Is there support for the postgresql data type array? (or SQL Array)?

I have a query like like this...

DB.execute('UPDATE tests SET year[1] = year[1] + month[1] WHERE
month[1] > 0)

also

DB.fetch("SELECT user_id, year[1] AS value FROM stats WHERE year[1] >
0 ")

Because I can't see how to specify an array element in the filter
statement. obviously this doesn't work...

stats.filter(:year[1] > 0)

It would be nice to be able to use the filter or group or join stuff
though with arrays.

Also it would be nice to be able to do something like...

stats= DB[:stats]
stats << { :year => [1,2,3,4]}

and have it generate the sql... INSERT INTO stats (year) VALUES
('{1,2,3,4}')

for instance

Thanks

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"sequel-talk" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/sequel-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to