Home
last modified time | relevance | path

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

12

/PHP-7.2/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.h40 int flatfile_store(flatfile *dba, datum key_datum, datum value_datum, int mode);
41 datum flatfile_fetch(flatfile *dba, datum key_datum);
42 int flatfile_delete(flatfile *dba, datum key_datum);
43 int flatfile_findkey(flatfile *dba, datum key_datum);
44 datum flatfile_firstkey(flatfile *dba);
45 datum flatfile_nextkey(flatfile *dba);
/PHP-7.2/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.h48 val_type inifile_fetch(inifile *dba, const key_type *key, int skip);
49 int inifile_firstkey(inifile *dba);
50 int inifile_nextkey(inifile *dba);
51 int inifile_delete(inifile *dba, const key_type *key);
52 int inifile_delete_ex(inifile *dba, const key_type *key, zend_bool *found);
53 int inifile_replace(inifile *dba, const key_type *key, const val_type *val);
54 int inifile_replace_ex(inifile *dba, const key_type *key, const val_type *val, zend_bool *found);
55 int inifile_append(inifile *dba, const key_type *key, const val_type *val);
66 void inifile_free(inifile *dba, int persistent);
/PHP-7.2/ext/dba/
H A Ddba_flatfile.c56 if (dba->nextkey.dptr) { in DBA_CLOSE_FUNC()
57 efree(dba->nextkey.dptr); in DBA_CLOSE_FUNC()
129 if (dba->nextkey.dptr) { in DBA_FIRSTKEY_FUNC()
132 dba->nextkey = flatfile_firstkey(dba); in DBA_FIRSTKEY_FUNC()
133 if (dba->nextkey.dptr) { in DBA_FIRSTKEY_FUNC()
137 return estrndup(dba->nextkey.dptr, dba->nextkey.dsize); in DBA_FIRSTKEY_FUNC()
146 if (!dba->nextkey.dptr) { in DBA_NEXTKEY_FUNC()
150 if (dba->nextkey.dptr) { in DBA_NEXTKEY_FUNC()
153 dba->nextkey = flatfile_nextkey(dba); in DBA_NEXTKEY_FUNC()
154 if (dba->nextkey.dptr) { in DBA_NEXTKEY_FUNC()
[all …]
H A Ddba_db2.c93 if (dba->cursor) in DBA_CLOSE_FUNC()
94 dba->cursor->c_close(dba->cursor); in DBA_CLOSE_FUNC()
95 dba->dbp->close(dba->dbp, 0); in DBA_CLOSE_FUNC()
105 if (dba->dbp->get(dba->dbp, NULL, &gkey, &gval, 0)) { in DBA_FETCH_FUNC()
122 if (dba->dbp->put(dba->dbp, NULL, &gkey, &gval, in DBA_UPDATE_FUNC()
135 if (dba->dbp->get(dba->dbp, NULL, &gkey, &gval, 0)) { in DBA_EXISTS_FUNC()
154 dba->cursor->c_close(dba->cursor);
159 if (dba->dbp->cursor(dba->dbp, NULL, &dba->cursor, 0)) {
161 if (dba->dbp->cursor(dba->dbp, NULL, &dba->cursor)) {
175 if (dba->cursor->c_get(dba->cursor, &gkey, &gval, DB_NEXT)
[all …]
H A Dconfig.w324 ARG_WITH("dba", "DBA support", "no");
10 …EXTENSION("dba", "dba.c dba_cdb.c dba_db1.c dba_db2.c dba_db3.c dba_dbm.c dba_flatfile.c dba_gdbm.…
11 ADD_SOURCES("ext/dba/libcdb", "cdb.c cdb_make.c uint32.c", "dba");
12 ADD_SOURCES("ext/dba/libflatfile", "flatfile.c", "dba");
13 ADD_SOURCES("ext/dba/libinifile", "inifile.c", "dba");
18 if (CHECK_LIB("libdb31s.lib;libdb61.lib", "dba", PHP_DBA) &&
27 if (CHECK_LIB("qdbm_a.lib;qdbm.lib", "dba", PHP_DBA) &&
29 ADD_SOURCES("ext/dba", "dba_qdbm.c", "dba");
38 if (CHECK_LIB("liblmdb_a.lib", "dba", PHP_DBA) &&
40 CHECK_LIB("ntdll.lib", "dba", PHP_DBA)) {
[all …]
H A Ddba_db3.c126 if (dba->cursor) dba->cursor->c_close(dba->cursor);
127 dba->dbp->close(dba->dbp, 0);
139 if (!dba->dbp->get(dba->dbp, NULL, &gkey, &gval, 0)) {
156 if (!dba->dbp->put(dba->dbp, NULL, &gkey, &gval,
170 if (!dba->dbp->get(dba->dbp, NULL, &gkey, &gval, 0)) {
181 return dba->dbp->del(dba->dbp, NULL, &gkey, 0) ? FAILURE : SUCCESS;
188 if (dba->cursor) {
189 dba->cursor->c_close(dba->cursor);
193 if (dba->dbp->cursor(dba->dbp, NULL, &dba->cursor, 0) != 0) {
210 if (dba->cursor->c_get(dba->cursor, &gkey, &gval, DB_NEXT) == 0) {
[all …]
H A Ddba_gdbm.c77 if(dba->nextkey.dptr) free(dba->nextkey.dptr); in DBA_CLOSE_FUNC()
78 gdbm_close(dba->dbf); in DBA_CLOSE_FUNC()
143 if(dba->nextkey.dptr) { in DBA_FIRSTKEY_FUNC()
144 free(dba->nextkey.dptr); in DBA_FIRSTKEY_FUNC()
151 dba->nextkey = gkey; in DBA_FIRSTKEY_FUNC()
153 dba->nextkey.dptr = NULL; in DBA_FIRSTKEY_FUNC()
166 gkey = gdbm_nextkey(dba->dbf, dba->nextkey); in DBA_NEXTKEY_FUNC()
167 free(dba->nextkey.dptr); in DBA_NEXTKEY_FUNC()
171 dba->nextkey = gkey; in DBA_NEXTKEY_FUNC()
173 dba->nextkey.dptr = NULL; in DBA_NEXTKEY_FUNC()
[all …]
H A Ddba_db1.c47 dba_db1_data *dba; in DBA_OPEN_FUNC() local
82 dba = pemalloc(sizeof(*dba), info->flags&DBA_PERSISTENT); in DBA_OPEN_FUNC()
83 dba->dbp = db; in DBA_OPEN_FUNC()
85 info->dbf = dba; in DBA_OPEN_FUNC()
93 dba->dbp->close(dba->dbp); in DBA_CLOSE_FUNC()
104 if (dba->dbp->get(dba->dbp, &gkey, &gval, 0) == RET_SUCCESS) { in DBA_FETCH_FUNC()
120 …return dba->dbp->put(dba->dbp, &gkey, &gval, mode == 1 ? R_NOOVERWRITE : 0) != RET_SUCCESS ? FAILU… in DBA_UPDATE_FUNC()
129 return dba->dbp->get(dba->dbp, &gkey, &gval, 0) != RET_SUCCESS ? FAILURE : SUCCESS; in DBA_EXISTS_FUNC()
137 return dba->dbp->del(dba->dbp, &gkey, 0) != RET_SUCCESS ? FAILURE : SUCCESS; in DBA_DELETE_FUNC()
149 if (dba->dbp->seq(dba->dbp, &gkey, &gval, R_FIRST) == RET_SUCCESS) { in DBA_FIRSTKEY_FUNC()
[all …]
H A Ddba_db4.c155 if (dba->cursor) dba->cursor->c_close(dba->cursor);
156 dba->dbp->close(dba->dbp, 0);
171 if (!dba->dbp->get(dba->dbp, NULL, &gkey, &gval, 0)) {
191 if (!dba->dbp->put(dba->dbp, NULL, &gkey, &gval,
210 if (!dba->dbp->get(dba->dbp, NULL, &gkey, &gval, 0)) {
224 return dba->dbp->del(dba->dbp, NULL, &gkey, 0) ? FAILURE : SUCCESS;
231 if (dba->cursor) {
232 dba->cursor->c_close(dba->cursor);
236 if (dba->dbp->cursor(dba->dbp, NULL, &dba->cursor, 0) != 0) {
257 if (dba->cursor && dba->cursor->c_get(dba->cursor, &gkey, &gval, DB_NEXT) == 0) {
[all …]
H A Ddba_inifile.c40 inifile *dba = info->dbf
64 inifile_free(dba, info->flags&DBA_PERSISTENT); in DBA_CLOSE_FUNC()
74 ini_val = inifile_fetch(dba, &ini_key, skip); in DBA_FETCH_FUNC()
91 res = inifile_append(dba, &ini_key, &ini_val); in DBA_UPDATE_FUNC()
93 res = inifile_replace(dba, &ini_key, &ini_val); in DBA_UPDATE_FUNC()
115 ini_val = inifile_fetch(dba, &ini_key, 0); in DBA_EXISTS_FUNC()
132 res = inifile_delete_ex(dba, &ini_key, &found); in DBA_DELETE_FUNC()
142 if (inifile_firstkey(dba)) { in DBA_FIRSTKEY_FUNC()
143 char *result = inifile_key_string(&dba->curr.key); in DBA_FIRSTKEY_FUNC()
155 if (!dba->curr.key.group && !dba->curr.key.name) { in DBA_NEXTKEY_FUNC()
[all …]
H A Ddba_tcadb.c34 #define TCADB_DATA dba_tcadb_data *dba = info->dbf
85 tcadbclose(dba->tcadb); in DBA_CLOSE_FUNC()
86 pefree(dba, info->flags & DBA_PERSISTENT); in DBA_CLOSE_FUNC()
95 value = tcadbget(dba->tcadb, key, keylen, &value_size); in DBA_FETCH_FUNC()
114 if (tcadbvsiz(dba->tcadb, key, keylen) > -1) { in DBA_UPDATE_FUNC()
119 result = tcadbput(dba->tcadb, key, keylen, val, vallen); in DBA_UPDATE_FUNC()
135 value = tcadbget(dba->tcadb, key, keylen, &value_len); in DBA_EXISTS_FUNC()
157 tcadbiterinit(dba->tcadb); in DBA_FIRSTKEY_FUNC()
159 value = tcadbiternext(dba->tcadb, &value_size); in DBA_FIRSTKEY_FUNC()
177 value = tcadbiternext(dba->tcadb, &value_size); in DBA_NEXTKEY_FUNC()
[all …]
H A Ddba_qdbm.c34 #define QDBM_DATA dba_qdbm_data *dba = info->dbf
76 dpclose(dba->dbf); in DBA_CLOSE_FUNC()
77 pefree(dba, info->flags & DBA_PERSISTENT); in DBA_CLOSE_FUNC()
86 value = dpget(dba->dbf, key, keylen, 0, -1, &value_size); in DBA_FETCH_FUNC()
116 value = dpget(dba->dbf, key, keylen, 0, -1, NULL); in DBA_EXISTS_FUNC()
129 return dpout(dba->dbf, key, keylen) ? SUCCESS : FAILURE; in DBA_DELETE_FUNC()
138 dpiterinit(dba->dbf); in DBA_FIRSTKEY_FUNC()
140 value = dpiternext(dba->dbf, &value_size); in DBA_FIRSTKEY_FUNC()
156 value = dpiternext(dba->dbf, &value_size); in DBA_NEXTKEY_FUNC()
170 dpoptimize(dba->dbf, 0); in DBA_OPTIMIZE_FUNC()
[all …]
H A Ddba_dbm.c42 #define DBM_DATA dba_dbm_data *dba = info->dbf
158 dba->nextkey = gkey; in DBA_FIRSTKEY_FUNC()
160 dba->nextkey.dptr = NULL; in DBA_FIRSTKEY_FUNC()
170 if(!dba->nextkey.dptr) return NULL; in DBA_NEXTKEY_FUNC()
172 gkey = nextkey(dba->nextkey); in DBA_NEXTKEY_FUNC()
176 dba->nextkey = gkey; in DBA_NEXTKEY_FUNC()
178 dba->nextkey.dptr = NULL; in DBA_NEXTKEY_FUNC()
H A Ddba.c154 PHP_MINIT_FUNCTION(dba);
155 PHP_MSHUTDOWN_FUNCTION(dba);
156 PHP_MINFO_FUNCTION(dba);
177 PHP_MINIT(dba),
178 PHP_MSHUTDOWN(dba),
181 PHP_MINFO(dba),
183 PHP_MODULE_GLOBALS(dba),
184 PHP_GINIT(dba),
191 ZEND_GET_MODULE(dba) in ZEND_GET_MODULE() argument
527 PHP_MINIT_FUNCTION(dba) in PHP_MINIT_FUNCTION() argument
[all …]
/PHP-7.2/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.2/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.2/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 41 milliseconds

12