Method: OrientSupport::OrientQuery#projection

Defined in:
lib/support/orientquery.rb

#projection(value = nil) ⇒ Object

:nodoc:



548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
# File 'lib/support/orientquery.rb', line 548

def projection value= nil  # :nodoc:
	if value.present?
		@q[:projection] << value
		self
	elsif  @q[:projection].present?
		@q[:projection].compact.map do | s |
			case s
			when ::Array
				s.join(', ')
			when String, Symbol
				s.to_s
			when ::Hash
				s.map{ |x,y| "#{x} as #{y}"}.join( ', ')
			end
		end.join( ', ' )
	end
end