[Nitro] [PATCH] og-aggregate-type-casting

Lars Olsson lasso at lassoweb.nu
Sun Apr 16 07:00:42 EDT 2006


Hi,

The sqlite-ruby libs already supports automatic type translation by 
themselves. Just use:

<code>
dbname.type_translation = true
</code>

before querying.

The sqlite-ruby lib can translate the following column types to ruby 
classes automatically (by help of it's Translator class, see 
http://sqlite-ruby.rubyforge.org/classes/SQLite/Translator.html):

BOOLEAN
INTEGER
BIT
DEC
TIME
DATE
TIMESTAMP
BIGINT
INT
MEDIUMINT
DOUBLE
NUMERIC
DECIMAL
TINYINT
SMALLINT
REAL
FIXED
DATETIME
BOOL
FLOAT

Shouldn't Og use the existing functionality instead?

Kindly

/Lars Olsson

________________________________________
Lars Olsson
lasso at lassoweb.nu
http://www.lassoweb.nu/



Bryan Soto skrev:
> You won't be impressed, I guarantee that. All it does is ensure dates
> and times are restored properly. I only called it type_cast because it
> seemed like an appropriate name. But it at least fixes the bug in the
> ticket.
> 
> On 4/13/06, George Moschovitis <george.moschovitis at gmail.com> wrote:
>> Nice ;-) havent seen the implementation though...
>>
>> -g.
>>
>> On 4/13/06, Bryan Soto <bryan.a.soto at gmail.com> wrote:
>>> * og-aggregate-type-casting
>>> Patch adds a new method, #type_cast, which ensures dates and times are returne
>>> d as instances of Date and Time. Adds tests to tc_aggregations_calculations.rb.
>>>
>>> ~~~~~
>>>
>>> Patch adds support and tests for the ticket at
>>> http://devlab.oree.ch/trac/nitrohq/ticket/19
>>>
>>> --
>>> "Never tell people how to do things. Tell them what to do and they
>>> will surprise you with their ingenuity." —General George S. Patton
>>>
>>>
>>> _______________________________________________
>>> Nitro-general mailing list
>>> Nitro-general at rubyforge.org
>>> http://rubyforge.org/mailman/listinfo/nitro-general
>>>
>>>
>>>
>>
>> --
>> http://www.gmosx.com
>> http://www.navel.gr
>> http://www.nitrohq.com
>>
>> _______________________________________________
>> Nitro-general mailing list
>> Nitro-general at rubyforge.org
>> http://rubyforge.org/mailman/listinfo/nitro-general
>>
> 
> 
> --
> "Never tell people how to do things. Tell them what to do and they
> will surprise you with their ingenuity." —General George S. Patton
> 
> _______________________________________________
> Nitro-general mailing list
> Nitro-general at rubyforge.org
> http://rubyforge.org/mailman/listinfo/nitro-general
> 



More information about the Nitro-general mailing list