Lines Matching refs:LMDB_IT
37 #define LMDB_IT(it) (((struct php_lmdb_info *)info->dbf)->it) macro
107 rc = mdb_dbi_open(txn, NULL, 0, &LMDB_IT(dbi)); in DBA_OPEN_FUNC()
115 LMDB_IT(env) = env; in DBA_OPEN_FUNC()
116 LMDB_IT(txn) = txn; in DBA_OPEN_FUNC()
118 mdb_txn_abort(LMDB_IT(txn)); in DBA_OPEN_FUNC()
125 mdb_dbi_close(LMDB_IT(env), LMDB_IT(dbi)); in DBA_CLOSE_FUNC()
126 mdb_env_close(LMDB_IT(env)); in DBA_CLOSE_FUNC()
137 if (LMDB_IT(cur)) { in DBA_FETCH_FUNC()
138 rc = mdb_txn_renew(LMDB_IT(txn)); in DBA_FETCH_FUNC()
140 rc = mdb_txn_begin(LMDB_IT(env), NULL, MDB_RDONLY, &LMDB_IT(txn)); in DBA_FETCH_FUNC()
150 rc = mdb_get(LMDB_IT(txn), LMDB_IT(dbi), &k, &v); in DBA_FETCH_FUNC()
155 mdb_txn_abort(LMDB_IT(txn)); in DBA_FETCH_FUNC()
163 if (LMDB_IT(cur)) { in DBA_FETCH_FUNC()
164 mdb_txn_reset(LMDB_IT(txn)); in DBA_FETCH_FUNC()
166 mdb_txn_abort(LMDB_IT(txn)); in DBA_FETCH_FUNC()
177 rc = mdb_txn_begin(LMDB_IT(env), NULL, 0, &LMDB_IT(txn)); in DBA_UPDATE_FUNC()
188 rc = mdb_put(LMDB_IT(txn), LMDB_IT(dbi), &k, &v, mode == 1 ? MDB_NOOVERWRITE : 0); in DBA_UPDATE_FUNC()
193 mdb_txn_abort(LMDB_IT(txn)); in DBA_UPDATE_FUNC()
197 rc = mdb_txn_commit(LMDB_IT(txn)); in DBA_UPDATE_FUNC()
200 mdb_txn_abort(LMDB_IT(txn)); in DBA_UPDATE_FUNC()
212 if (LMDB_IT(cur)) { in DBA_EXISTS_FUNC()
213 rc = mdb_txn_renew(LMDB_IT(txn)); in DBA_EXISTS_FUNC()
215 rc = mdb_txn_begin(LMDB_IT(env), NULL, MDB_RDONLY, &LMDB_IT(txn)); in DBA_EXISTS_FUNC()
225 rc = mdb_get(LMDB_IT(txn), LMDB_IT(dbi), &k, &v); in DBA_EXISTS_FUNC()
230 mdb_txn_abort(LMDB_IT(txn)); in DBA_EXISTS_FUNC()
234 if (LMDB_IT(cur)) { in DBA_EXISTS_FUNC()
235 mdb_txn_reset(LMDB_IT(txn)); in DBA_EXISTS_FUNC()
237 mdb_txn_abort(LMDB_IT(txn)); in DBA_EXISTS_FUNC()
248 rc = mdb_txn_begin(LMDB_IT(env), NULL, 0, &LMDB_IT(txn)); in DBA_DELETE_FUNC()
257 rc = mdb_del(LMDB_IT(txn), LMDB_IT(dbi), &k, NULL); in DBA_DELETE_FUNC()
259 rc = mdb_txn_commit(LMDB_IT(txn)); in DBA_DELETE_FUNC()
262 mdb_txn_abort(LMDB_IT(txn)); in DBA_DELETE_FUNC()
270 mdb_txn_abort(LMDB_IT(txn)); in DBA_DELETE_FUNC()
280 rc = mdb_txn_begin(LMDB_IT(env), NULL, MDB_RDONLY, &LMDB_IT(txn)); in DBA_FIRSTKEY_FUNC()
286 rc = mdb_cursor_open(LMDB_IT(txn), LMDB_IT(dbi), &LMDB_IT(cur)); in DBA_FIRSTKEY_FUNC()
288 mdb_txn_abort(LMDB_IT(txn)); in DBA_FIRSTKEY_FUNC()
293 rc = mdb_cursor_get(LMDB_IT(cur), &k, &v, MDB_FIRST); in DBA_FIRSTKEY_FUNC()
295 mdb_txn_abort(LMDB_IT(txn)); in DBA_FIRSTKEY_FUNC()
296 mdb_cursor_close(LMDB_IT(cur)); in DBA_FIRSTKEY_FUNC()
297 LMDB_IT(cur) = NULL; in DBA_FIRSTKEY_FUNC()
308 mdb_txn_reset(LMDB_IT(txn)); in DBA_FIRSTKEY_FUNC()
319 rc = mdb_txn_renew(LMDB_IT(txn)); in DBA_NEXTKEY_FUNC()
325 rc = mdb_cursor_get(LMDB_IT(cur), &k, &v, MDB_NEXT); in DBA_NEXTKEY_FUNC()
327 mdb_txn_abort(LMDB_IT(txn)); in DBA_NEXTKEY_FUNC()
328 mdb_cursor_close(LMDB_IT(cur)); in DBA_NEXTKEY_FUNC()
329 LMDB_IT(cur) = NULL; in DBA_NEXTKEY_FUNC()
340 mdb_txn_reset(LMDB_IT(txn)); in DBA_NEXTKEY_FUNC()
354 rc = mdb_env_sync(LMDB_IT(env), 1); in DBA_SYNC_FUNC()