Class: SQB::Base
Instance Attribute Summary collapse
-
#options ⇒ Object
readonly
Returns the value of attribute options.
-
#prepared_arguments ⇒ Object
readonly
Returns the value of attribute prepared_arguments.
Instance Method Summary collapse
-
#initialize(table_name, options = {}, &block) ⇒ Base
constructor
A new instance of Base.
-
#to_sql ⇒ String
Generate the full SQL query for this query.
Constructor Details
#initialize(table_name, options = {}, &block) ⇒ Base
Returns a new instance of Base.
12 13 14 15 16 17 |
# File 'lib/sqb/base.rb', line 12 def initialize(table_name, = {}, &block) @table_name = table_name @options = @prepared_arguments = [] block.call(self) if block_given? end |
Instance Attribute Details
#options ⇒ Object (readonly)
Returns the value of attribute options.
10 11 12 |
# File 'lib/sqb/base.rb', line 10 def @options end |
#prepared_arguments ⇒ Object (readonly)
Returns the value of attribute prepared_arguments.
9 10 11 |
# File 'lib/sqb/base.rb', line 9 def prepared_arguments @prepared_arguments end |
Instance Method Details
#to_sql ⇒ String
Generate the full SQL query for this query.
22 23 |
# File 'lib/sqb/base.rb', line 22 def to_sql end |