class Sequel::Postgres::PGArray::Creator
Callable object that takes the input string and parses it using Parser
.
Attributes
converter[R]
The converter callable that is called on each member of the array to convert it to the correct type.
type[R]
The database type to set on the PGArray
instances returned.
Public Class Methods
new(type, converter=nil)
click to toggle source
Set the type and optional converter callable that will be used.
# File lib/sequel/extensions/pg_array.rb 409 def initialize(type, converter=nil) 410 @type = type 411 @converter = converter 412 end
Public Instance Methods
call(string)
click to toggle source
:nocov: Use sequel_pg's C-based parser if it has already been defined.
# File lib/sequel/extensions/pg_array.rb 417 def call(string) 418 PGArray.new(Sequel::Postgres.parse_pg_array(string, @converter), @type) 419 end