Lines Matching refs:stmt_obj
467 php_sqlite3_stmt *stmt_obj; local
486 stmt_obj = (php_sqlite3_stmt *)zend_object_store_get_object(return_value TSRMLS_CC);
487 stmt_obj->db_obj = db_obj;
488 stmt_obj->db_obj_zval = getThis();
492 errcode = sqlite3_prepare_v2(db_obj->db, sql, sql_len, &(stmt_obj->stmt), NULL);
499 stmt_obj->initialised = 1;
502 free_item->stmt_obj = stmt_obj;
515 php_sqlite3_stmt *stmt_obj; local
544 stmt_obj = (php_sqlite3_stmt *)zend_object_store_get_object(stmt TSRMLS_CC);
545 stmt_obj->db_obj = db_obj;
546 stmt_obj->db_obj_zval = getThis();
550 return_code = sqlite3_prepare_v2(db_obj->db, sql, sql_len, &(stmt_obj->stmt), NULL);
557 stmt_obj->initialised = 1;
562 result->stmt_obj = stmt_obj;
565 return_code = sqlite3_step(result->stmt_obj->stmt);
573 free_item->stmt_obj = stmt_obj;
576 sqlite3_reset(result->stmt_obj->stmt);
583 sqlite3_finalize(stmt_obj->stmt);
584 stmt_obj->initialised = 0;
1306 php_sqlite3_stmt *stmt_obj; local
1308 stmt_obj = (php_sqlite3_stmt *)zend_object_store_get_object(object TSRMLS_CC);
1310 SQLITE3_CHECK_INITIALIZED(stmt_obj->db_obj, stmt_obj->initialised, SQLite3)
1316 SQLITE3_CHECK_INITIALIZED_STMT(stmt_obj->stmt, SQLite3Stmt);
1318 RETURN_LONG(sqlite3_bind_parameter_count(stmt_obj->stmt));
1326 php_sqlite3_stmt *stmt_obj; local
1328 stmt_obj = (php_sqlite3_stmt *)zend_object_store_get_object(object TSRMLS_CC);
1330 SQLITE3_CHECK_INITIALIZED(stmt_obj->db_obj, stmt_obj->initialised, SQLite3)
1336 if(stmt_obj->db_obj) {
1337 …zend_llist_del_element(&(stmt_obj->db_obj->free_list), object, (int (*)(void *, void *)) php_sqlit…
1348 php_sqlite3_stmt *stmt_obj; local
1350 stmt_obj = (php_sqlite3_stmt *)zend_object_store_get_object(object TSRMLS_CC);
1352 SQLITE3_CHECK_INITIALIZED(stmt_obj->db_obj, stmt_obj->initialised, SQLite3)
1358 SQLITE3_CHECK_INITIALIZED_STMT(stmt_obj->stmt, SQLite3Stmt);
1360 if (sqlite3_reset(stmt_obj->stmt) != SQLITE_OK) {
1361 …php_sqlite3_error(stmt_obj->db_obj, "Unable to reset statement: %s", sqlite3_errmsg(sqlite3_db_han…
1372 php_sqlite3_stmt *stmt_obj; local
1374 stmt_obj = (php_sqlite3_stmt *)zend_object_store_get_object(object TSRMLS_CC);
1376 SQLITE3_CHECK_INITIALIZED(stmt_obj->db_obj, stmt_obj->initialised, SQLite3)
1382 SQLITE3_CHECK_INITIALIZED_STMT(stmt_obj->stmt, SQLite3Stmt);
1384 if (sqlite3_clear_bindings(stmt_obj->stmt) != SQLITE_OK) {
1385 …php_sqlite3_error(stmt_obj->db_obj, "Unable to clear statement: %s", sqlite3_errmsg(sqlite3_db_han…
1389 if (stmt_obj->bound_params) {
1390 zend_hash_destroy(stmt_obj->bound_params);
1391 FREE_HASHTABLE(stmt_obj->bound_params);
1392 stmt_obj->bound_params = NULL;
1403 php_sqlite3_stmt *stmt_obj; local
1405 stmt_obj = (php_sqlite3_stmt *)zend_object_store_get_object(object TSRMLS_CC);
1407 SQLITE3_CHECK_INITIALIZED(stmt_obj->db_obj, stmt_obj->initialised, SQLite3)
1413 SQLITE3_CHECK_INITIALIZED_STMT(stmt_obj->stmt, SQLite3Stmt);
1416 if (sqlite3_stmt_readonly(stmt_obj->stmt)) {
1473 php_sqlite3_stmt *stmt_obj; local
1476 stmt_obj = (php_sqlite3_stmt *)zend_object_store_get_object(object TSRMLS_CC);
1478 SQLITE3_CHECK_INITIALIZED(stmt_obj->db_obj, stmt_obj->initialised, SQLite3)
1489 SQLITE3_CHECK_INITIALIZED_STMT(stmt_obj->stmt, SQLite3Stmt);
1493 if (!register_bound_parameter_to_sqlite(¶m, stmt_obj TSRMLS_CC)) {
1508 php_sqlite3_stmt *stmt_obj; local
1511 stmt_obj = (php_sqlite3_stmt *)zend_object_store_get_object(object TSRMLS_CC);
1513 SQLITE3_CHECK_INITIALIZED(stmt_obj->db_obj, stmt_obj->initialised, SQLite3)
1524 SQLITE3_CHECK_INITIALIZED_STMT(stmt_obj->stmt, SQLite3Stmt);
1528 if (!register_bound_parameter_to_sqlite(¶m, stmt_obj TSRMLS_CC)) {
1543 php_sqlite3_stmt *stmt_obj; local
1549 stmt_obj = (php_sqlite3_stmt *)zend_object_store_get_object(object TSRMLS_CC);
1551 SQLITE3_CHECK_INITIALIZED(stmt_obj->db_obj, stmt_obj->initialised, SQLite3)
1557 SQLITE3_CHECK_INITIALIZED(stmt_obj->db_obj, stmt_obj->initialised, SQLite3)
1559 if (stmt_obj->bound_params) {
1560 zend_hash_internal_pointer_reset(stmt_obj->bound_params);
1561 while (zend_hash_get_current_data(stmt_obj->bound_params, (void **)¶m) == SUCCESS) {
1564 sqlite3_bind_null(stmt_obj->stmt, param->param_number);
1565 zend_hash_move_forward(stmt_obj->bound_params);
1573 sqlite3_bind_int64(stmt_obj->stmt, param->param_number, Z_LVAL_P(param->parameter));
1575 sqlite3_bind_int(stmt_obj->stmt, param->param_number, Z_LVAL_P(param->parameter));
1581 sqlite3_bind_double(stmt_obj->stmt, param->param_number, Z_DVAL_P(param->parameter));
1592 …php_sqlite3_error(stmt_obj->db_obj, "Unable to read stream for parameter %ld", param->param_number…
1602 sqlite3_bind_blob(stmt_obj->stmt, param->param_number, buffer, blength, SQLITE_TRANSIENT);
1612 …sqlite3_bind_text(stmt_obj->stmt, param->param_number, Z_STRVAL_P(param->parameter), Z_STRLEN_P(pa…
1616 sqlite3_bind_null(stmt_obj->stmt, param->param_number);
1620 …php_sqlite3_error(stmt_obj->db_obj, "Unknown parameter type: %ld for parameter %ld", param->type, …
1623 zend_hash_move_forward(stmt_obj->bound_params);
1627 return_code = sqlite3_step(stmt_obj->stmt);
1633 sqlite3_reset(stmt_obj->stmt);
1640 result->db_obj = stmt_obj->db_obj;
1641 result->stmt_obj = stmt_obj;
1647 sqlite3_reset(stmt_obj->stmt);
1651 …php_sqlite3_error(stmt_obj->db_obj, "Unable to execute statement: %s", sqlite3_errmsg(sqlite3_db_h…
1665 php_sqlite3_stmt *stmt_obj; local
1674 stmt_obj = (php_sqlite3_stmt *)zend_object_store_get_object(object TSRMLS_CC);
1692 stmt_obj->db_obj = db_obj;
1693 stmt_obj->db_obj_zval = db_zval;
1697 errcode = sqlite3_prepare_v2(db_obj->db, sql, sql_len, &(stmt_obj->stmt), NULL);
1703 stmt_obj->initialised = 1;
1706 free_item->stmt_obj = stmt_obj;
1721 SQLITE3_CHECK_INITIALIZED(result_obj->db_obj, result_obj->stmt_obj->initialised, SQLite3Result)
1727 RETURN_LONG(sqlite3_column_count(result_obj->stmt_obj->stmt));
1741 SQLITE3_CHECK_INITIALIZED(result_obj->db_obj, result_obj->stmt_obj->initialised, SQLite3Result)
1746 column_name = (char*) sqlite3_column_name(result_obj->stmt_obj->stmt, column);
1765 SQLITE3_CHECK_INITIALIZED(result_obj->db_obj, result_obj->stmt_obj->initialised, SQLite3Result)
1775 RETURN_LONG(sqlite3_column_type(result_obj->stmt_obj->stmt, column));
1789 SQLITE3_CHECK_INITIALIZED(result_obj->db_obj, result_obj->stmt_obj->initialised, SQLite3Result)
1795 ret = sqlite3_step(result_obj->stmt_obj->stmt);
1805 for (i = 0; i < sqlite3_data_count(result_obj->stmt_obj->stmt); i++) {
1808 data = sqlite_value_to_zval(result_obj->stmt_obj->stmt, i);
1818 add_assoc_zval(return_value, (char*)sqlite3_column_name(result_obj->stmt_obj->stmt, i), data);
1829 … "Unable to execute statement: %s", sqlite3_errmsg(sqlite3_db_handle(result_obj->stmt_obj->stmt)));
1842 SQLITE3_CHECK_INITIALIZED(result_obj->db_obj, result_obj->stmt_obj->initialised, SQLite3Result)
1848 if (sqlite3_reset(result_obj->stmt_obj->stmt) != SQLITE_OK) {
1866 SQLITE3_CHECK_INITIALIZED(result_obj->db_obj, result_obj->stmt_obj->initialised, SQLite3Result)
1877 sqlite3_reset(result_obj->stmt_obj->stmt);
2076 if (free_item->stmt_obj && free_item->stmt_obj->initialised) {
2077 sqlite3_finalize(free_item->stmt_obj->stmt);
2078 free_item->stmt_obj->initialised = 0;
2086 return ((*free_list)->stmt_obj->initialised && statement == (*free_list)->stmt_obj_zval);
2092 return ((*free_list)->stmt_obj->initialised && statement == (*free_list)->stmt_obj->stmt);
2187 if (intern->stmt_obj->initialised) {
2188 sqlite3_reset(intern->stmt_obj->stmt);