HSQLDB:关闭连接后删除所有创建的文件的简单方法?

发布于 2024-09-11 21:57:03 字数 343 浏览 2 评论 0原文

我有一个应用程序/工具,它从 CSV 文件读取并写入另一个文件,并使用 HSQLDB 对其进行处理。

我希望将 CSV 文件作为唯一的输出,并且数据库文件应该在该过程完成后消失。

  • 我尝试使用 mem 存储,但这会阻止 HSQLDB 写入 CSV 文件。
  • 我还尝试在关闭连接之前删除 SCHEMA,但这不会删除文件。
  • 我不喜欢手动删除文件,因为这是特定于 HSQLDB 实现的,并且可能会随着时间的推移而改变。

有没有一些系统性的方法可以只保留 CSV 文件? 理想情况下,我想要一些选项,允许 HSQLDB 在使用内存存储时写入 CSV 文件。

I have an app/tool which reads from a CSV file and writes to another, processing it using HSQLDB.

I want to have the CSV file as the only output, and the database files should disappear after the process finishes.

  • I tried to use mem storage, but that prevents HSQLDB to write to the CSV file.
  • I also tried to DROP SCHEMA before closing the connection, but that does not remove the files.
  • I don't like deleting the files manually, as that's HSQLDB implementation-specific and can change over time.

Is there some systemic way to leave only the CSV file?
Ideally, I'd like some option which would allow HSQLDB to write CSV file while using in-memory storage.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

栩栩如生 2024-09-18 21:57:03

HSQLDB 从不删除自己的文件。 减少文件数量

您可以使用SET FILES LOG FALSE

HSQLDB never deletes its own files. You can reduce the number of files by using

SET FILES LOG FALSE

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文