Lines Matching refs:stmt_obj

471 	php_sqlite3_stmt *stmt_obj;  in PHP_METHOD()  local
490 stmt_obj = Z_SQLITE3_STMT_P(return_value); in PHP_METHOD()
491 stmt_obj->db_obj = db_obj; in PHP_METHOD()
492 ZVAL_COPY(&stmt_obj->db_obj_zval, object); in PHP_METHOD()
494 errcode = sqlite3_prepare_v2(db_obj->db, ZSTR_VAL(sql), ZSTR_LEN(sql), &(stmt_obj->stmt), NULL); in PHP_METHOD()
501 stmt_obj->initialised = 1; in PHP_METHOD()
504 free_item->stmt_obj = stmt_obj; in PHP_METHOD()
517 php_sqlite3_stmt *stmt_obj; in PHP_METHOD() local
545 stmt_obj = Z_SQLITE3_STMT_P(&stmt); in PHP_METHOD()
546 stmt_obj->db_obj = db_obj; in PHP_METHOD()
547 ZVAL_COPY(&stmt_obj->db_obj_zval, object); in PHP_METHOD()
549 …return_code = sqlite3_prepare_v2(db_obj->db, ZSTR_VAL(sql), ZSTR_LEN(sql), &(stmt_obj->stmt), NULL… in PHP_METHOD()
556 stmt_obj->initialised = 1; in PHP_METHOD()
561 result->stmt_obj = stmt_obj; in PHP_METHOD()
564 return_code = sqlite3_step(result->stmt_obj->stmt); in PHP_METHOD()
572 free_item->stmt_obj = stmt_obj; in PHP_METHOD()
575 sqlite3_reset(result->stmt_obj->stmt); in PHP_METHOD()
582 sqlite3_finalize(stmt_obj->stmt); in PHP_METHOD()
583 stmt_obj->initialised = 0; in PHP_METHOD()
1301 php_sqlite3_stmt *stmt_obj; in PHP_METHOD() local
1303 stmt_obj = Z_SQLITE3_STMT_P(object); in PHP_METHOD()
1309 SQLITE3_CHECK_INITIALIZED(stmt_obj->db_obj, stmt_obj->initialised, SQLite3); in PHP_METHOD()
1310 SQLITE3_CHECK_INITIALIZED_STMT(stmt_obj->stmt, SQLite3Stmt); in PHP_METHOD()
1312 RETURN_LONG(sqlite3_bind_parameter_count(stmt_obj->stmt)); in PHP_METHOD()
1320 php_sqlite3_stmt *stmt_obj; in PHP_METHOD() local
1322 stmt_obj = Z_SQLITE3_STMT_P(object); in PHP_METHOD()
1328 SQLITE3_CHECK_INITIALIZED(stmt_obj->db_obj, stmt_obj->initialised, SQLite3); in PHP_METHOD()
1330 if(stmt_obj->db_obj) { in PHP_METHOD()
1331 …zend_llist_del_element(&(stmt_obj->db_obj->free_list), object, (int (*)(void *, void *)) php_sqlit… in PHP_METHOD()
1342 php_sqlite3_stmt *stmt_obj; in PHP_METHOD() local
1344 stmt_obj = Z_SQLITE3_STMT_P(object); in PHP_METHOD()
1350 SQLITE3_CHECK_INITIALIZED(stmt_obj->db_obj, stmt_obj->initialised, SQLite3); in PHP_METHOD()
1351 SQLITE3_CHECK_INITIALIZED_STMT(stmt_obj->stmt, SQLite3Stmt); in PHP_METHOD()
1353 if (sqlite3_reset(stmt_obj->stmt) != SQLITE_OK) { in PHP_METHOD()
1354 …php_sqlite3_error(stmt_obj->db_obj, "Unable to reset statement: %s", sqlite3_errmsg(sqlite3_db_han… in PHP_METHOD()
1365 php_sqlite3_stmt *stmt_obj; in PHP_METHOD() local
1367 stmt_obj = Z_SQLITE3_STMT_P(object); in PHP_METHOD()
1373 SQLITE3_CHECK_INITIALIZED(stmt_obj->db_obj, stmt_obj->initialised, SQLite3); in PHP_METHOD()
1374 SQLITE3_CHECK_INITIALIZED_STMT(stmt_obj->stmt, SQLite3Stmt); in PHP_METHOD()
1376 if (sqlite3_clear_bindings(stmt_obj->stmt) != SQLITE_OK) { in PHP_METHOD()
1377 …php_sqlite3_error(stmt_obj->db_obj, "Unable to clear statement: %s", sqlite3_errmsg(sqlite3_db_han… in PHP_METHOD()
1381 if (stmt_obj->bound_params) { in PHP_METHOD()
1382 zend_hash_destroy(stmt_obj->bound_params); in PHP_METHOD()
1383 FREE_HASHTABLE(stmt_obj->bound_params); in PHP_METHOD()
1384 stmt_obj->bound_params = NULL; in PHP_METHOD()
1395 php_sqlite3_stmt *stmt_obj; in PHP_METHOD() local
1397 stmt_obj = Z_SQLITE3_STMT_P(object); in PHP_METHOD()
1403 SQLITE3_CHECK_INITIALIZED(stmt_obj->db_obj, stmt_obj->initialised, SQLite3); in PHP_METHOD()
1404 SQLITE3_CHECK_INITIALIZED_STMT(stmt_obj->stmt, SQLite3Stmt); in PHP_METHOD()
1407 if (sqlite3_stmt_readonly(stmt_obj->stmt)) { in PHP_METHOD()
1486 php_sqlite3_stmt *stmt_obj; in PHP_METHOD() local
1490 stmt_obj = Z_SQLITE3_STMT_P(object); in PHP_METHOD()
1501 SQLITE3_CHECK_INITIALIZED(stmt_obj->db_obj, stmt_obj->initialised, SQLite3); in PHP_METHOD()
1502 SQLITE3_CHECK_INITIALIZED_STMT(stmt_obj->stmt, SQLite3Stmt); in PHP_METHOD()
1510 if (!register_bound_parameter_to_sqlite(&param, stmt_obj)) { in PHP_METHOD()
1525 php_sqlite3_stmt *stmt_obj; in PHP_METHOD() local
1529 stmt_obj = Z_SQLITE3_STMT_P(object); in PHP_METHOD()
1540 SQLITE3_CHECK_INITIALIZED(stmt_obj->db_obj, stmt_obj->initialised, SQLite3); in PHP_METHOD()
1541 SQLITE3_CHECK_INITIALIZED_STMT(stmt_obj->stmt, SQLite3Stmt); in PHP_METHOD()
1549 if (!register_bound_parameter_to_sqlite(&param, stmt_obj)) { in PHP_METHOD()
1566 php_sqlite3_stmt *stmt_obj; in PHP_METHOD() local
1572 stmt_obj = Z_SQLITE3_STMT_P(object); in PHP_METHOD()
1578 SQLITE3_CHECK_INITIALIZED(stmt_obj->db_obj, stmt_obj->initialised, SQLite3); in PHP_METHOD()
1581 sqlite3_reset(stmt_obj->stmt); in PHP_METHOD()
1583 if (stmt_obj->bound_params) { in PHP_METHOD()
1584 ZEND_HASH_FOREACH_PTR(stmt_obj->bound_params, param) { in PHP_METHOD()
1595 sqlite3_bind_null(stmt_obj->stmt, param->param_number); in PHP_METHOD()
1603 sqlite3_bind_int64(stmt_obj->stmt, param->param_number, Z_LVAL_P(parameter)); in PHP_METHOD()
1605 sqlite3_bind_int(stmt_obj->stmt, param->param_number, Z_LVAL_P(parameter)); in PHP_METHOD()
1611 sqlite3_bind_double(stmt_obj->stmt, param->param_number, Z_DVAL_P(parameter)); in PHP_METHOD()
1621 …php_sqlite3_error(stmt_obj->db_obj, "Unable to read stream for parameter %ld", param->param_number… in PHP_METHOD()
1630 …sqlite3_bind_blob(stmt_obj->stmt, param->param_number, ZSTR_VAL(buffer), ZSTR_LEN(buffer), SQLITE_… in PHP_METHOD()
1633 sqlite3_bind_null(stmt_obj->stmt, param->param_number); in PHP_METHOD()
1640 …sqlite3_bind_text(stmt_obj->stmt, param->param_number, Z_STRVAL_P(parameter), Z_STRLEN_P(parameter… in PHP_METHOD()
1644 sqlite3_bind_null(stmt_obj->stmt, param->param_number); in PHP_METHOD()
1648 …php_sqlite3_error(stmt_obj->db_obj, "Unknown parameter type: %pd for parameter %pd", param->type, … in PHP_METHOD()
1654 return_code = sqlite3_step(stmt_obj->stmt); in PHP_METHOD()
1660 sqlite3_reset(stmt_obj->stmt); in PHP_METHOD()
1665 result->db_obj = stmt_obj->db_obj; in PHP_METHOD()
1666 result->stmt_obj = stmt_obj; in PHP_METHOD()
1672 sqlite3_reset(stmt_obj->stmt); in PHP_METHOD()
1676 …php_sqlite3_error(stmt_obj->db_obj, "Unable to execute statement: %s", sqlite3_errmsg(sqlite3_db_h… in PHP_METHOD()
1690 php_sqlite3_stmt *stmt_obj; in PHP_METHOD() local
1699 stmt_obj = Z_SQLITE3_STMT_P(object); in PHP_METHOD()
1715 stmt_obj->db_obj = db_obj; in PHP_METHOD()
1716 ZVAL_COPY(&stmt_obj->db_obj_zval, db_zval); in PHP_METHOD()
1718 errcode = sqlite3_prepare_v2(db_obj->db, ZSTR_VAL(sql), ZSTR_LEN(sql), &(stmt_obj->stmt), NULL); in PHP_METHOD()
1724 stmt_obj->initialised = 1; in PHP_METHOD()
1727 free_item->stmt_obj = stmt_obj; in PHP_METHOD()
1743 SQLITE3_CHECK_INITIALIZED(result_obj->db_obj, result_obj->stmt_obj->initialised, SQLite3Result) in PHP_METHOD()
1749 RETURN_LONG(sqlite3_column_count(result_obj->stmt_obj->stmt)); in PHP_METHOD()
1763 SQLITE3_CHECK_INITIALIZED(result_obj->db_obj, result_obj->stmt_obj->initialised, SQLite3Result) in PHP_METHOD()
1768 column_name = (char*) sqlite3_column_name(result_obj->stmt_obj->stmt, column); in PHP_METHOD()
1787 SQLITE3_CHECK_INITIALIZED(result_obj->db_obj, result_obj->stmt_obj->initialised, SQLite3Result) in PHP_METHOD()
1797 RETURN_LONG(sqlite3_column_type(result_obj->stmt_obj->stmt, column)); in PHP_METHOD()
1811 SQLITE3_CHECK_INITIALIZED(result_obj->db_obj, result_obj->stmt_obj->initialised, SQLite3Result) in PHP_METHOD()
1817 ret = sqlite3_step(result_obj->stmt_obj->stmt); in PHP_METHOD()
1827 for (i = 0; i < sqlite3_data_count(result_obj->stmt_obj->stmt); i++) { in PHP_METHOD()
1830 sqlite_value_to_zval(result_obj->stmt_obj->stmt, i, &data); in PHP_METHOD()
1842 add_assoc_zval(return_value, (char*)sqlite3_column_name(result_obj->stmt_obj->stmt, i), &data); in PHP_METHOD()
1853 … "Unable to execute statement: %s", sqlite3_errmsg(sqlite3_db_handle(result_obj->stmt_obj->stmt))); in PHP_METHOD()
1866 SQLITE3_CHECK_INITIALIZED(result_obj->db_obj, result_obj->stmt_obj->initialised, SQLite3Result) in PHP_METHOD()
1872 if (sqlite3_reset(result_obj->stmt_obj->stmt) != SQLITE_OK) { in PHP_METHOD()
1890 SQLITE3_CHECK_INITIALIZED(result_obj->db_obj, result_obj->stmt_obj->initialised, SQLite3Result) in PHP_METHOD()
1901 sqlite3_reset(result_obj->stmt_obj->stmt); in PHP_METHOD()
2103 if (free_item->stmt_obj && free_item->stmt_obj->initialised) { in php_sqlite3_free_list_dtor()
2104 sqlite3_finalize(free_item->stmt_obj->stmt); in php_sqlite3_free_list_dtor()
2105 free_item->stmt_obj->initialised = 0; in php_sqlite3_free_list_dtor()
2113 …return ((*free_list)->stmt_obj->initialised && Z_PTR_P(statement) == Z_PTR((*free_list)->stmt_obj… in php_sqlite3_compare_stmt_zval_free()
2119 return ((*free_list)->stmt_obj->initialised && statement == (*free_list)->stmt_obj->stmt); in php_sqlite3_compare_stmt_free()
2212 if (intern->stmt_obj && intern->stmt_obj->initialised) { in php_sqlite3_result_object_free_storage()
2213 sqlite3_reset(intern->stmt_obj->stmt); in php_sqlite3_result_object_free_storage()