monetdblite: Is it possible to configure "monetdb_query" to run multiple statements?

61 Views Asked by At

I am trying to run the following script

"create table T1(i int); create table T2(i int);" 

in a fresh new database using MonetDBLite C and its "monetdb_query" API, but "monetdb_query" function seems to execute only first statement.

Is it any way I can run the whole script (dot-comma separated valid statements) at once (ideally in the same transaction)?

Thank you,

1

There are 1 best solutions below

2
Hannes Mühleisen On

Not as far as I know, sorry. Happy to review a PR though. Main problem is that multiple queries might produce multiple result sets, which would greatly complicate the API. But if all you're after is the execution and you don't care about the result this can be done with some minor hacking. Try calling monetdb_query_internal with a lowercase 's' as last parameter.