lib/query.rb
  Output the compiled query
  Parameter: destination (rest, batch )
  If the query is submitted via the REST-Interface (as get-command), the limit parameter is extracted.
Output the compiled query
Parameter: destination (rest, batch )
If the query is submitted via the REST-Interface (as get-command), the limit parameter is extracted.
Output the compiled query Parameter : destination ( rest batch ) If the query is submitted via the REST - Interface ( as get - command ) the limit parameter is extracted .
def compose(destination: :batch)
			if kind.to_sym == :update
				return_statement = "return after " + ( @q[:aliases].empty? ?  "$current" : @q[:aliases].first.to_s)
				[ 'update', target, set, remove, return_statement , where, limit ].compact.join(' ')
			elsif kind.to_sym == :update!
				[ 'update', target, set,  where, limit, misc ].compact.join(' ')
			elsif kind.to_sym == :upsert
        set(  generate_sql_list( @q[:where] ){ @fill || 'and' } ) if set.nil?
				return_statement = "return after " + ( @q[:aliases].empty? ?  "$current" : @q[:aliases].first.to_s)
				[ "update", target, set,"upsert",  return_statement , where, limit, misc  ].compact.join(' ')
			elsif destination == :rest
				[ kind, projection, from, let, where, subquery,  misc, order, group_by, unwind, skip].compact.join(' ')
			else
				[ kind, projection, from, let, where, subquery,  while_s,  misc, order, group_by, limit, unwind, skip].compact.join(' ')
			end
		end
def compose ( destination : :batch ) if kind . to_sym == :update return_statement = "return after " + ( @q [ :aliases ] . empty? ? "$current" : @q [ :aliases ] . first . to_s ) [ 'update' , target , set , remove , return_statement , where , limit ] . compact . join ( ' ' ) elsif kind . to_sym == :update! [ 'update' , target , set , where , limit , misc ] . compact . join ( ' ' ) elsif kind . to_sym == :upsert set ( generate_sql_list ( @q [ :where ] ) { @fill || 'and' } ) if set . nil? return_statement = "return after " + ( @q [ :aliases ] . empty? ? "$current" : @q [ :aliases ] . first . to_s ) [ "update" , target , set , "upsert" , return_statement , where , limit , misc ] . compact . join ( ' ' ) elsif destination == :rest [ kind , projection , from , let , where , subquery , misc , order , group_by , unwind , skip ] . compact . join ( ' ' ) else [ kind , projection , from , let , where , subquery , while_s , misc , order , group_by , limit , unwind , skip ] . compact . join ( ' ' ) end end
Output the compiled query
Parameter: destination (rest, batch )
If the query is submitted via the REST-Interface (as get-command), the limit parameter is extracted.
Output the compiled query Parameter : destination ( rest batch ) If the query is submitted via the REST - Interface ( as get - command ) the limit parameter is extracted .
#			elsif kind.to_sym == :create                                             # relict of orientdb #				[ "CREATE VERTEX", target, set ].compact.join(' ') #	[ kind, target, set,  return_statement ,where,  limit, misc ].compact.join(' ') #[ kind,  where, return_statement ].compact.join(' ')
destination