我可以在JDO环境中直接执行SQL语句吗?
我在 HSqlDb 之上使用 Datanucleus JDO。
我想执行以下SQL语句来告诉HsqlDb将写入延迟设置为0:
“SET WRITE_DELAY 0”
有没有办法可以从 JDO PersistenceManager 或 PersistenceManagerFactory 执行此操作?
旁注:我尝试使用以下连接 URL 修改 write_delay: jdbc:hsqldb:file:data/hsqldb/dbbench;write_delay=false
它不起作用。我调试了 HsqlDb 源,仍然可以看到写入延迟设置为 10 秒。
I am using Datanucleus JDO on top of HSqlDb.
I would like to execute the following SQL statement to tell HsqlDb to set the write delay to 0:
"SET WRITE_DELAY 0"
Is there a way I can do this from a JDO PersistenceManager or a PersistenceManagerFactory?
On a sidenote: I have tried to modify write_delay by using the following connection URL:
jdbc:hsqldb:file:data/hsqldb/dbbench;write_delay=false
It didn't work. I debugged the HsqlDb sources and I could still see the write delay being set to 10 seconds.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
我想我已经找到了一个适合我的解决方案:
I think I have found a solution that will work for me:
您可以编写一个启动脚本(本示例中为 dbbench.script),并将 SQL 放入其中。
请参阅:http://best-practice- software-engineering.ifs.tuwien.ac.at/technology/tech-hsqldb.html
You can write a startup script, dbbench.script in this example, and put the SQL in there.
See: http://best-practice-software-engineering.ifs.tuwien.ac.at/technology/tech-hsqldb.html
我认为这个页面
http://www.datanucleus.org/products/accessplatform/jdo/datastore_connection。 html
告诉所有需要的。不 ?
I think this page
http://www.datanucleus.org/products/accessplatform/jdo/datastore_connection.html
tells all needed. No ?