diff options
author | drh <> | 2024-12-16 13:25:49 +0000 |
---|---|---|
committer | drh <> | 2024-12-16 13:25:49 +0000 |
commit | bd1a5932d9fe3b9b75a6cf22bb7e96063f28ccec (patch) | |
tree | de29a23240c2ac4c315f47bc4c8a4d513f4b62c3 /src/pager.h | |
parent | 276172e4a3cb1ca03e6b498776b735378030efdb (diff) | |
download | sqlite-bd1a5932d9fe3b9b75a6cf22bb7e96063f28ccec.tar.gz sqlite-bd1a5932d9fe3b9b75a6cf22bb7e96063f28ccec.zip |
Changes for better alignment with the wal2 branch.
FossilOrigin-Name: 4fab85b3d0d1cad2d185f2456de7ddf281badf8561cc051e10e16655441dcc84
Diffstat (limited to 'src/pager.h')
-rw-r--r-- | src/pager.h | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/pager.h b/src/pager.h index 7ef9a237a..9b2cfc0bc 100644 --- a/src/pager.h +++ b/src/pager.h @@ -83,6 +83,22 @@ typedef struct PgHdr DbPage; #define PAGER_JOURNALMODE_MEMORY 4 /* In-memory journal file */ #define PAGER_JOURNALMODE_WAL 5 /* Use write-ahead logging */ +#define isWalMode(x) ((x)==PAGER_JOURNALMODE_WAL) + +/* +** The argument to this macro is a file descriptor (type sqlite3_file*). +** Return 0 if it is not open, or non-zero (but not 1) if it is. +** +** This is so that expressions can be written as: +** +** if( isOpen(pPager->jfd) ){ ... +** +** instead of +** +** if( pPager->jfd->pMethods ){ ... +*/ +#define isOpen(pFd) ((pFd)->pMethods!=0) + /* ** Flags that make up the mask passed to sqlite3PagerGet(). */ |