Home
last modified time | relevance | path

Searched refs:dba (Results 1 – 25 of 42) sorted by relevance

12

/PHP-8.0/ext/dba/
H A Ddba.stub.php23 /** @param resource $dba */
24 function dba_close($dba): void {} argument
28 * @param resource $dba
35 * @param resource $dba
41 /** @param resource $dba */
44 /** @param resource $dba */
49 * @param resource $dba
55 * @param resource $dba
61 * @param resource $dba
65 /** @param resource $dba */
[all …]
H A Ddba_flatfile.c52 if (dba->nextkey.dptr) { in DBA_CLOSE_FUNC()
53 efree(dba->nextkey.dptr); in DBA_CLOSE_FUNC()
125 if (dba->nextkey.dptr) { in DBA_FIRSTKEY_FUNC()
128 dba->nextkey = flatfile_firstkey(dba); in DBA_FIRSTKEY_FUNC()
129 if (dba->nextkey.dptr) { in DBA_FIRSTKEY_FUNC()
133 return estrndup(dba->nextkey.dptr, dba->nextkey.dsize); in DBA_FIRSTKEY_FUNC()
142 if (!dba->nextkey.dptr) { in DBA_NEXTKEY_FUNC()
146 if (dba->nextkey.dptr) { in DBA_NEXTKEY_FUNC()
149 dba->nextkey = flatfile_nextkey(dba); in DBA_NEXTKEY_FUNC()
150 if (dba->nextkey.dptr) { in DBA_NEXTKEY_FUNC()
[all …]
H A Ddba_db2.c88 if (dba->cursor) in DBA_CLOSE_FUNC()
89 dba->cursor->c_close(dba->cursor); in DBA_CLOSE_FUNC()
90 dba->dbp->close(dba->dbp, 0); in DBA_CLOSE_FUNC()
100 if (dba->dbp->get(dba->dbp, NULL, &gkey, &gval, 0)) { in DBA_FETCH_FUNC()
117 if (dba->dbp->put(dba->dbp, NULL, &gkey, &gval, in DBA_UPDATE_FUNC()
130 if (dba->dbp->get(dba->dbp, NULL, &gkey, &gval, 0)) { in DBA_EXISTS_FUNC()
149 dba->cursor->c_close(dba->cursor);
154 if (dba->dbp->cursor(dba->dbp, NULL, &dba->cursor, 0)) {
156 if (dba->dbp->cursor(dba->dbp, NULL, &dba->cursor)) {
170 if (dba->cursor->c_get(dba->cursor, &gkey, &gval, DB_NEXT)
[all …]
H A Ddba_db1.c43 dba_db1_data *dba; in DBA_OPEN_FUNC() local
77 dba = pemalloc(sizeof(*dba), info->flags&DBA_PERSISTENT); in DBA_OPEN_FUNC()
78 dba->dbp = db; in DBA_OPEN_FUNC()
80 info->dbf = dba; in DBA_OPEN_FUNC()
88 dba->dbp->close(dba->dbp); in DBA_CLOSE_FUNC()
99 if (dba->dbp->get(dba->dbp, &gkey, &gval, 0) == RET_SUCCESS) { in DBA_FETCH_FUNC()
115 …return dba->dbp->put(dba->dbp, &gkey, &gval, mode == 1 ? R_NOOVERWRITE : 0) != RET_SUCCESS ? FAILU… in DBA_UPDATE_FUNC()
124 return dba->dbp->get(dba->dbp, &gkey, &gval, 0) != RET_SUCCESS ? FAILURE : SUCCESS; in DBA_EXISTS_FUNC()
132 return dba->dbp->del(dba->dbp, &gkey, 0) != RET_SUCCESS ? FAILURE : SUCCESS; in DBA_DELETE_FUNC()
144 if (dba->dbp->seq(dba->dbp, &gkey, &gval, R_FIRST) == RET_SUCCESS) { in DBA_FIRSTKEY_FUNC()
[all …]
H A Dconfig.w323 ARG_WITH("dba", "DBA support", "no");
9 …EXTENSION("dba", "dba.c dba_cdb.c dba_db1.c dba_db2.c dba_db3.c dba_dbm.c dba_flatfile.c dba_gdbm.…
10 ADD_SOURCES("ext/dba/libcdb", "cdb.c cdb_make.c uint32.c", "dba");
11 ADD_SOURCES("ext/dba/libflatfile", "flatfile.c", "dba");
12 ADD_SOURCES("ext/dba/libinifile", "inifile.c", "dba");
17 if (CHECK_LIB("libdb31s.lib;libdb61.lib", "dba", PHP_DBA) &&
26 if (CHECK_LIB("qdbm_a.lib;qdbm.lib", "dba", PHP_DBA) &&
28 ADD_SOURCES("ext/dba", "dba_qdbm.c", "dba");
37 if (CHECK_LIB("liblmdb_a.lib", "dba", PHP_DBA) &&
39 CHECK_LIB("ntdll.lib", "dba", PHP_DBA)) {
[all …]
H A Ddba_db3.c121 if (dba->cursor) dba->cursor->c_close(dba->cursor);
122 dba->dbp->close(dba->dbp, 0);
134 if (!dba->dbp->get(dba->dbp, NULL, &gkey, &gval, 0)) {
151 if (!dba->dbp->put(dba->dbp, NULL, &gkey, &gval,
165 if (!dba->dbp->get(dba->dbp, NULL, &gkey, &gval, 0)) {
176 return dba->dbp->del(dba->dbp, NULL, &gkey, 0) ? FAILURE : SUCCESS;
183 if (dba->cursor) {
184 dba->cursor->c_close(dba->cursor);
188 if (dba->dbp->cursor(dba->dbp, NULL, &dba->cursor, 0) != 0) {
205 if (dba->cursor->c_get(dba->cursor, &gkey, &gval, DB_NEXT) == 0) {
[all …]
H A Ddba_gdbm.c72 if(dba->nextkey.dptr) free(dba->nextkey.dptr); in DBA_CLOSE_FUNC()
73 gdbm_close(dba->dbf); in DBA_CLOSE_FUNC()
138 if(dba->nextkey.dptr) { in DBA_FIRSTKEY_FUNC()
139 free(dba->nextkey.dptr); in DBA_FIRSTKEY_FUNC()
146 dba->nextkey = gkey; in DBA_FIRSTKEY_FUNC()
148 dba->nextkey.dptr = NULL; in DBA_FIRSTKEY_FUNC()
161 gkey = gdbm_nextkey(dba->dbf, dba->nextkey); in DBA_NEXTKEY_FUNC()
162 free(dba->nextkey.dptr); in DBA_NEXTKEY_FUNC()
166 dba->nextkey = gkey; in DBA_NEXTKEY_FUNC()
168 dba->nextkey.dptr = NULL; in DBA_NEXTKEY_FUNC()
[all …]
H A Ddba_inifile.c36 inifile *dba = info->dbf
60 inifile_free(dba, info->flags&DBA_PERSISTENT); in DBA_CLOSE_FUNC()
70 ini_val = inifile_fetch(dba, &ini_key, skip); in DBA_FETCH_FUNC()
87 res = inifile_append(dba, &ini_key, &ini_val); in DBA_UPDATE_FUNC()
89 res = inifile_replace(dba, &ini_key, &ini_val); in DBA_UPDATE_FUNC()
111 ini_val = inifile_fetch(dba, &ini_key, 0); in DBA_EXISTS_FUNC()
128 res = inifile_delete_ex(dba, &ini_key, &found); in DBA_DELETE_FUNC()
138 if (inifile_firstkey(dba)) { in DBA_FIRSTKEY_FUNC()
139 char *result = inifile_key_string(&dba->curr.key); in DBA_FIRSTKEY_FUNC()
151 if (!dba->curr.key.group && !dba->curr.key.name) { in DBA_NEXTKEY_FUNC()
[all …]
H A Ddba_db4.c150 if (dba->cursor) dba->cursor->c_close(dba->cursor);
151 dba->dbp->close(dba->dbp, 0);
166 if (!dba->dbp->get(dba->dbp, NULL, &gkey, &gval, 0)) {
186 if (!dba->dbp->put(dba->dbp, NULL, &gkey, &gval,
205 if (!dba->dbp->get(dba->dbp, NULL, &gkey, &gval, 0)) {
219 return dba->dbp->del(dba->dbp, NULL, &gkey, 0) ? FAILURE : SUCCESS;
226 if (dba->cursor) {
227 dba->cursor->c_close(dba->cursor);
231 if (dba->dbp->cursor(dba->dbp, NULL, &dba->cursor, 0) != 0) {
252 if (dba->cursor && dba->cursor->c_get(dba->cursor, &gkey, &gval, DB_NEXT) == 0) {
[all …]
H A Ddba_tcadb.c30 #define TCADB_DATA dba_tcadb_data *dba = info->dbf
81 tcadbclose(dba->tcadb); in DBA_CLOSE_FUNC()
82 tcadbdel(dba->tcadb); in DBA_CLOSE_FUNC()
83 pefree(dba, info->flags & DBA_PERSISTENT); in DBA_CLOSE_FUNC()
92 value = tcadbget(dba->tcadb, key, keylen, &value_size); in DBA_FETCH_FUNC()
111 if (tcadbvsiz(dba->tcadb, key, keylen) > -1) { in DBA_UPDATE_FUNC()
132 value = tcadbget(dba->tcadb, key, keylen, &value_len); in DBA_EXISTS_FUNC()
154 tcadbiterinit(dba->tcadb); in DBA_FIRSTKEY_FUNC()
156 value = tcadbiternext(dba->tcadb, &value_size); in DBA_FIRSTKEY_FUNC()
174 value = tcadbiternext(dba->tcadb, &value_size); in DBA_NEXTKEY_FUNC()
[all …]
H A Ddba_qdbm.c30 #define QDBM_DATA dba_qdbm_data *dba = info->dbf
72 dpclose(dba->dbf); in DBA_CLOSE_FUNC()
73 pefree(dba, info->flags & DBA_PERSISTENT); in DBA_CLOSE_FUNC()
82 value = dpget(dba->dbf, key, keylen, 0, -1, &value_size); in DBA_FETCH_FUNC()
112 value = dpget(dba->dbf, key, keylen, 0, -1, NULL); in DBA_EXISTS_FUNC()
125 return dpout(dba->dbf, key, keylen) ? SUCCESS : FAILURE; in DBA_DELETE_FUNC()
134 dpiterinit(dba->dbf); in DBA_FIRSTKEY_FUNC()
136 value = dpiternext(dba->dbf, &value_size); in DBA_FIRSTKEY_FUNC()
152 value = dpiternext(dba->dbf, &value_size); in DBA_NEXTKEY_FUNC()
166 dpoptimize(dba->dbf, 0); in DBA_OPTIMIZE_FUNC()
[all …]
H A Ddba_arginfo.h14 ZEND_ARG_INFO(0, dba)
19 ZEND_ARG_INFO(0, dba)
25 ZEND_ARG_INFO(0, dba)
33 ZEND_ARG_INFO(0, dba)
43 ZEND_ARG_INFO(0, dba)
49 ZEND_ARG_INFO(0, dba)
H A Ddba_dbm.c38 #define DBM_DATA dba_dbm_data *dba = info->dbf
153 dba->nextkey = gkey; in DBA_FIRSTKEY_FUNC()
155 dba->nextkey.dptr = NULL; in DBA_FIRSTKEY_FUNC()
165 if(!dba->nextkey.dptr) return NULL; in DBA_NEXTKEY_FUNC()
167 gkey = nextkey(dba->nextkey); in DBA_NEXTKEY_FUNC()
171 dba->nextkey = gkey; in DBA_NEXTKEY_FUNC()
173 dba->nextkey.dptr = NULL; in DBA_NEXTKEY_FUNC()
/PHP-8.0/ext/dba/libflatfile/
H A Dflatfile.c54 php_stream_flush(dba->fp); in flatfile_store()
59 php_stream_flush(dba->fp); in flatfile_store()
66 php_stream_flush(dba->fp); in flatfile_store()
76 php_stream_flush(dba->fp); in flatfile_store()
109 php_stream_rewind(dba->fp); in flatfile_delete()
128 php_stream_flush(dba->fp); in flatfile_delete()
160 php_stream_rewind(dba->fp); in flatfile_findkey()
200 php_stream_rewind(dba->fp); in flatfile_firstkey()
213 dba->CurrentFlatFilePos = php_stream_tell(dba->fp); in flatfile_firstkey()
242 php_stream_seek(dba->fp, dba->CurrentFlatFilePos, SEEK_SET); in flatfile_nextkey()
[all …]
H A Dflatfile.h36 int flatfile_store(flatfile *dba, datum key_datum, datum value_datum, int mode);
37 datum flatfile_fetch(flatfile *dba, datum key_datum);
38 int flatfile_delete(flatfile *dba, datum key_datum);
39 int flatfile_findkey(flatfile *dba, datum key_datum);
40 datum flatfile_firstkey(flatfile *dba);
41 datum flatfile_nextkey(flatfile *dba);
/PHP-8.0/ext/dba/libinifile/
H A Dinifile.c82 inifile *dba; in inifile_alloc() local
93 dba->fp = fp; in inifile_alloc()
95 return dba; in inifile_alloc()
102 if (dba) { in inifile_free()
246 …if (skip == -1 && dba->next.key.group && dba->next.key.name && !inifile_key_cmp(&dba->next.key, ke… in inifile_fetch()
248 php_stream_seek(dba->fp, dba->next.pos, SEEK_SET); in inifile_fetch()
265 dba->next = ln; in inifile_fetch()
266 dba->next.pos = php_stream_tell(dba->fp); in inifile_fetch()
278 dba->next.pos = php_stream_tell(dba->fp); in inifile_fetch()
296 php_stream_seek(dba->fp, dba->curr.pos, SEEK_SET); in inifile_nextkey()
[all …]
H A Dinifile.h44 val_type inifile_fetch(inifile *dba, const key_type *key, int skip);
45 int inifile_firstkey(inifile *dba);
46 int inifile_nextkey(inifile *dba);
47 int inifile_delete(inifile *dba, const key_type *key);
48 int inifile_delete_ex(inifile *dba, const key_type *key, zend_bool *found);
49 int inifile_replace(inifile *dba, const key_type *key, const val_type *val);
50 int inifile_replace_ex(inifile *dba, const key_type *key, const val_type *val, zend_bool *found);
51 int inifile_append(inifile *dba, const key_type *key, const val_type *val);
62 void inifile_free(inifile *dba, int persistent);
/PHP-8.0/ext/dba/tests/
H A Dbug62490.phpt13 $dba = dba_open($db_filename, "n", $handler)
17 var_dump(dba_insert("a", $i, $dba));
21 var_dump(dba_exists("a", $dba));
23 var_dump(dba_delete("a", $dba));
25 var_dump(dba_exists("a", $dba));
27 var_dump(dba_delete("a", $dba));
H A Ddba012.phpt2 DBA dba.default_handler tests
9 dba.default_handler=flatfile
18 ini_set('dba.default_handler', 'does_not_exist');
24 ini_set('dba.default_handler', '');
38 resource(%d) of type (dba)
H A Dbug71514.phpt5 if (!extension_loaded('dba')) die('skip dba extension not available');
H A Dskipif.inc2 if (!extension_loaded('dba')) die('skip dba extension not available');
H A DCONFLICTS2 dba
H A Ddba011.phpt24 resource(%d) of type (dba)
34 resource(%d) of type (dba)
/PHP-8.0/
H A D.gitattributes4 /ext/dba/libinifile/inifile.c ident
5 /ext/dba/libflatfile/flatfile.c ident
6 /ext/dba/libcdb/cdb_make.c ident
7 /ext/dba/libcdb/cdb.c ident
/PHP-8.0/ext/pgsql/tests/
H A D80_bug14383.phpt5 require_once(__DIR__.'/../../dba/tests/skipif.inc');
18 require_once(__DIR__.'/../../dba/tests/test.inc');
19 require_once(__DIR__.'/../../dba/tests/dba_handler.inc');
24 require_once(__DIR__.'/../../dba/tests/clean.inc');

Completed in 38 milliseconds

12