Class: SQLConstructor::BasicDelete

Inherits:
GenericQuery show all
Defined in:
lib/sqlconstructor.rb

Overview

Internal class which represents a basic DELETE statement.

Direct Known Subclasses

BasicDelete_mysql

Constant Summary collapse

METHODS =
{ 
                :using => QAttr.new( :name => 'del_using', :text => 'USING', :val => SQLObject ),
                :where => QAttr.new( :name => 'attr_where', :text => 'WHERE', :val => SQLConditional),
                :from  => QAttr.new( :name => 'attr_from',  :text => 'FROM',  :val => SQLAliasedList),
                :first => QAttr.new( :name => 'attr_first', :text => 'FIRST', :val => SQLObject ),
                :skip  => QAttr.new( :name => 'attr_skip',  :text => 'SKIP',  :val => SQLObject ),
                :order_by => QAttr.new( :name => 'attr_order_by', :text => 'ORDER BY', 
                      :val => SQLObject ),
                :order_by_asc  => QAttr.new( :name => 'attr_order_by_order', :text => 'ASC' ),
                :order_by_desc => QAttr.new( :name => 'attr_order_by_order', :text => 'DESC' )
}

Instance Attribute Summary collapse

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) ⇒ BasicDelete

Class constructor.

_caller     - the caller object


630
631
632
# File 'lib/sqlconstructor.rb', line 630

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

#attr_firstObject

Returns the value of attribute attr_first.



611
612
613
# File 'lib/sqlconstructor.rb', line 611

def attr_first
  @attr_first
end

#attr_fromObject

Returns the value of attribute attr_from.



611
612
613
# File 'lib/sqlconstructor.rb', line 611

def attr_from
  @attr_from
end

#attr_order_byObject

Returns the value of attribute attr_order_by.



611
612
613
# File 'lib/sqlconstructor.rb', line 611

def attr_order_by
  @attr_order_by
end

#attr_order_by_orderObject

Returns the value of attribute attr_order_by_order.



611
612
613
# File 'lib/sqlconstructor.rb', line 611

def attr_order_by_order
  @attr_order_by_order
end

#attr_skipObject

Returns the value of attribute attr_skip.



611
612
613
# File 'lib/sqlconstructor.rb', line 611

def attr_skip
  @attr_skip
end

#attr_whereObject

Returns the value of attribute attr_where.



611
612
613
# File 'lib/sqlconstructor.rb', line 611

def attr_where
  @attr_where
end

#del_usingObject

Returns the value of attribute del_using.



611
612
613
# File 'lib/sqlconstructor.rb', line 611

def del_using
  @del_using
end