Method: OrientSupport::MatchConnection#compose

Defined in:
lib/support/orientquery.rb

#composeObject Also known as: to_s



179
180
181
182
183
184
185
186
187
188
# File 'lib/support/orientquery.rb', line 179

def compose
where_statement =( where.nil? || where.size <5 ) ? nil : "where: ( #{ generate_sql_list( @q[:where] ) })"
while_statement =( while_s.nil? || while_s.size <5) ? nil : "while: ( #{ generate_sql_list( @q[:while] )})"

ministatement = "{"+ [ as, where_statement, while_statement, max_depth].compact.join(', ') + "}"
ministatement = "" if ministatement=="{}"

 (1 .. count).map{|x| direction }.join("") + ministatement

end