Home
last modified time | relevance | path

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

12

/PHP-7.3/ext/dba/libflatfile/
H A Dflatfile.c57 php_stream_flush(dba->fp); in flatfile_store()
62 php_stream_flush(dba->fp); in flatfile_store()
69 php_stream_flush(dba->fp); in flatfile_store()
79 php_stream_flush(dba->fp); in flatfile_store()
114 php_stream_rewind(dba->fp); in flatfile_delete()
133 php_stream_flush(dba->fp); in flatfile_delete()
166 php_stream_rewind(dba->fp); in flatfile_findkey()
207 php_stream_rewind(dba->fp); in flatfile_firstkey()
220 dba->CurrentFlatFilePos = php_stream_tell(dba->fp); in flatfile_firstkey()
250 php_stream_seek(dba->fp, dba->CurrentFlatFilePos, SEEK_SET); in flatfile_nextkey()
[all …]
H A Dflatfile.h38 int flatfile_store(flatfile *dba, datum key_datum, datum value_datum, int mode);
39 datum flatfile_fetch(flatfile *dba, datum key_datum);
40 int flatfile_delete(flatfile *dba, datum key_datum);
41 int flatfile_findkey(flatfile *dba, datum key_datum);
42 datum flatfile_firstkey(flatfile *dba);
43 datum flatfile_nextkey(flatfile *dba);
/PHP-7.3/ext/dba/libinifile/
H A Dinifile.c84 inifile *dba; in inifile_alloc() local
95 dba->fp = fp; in inifile_alloc()
97 return dba; in inifile_alloc()
104 if (dba) { in inifile_free()
250 …if (skip == -1 && dba->next.key.group && dba->next.key.name && !inifile_key_cmp(&dba->next.key, ke… in inifile_fetch()
252 php_stream_seek(dba->fp, dba->next.pos, SEEK_SET); in inifile_fetch()
269 dba->next = ln; in inifile_fetch()
270 dba->next.pos = php_stream_tell(dba->fp); in inifile_fetch()
282 dba->next.pos = php_stream_tell(dba->fp); in inifile_fetch()
302 php_stream_seek(dba->fp, dba->curr.pos, SEEK_SET); in inifile_nextkey()
[all …]
H A Dinifile.h46 val_type inifile_fetch(inifile *dba, const key_type *key, int skip);
47 int inifile_firstkey(inifile *dba);
48 int inifile_nextkey(inifile *dba);
49 int inifile_delete(inifile *dba, const key_type *key);
50 int inifile_delete_ex(inifile *dba, const key_type *key, zend_bool *found);
51 int inifile_replace(inifile *dba, const key_type *key, const val_type *val);
52 int inifile_replace_ex(inifile *dba, const key_type *key, const val_type *val, zend_bool *found);
53 int inifile_append(inifile *dba, const key_type *key, const val_type *val);
64 void inifile_free(inifile *dba, int persistent);
/PHP-7.3/ext/dba/
H A Ddba_flatfile.c54 if (dba->nextkey.dptr) { in DBA_CLOSE_FUNC()
55 efree(dba->nextkey.dptr); in DBA_CLOSE_FUNC()
127 if (dba->nextkey.dptr) { in DBA_FIRSTKEY_FUNC()
130 dba->nextkey = flatfile_firstkey(dba); in DBA_FIRSTKEY_FUNC()
131 if (dba->nextkey.dptr) { in DBA_FIRSTKEY_FUNC()
135 return estrndup(dba->nextkey.dptr, dba->nextkey.dsize); in DBA_FIRSTKEY_FUNC()
144 if (!dba->nextkey.dptr) { in DBA_NEXTKEY_FUNC()
148 if (dba->nextkey.dptr) { in DBA_NEXTKEY_FUNC()
151 dba->nextkey = flatfile_nextkey(dba); in DBA_NEXTKEY_FUNC()
152 if (dba->nextkey.dptr) { in DBA_NEXTKEY_FUNC()
[all …]
H A Ddba_db2.c90 if (dba->cursor) in DBA_CLOSE_FUNC()
91 dba->cursor->c_close(dba->cursor); in DBA_CLOSE_FUNC()
92 dba->dbp->close(dba->dbp, 0); in DBA_CLOSE_FUNC()
102 if (dba->dbp->get(dba->dbp, NULL, &gkey, &gval, 0)) { in DBA_FETCH_FUNC()
119 if (dba->dbp->put(dba->dbp, NULL, &gkey, &gval, in DBA_UPDATE_FUNC()
132 if (dba->dbp->get(dba->dbp, NULL, &gkey, &gval, 0)) { in DBA_EXISTS_FUNC()
151 dba->cursor->c_close(dba->cursor);
156 if (dba->dbp->cursor(dba->dbp, NULL, &dba->cursor, 0)) {
158 if (dba->dbp->cursor(dba->dbp, NULL, &dba->cursor)) {
172 if (dba->cursor->c_get(dba->cursor, &gkey, &gval, DB_NEXT)
[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_db1.c45 dba_db1_data *dba; in DBA_OPEN_FUNC() local
79 dba = pemalloc(sizeof(*dba), info->flags&DBA_PERSISTENT); in DBA_OPEN_FUNC()
80 dba->dbp = db; in DBA_OPEN_FUNC()
82 info->dbf = dba; in DBA_OPEN_FUNC()
90 dba->dbp->close(dba->dbp); in DBA_CLOSE_FUNC()
101 if (dba->dbp->get(dba->dbp, &gkey, &gval, 0) == RET_SUCCESS) { in DBA_FETCH_FUNC()
117 …return dba->dbp->put(dba->dbp, &gkey, &gval, mode == 1 ? R_NOOVERWRITE : 0) != RET_SUCCESS ? FAILU… in DBA_UPDATE_FUNC()
126 return dba->dbp->get(dba->dbp, &gkey, &gval, 0) != RET_SUCCESS ? FAILURE : SUCCESS; in DBA_EXISTS_FUNC()
134 return dba->dbp->del(dba->dbp, &gkey, 0) != RET_SUCCESS ? FAILURE : SUCCESS; in DBA_DELETE_FUNC()
146 if (dba->dbp->seq(dba->dbp, &gkey, &gval, R_FIRST) == RET_SUCCESS) { in DBA_FIRSTKEY_FUNC()
[all …]
H A Ddba_db3.c123 if (dba->cursor) dba->cursor->c_close(dba->cursor);
124 dba->dbp->close(dba->dbp, 0);
136 if (!dba->dbp->get(dba->dbp, NULL, &gkey, &gval, 0)) {
153 if (!dba->dbp->put(dba->dbp, NULL, &gkey, &gval,
167 if (!dba->dbp->get(dba->dbp, NULL, &gkey, &gval, 0)) {
178 return dba->dbp->del(dba->dbp, NULL, &gkey, 0) ? FAILURE : SUCCESS;
185 if (dba->cursor) {
186 dba->cursor->c_close(dba->cursor);
190 if (dba->dbp->cursor(dba->dbp, NULL, &dba->cursor, 0) != 0) {
207 if (dba->cursor->c_get(dba->cursor, &gkey, &gval, DB_NEXT) == 0) {
[all …]
H A Ddba_gdbm.c74 if(dba->nextkey.dptr) free(dba->nextkey.dptr); in DBA_CLOSE_FUNC()
75 gdbm_close(dba->dbf); in DBA_CLOSE_FUNC()
140 if(dba->nextkey.dptr) { in DBA_FIRSTKEY_FUNC()
141 free(dba->nextkey.dptr); in DBA_FIRSTKEY_FUNC()
148 dba->nextkey = gkey; in DBA_FIRSTKEY_FUNC()
150 dba->nextkey.dptr = NULL; in DBA_FIRSTKEY_FUNC()
163 gkey = gdbm_nextkey(dba->dbf, dba->nextkey); in DBA_NEXTKEY_FUNC()
164 free(dba->nextkey.dptr); in DBA_NEXTKEY_FUNC()
168 dba->nextkey = gkey; in DBA_NEXTKEY_FUNC()
170 dba->nextkey.dptr = NULL; in DBA_NEXTKEY_FUNC()
[all …]
H A Ddba_db4.c152 if (dba->cursor) dba->cursor->c_close(dba->cursor);
153 dba->dbp->close(dba->dbp, 0);
168 if (!dba->dbp->get(dba->dbp, NULL, &gkey, &gval, 0)) {
188 if (!dba->dbp->put(dba->dbp, NULL, &gkey, &gval,
207 if (!dba->dbp->get(dba->dbp, NULL, &gkey, &gval, 0)) {
221 return dba->dbp->del(dba->dbp, NULL, &gkey, 0) ? FAILURE : SUCCESS;
228 if (dba->cursor) {
229 dba->cursor->c_close(dba->cursor);
233 if (dba->dbp->cursor(dba->dbp, NULL, &dba->cursor, 0) != 0) {
254 if (dba->cursor && dba->cursor->c_get(dba->cursor, &gkey, &gval, DB_NEXT) == 0) {
[all …]
H A Ddba_inifile.c38 inifile *dba = info->dbf
62 inifile_free(dba, info->flags&DBA_PERSISTENT); in DBA_CLOSE_FUNC()
72 ini_val = inifile_fetch(dba, &ini_key, skip); in DBA_FETCH_FUNC()
89 res = inifile_append(dba, &ini_key, &ini_val); in DBA_UPDATE_FUNC()
91 res = inifile_replace(dba, &ini_key, &ini_val); in DBA_UPDATE_FUNC()
113 ini_val = inifile_fetch(dba, &ini_key, 0); in DBA_EXISTS_FUNC()
130 res = inifile_delete_ex(dba, &ini_key, &found); in DBA_DELETE_FUNC()
140 if (inifile_firstkey(dba)) { in DBA_FIRSTKEY_FUNC()
141 char *result = inifile_key_string(&dba->curr.key); in DBA_FIRSTKEY_FUNC()
153 if (!dba->curr.key.group && !dba->curr.key.name) { in DBA_NEXTKEY_FUNC()
[all …]
H A Ddba_tcadb.c32 #define TCADB_DATA dba_tcadb_data *dba = info->dbf
83 tcadbclose(dba->tcadb); in DBA_CLOSE_FUNC()
84 pefree(dba, info->flags & DBA_PERSISTENT); in DBA_CLOSE_FUNC()
93 value = tcadbget(dba->tcadb, key, keylen, &value_size); in DBA_FETCH_FUNC()
112 if (tcadbvsiz(dba->tcadb, key, keylen) > -1) { in DBA_UPDATE_FUNC()
117 result = tcadbput(dba->tcadb, key, keylen, val, vallen); in DBA_UPDATE_FUNC()
133 value = tcadbget(dba->tcadb, key, keylen, &value_len); in DBA_EXISTS_FUNC()
155 tcadbiterinit(dba->tcadb); in DBA_FIRSTKEY_FUNC()
157 value = tcadbiternext(dba->tcadb, &value_size); in DBA_FIRSTKEY_FUNC()
175 value = tcadbiternext(dba->tcadb, &value_size); in DBA_NEXTKEY_FUNC()
[all …]
H A Ddba_qdbm.c32 #define QDBM_DATA dba_qdbm_data *dba = info->dbf
74 dpclose(dba->dbf); in DBA_CLOSE_FUNC()
75 pefree(dba, info->flags & DBA_PERSISTENT); in DBA_CLOSE_FUNC()
84 value = dpget(dba->dbf, key, keylen, 0, -1, &value_size); in DBA_FETCH_FUNC()
114 value = dpget(dba->dbf, key, keylen, 0, -1, NULL); in DBA_EXISTS_FUNC()
127 return dpout(dba->dbf, key, keylen) ? SUCCESS : FAILURE; in DBA_DELETE_FUNC()
136 dpiterinit(dba->dbf); in DBA_FIRSTKEY_FUNC()
138 value = dpiternext(dba->dbf, &value_size); in DBA_FIRSTKEY_FUNC()
154 value = dpiternext(dba->dbf, &value_size); in DBA_NEXTKEY_FUNC()
168 dpoptimize(dba->dbf, 0); in DBA_OPTIMIZE_FUNC()
[all …]
H A Ddba_dbm.c40 #define DBM_DATA dba_dbm_data *dba = info->dbf
155 dba->nextkey = gkey; in DBA_FIRSTKEY_FUNC()
157 dba->nextkey.dptr = NULL; in DBA_FIRSTKEY_FUNC()
167 if(!dba->nextkey.dptr) return NULL; in DBA_NEXTKEY_FUNC()
169 gkey = nextkey(dba->nextkey); in DBA_NEXTKEY_FUNC()
173 dba->nextkey = gkey; in DBA_NEXTKEY_FUNC()
175 dba->nextkey.dptr = NULL; in DBA_NEXTKEY_FUNC()
H A Ddba.c152 PHP_MINIT_FUNCTION(dba);
153 PHP_MSHUTDOWN_FUNCTION(dba);
154 PHP_MINFO_FUNCTION(dba);
175 PHP_MINIT(dba),
176 PHP_MSHUTDOWN(dba),
179 PHP_MINFO(dba),
181 PHP_MODULE_GLOBALS(dba),
182 PHP_GINIT(dba),
189 ZEND_GET_MODULE(dba) in ZEND_GET_MODULE() argument
525 PHP_MINIT_FUNCTION(dba) in PHP_MINIT_FUNCTION() argument
[all …]
/PHP-7.3/ext/spl/examples/
H A Ddba_array.php33 $dba = new DbaArray($argv[1], $argv[2]); variable
34 if ($dba && $argc > 3) {
36 $dba[$argv[3]] = $argv[4];
38 var_dump(array('Index' => $argv[3], 'Value' => $dba[$argv[3]]));
40 unset($dba);
/PHP-7.3/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 Ddba011.phpt28 resource(%d) of type (dba)
38 resource(%d) of type (dba)
H A Dbug70825.phpt5 if (!extension_loaded('dba')) die('skip dba extension not available');
H A Dbug65708.phpt2 Bug #65708 (dba functions cast $key param to string in-place, bypassing copy on write)
/PHP-7.3/ext/pgsql/tests/
H A D80_bug14383.phpt5 require_once(dirname(__FILE__).'/../../dba/tests/skipif.inc');
18 require_once(dirname(__FILE__).'/../../dba/tests/test.inc');
19 require_once(dirname(__FILE__).'/../../dba/tests/dba_handler.inc');

Completed in 38 milliseconds

12