Lines Matching refs:S
32 pdo_sqlite_stmt *S = (pdo_sqlite_stmt*)stmt->driver_data; in pdo_sqlite_stmt_dtor() local
34 if (S->stmt) { in pdo_sqlite_stmt_dtor()
35 sqlite3_finalize(S->stmt); in pdo_sqlite_stmt_dtor()
36 S->stmt = NULL; in pdo_sqlite_stmt_dtor()
38 efree(S); in pdo_sqlite_stmt_dtor()
44 pdo_sqlite_stmt *S = (pdo_sqlite_stmt*)stmt->driver_data; in pdo_sqlite_stmt_execute() local
46 if (stmt->executed && !S->done) { in pdo_sqlite_stmt_execute()
47 sqlite3_reset(S->stmt); in pdo_sqlite_stmt_execute()
50 S->done = 0; in pdo_sqlite_stmt_execute()
51 switch (sqlite3_step(S->stmt)) { in pdo_sqlite_stmt_execute()
53 S->pre_fetched = 1; in pdo_sqlite_stmt_execute()
54 php_pdo_stmt_set_column_count(stmt, sqlite3_data_count(S->stmt)); in pdo_sqlite_stmt_execute()
58 php_pdo_stmt_set_column_count(stmt, sqlite3_column_count(S->stmt)); in pdo_sqlite_stmt_execute()
59 stmt->row_count = sqlite3_changes(S->H->db); in pdo_sqlite_stmt_execute()
60 sqlite3_reset(S->stmt); in pdo_sqlite_stmt_execute()
61 S->done = 1; in pdo_sqlite_stmt_execute()
65 sqlite3_reset(S->stmt); in pdo_sqlite_stmt_execute()
78 pdo_sqlite_stmt *S = (pdo_sqlite_stmt*)stmt->driver_data; in pdo_sqlite_stmt_param_hook() local
83 if (stmt->executed && !S->done) { in pdo_sqlite_stmt_param_hook()
84 sqlite3_reset(S->stmt); in pdo_sqlite_stmt_param_hook()
85 S->done = 1; in pdo_sqlite_stmt_param_hook()
91 param->paramno = sqlite3_bind_parameter_index(S->stmt, ZSTR_VAL(param->name)) - 1; in pdo_sqlite_stmt_param_hook()
99 if (sqlite3_bind_null(S->stmt, param->paramno + 1) == SQLITE_OK) { in pdo_sqlite_stmt_param_hook()
113 if (sqlite3_bind_null(S->stmt, param->paramno + 1) == SQLITE_OK) { in pdo_sqlite_stmt_param_hook()
119 if (SQLITE_OK == sqlite3_bind_int64(S->stmt, param->paramno + 1, Z_LVAL_P(parameter))) { in pdo_sqlite_stmt_param_hook()
123 if (SQLITE_OK == sqlite3_bind_int(S->stmt, param->paramno + 1, Z_LVAL_P(parameter))) { in pdo_sqlite_stmt_param_hook()
149 if (sqlite3_bind_null(S->stmt, param->paramno + 1) == SQLITE_OK) { in pdo_sqlite_stmt_param_hook()
160 if (SQLITE_OK == sqlite3_bind_blob(S->stmt, param->paramno + 1, in pdo_sqlite_stmt_param_hook()
176 if (sqlite3_bind_null(S->stmt, param->paramno + 1) == SQLITE_OK) { in pdo_sqlite_stmt_param_hook()
183 if (SQLITE_OK == sqlite3_bind_text(S->stmt, param->paramno + 1, in pdo_sqlite_stmt_param_hook()
205 pdo_sqlite_stmt *S = (pdo_sqlite_stmt*)stmt->driver_data; in pdo_sqlite_stmt_fetch() local
207 if (!S->stmt) { in pdo_sqlite_stmt_fetch()
210 if (S->pre_fetched) { in pdo_sqlite_stmt_fetch()
211 S->pre_fetched = 0; in pdo_sqlite_stmt_fetch()
214 if (S->done) { in pdo_sqlite_stmt_fetch()
217 i = sqlite3_step(S->stmt); in pdo_sqlite_stmt_fetch()
223 S->done = 1; in pdo_sqlite_stmt_fetch()
224 sqlite3_reset(S->stmt); in pdo_sqlite_stmt_fetch()
228 sqlite3_reset(S->stmt); in pdo_sqlite_stmt_fetch()
238 pdo_sqlite_stmt *S = (pdo_sqlite_stmt*)stmt->driver_data; in pdo_sqlite_stmt_describe() local
241 if(colno >= sqlite3_column_count(S->stmt)) { in pdo_sqlite_stmt_describe()
247 str = sqlite3_column_name(S->stmt, colno); in pdo_sqlite_stmt_describe()
258 pdo_sqlite_stmt *S = (pdo_sqlite_stmt*)stmt->driver_data; in pdo_sqlite_stmt_get_col() local
259 if (!S->stmt) { in pdo_sqlite_stmt_get_col()
262 if(colno >= sqlite3_data_count(S->stmt)) { in pdo_sqlite_stmt_get_col()
267 switch (sqlite3_column_type(S->stmt, colno)) { in pdo_sqlite_stmt_get_col()
273 int64_t i = sqlite3_column_int64(S->stmt, colno); in pdo_sqlite_stmt_get_col()
277 (char *) sqlite3_column_text(S->stmt, colno), in pdo_sqlite_stmt_get_col()
278 sqlite3_column_bytes(S->stmt, colno)); in pdo_sqlite_stmt_get_col()
287 ZVAL_DOUBLE(result, sqlite3_column_double(S->stmt, colno)); in pdo_sqlite_stmt_get_col()
292 sqlite3_column_blob(S->stmt, colno), sqlite3_column_bytes(S->stmt, colno)); in pdo_sqlite_stmt_get_col()
297 (char *) sqlite3_column_text(S->stmt, colno), sqlite3_column_bytes(S->stmt, colno)); in pdo_sqlite_stmt_get_col()
304 pdo_sqlite_stmt *S = (pdo_sqlite_stmt*)stmt->driver_data; in pdo_sqlite_stmt_col_meta() local
308 if (!S->stmt) { in pdo_sqlite_stmt_col_meta()
311 if(colno >= sqlite3_column_count(S->stmt)) { in pdo_sqlite_stmt_col_meta()
320 switch (sqlite3_column_type(S->stmt, colno)) { in pdo_sqlite_stmt_col_meta()
346 str = sqlite3_column_decltype(S->stmt, colno); in pdo_sqlite_stmt_col_meta()
352 str = sqlite3_column_table_name(S->stmt, colno); in pdo_sqlite_stmt_col_meta()
365 pdo_sqlite_stmt *S = (pdo_sqlite_stmt*)stmt->driver_data; in pdo_sqlite_stmt_cursor_closer() local
366 sqlite3_reset(S->stmt); in pdo_sqlite_stmt_cursor_closer()
372 pdo_sqlite_stmt *S = (pdo_sqlite_stmt*)stmt->driver_data; in pdo_sqlite_stmt_get_attribute() local
379 if (sqlite3_stmt_readonly(S->stmt)) { in pdo_sqlite_stmt_get_attribute()