SQLITE源码剖析(17)

声明:本SQLite源码剖析系列为刘兴(http://deepfuture.iteye.com/)原创,未经笔者授权,任何人和机构不能转载  

** CAPI3REF: File Locking Levels

**文件锁,SQLITE使用这些整数值中的一个做为第2个参数调用sqlite3_io_methods对象的xlock()和xUunlock()方法

** SQLite uses one of these integer values as the second

** argument to calls it makes to the xLock() and xUnlock() methods

** of an [sqlite3_io_methods] object.

*/

#define SQLITE_LOCK_NONE          0

#define SQLITE_LOCK_SHARED        1

#define SQLITE_LOCK_RESERVED      2

#define SQLITE_LOCK_PENDING       3

#define SQLITE_LOCK_EXCLUSIVE     4

 

/*

** CAPI3REF: Synchronization Type Flags

**同步标志

** When SQLite invokes the xSync() method of an

** [sqlite3_io_methods] object it uses a combination of

** these integer values as the second argument.

**sqlite3_io_methods对象的xSync()方法使用这些整数值做为第2个参数

** When the SQLITE_SYNC_DATAONLY flag is used, it means that the

** sync operation only needs to flush data to mass storage.  Inode

** information need not be flushed. If the lower four bits of the flag

**SQLITE_SYNC_DATAONLY标志表示同步操作仅需要用于更新数据在主存区,索引信息不需要更新,如果flag的最低4位为SQLITE_SYNC_NORMAL,则使用fsync()。如果低4位为SQLITE_SYNC_FULL,则使用Mac OS X的fullsync替代fsync()

** equal SQLITE_SYNC_NORMAL, that means to use normal fsync() semantics.

** If the lower four bits equal SQLITE_SYNC_FULL, that means

** to use Mac OS X style fullsync instead of fsync().

*/

#define SQLITE_SYNC_NORMAL        0x00002

#define SQLITE_SYNC_FULL          0x00003

#define SQLITE_SYNC_DATAONLY      0x00010

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值