I am converting an existing schema into the sqlalchemy database
description metadata format. Is there a sqlalchemy type for the SQL
array type?
CREATE TABLE sal_emp (
name text,
pay_by_quarter integer[],
schedule text[][]
);
as described here: http://www.postgresql.org/docs/8/interactive/
arrays.html
I could find nothing in the documentation regarding this. My guess
is that I could support this by subclassing types.TypeDecorator, and
adding pre- and post-processing of query parameters (http://
www.sqlalchemy.org/docs/types.myt#types_custom) to convert a python
list to and from a string, for example. (I would probably have to
use 'eval()' on the way out of the db, though.)
Thanks,
Dimi
-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems? Stop! Download the new AJAX search engine that makes
searching your log files as easy as surfing the web. DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642
_______________________________________________
Sqlalchemy-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/sqlalchemy-users