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 (isc_dsql_execute(H->isc_status, &H->tr, &S->stmt, PDO_FB_SQLDA_VERSION, S->in_sqlda)) { in firebird_stmt_execute()
112 switch (S->statement_type) { in firebird_stmt_execute()
117 if (isc_dsql_sql_info(H->isc_status, &S->stmt, sizeof ( info_count), in firebird_stmt_execute()
141 *S->name = 0; in firebird_stmt_execute()
142S->cursor_open = (S->out_sqlda.sqln > 0); /* A cursor is opened, when more than zero columns retur… in firebird_stmt_execute()
143 S->exhausted = !S->cursor_open; in firebird_stmt_execute()
158 pdo_firebird_stmt *S = (pdo_firebird_stmt*)stmt->driver_data; in firebird_stmt_fetch() local
159 pdo_firebird_db_handle *H = S->H; in firebird_stmt_fetch()
164 } else if (!S->exhausted) { in firebird_stmt_fetch()
165 if (isc_dsql_fetch(H->isc_status, &S->stmt, PDO_FB_SQLDA_VERSION, &S->out_sqlda)) { in firebird_stmt_fetch()
169 S->exhausted = 1; in firebird_stmt_fetch()
172 if (S->statement_type == isc_info_sql_stmt_exec_procedure) { in firebird_stmt_fetch()
173 S->exhausted = 1; in firebird_stmt_fetch()
185 pdo_firebird_stmt *S = (pdo_firebird_stmt*)stmt->driver_data; in firebird_stmt_describe() local
187 XSQLVAR *var = &S->out_sqlda.sqlvar[colno]; in firebird_stmt_describe()
195 colname_len = (S->H->fetch_table_names && var->relname_length) in firebird_stmt_describe()
224 pdo_firebird_stmt *S = (pdo_firebird_stmt*)stmt->driver_data; in firebird_fetch_blob() local
225 pdo_firebird_db_handle *H = S->H; in firebird_fetch_blob()
270 *ptr = S->fetch_buf[colno] = erealloc(*ptr, *len+1); in firebird_fetch_blob()
301 pdo_firebird_stmt *S = (pdo_firebird_stmt*)stmt->driver_data; in firebird_stmt_get_col() local
302 XSQLVAR const *var = &S->out_sqlda.sqlvar[colno]; in firebird_stmt_get_col()
340 *ptr = FETCH_BUF(S->fetch_buf[colno], char, CHAR_BUF_LEN, NULL); in firebird_stmt_get_col()
365 *ptr = FETCH_BUF(S->fetch_buf[colno], char, CHAR_BUF_LEN, NULL); in firebird_stmt_get_col()
369 *ptr = FETCH_BUF(S->fetch_buf[colno], char, CHAR_BUF_LEN, NULL); in firebird_stmt_get_col()
373 *ptr = FETCH_BUF(S->fetch_buf[colno], char, CHAR_BUF_LEN, NULL); in firebird_stmt_get_col()
377 *ptr = FETCH_BUF(S->fetch_buf[colno], char, CHAR_BUF_LEN, NULL); in firebird_stmt_get_col()
381 *ptr = FETCH_BUF(S->fetch_buf[colno], char, CHAR_BUF_LEN, NULL); in firebird_stmt_get_col()
386 fmt = S->H->date_format ? S->H->date_format : PDO_FB_DEF_DATE_FMT; in firebird_stmt_get_col()
390 fmt = S->H->time_format ? S->H->time_format : PDO_FB_DEF_TIME_FMT; in firebird_stmt_get_col()
394 fmt = S->H->timestamp_format ? S->H->timestamp_format : PDO_FB_DEF_TIMESTAMP_FMT; in firebird_stmt_get_col()
398 *ptr = FETCH_BUF(S->fetch_buf[colno], char, *len, NULL); in firebird_stmt_get_col()
413 pdo_firebird_stmt *S = (pdo_firebird_stmt*)stmt->driver_data; in firebird_bind_blob() local
414 pdo_firebird_db_handle *H = S->H; in firebird_bind_blob()
453 pdo_firebird_stmt *S = (pdo_firebird_stmt*)stmt->driver_data; in firebird_stmt_param_hook() local
454 XSQLDA *sqlda = param->is_param ? S->in_sqlda : &S->out_sqlda; in firebird_stmt_param_hook()
463 S->H->last_app_error = "Invalid parameter index"; in firebird_stmt_param_hook()
470 if (SUCCESS == zend_hash_find(S->named_params, param->name, param->namelen+1, (void*)&index)) { in firebird_stmt_param_hook()
489 S->H->last_app_error = "Invalid parameter name"; in firebird_stmt_param_hook()
523 S->H->last_app_error = "Cannot bind to array field"; in firebird_stmt_param_hook()
573 S->H->last_app_error = "Parameter requires non-null value"; in firebird_stmt_param_hook()
580 S->H->last_app_error = "Binding arrays/objects is not supported"; in firebird_stmt_param_hook()
635 pdo_firebird_stmt *S = (pdo_firebird_stmt*)stmt->driver_data; in firebird_stmt_set_attribute() local
643 if (isc_dsql_set_cursor_name(S->H->isc_status, &S->stmt, Z_STRVAL_P(val),0)) { in firebird_stmt_set_attribute()
647 strlcpy(S->name, Z_STRVAL_P(val), sizeof(S->name)); in firebird_stmt_set_attribute()
656 pdo_firebird_stmt *S = (pdo_firebird_stmt*)stmt->driver_data; in firebird_stmt_get_attribute() local
662 if (*S->name) { in firebird_stmt_get_attribute()
663 ZVAL_STRING(val,S->name,1); in firebird_stmt_get_attribute()
675 pdo_firebird_stmt *S = (pdo_firebird_stmt*)stmt->driver_data; in firebird_stmt_cursor_closer() local
678 …if ((*S->name || S->cursor_open) && isc_dsql_free_statement(S->H->isc_status, &S->stmt, DSQL_close… in firebird_stmt_cursor_closer()
682 *S->name = 0; in firebird_stmt_cursor_closer()
683 S->cursor_open = 0; in firebird_stmt_cursor_closer()