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, line 446 def initialize(type, converter=nil) @type = type @converter = converter 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, line 454 def call(string) PGArray.new(Sequel::Postgres.parse_pg_array(string, @converter), @type) end