Class: Ronin::Code::SQL::Insert
- Defined in:
- lib/ronin/code/sql/insert.rb
Instance Attribute Summary
Attributes inherited from Statement
Instance Method Summary collapse
- #emit ⇒ Object
-
#initialize(dialect, table = nil, options = {}, &block) ⇒ Insert
constructor
A new instance of Insert.
- #table(name = nil) ⇒ Object
Methods inherited from Statement
clause_order, clauses, #get_clause, #has_clause?, has_clause?
Methods inherited from Expr
Constructor Details
#initialize(dialect, table = nil, options = {}, &block) ⇒ Insert
Returns a new instance of Insert.
36 37 38 39 40 |
# File 'lib/ronin/code/sql/insert.rb', line 36 def initialize(dialect,table=nil,={},&block) @table = table super(dialect,,&block) end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class Ronin::Code::SQL::Statement
Instance Method Details
#emit ⇒ Object
47 48 49 |
# File 'lib/ronin/code/sql/insert.rb', line 47 def emit emit_token('INSERT INTO') + emit_value(@table) + super end |
#table(name = nil) ⇒ Object
42 43 44 45 |
# File 'lib/ronin/code/sql/insert.rb', line 42 def table(name=nil) @table = name if name return @table end |