Module: Imparcial::Driver::AbstractExpression::Insert
- Included in:
- Imparcial::Driver::AbstractExpression
- Defined in:
- lib/imparcial/driver/abstract/expression/insert.rb
Instance Method Summary collapse
-
#insert(options = {}) ⇒ Object
Description Insert some records.
Instance Method Details
#insert(options = {}) ⇒ Object
Description
Insert some records.
Usage
abstract_adapter.insert :table_name => ‘person’, :values => => 1, :name => ‘ronaldinho’
Options
-
:table_name
-
:values
Returning
nothing
30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 |
# File 'lib/imparcial/driver/abstract/expression/insert.rb', line 30 def insert ( = {} ) , sql = sql_for_inserting( ) logger.warn sql if @insert_logging query sql rescue adapter_specific_exception => ex raise InsertError.new(ex.) end |