Lines Matching refs:S

53 	pdo_firebird_stmt *S = (pdo_firebird_stmt*)stmt->driver_data;  in firebird_stmt_dtor()  local
57 if (isc_dsql_free_statement(S->H->isc_status, &S->stmt, DSQL_drop)) { in firebird_stmt_dtor()
63 for (i = 0; i < S->out_sqlda.sqld; ++i) { in firebird_stmt_dtor()
64 if (S->fetch_buf[i]) { in firebird_stmt_dtor()
65 efree(S->fetch_buf[i]); in firebird_stmt_dtor()
68 efree(S->fetch_buf); in firebird_stmt_dtor()
70 zend_hash_destroy(S->named_params); in firebird_stmt_dtor()
71 FREE_HASHTABLE(S->named_params); in firebird_stmt_dtor()
74 if (S->in_sqlda) { in firebird_stmt_dtor()
75 free_sqlda(S->in_sqlda); in firebird_stmt_dtor()
76 efree(S->in_sqlda); in firebird_stmt_dtor()
79 free_sqlda(&S->out_sqlda); in firebird_stmt_dtor()
80 efree(S); in firebird_stmt_dtor()
89 pdo_firebird_stmt *S = (pdo_firebird_stmt*)stmt->driver_data; in firebird_stmt_execute() local
90 pdo_firebird_db_handle *H = S->H; in firebird_stmt_execute()
97 …if ((*S->name || S->cursor_open) && isc_dsql_free_statement(H->isc_status, &S->stmt, DSQL_close)) { in firebird_stmt_execute()
100 S->cursor_open = 0; in firebird_stmt_execute()
103 if (S->out_sqlda.sqld) { in firebird_stmt_execute()
105 for (i = 0; i < S->out_sqlda.sqld; i++) { in firebird_stmt_execute()
106 XSQLVAR *var = &S->out_sqlda.sqlvar[i]; in firebird_stmt_execute()
112 if (S->statement_type == isc_info_sql_stmt_exec_procedure) { in firebird_stmt_execute()
113 …if (isc_dsql_execute2(H->isc_status, &H->tr, &S->stmt, PDO_FB_SQLDA_VERSION, S->in_sqlda, &S->out_… in firebird_stmt_execute()
116 } else if (isc_dsql_execute(H->isc_status, &H->tr, &S->stmt, PDO_FB_SQLDA_VERSION, S->in_sqlda)) { in firebird_stmt_execute()
125 switch (S->statement_type) { in firebird_stmt_execute()
130 if (isc_dsql_sql_info(H->isc_status, &S->stmt, sizeof ( info_count), in firebird_stmt_execute()
160 *S->name = 0; in firebird_stmt_execute()
161 S->cursor_open = S->out_sqlda.sqln && (S->statement_type != isc_info_sql_stmt_exec_procedure); in firebird_stmt_execute()
162 S->exhausted = !S->out_sqlda.sqln; /* There are data to fetch */ in firebird_stmt_execute()
178 pdo_firebird_stmt *S = (pdo_firebird_stmt*)stmt->driver_data; in firebird_stmt_fetch() local
179 pdo_firebird_db_handle *H = S->H; in firebird_stmt_fetch()
184 } else if (!S->exhausted) { in firebird_stmt_fetch()
185 if (S->statement_type == isc_info_sql_stmt_exec_procedure) { in firebird_stmt_fetch()
187 S->exhausted = 1; in firebird_stmt_fetch()
190 if (isc_dsql_fetch(H->isc_status, &S->stmt, PDO_FB_SQLDA_VERSION, &S->out_sqlda)) { in firebird_stmt_fetch()
194 S->exhausted = 1; in firebird_stmt_fetch()
207 pdo_firebird_stmt *S = (pdo_firebird_stmt*)stmt->driver_data; in firebird_stmt_describe() local
209 XSQLVAR *var = &S->out_sqlda.sqlvar[colno]; in firebird_stmt_describe()
213 colname_len = (S->H->fetch_table_names && var->relname_length) in firebird_stmt_describe()
263 pdo_firebird_stmt *S = (pdo_firebird_stmt*)stmt->driver_data; in firebird_fetch_blob() local
264 pdo_firebird_db_handle *H = S->H; in firebird_fetch_blob()
314 *ptr = S->fetch_buf[colno] = erealloc(S->fetch_buf[colno], *len+1); in firebird_fetch_blob()
345 pdo_firebird_stmt *S = (pdo_firebird_stmt*)stmt->driver_data; in firebird_stmt_get_col() local
346 XSQLVAR const *var = &S->out_sqlda.sqlvar[colno]; in firebird_stmt_get_col()
384 *ptr = FETCH_BUF(S->fetch_buf[colno], char, CHAR_BUF_LEN, NULL); in firebird_stmt_get_col()
410 *ptr = FETCH_BUF(S->fetch_buf[colno], zend_long, 1, NULL); in firebird_stmt_get_col()
415 *ptr = FETCH_BUF(S->fetch_buf[colno], zend_long, 1, NULL); in firebird_stmt_get_col()
421 *ptr = FETCH_BUF(S->fetch_buf[colno], zend_long, 1, NULL); in firebird_stmt_get_col()
424 *ptr = FETCH_BUF(S->fetch_buf[colno], char, CHAR_BUF_LEN, NULL); in firebird_stmt_get_col()
429 *ptr = FETCH_BUF(S->fetch_buf[colno], char, CHAR_BUF_LEN, NULL); in firebird_stmt_get_col()
433 *ptr = FETCH_BUF(S->fetch_buf[colno], char, CHAR_BUF_LEN, NULL); in firebird_stmt_get_col()
439 *ptr = FETCH_BUF(S->fetch_buf[colno], zend_bool, 1, NULL); in firebird_stmt_get_col()
445 fmt = S->H->date_format ? S->H->date_format : PDO_FB_DEF_DATE_FMT; in firebird_stmt_get_col()
449 fmt = S->H->time_format ? S->H->time_format : PDO_FB_DEF_TIME_FMT; in firebird_stmt_get_col()
453 fmt = S->H->timestamp_format ? S->H->timestamp_format : PDO_FB_DEF_TIMESTAMP_FMT; in firebird_stmt_get_col()
457 *ptr = FETCH_BUF(S->fetch_buf[colno], char, *len, NULL); in firebird_stmt_get_col()
472 pdo_firebird_stmt *S = (pdo_firebird_stmt*)stmt->driver_data; in firebird_bind_blob() local
473 pdo_firebird_db_handle *H = S->H; in firebird_bind_blob()
515 pdo_firebird_stmt *S = (pdo_firebird_stmt*)stmt->driver_data; in firebird_stmt_param_hook() local
516 XSQLDA *sqlda = param->is_param ? S->in_sqlda : &S->out_sqlda; in firebird_stmt_param_hook()
525 S->H->last_app_error = "Invalid parameter index"; in firebird_stmt_param_hook()
532 if ((index = zend_hash_find(S->named_params, param->name)) != NULL) { in firebird_stmt_param_hook()
551 S->H->last_app_error = "Invalid parameter name"; in firebird_stmt_param_hook()
605 S->H->last_app_error = "Cannot bind to array field"; in firebird_stmt_param_hook()
613 S->H->last_app_error = "Parameter requires non-null value"; in firebird_stmt_param_hook()
665 S->H->last_app_error = "Parameter requires non-null value"; in firebird_stmt_param_hook()
672 S->H->last_app_error = "Binding arrays/objects is not supported"; in firebird_stmt_param_hook()
734 pdo_firebird_stmt *S = (pdo_firebird_stmt*)stmt->driver_data; in firebird_stmt_set_attribute() local
742 if (isc_dsql_set_cursor_name(S->H->isc_status, &S->stmt, Z_STRVAL_P(val),0)) { in firebird_stmt_set_attribute()
746 strlcpy(S->name, Z_STRVAL_P(val), sizeof(S->name)); in firebird_stmt_set_attribute()
755 pdo_firebird_stmt *S = (pdo_firebird_stmt*)stmt->driver_data; in firebird_stmt_get_attribute() local
761 if (*S->name) { in firebird_stmt_get_attribute()
762 ZVAL_STRING(val, S->name); in firebird_stmt_get_attribute()
774 pdo_firebird_stmt *S = (pdo_firebird_stmt*)stmt->driver_data; in firebird_stmt_cursor_closer() local
777 …if ((*S->name || S->cursor_open) && isc_dsql_free_statement(S->H->isc_status, &S->stmt, DSQL_close… in firebird_stmt_cursor_closer()
781 *S->name = 0; in firebird_stmt_cursor_closer()
782 S->cursor_open = 0; in firebird_stmt_cursor_closer()