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()
115 if (S->statement_type == isc_info_sql_stmt_exec_procedure) { in firebird_stmt_execute()
116 …if (isc_dsql_execute2(H->isc_status, &H->tr, &S->stmt, PDO_FB_SQLDA_VERSION, S->in_sqlda, &S->out_… in firebird_stmt_execute()
119 } else if (isc_dsql_execute(H->isc_status, &H->tr, &S->stmt, PDO_FB_SQLDA_VERSION, S->in_sqlda)) { in firebird_stmt_execute()
128 switch (S->statement_type) { in firebird_stmt_execute()
133 if (isc_dsql_sql_info(H->isc_status, &S->stmt, sizeof ( info_count), in firebird_stmt_execute()
163 *S->name = 0; in firebird_stmt_execute()
164 S->cursor_open = S->out_sqlda.sqln && (S->statement_type != isc_info_sql_stmt_exec_procedure); in firebird_stmt_execute()
165 S->exhausted = !S->out_sqlda.sqln; /* There are data to fetch */ in firebird_stmt_execute()
181 pdo_firebird_stmt *S = (pdo_firebird_stmt*)stmt->driver_data; in firebird_stmt_fetch() local
182 pdo_firebird_db_handle *H = S->H; in firebird_stmt_fetch()
187 } else if (!S->exhausted) { in firebird_stmt_fetch()
188 if (S->statement_type == isc_info_sql_stmt_exec_procedure) { in firebird_stmt_fetch()
190 S->exhausted = 1; in firebird_stmt_fetch()
193 if (isc_dsql_fetch(H->isc_status, &S->stmt, PDO_FB_SQLDA_VERSION, &S->out_sqlda)) { in firebird_stmt_fetch()
197 S->exhausted = 1; in firebird_stmt_fetch()
210 pdo_firebird_stmt *S = (pdo_firebird_stmt*)stmt->driver_data; in firebird_stmt_describe() local
212 XSQLVAR *var = &S->out_sqlda.sqlvar[colno]; in firebird_stmt_describe()
216 colname_len = (S->H->fetch_table_names && var->relname_length) in firebird_stmt_describe()
266 pdo_firebird_stmt *S = (pdo_firebird_stmt*)stmt->driver_data; in firebird_fetch_blob() local
267 pdo_firebird_db_handle *H = S->H; in firebird_fetch_blob()
317 *ptr = S->fetch_buf[colno] = erealloc(S->fetch_buf[colno], *len+1); in firebird_fetch_blob()
348 pdo_firebird_stmt *S = (pdo_firebird_stmt*)stmt->driver_data; in firebird_stmt_get_col() local
349 XSQLVAR const *var = &S->out_sqlda.sqlvar[colno]; in firebird_stmt_get_col()
387 *ptr = FETCH_BUF(S->fetch_buf[colno], char, CHAR_BUF_LEN, NULL); in firebird_stmt_get_col()
415 *ptr = FETCH_BUF(S->fetch_buf[colno], zend_long, 1, NULL); in firebird_stmt_get_col()
420 *ptr = FETCH_BUF(S->fetch_buf[colno], zend_long, 1, NULL); in firebird_stmt_get_col()
426 *ptr = FETCH_BUF(S->fetch_buf[colno], zend_long, 1, NULL); in firebird_stmt_get_col()
429 *ptr = FETCH_BUF(S->fetch_buf[colno], char, CHAR_BUF_LEN, NULL); in firebird_stmt_get_col()
434 *ptr = FETCH_BUF(S->fetch_buf[colno], char, CHAR_BUF_LEN, NULL); in firebird_stmt_get_col()
438 *ptr = FETCH_BUF(S->fetch_buf[colno], char, CHAR_BUF_LEN, NULL); in firebird_stmt_get_col()
444 *ptr = FETCH_BUF(S->fetch_buf[colno], zend_bool, 1, NULL); in firebird_stmt_get_col()
450 fmt = S->H->date_format ? S->H->date_format : PDO_FB_DEF_DATE_FMT; in firebird_stmt_get_col()
454 fmt = S->H->time_format ? S->H->time_format : PDO_FB_DEF_TIME_FMT; in firebird_stmt_get_col()
458 fmt = S->H->timestamp_format ? S->H->timestamp_format : PDO_FB_DEF_TIMESTAMP_FMT; in firebird_stmt_get_col()
462 *ptr = FETCH_BUF(S->fetch_buf[colno], char, *len, NULL); in firebird_stmt_get_col()
477 pdo_firebird_stmt *S = (pdo_firebird_stmt*)stmt->driver_data; in firebird_bind_blob() local
478 pdo_firebird_db_handle *H = S->H; in firebird_bind_blob()
520 pdo_firebird_stmt *S = (pdo_firebird_stmt*)stmt->driver_data; in firebird_stmt_param_hook() local
521 XSQLDA *sqlda = param->is_param ? S->in_sqlda : &S->out_sqlda; in firebird_stmt_param_hook()
530 S->H->last_app_error = "Invalid parameter index"; in firebird_stmt_param_hook()
537 if ((index = zend_hash_find(S->named_params, param->name)) != NULL) { in firebird_stmt_param_hook()
556 S->H->last_app_error = "Invalid parameter name"; in firebird_stmt_param_hook()
610 S->H->last_app_error = "Cannot bind to array field"; in firebird_stmt_param_hook()
618 S->H->last_app_error = "Parameter requires non-null value"; in firebird_stmt_param_hook()
662 S->H->last_app_error = "Cannot convert string to boolean"; in firebird_stmt_param_hook()
674 S->H->last_app_error = "Binding arrays/objects is not supported"; in firebird_stmt_param_hook()
724 S->H->last_app_error = "Parameter requires non-null value"; in firebird_stmt_param_hook()
731 S->H->last_app_error = "Binding arrays/objects is not supported"; in firebird_stmt_param_hook()
793 pdo_firebird_stmt *S = (pdo_firebird_stmt*)stmt->driver_data; in firebird_stmt_set_attribute() local
803 if (isc_dsql_set_cursor_name(S->H->isc_status, &S->stmt, Z_STRVAL_P(val),0)) { in firebird_stmt_set_attribute()
807 strlcpy(S->name, Z_STRVAL_P(val), sizeof(S->name)); in firebird_stmt_set_attribute()
816 pdo_firebird_stmt *S = (pdo_firebird_stmt*)stmt->driver_data; in firebird_stmt_get_attribute() local
822 if (*S->name) { in firebird_stmt_get_attribute()
823 ZVAL_STRING(val, S->name); in firebird_stmt_get_attribute()
835 pdo_firebird_stmt *S = (pdo_firebird_stmt*)stmt->driver_data; in firebird_stmt_cursor_closer() local
838 …if ((*S->name || S->cursor_open) && isc_dsql_free_statement(S->H->isc_status, &S->stmt, DSQL_close… in firebird_stmt_cursor_closer()
842 *S->name = 0; in firebird_stmt_cursor_closer()
843 S->cursor_open = 0; in firebird_stmt_cursor_closer()