Lines Matching refs:sqldata
33 #define READ_AND_RETURN_USING_MEMCPY(type, sqldata) do { \ argument
35 memcpy(&ret, sqldata, sizeof(ret)); \
39 static zend_always_inline ISC_INT64 get_isc_int64_from_sqldata(const ISC_SCHAR *sqldata) in get_isc_int64_from_sqldata() argument
41 READ_AND_RETURN_USING_MEMCPY(ISC_INT64, sqldata); in get_isc_int64_from_sqldata()
44 static zend_always_inline ISC_LONG get_isc_long_from_sqldata(const ISC_SCHAR *sqldata) in get_isc_long_from_sqldata() argument
46 READ_AND_RETURN_USING_MEMCPY(ISC_LONG, sqldata); in get_isc_long_from_sqldata()
49 static zend_always_inline double get_double_from_sqldata(const ISC_SCHAR *sqldata) in get_double_from_sqldata() argument
51 READ_AND_RETURN_USING_MEMCPY(double, sqldata); in get_double_from_sqldata()
54 static zend_always_inline float get_float_from_sqldata(const ISC_SCHAR *sqldata) in get_float_from_sqldata() argument
56 READ_AND_RETURN_USING_MEMCPY(float, sqldata); in get_float_from_sqldata()
59 static zend_always_inline ISC_TIMESTAMP get_isc_timestamp_from_sqldata(const ISC_SCHAR *sqldata) in get_isc_timestamp_from_sqldata() argument
61 READ_AND_RETURN_USING_MEMCPY(ISC_TIMESTAMP, sqldata); in get_isc_timestamp_from_sqldata()
64 static zend_always_inline ISC_QUAD get_isc_quad_from_sqldata(const ISC_SCHAR *sqldata) in get_isc_quad_from_sqldata() argument
66 READ_AND_RETURN_USING_MEMCPY(ISC_QUAD, sqldata); in get_isc_quad_from_sqldata()
137 var->sqldata = &((char*)var->sqlind)[sizeof(short)]; in firebird_stmt_execute()
416 n = *(short*)var->sqldata; in firebird_stmt_get_col()
419 n = get_isc_long_from_sqldata(var->sqldata); in firebird_stmt_get_col()
422 n = get_isc_int64_from_sqldata(var->sqldata); in firebird_stmt_get_col()
430 str = zend_strpprintf(0, "%.*F", -var->sqlscale, get_double_from_sqldata(var->sqldata)); in firebird_stmt_get_col()
447 ZVAL_STRINGL_FAST(result, &var->sqldata[2], *(short*)var->sqldata); in firebird_stmt_get_col()
450 ZVAL_STRINGL_FAST(result, var->sqldata, var->sqllen); in firebird_stmt_get_col()
453 ZVAL_LONG(result, *(short*)var->sqldata); in firebird_stmt_get_col()
456 ZVAL_LONG(result, get_isc_long_from_sqldata(var->sqldata)); in firebird_stmt_get_col()
460 ZVAL_LONG(result, get_isc_int64_from_sqldata(var->sqldata)); in firebird_stmt_get_col()
462 … ZVAL_STR(result, zend_strpprintf(0, "%" LL_MASK "d", get_isc_int64_from_sqldata(var->sqldata))); in firebird_stmt_get_col()
467 ZVAL_STR(result, zend_strpprintf_unchecked(0, "%.8H", get_float_from_sqldata(var->sqldata))); in firebird_stmt_get_col()
471 ZVAL_STR(result, zend_strpprintf_unchecked(0, "%.16H", get_double_from_sqldata(var->sqldata))); in firebird_stmt_get_col()
475 ZVAL_BOOL(result, *(FB_BOOLEAN*)var->sqldata); in firebird_stmt_get_col()
479 isc_decode_sql_date((ISC_DATE*)var->sqldata, &t); in firebird_stmt_get_col()
483 isc_decode_sql_time((ISC_TIME*)var->sqldata, &t); in firebird_stmt_get_col()
488 ISC_TIMESTAMP timestamp = get_isc_timestamp_from_sqldata(var->sqldata); in firebird_stmt_get_col()
499 ISC_QUAD quad = get_isc_quad_from_sqldata(var->sqldata); in firebird_stmt_get_col()
607 var->sqldata = &((char*)var->sqlind)[sizeof(short)]; in firebird_stmt_param_hook()
654 ISC_QUAD quad = get_isc_quad_from_sqldata(var->sqldata); in firebird_stmt_param_hook()
656 memcpy(var->sqldata, &quad, sizeof(quad)); in firebird_stmt_param_hook()
671 *(FB_BOOLEAN*)var->sqldata = zend_is_true(parameter) ? FB_TRUE : FB_FALSE; in firebird_stmt_param_hook()
679 *(FB_BOOLEAN*)var->sqldata = FB_FALSE; in firebird_stmt_param_hook()
685 *(FB_BOOLEAN*)var->sqldata = (lval != 0) ? FB_TRUE : FB_FALSE; in firebird_stmt_param_hook()
688 *(FB_BOOLEAN*)var->sqldata = (dval != 0) ? FB_TRUE : FB_FALSE; in firebird_stmt_param_hook()
692 *(FB_BOOLEAN*)var->sqldata = FB_TRUE; in firebird_stmt_param_hook()
694 *(FB_BOOLEAN*)var->sqldata = FB_FALSE; in firebird_stmt_param_hook()
724 var->sqldata = (void*)&Z_LVAL_P(parameter); in firebird_stmt_param_hook()
730 var->sqldata = (void*)&Z_DVAL_P(parameter); in firebird_stmt_param_hook()
751 var->sqldata = Z_STRVAL_P(parameter); in firebird_stmt_param_hook()