[Nitro] [oree.ch] Patchset #1
mneumann at ntecs.de
Mon Feb 13 06:26:28 EST 2006
Am 13.02.2006 um 09:43 schrieb zimba.tm:
> On Sunday 12 February 2006 23:51, Michael Neumann wrote:
> How about additional keywords that are dependent of the database,
> like mysql's
> auto_incerment or UNSIGNED ?
I guess this can be done with the existing implementation using
:extra_sql (I don't remember the correct keyword).
With :sql_type, you could write:
property :age, Integer, :sql_type => "UNSIGNED INT"
property :myid, Integer, :extra_sql => 'auto_increment'
Even with :sql_type, we wouldn't need :length or :limit at all as we
property :name, String, :sql_type => "VARCHAR(256)"
But then, we could do everything directly with:
property :name, String, :sql => "VARCHAR(256) DEFAULT '' NOT NULL"
More information about the Nitro-general