如何在java程序中实现SQLite的Write-Ahead Logging [英] How to implement Write-Ahead Logging of SQLite in java program

查看:200
本文介绍了如何在java程序中实现SQLite的Write-Ahead Logging的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想在j2se程式中使用SQLite的预先记录功能。
请帮助我一个java实现示例。

I want to use the Write-Ahead Logging feature of SQLite in a j2se program. Please help me with a java implemention example.

推荐答案

您需要执行一个Sqlite特定的命令'd执行其他SQL查询):

You need to execute a Sqlite specific command (just like you'd execute other SQL queries):

pragma journal_mode=wal

有关使用此编译指示的详细信息,请参阅 http://www.sqlite.org/pragma.html#pragma_journal_mode

For the specifics of using this pragma, please read http://www.sqlite.org/pragma.html#pragma_journal_mode

以下是一些亮点:


  • 您的Sqlite库必须> = 3.7.0。

  • 此journal_mode是持久性的如果您想要使用< 3.7.0 Sqlite。

这篇关于如何在java程序中实现SQLite的Write-Ahead Logging的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆