Lines Matching refs:LMDB_IT

41 #define LMDB_IT(it) (((struct php_lmdb_info *)info->dbf)->it)  macro
82 rc = mdb_dbi_open(txn, NULL, 0, &LMDB_IT(dbi)); in DBA_OPEN_FUNC()
90 LMDB_IT(env) = env; in DBA_OPEN_FUNC()
91 LMDB_IT(txn) = txn; in DBA_OPEN_FUNC()
93 mdb_txn_abort(LMDB_IT(txn)); in DBA_OPEN_FUNC()
100 mdb_dbi_close(LMDB_IT(env), LMDB_IT(dbi)); in DBA_CLOSE_FUNC()
101 mdb_env_close(LMDB_IT(env)); in DBA_CLOSE_FUNC()
112 if (LMDB_IT(cur)) { in DBA_FETCH_FUNC()
113 rc = mdb_txn_renew(LMDB_IT(txn)); in DBA_FETCH_FUNC()
115 rc = mdb_txn_begin(LMDB_IT(env), NULL, MDB_RDONLY, &LMDB_IT(txn)); in DBA_FETCH_FUNC()
125 rc = mdb_get(LMDB_IT(txn), LMDB_IT(dbi), &k, &v); in DBA_FETCH_FUNC()
130 mdb_txn_abort(LMDB_IT(txn)); in DBA_FETCH_FUNC()
139 if (LMDB_IT(cur)) { in DBA_FETCH_FUNC()
140 mdb_txn_reset(LMDB_IT(txn)); in DBA_FETCH_FUNC()
142 mdb_txn_abort(LMDB_IT(txn)); in DBA_FETCH_FUNC()
153 rc = mdb_txn_begin(LMDB_IT(env), NULL, 0, &LMDB_IT(txn)); in DBA_UPDATE_FUNC()
164 rc = mdb_put(LMDB_IT(txn), LMDB_IT(dbi), &k, &v, mode == 1 ? MDB_NOOVERWRITE : 0); in DBA_UPDATE_FUNC()
169 mdb_txn_abort(LMDB_IT(txn)); in DBA_UPDATE_FUNC()
173 rc = mdb_txn_commit(LMDB_IT(txn)); in DBA_UPDATE_FUNC()
176 mdb_txn_abort(LMDB_IT(txn)); in DBA_UPDATE_FUNC()
188 if (LMDB_IT(cur)) { in DBA_EXISTS_FUNC()
189 rc = mdb_txn_renew(LMDB_IT(txn)); in DBA_EXISTS_FUNC()
191 rc = mdb_txn_begin(LMDB_IT(env), NULL, MDB_RDONLY, &LMDB_IT(txn)); in DBA_EXISTS_FUNC()
201 rc = mdb_get(LMDB_IT(txn), LMDB_IT(dbi), &k, &v); in DBA_EXISTS_FUNC()
206 mdb_txn_abort(LMDB_IT(txn)); in DBA_EXISTS_FUNC()
210 if (LMDB_IT(cur)) { in DBA_EXISTS_FUNC()
211 mdb_txn_reset(LMDB_IT(txn)); in DBA_EXISTS_FUNC()
213 mdb_txn_abort(LMDB_IT(txn)); in DBA_EXISTS_FUNC()
224 rc = mdb_txn_begin(LMDB_IT(env), NULL, 0, &LMDB_IT(txn)); in DBA_DELETE_FUNC()
233 rc = mdb_del(LMDB_IT(txn), LMDB_IT(dbi), &k, NULL); in DBA_DELETE_FUNC()
235 rc = mdb_txn_commit(LMDB_IT(txn)); in DBA_DELETE_FUNC()
238 mdb_txn_abort(LMDB_IT(txn)); in DBA_DELETE_FUNC()
255 rc = mdb_txn_begin(LMDB_IT(env), NULL, MDB_RDONLY, &LMDB_IT(txn)); in DBA_FIRSTKEY_FUNC()
261 rc = mdb_cursor_open(LMDB_IT(txn), LMDB_IT(dbi), &LMDB_IT(cur)); in DBA_FIRSTKEY_FUNC()
263 mdb_txn_abort(LMDB_IT(txn)); in DBA_FIRSTKEY_FUNC()
268 rc = mdb_cursor_get(LMDB_IT(cur), &k, &v, MDB_FIRST); in DBA_FIRSTKEY_FUNC()
270 mdb_txn_abort(LMDB_IT(txn)); in DBA_FIRSTKEY_FUNC()
271 mdb_cursor_close(LMDB_IT(cur)); in DBA_FIRSTKEY_FUNC()
272 LMDB_IT(cur) = NULL; in DBA_FIRSTKEY_FUNC()
284 mdb_txn_reset(LMDB_IT(txn)); in DBA_FIRSTKEY_FUNC()
295 rc = mdb_txn_renew(LMDB_IT(txn)); in DBA_NEXTKEY_FUNC()
301 rc = mdb_cursor_get(LMDB_IT(cur), &k, &v, MDB_NEXT); in DBA_NEXTKEY_FUNC()
303 mdb_txn_abort(LMDB_IT(txn)); in DBA_NEXTKEY_FUNC()
304 mdb_cursor_close(LMDB_IT(cur)); in DBA_NEXTKEY_FUNC()
305 LMDB_IT(cur) = NULL; in DBA_NEXTKEY_FUNC()
317 mdb_txn_reset(LMDB_IT(txn)); in DBA_NEXTKEY_FUNC()
331 rc = mdb_env_sync(LMDB_IT(env), 1); in DBA_SYNC_FUNC()