lib/support.rb
  from can either be a Databaseclass to operate on or a Subquery providing data to query further
from can either be a Databaseclass to operate on or a Subquery providing data to query further
from can either be a Databaseclass to operate on or a Subquery providing data to query further
def from arg = nil
      if arg.present?
	@database = case arg
		    when ActiveOrient::Model   
		      arg.rrid
		    when OrientQuery	      
		      ' ( '+ arg.to_s + ' ) '
		    when Class
		      arg.ref_name
		    else
		      if arg.to_s.rid?	  
			arg
		      else		  
			arg.to_s  
		      end
		    end
	compose  
      else 
	"from #{@database}" unless @database.nil?
      end
    end
def from arg = nil if arg . present? @database = case arg when ActiveOrient :: Model arg . rrid when OrientQuery ' ( ' + arg . to_s + ' ) ' when Class arg . ref_name else if arg . to_s . rid? arg else arg . to_s end end compose else "from #{@database}" unless @database . nil? end end
from can either be a Databaseclass to operate on or a Subquery providing data to query further
from can either be a Databaseclass to operate on or a Subquery providing data to query further
# a single record # result of a query # a string with "#ab:cd" # a databas-class-name # return the complete query # read from
arg
<not_specific>