Lines Matching refs:dbh
34 int _pdo_sqlite_error(pdo_dbh_t *dbh, pdo_stmt_t *stmt, const char *file, int line TSRMLS_DC) /* {{… in _pdo_sqlite_error() argument
36 pdo_sqlite_db_handle *H = (pdo_sqlite_db_handle *)dbh->driver_data; in _pdo_sqlite_error()
37 pdo_error_type *pdo_err = stmt ? &stmt->error_code : &dbh->error_code; in _pdo_sqlite_error()
46 pefree(einfo->errmsg, dbh->is_persistent); in _pdo_sqlite_error()
48 einfo->errmsg = pestrdup((char*)sqlite3_errmsg(H->db), dbh->is_persistent); in _pdo_sqlite_error()
80 if (!dbh->methods) { in _pdo_sqlite_error()
89 static int pdo_sqlite_fetch_error_func(pdo_dbh_t *dbh, pdo_stmt_t *stmt, zval *info TSRMLS_DC) in pdo_sqlite_fetch_error_func() argument
91 pdo_sqlite_db_handle *H = (pdo_sqlite_db_handle *)dbh->driver_data; in pdo_sqlite_fetch_error_func()
155 static int sqlite_handle_closer(pdo_dbh_t *dbh TSRMLS_DC) /* {{{ */ in sqlite_handle_closer()
157 pdo_sqlite_db_handle *H = (pdo_sqlite_db_handle *)dbh->driver_data; in sqlite_handle_closer()
168 pefree(einfo->errmsg, dbh->is_persistent); in sqlite_handle_closer()
171 pefree(H, dbh->is_persistent); in sqlite_handle_closer()
172 dbh->driver_data = NULL; in sqlite_handle_closer()
178 static int sqlite_handle_preparer(pdo_dbh_t *dbh, const char *sql, long sql_len, pdo_stmt_t *stmt, … in sqlite_handle_preparer() argument
180 pdo_sqlite_db_handle *H = (pdo_sqlite_db_handle *)dbh->driver_data; in sqlite_handle_preparer()
192 pdo_sqlite_error(dbh); in sqlite_handle_preparer()
201 pdo_sqlite_error(dbh); in sqlite_handle_preparer()
206 static long sqlite_handle_doer(pdo_dbh_t *dbh, const char *sql, long sql_len TSRMLS_DC) in sqlite_handle_doer() argument
208 pdo_sqlite_db_handle *H = (pdo_sqlite_db_handle *)dbh->driver_data; in sqlite_handle_doer()
212 pdo_sqlite_error(dbh); in sqlite_handle_doer()
222 static char *pdo_sqlite_last_insert_id(pdo_dbh_t *dbh, const char *name, unsigned int *len TSRMLS_D… in pdo_sqlite_last_insert_id() argument
224 pdo_sqlite_db_handle *H = (pdo_sqlite_db_handle *)dbh->driver_data; in pdo_sqlite_last_insert_id()
233 static int sqlite_handle_quoter(pdo_dbh_t *dbh, const char *unquoted, int unquotedlen, char **quote… in sqlite_handle_quoter() argument
241 static int sqlite_handle_begin(pdo_dbh_t *dbh TSRMLS_DC) in sqlite_handle_begin()
243 pdo_sqlite_db_handle *H = (pdo_sqlite_db_handle *)dbh->driver_data; in sqlite_handle_begin()
247 pdo_sqlite_error(dbh); in sqlite_handle_begin()
255 static int sqlite_handle_commit(pdo_dbh_t *dbh TSRMLS_DC) in sqlite_handle_commit()
257 pdo_sqlite_db_handle *H = (pdo_sqlite_db_handle *)dbh->driver_data; in sqlite_handle_commit()
261 pdo_sqlite_error(dbh); in sqlite_handle_commit()
269 static int sqlite_handle_rollback(pdo_dbh_t *dbh TSRMLS_DC) in sqlite_handle_rollback()
271 pdo_sqlite_db_handle *H = (pdo_sqlite_db_handle *)dbh->driver_data; in sqlite_handle_rollback()
275 pdo_sqlite_error(dbh); in sqlite_handle_rollback()
283 static int pdo_sqlite_get_attribute(pdo_dbh_t *dbh, long attr, zval *return_value TSRMLS_DC) in pdo_sqlite_get_attribute() argument
298 static int pdo_sqlite_set_attr(pdo_dbh_t *dbh, long attr, zval *val TSRMLS_DC) in pdo_sqlite_set_attr() argument
300 pdo_sqlite_db_handle *H = (pdo_sqlite_db_handle *)dbh->driver_data; in pdo_sqlite_set_attr()
542 pdo_dbh_t *dbh; in PHP_METHOD() local
551 dbh = zend_object_store_get_object(getThis() TSRMLS_CC); in PHP_METHOD()
561 H = (pdo_sqlite_db_handle *)dbh->driver_data; in PHP_METHOD()
613 pdo_dbh_t *dbh; in PHP_METHOD() local
622 dbh = zend_object_store_get_object(getThis() TSRMLS_CC); in PHP_METHOD()
638 H = (pdo_sqlite_db_handle *)dbh->driver_data; in PHP_METHOD()
675 pdo_dbh_t *dbh; in PHP_METHOD() local
684 dbh = zend_object_store_get_object(getThis() TSRMLS_CC); in PHP_METHOD()
694 H = (pdo_sqlite_db_handle *)dbh->driver_data; in PHP_METHOD()
723 static const zend_function_entry *get_driver_methods(pdo_dbh_t *dbh, int kind TSRMLS_DC) in get_driver_methods() argument
734 static void pdo_sqlite_request_shutdown(pdo_dbh_t *dbh TSRMLS_DC) in pdo_sqlite_request_shutdown()
736 pdo_sqlite_db_handle *H = (pdo_sqlite_db_handle *)dbh->driver_data; in pdo_sqlite_request_shutdown()
810 static int pdo_sqlite_handle_factory(pdo_dbh_t *dbh, zval *driver_options TSRMLS_DC) /* {{{ */ in pdo_sqlite_handle_factory() argument
817 H = pecalloc(1, sizeof(pdo_sqlite_db_handle), dbh->is_persistent); in pdo_sqlite_handle_factory()
821 dbh->driver_data = H; in pdo_sqlite_handle_factory()
823 filename = make_filename_safe(dbh->data_source TSRMLS_CC); in pdo_sqlite_handle_factory()
828 dbh->data_source); in pdo_sqlite_handle_factory()
836 pdo_sqlite_error(dbh); in pdo_sqlite_handle_factory()
849 dbh->alloc_own_columns = 1; in pdo_sqlite_handle_factory()
850 dbh->max_escaped_char_length = 2; in pdo_sqlite_handle_factory()
855 dbh->methods = &sqlite_methods; in pdo_sqlite_handle_factory()