FIXME hopefully we can remove this
# File lib/arel/crud.rb, line 55 def compile_delete dm = DeleteManager.new @engine dm.wheres = @ctx.wheres dm.from @ctx.froms dm end
# File lib/arel/crud.rb, line 34 def compile_insert values im = create_insert im.insert values im end
# File lib/arel/crud.rb, line 5 def compile_update values um = UpdateManager.new @engine if Nodes::SqlLiteral === values relation = @ctx.from else relation = values.first.first.relation end um.table relation um.set values um.take @ast.limit.expr if @ast.limit um.order(*@ast.orders) um.wheres = @ctx.wheres um end
# File lib/arel/crud.rb, line 40 def create_insert InsertManager.new @engine end
# File lib/arel/crud.rb, line 62 def delete if $VERBOSE warn delete (#{caller.first}) is deprecated and will be removed in ARel 4.0.0. Pleaseswitch to `compile_delete` end @engine.connection.delete compile_delete.to_sql, 'AREL' end
FIXME: this method should go away
# File lib/arel/crud.rb, line 45 def insert values if $VERBOSE warn insert (#{caller.first}) is deprecated and will be removed in ARel 4.0.0. Pleaseswitch to `compile_insert` end @engine.connection.insert compile_insert(values).to_sql end
FIXME: this method should go away
# File lib/arel/crud.rb, line 22 def update values if $VERBOSE warn update (#{caller.first}) is deprecated and will be removed in ARel 4.0.0. Pleaseswitch to `compile_update` end um = compile_update values @engine.connection.update um.to_sql, 'AREL' end
Generated with the Darkfish Rdoc Generator 2.