Class: SQLConstructor::BasicInsert_mysql

Inherits:
BasicInsert show all
Defined in:
lib/dialects/mysql-constructor.rb

Overview

MySQL dialect descendant of BasicInsert class

Constant Summary collapse

METHODS =
{
 :low_priority  => SQLConstructor::QAttr.new( :name => 'ins_priority', :text => 'LOW_PRIORITY' ),
 :delayed       => SQLConstructor::QAttr.new( :name => 'ins_priority', :text => 'DELAYED'       ),
 :high_priority => SQLConstructor::QAttr.new( :name => 'ins_priority', :text => 'HIGH_PRIORITY' ),
 :quick         => SQLConstructor::QAttr.new( :name => 'ins_quick',    :text => 'QUICK'         ),
 :ignore        => SQLConstructor::QAttr.new( :name => 'ins_ignore',   :text => 'IGNORE'        ),
 :on_duplicate_key_update => SQLConstructor::QAttr.new( 
                               :name => 'ins_on_duplicate_key_update', 
                               :text => 'ON DUPLICATE KEY UPDATE',
                               :val  => SQLConditional
                             )
}

Instance Attribute Summary collapse

Attributes inherited from BasicInsert

#ins_columns, #ins_into, #ins_select, #ins_set, #ins_values

Attributes inherited from GenericQuery

#attr_index_hints, #caller, #child_caller, #dialect, #exporter, #string, #tidy, #type

Attributes inherited from SQLObject

#alias, #inline, #name, #separator

Instance Method Summary collapse

Methods inherited from GenericQuery

#_get, #_remove, #method_missing, #to_s, #to_str

Methods inherited from SQLObject

#_name, #_string, #_string=, get, #to_s

Constructor Details

#initialize(_caller) ⇒ BasicInsert_mysql

Class constructor.

_caller     - the caller object


135
136
137
# File 'lib/dialects/mysql-constructor.rb', line 135

def initialize ( _caller )
    super
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class SQLConstructor::GenericQuery

Instance Attribute Details

#ins_ignoreObject (readonly)

Returns the value of attribute ins_ignore.



116
117
118
# File 'lib/dialects/mysql-constructor.rb', line 116

def ins_ignore
  @ins_ignore
end

#ins_on_duplicate_key_updateObject (readonly)

Returns the value of attribute ins_on_duplicate_key_update.



116
117
118
# File 'lib/dialects/mysql-constructor.rb', line 116

def ins_on_duplicate_key_update
  @ins_on_duplicate_key_update
end

#ins_priorityObject (readonly)

Returns the value of attribute ins_priority.



116
117
118
# File 'lib/dialects/mysql-constructor.rb', line 116

def ins_priority
  @ins_priority
end

#ins_quickObject (readonly)

Returns the value of attribute ins_quick.



116
117
118
# File 'lib/dialects/mysql-constructor.rb', line 116

def ins_quick
  @ins_quick
end