class Sequel::Postgres::PGArray::Creator

  1. lib/sequel/extensions/pg_array.rb
Superclass: Object

Callable object that takes the input string and parses it using Parser.

Methods

Public Class

  1. new

Public Instance

  1. call
  2. converter
  3. type

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)

Set the type and optional converter callable that will be used.

[show source]
    # File lib/sequel/extensions/pg_array.rb
431 def initialize(type, converter=nil)
432   @type = type
433   @converter = converter
434 end

Public Instance methods

call(string)

:nocov: Use sequel_pg’s C-based parser if it has already been defined.

[show source]
    # File lib/sequel/extensions/pg_array.rb
439 def call(string)
440   PGArray.new(Sequel::Postgres.parse_pg_array(string, @converter), @type)
441 end