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()
154 *S->name = 0; in firebird_stmt_execute()
155 S->cursor_open = S->out_sqlda.sqln && (S->statement_type != isc_info_sql_stmt_exec_procedure); in firebird_stmt_execute()
156 S->exhausted = !S->out_sqlda.sqln; /* There are data to fetch */ in firebird_stmt_execute()
171 pdo_firebird_stmt *S = (pdo_firebird_stmt*)stmt->driver_data; in firebird_stmt_fetch() local
172 pdo_firebird_db_handle *H = S->H; in firebird_stmt_fetch()
177 } else if (!S->exhausted) { in firebird_stmt_fetch()
178 if (S->statement_type == isc_info_sql_stmt_exec_procedure) { in firebird_stmt_fetch()
180 S->exhausted = 1; in firebird_stmt_fetch()
183 if (isc_dsql_fetch(H->isc_status, &S->stmt, PDO_FB_SQLDA_VERSION, &S->out_sqlda)) { in firebird_stmt_fetch()
187 S->exhausted = 1; in firebird_stmt_fetch()
200 pdo_firebird_stmt *S = (pdo_firebird_stmt*)stmt->driver_data; in firebird_stmt_describe() local
202 XSQLVAR *var = &S->out_sqlda.sqlvar[colno]; in firebird_stmt_describe()
206 colname_len = (S->H->fetch_table_names && var->relname_length) in firebird_stmt_describe()
251 pdo_firebird_stmt *S = (pdo_firebird_stmt*)stmt->driver_data; in firebird_fetch_blob() local
252 pdo_firebird_db_handle *H = S->H; in firebird_fetch_blob()
297 *ptr = S->fetch_buf[colno] = erealloc(S->fetch_buf[colno], *len+1); in firebird_fetch_blob()
328 pdo_firebird_stmt *S = (pdo_firebird_stmt*)stmt->driver_data; in firebird_stmt_get_col() local
329 XSQLVAR const *var = &S->out_sqlda.sqlvar[colno]; in firebird_stmt_get_col()
367 *ptr = FETCH_BUF(S->fetch_buf[colno], char, CHAR_BUF_LEN, NULL); in firebird_stmt_get_col()
393 *ptr = FETCH_BUF(S->fetch_buf[colno], zend_long, 1, NULL); in firebird_stmt_get_col()
398 *ptr = FETCH_BUF(S->fetch_buf[colno], zend_long, 1, NULL); in firebird_stmt_get_col()
404 *ptr = FETCH_BUF(S->fetch_buf[colno], zend_long, 1, NULL); in firebird_stmt_get_col()
407 *ptr = FETCH_BUF(S->fetch_buf[colno], char, CHAR_BUF_LEN, NULL); in firebird_stmt_get_col()
412 *ptr = FETCH_BUF(S->fetch_buf[colno], char, CHAR_BUF_LEN, NULL); in firebird_stmt_get_col()
416 *ptr = FETCH_BUF(S->fetch_buf[colno], char, CHAR_BUF_LEN, NULL); in firebird_stmt_get_col()
421 fmt = S->H->date_format ? S->H->date_format : PDO_FB_DEF_DATE_FMT; in firebird_stmt_get_col()
425 fmt = S->H->time_format ? S->H->time_format : PDO_FB_DEF_TIME_FMT; in firebird_stmt_get_col()
429 fmt = S->H->timestamp_format ? S->H->timestamp_format : PDO_FB_DEF_TIMESTAMP_FMT; in firebird_stmt_get_col()
433 *ptr = FETCH_BUF(S->fetch_buf[colno], char, *len, NULL); in firebird_stmt_get_col()
448 pdo_firebird_stmt *S = (pdo_firebird_stmt*)stmt->driver_data; in firebird_bind_blob() local
449 pdo_firebird_db_handle *H = S->H; in firebird_bind_blob()
492 pdo_firebird_stmt *S = (pdo_firebird_stmt*)stmt->driver_data; in firebird_stmt_param_hook() local
493 XSQLDA *sqlda = param->is_param ? S->in_sqlda : &S->out_sqlda; in firebird_stmt_param_hook()
502 S->H->last_app_error = "Invalid parameter index"; in firebird_stmt_param_hook()
509 if ((index = zend_hash_find(S->named_params, param->name)) != NULL) { in firebird_stmt_param_hook()
528 S->H->last_app_error = "Invalid parameter name"; in firebird_stmt_param_hook()
582 S->H->last_app_error = "Cannot bind to array field"; in firebird_stmt_param_hook()
590 S->H->last_app_error = "Parameter requires non-null value"; in firebird_stmt_param_hook()
642 S->H->last_app_error = "Parameter requires non-null value"; in firebird_stmt_param_hook()
649 S->H->last_app_error = "Binding arrays/objects is not supported"; in firebird_stmt_param_hook()
711 pdo_firebird_stmt *S = (pdo_firebird_stmt*)stmt->driver_data; in firebird_stmt_set_attribute() local
719 if (isc_dsql_set_cursor_name(S->H->isc_status, &S->stmt, Z_STRVAL_P(val),0)) { in firebird_stmt_set_attribute()
723 strlcpy(S->name, Z_STRVAL_P(val), sizeof(S->name)); in firebird_stmt_set_attribute()
732 pdo_firebird_stmt *S = (pdo_firebird_stmt*)stmt->driver_data; in firebird_stmt_get_attribute() local
738 if (*S->name) { in firebird_stmt_get_attribute()
739 ZVAL_STRING(val, S->name); in firebird_stmt_get_attribute()
751 pdo_firebird_stmt *S = (pdo_firebird_stmt*)stmt->driver_data; in firebird_stmt_cursor_closer() local
754 …if ((*S->name || S->cursor_open) && isc_dsql_free_statement(S->H->isc_status, &S->stmt, DSQL_close… in firebird_stmt_cursor_closer()
758 *S->name = 0; in firebird_stmt_cursor_closer()
759 S->cursor_open = 0; in firebird_stmt_cursor_closer()