Class Sequel::Postgres::AutoParameterize::StringWithArray
In: lib/sequel/extensions/pg_auto_parameterize.rb
Parent: ::String

String that holds an array of parameters

Methods

add_arg   inspect  

Attributes

args  [R]  The array of parameters used by this query.

Public Instance methods

Add a new parameter to this query, which adds the parameter to the array of parameters, and an SQL placeholder to the query itself.

[Source]

    # File lib/sequel/extensions/pg_auto_parameterize.rb, line 75
75:         def add_arg(s, type)
76:           @args ||= []
77:           @args << s
78:           self << "$#{@args.length}::#{type}"
79:         end

Show args when the string is inspected

[Source]

    # File lib/sequel/extensions/pg_auto_parameterize.rb, line 82
82:         def inspect
83:           @args ? "#{self}; #{@args.inspect}".inspect : super
84:         end

[Validate]