Lines Matching refs:LMDB_IT
37 #define LMDB_IT(it) (((struct php_lmdb_info *)info->dbf)->it) macro
94 rc = mdb_dbi_open(txn, NULL, 0, &LMDB_IT(dbi)); in DBA_OPEN_FUNC()
102 LMDB_IT(env) = env; in DBA_OPEN_FUNC()
103 LMDB_IT(txn) = txn; in DBA_OPEN_FUNC()
105 mdb_txn_abort(LMDB_IT(txn)); in DBA_OPEN_FUNC()
112 mdb_dbi_close(LMDB_IT(env), LMDB_IT(dbi)); in DBA_CLOSE_FUNC()
113 mdb_env_close(LMDB_IT(env)); in DBA_CLOSE_FUNC()
124 if (LMDB_IT(cur)) { in DBA_FETCH_FUNC()
125 rc = mdb_txn_renew(LMDB_IT(txn)); in DBA_FETCH_FUNC()
127 rc = mdb_txn_begin(LMDB_IT(env), NULL, MDB_RDONLY, &LMDB_IT(txn)); in DBA_FETCH_FUNC()
137 rc = mdb_get(LMDB_IT(txn), LMDB_IT(dbi), &k, &v); in DBA_FETCH_FUNC()
142 mdb_txn_abort(LMDB_IT(txn)); in DBA_FETCH_FUNC()
151 if (LMDB_IT(cur)) { in DBA_FETCH_FUNC()
152 mdb_txn_reset(LMDB_IT(txn)); in DBA_FETCH_FUNC()
154 mdb_txn_abort(LMDB_IT(txn)); in DBA_FETCH_FUNC()
165 rc = mdb_txn_begin(LMDB_IT(env), NULL, 0, &LMDB_IT(txn)); in DBA_UPDATE_FUNC()
176 rc = mdb_put(LMDB_IT(txn), LMDB_IT(dbi), &k, &v, mode == 1 ? MDB_NOOVERWRITE : 0); in DBA_UPDATE_FUNC()
181 mdb_txn_abort(LMDB_IT(txn)); in DBA_UPDATE_FUNC()
185 rc = mdb_txn_commit(LMDB_IT(txn)); in DBA_UPDATE_FUNC()
188 mdb_txn_abort(LMDB_IT(txn)); in DBA_UPDATE_FUNC()
200 if (LMDB_IT(cur)) { in DBA_EXISTS_FUNC()
201 rc = mdb_txn_renew(LMDB_IT(txn)); in DBA_EXISTS_FUNC()
203 rc = mdb_txn_begin(LMDB_IT(env), NULL, MDB_RDONLY, &LMDB_IT(txn)); in DBA_EXISTS_FUNC()
213 rc = mdb_get(LMDB_IT(txn), LMDB_IT(dbi), &k, &v); in DBA_EXISTS_FUNC()
218 mdb_txn_abort(LMDB_IT(txn)); in DBA_EXISTS_FUNC()
222 if (LMDB_IT(cur)) { in DBA_EXISTS_FUNC()
223 mdb_txn_reset(LMDB_IT(txn)); in DBA_EXISTS_FUNC()
225 mdb_txn_abort(LMDB_IT(txn)); in DBA_EXISTS_FUNC()
236 rc = mdb_txn_begin(LMDB_IT(env), NULL, 0, &LMDB_IT(txn)); in DBA_DELETE_FUNC()
245 rc = mdb_del(LMDB_IT(txn), LMDB_IT(dbi), &k, NULL); in DBA_DELETE_FUNC()
247 rc = mdb_txn_commit(LMDB_IT(txn)); in DBA_DELETE_FUNC()
250 mdb_txn_abort(LMDB_IT(txn)); in DBA_DELETE_FUNC()
258 mdb_txn_abort(LMDB_IT(txn)); in DBA_DELETE_FUNC()
268 rc = mdb_txn_begin(LMDB_IT(env), NULL, MDB_RDONLY, &LMDB_IT(txn)); in DBA_FIRSTKEY_FUNC()
274 rc = mdb_cursor_open(LMDB_IT(txn), LMDB_IT(dbi), &LMDB_IT(cur)); in DBA_FIRSTKEY_FUNC()
276 mdb_txn_abort(LMDB_IT(txn)); in DBA_FIRSTKEY_FUNC()
281 rc = mdb_cursor_get(LMDB_IT(cur), &k, &v, MDB_FIRST); in DBA_FIRSTKEY_FUNC()
283 mdb_txn_abort(LMDB_IT(txn)); in DBA_FIRSTKEY_FUNC()
284 mdb_cursor_close(LMDB_IT(cur)); in DBA_FIRSTKEY_FUNC()
285 LMDB_IT(cur) = NULL; in DBA_FIRSTKEY_FUNC()
297 mdb_txn_reset(LMDB_IT(txn)); in DBA_FIRSTKEY_FUNC()
308 rc = mdb_txn_renew(LMDB_IT(txn)); in DBA_NEXTKEY_FUNC()
314 rc = mdb_cursor_get(LMDB_IT(cur), &k, &v, MDB_NEXT); in DBA_NEXTKEY_FUNC()
316 mdb_txn_abort(LMDB_IT(txn)); in DBA_NEXTKEY_FUNC()
317 mdb_cursor_close(LMDB_IT(cur)); in DBA_NEXTKEY_FUNC()
318 LMDB_IT(cur) = NULL; in DBA_NEXTKEY_FUNC()
330 mdb_txn_reset(LMDB_IT(txn)); in DBA_NEXTKEY_FUNC()
344 rc = mdb_env_sync(LMDB_IT(env), 1); in DBA_SYNC_FUNC()