[Nitro] Og: Custom selects

George Moschovitis george.moschovitis at gmail.com
Mon Jun 6 05:56:00 EDT 2005


Hello Michael,

Document.table

Returns the table used to map this class. I am thinking about changin
this to schema (to be more compatible with non-sql backends).

As for the custom SQL statement. It seems that during the redesign of
Og I forgot to to include the older 'select' method.

If you can't wait here is how to do it:

	def select(sql, options)	
		klass = options[:class]
		read_all(query(sql), klass, options[:include])
	end

An alternative api will be:

store.find(:sql => "SELECT * FROM #{Klass.table}", :class => Klass)

I 'll add both methods right now, you will be able to find the updated
code in the svn repository.

regards,
-g.



On 6/6/05, Michael Neumann <mneumann at ntecs.de> wrote:
> Hi,
> ...
>   Michael


-- 
http://nitro.rubyforge.org
http://www.joy.gr




More information about the Nitro-general mailing list