Lines Matching refs:dbh
31 int _pdo_sqlite_error(pdo_dbh_t *dbh, pdo_stmt_t *stmt, const char *file, int line) /* {{{ */ in _pdo_sqlite_error() argument
33 pdo_sqlite_db_handle *H = (pdo_sqlite_db_handle *)dbh->driver_data; in _pdo_sqlite_error()
34 pdo_error_type *pdo_err = stmt ? &stmt->error_code : &dbh->error_code; in _pdo_sqlite_error()
43 pefree(einfo->errmsg, dbh->is_persistent); in _pdo_sqlite_error()
45 einfo->errmsg = pestrdup((char*)sqlite3_errmsg(H->db), dbh->is_persistent); in _pdo_sqlite_error()
77 if (!dbh->methods) { in _pdo_sqlite_error()
85 static void pdo_sqlite_fetch_error_func(pdo_dbh_t *dbh, pdo_stmt_t *stmt, zval *info) in pdo_sqlite_fetch_error_func() argument
87 pdo_sqlite_db_handle *H = (pdo_sqlite_db_handle *)dbh->driver_data; in pdo_sqlite_fetch_error_func()
149 static void sqlite_handle_closer(pdo_dbh_t *dbh) /* {{{ */ in sqlite_handle_closer() argument
151 pdo_sqlite_db_handle *H = (pdo_sqlite_db_handle *)dbh->driver_data; in sqlite_handle_closer()
166 pefree(einfo->errmsg, dbh->is_persistent); in sqlite_handle_closer()
169 pefree(H, dbh->is_persistent); in sqlite_handle_closer()
170 dbh->driver_data = NULL; in sqlite_handle_closer()
175 static bool sqlite_handle_preparer(pdo_dbh_t *dbh, zend_string *sql, pdo_stmt_t *stmt, zval *driver… in sqlite_handle_preparer() argument
177 pdo_sqlite_db_handle *H = (pdo_sqlite_db_handle *)dbh->driver_data; in sqlite_handle_preparer()
189 pdo_sqlite_error(dbh); in sqlite_handle_preparer()
198 pdo_sqlite_error(dbh); in sqlite_handle_preparer()
203 static zend_long sqlite_handle_doer(pdo_dbh_t *dbh, const zend_string *sql) in sqlite_handle_doer() argument
205 pdo_sqlite_db_handle *H = (pdo_sqlite_db_handle *)dbh->driver_data; in sqlite_handle_doer()
208 pdo_sqlite_error(dbh); in sqlite_handle_doer()
215 static zend_string *pdo_sqlite_last_insert_id(pdo_dbh_t *dbh, const zend_string *name) in pdo_sqlite_last_insert_id() argument
217 pdo_sqlite_db_handle *H = (pdo_sqlite_db_handle *)dbh->driver_data; in pdo_sqlite_last_insert_id()
223 static zend_string* sqlite_handle_quoter(pdo_dbh_t *dbh, const zend_string *unquoted, enum pdo_para… in sqlite_handle_quoter() argument
237 static bool sqlite_handle_begin(pdo_dbh_t *dbh) in sqlite_handle_begin() argument
239 pdo_sqlite_db_handle *H = (pdo_sqlite_db_handle *)dbh->driver_data; in sqlite_handle_begin()
242 pdo_sqlite_error(dbh); in sqlite_handle_begin()
248 static bool sqlite_handle_commit(pdo_dbh_t *dbh) in sqlite_handle_commit() argument
250 pdo_sqlite_db_handle *H = (pdo_sqlite_db_handle *)dbh->driver_data; in sqlite_handle_commit()
253 pdo_sqlite_error(dbh); in sqlite_handle_commit()
259 static bool sqlite_handle_rollback(pdo_dbh_t *dbh) in sqlite_handle_rollback() argument
261 pdo_sqlite_db_handle *H = (pdo_sqlite_db_handle *)dbh->driver_data; in sqlite_handle_rollback()
264 pdo_sqlite_error(dbh); in sqlite_handle_rollback()
270 static int pdo_sqlite_get_attribute(pdo_dbh_t *dbh, zend_long attr, zval *return_value) in pdo_sqlite_get_attribute() argument
285 static bool pdo_sqlite_set_attr(pdo_dbh_t *dbh, zend_long attr, zval *val) in pdo_sqlite_set_attr() argument
287 pdo_sqlite_db_handle *H = (pdo_sqlite_db_handle *)dbh->driver_data; in pdo_sqlite_set_attr()
521 pdo_dbh_t *dbh; in PHP_METHOD() local
533 dbh = Z_PDO_DBH_P(ZEND_THIS); in PHP_METHOD()
536 H = (pdo_sqlite_db_handle *)dbh->driver_data; in PHP_METHOD()
587 pdo_dbh_t *dbh; in PHP_METHOD() local
599 dbh = Z_PDO_DBH_P(ZEND_THIS); in PHP_METHOD()
602 H = (pdo_sqlite_db_handle *)dbh->driver_data; in PHP_METHOD()
637 pdo_dbh_t *dbh; in PHP_METHOD() local
646 dbh = Z_PDO_DBH_P(ZEND_THIS); in PHP_METHOD()
649 H = (pdo_sqlite_db_handle *)dbh->driver_data; in PHP_METHOD()
670 static const zend_function_entry *get_driver_methods(pdo_dbh_t *dbh, int kind) in get_driver_methods() argument
681 static void pdo_sqlite_request_shutdown(pdo_dbh_t *dbh) in pdo_sqlite_request_shutdown() argument
683 pdo_sqlite_db_handle *H = (pdo_sqlite_db_handle *)dbh->driver_data; in pdo_sqlite_request_shutdown()
691 static void pdo_sqlite_get_gc(pdo_dbh_t *dbh, zend_get_gc_buffer *gc_buffer) in pdo_sqlite_get_gc() argument
693 pdo_sqlite_db_handle *H = dbh->driver_data; in pdo_sqlite_get_gc()
776 static int pdo_sqlite_handle_factory(pdo_dbh_t *dbh, zval *driver_options) /* {{{ */ in pdo_sqlite_handle_factory() argument
783 H = pecalloc(1, sizeof(pdo_sqlite_db_handle), dbh->is_persistent); in pdo_sqlite_handle_factory()
787 dbh->driver_data = H; in pdo_sqlite_handle_factory()
790 dbh->skip_param_evt = 0x7F ^ (1 << PDO_PARAM_EVT_EXEC_PRE); in pdo_sqlite_handle_factory()
792 filename = make_filename_safe(dbh->data_source); in pdo_sqlite_handle_factory()
797 dbh->data_source); in pdo_sqlite_handle_factory()
811 pdo_sqlite_error(dbh); in pdo_sqlite_handle_factory()
824 dbh->alloc_own_columns = 1; in pdo_sqlite_handle_factory()
825 dbh->max_escaped_char_length = 2; in pdo_sqlite_handle_factory()
830 dbh->methods = &sqlite_methods; in pdo_sqlite_handle_factory()