简体   繁体   English

monetdblite:是否可以配置“ monetdb_query”以运行多个语句?

[英]monetdblite: Is it possible to configure “monetdb_query” to run multiple statements?

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. 在使用MonetDBLite C及其“ monetdb_query” API的全新数据库中,但“ monetdb_query”函数似乎仅执行第一条语句。

Is it any way I can run the whole script (dot-comma separated valid statements) at once (ideally in the same transaction)? 我可以以某种方式(最好在同一事务中)一次运行整个脚本(用逗号分隔的有效语句)吗?

Thank you, 谢谢,

Not as far as I know, sorry. 据我所知,抱歉。 Happy to review a PR though. 很高兴审查PR。 Main problem is that multiple queries might produce multiple result sets, which would greatly complicate the API. 主要问题是,多个查询可能会产生多个结果集,这将使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. 尝试使用小写的“ s”作为最后一个参数调用monetdb_query_internal

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM