Menu

#327 CUBRID python driver should support SET types (LIST/SET/MULTISET) in prepared statements

open
nobody
None
5
2012-10-20
2012-10-20
Jira Trac
No

If you want to execute a query in a table containing a SET, LIST or MULTISET data type, then the prepared query in python does not work.

Example:
{code}
CREATE TABLE set_tbl ( col_1 set(int, CHAR(1)));
{code}

More information is here:
http://www.cubrid.org/manual/841/en/Collection%20Types-SET

For example if you want to execute this query:
{code}
INSERT INTO set_tbl VALUES ({3,3,3,2,2,1,0,'c','c','c','b','b','a'});
{code}

you cannot do it using prepared statements.

{code}
insert into set_tbl values (?);
{code}

with parameters given to execute command: ({3,3,3,2,2,1,0,'c','c','c','b','b','a'},) give out an error that cannot convert the set data type. Same problem occurs for list data type or if you use set instead of brackets in the python code when giving the parameters.

Discussion

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.