|
| 1 | +/* |
| 2 | + +----------------------------------------------------------------------+ |
| 3 | + | Swoole | |
| 4 | + +----------------------------------------------------------------------+ |
| 5 | + | Copyright (c) 2012-2018 The Swoole Group | |
| 6 | + +----------------------------------------------------------------------+ |
| 7 | + | This source file is subject to version 2.0 of the Apache license, | |
| 8 | + | that is bundled with this package in the file LICENSE, and is | |
| 9 | + | available through the world-wide-web at the following url: | |
| 10 | + | http://www.apache.org/licenses/LICENSE-2.0.html | |
| 11 | + | If you did not receive a copy of the Apache2.0 license and are unable| |
| 12 | + | to obtain it through the world-wide-web, please send a note to | |
| 13 | + | license@swoole.com so we can mail you a copy immediately. | |
| 14 | + +----------------------------------------------------------------------+ |
| 15 | + | Author: NathanFreeman <mariasocute@163.com> | |
| 16 | + +----------------------------------------------------------------------+ |
| 17 | +*/ |
| 18 | +#ifndef SWOOLE_SRC_PHP_SWOOLE_FIREBIRD_H |
| 19 | +#define SWOOLE_SRC_PHP_SWOOLE_FIREBIRD_H |
| 20 | + |
| 21 | +#include "php_swoole.h" |
| 22 | + |
| 23 | +#ifdef SW_USE_FIREBIRD |
| 24 | + |
| 25 | +BEGIN_EXTERN_C() |
| 26 | + |
| 27 | +#include "ext/pdo/php_pdo_driver.h" |
| 28 | + |
| 29 | +#include "thirdparty/php84/pdo_firebird/php_pdo_firebird_int.h" |
| 30 | + |
| 31 | +extern const pdo_driver_t swoole_pdo_firebird_driver; |
| 32 | +void swoole_firebird_set_blocking(bool blocking); |
| 33 | + |
| 34 | +ISC_STATUS swoole_isc_attach_database( |
| 35 | + ISC_STATUS *, short, const ISC_SCHAR *, isc_db_handle *, short, const ISC_SCHAR *); |
| 36 | +ISC_STATUS swoole_isc_detach_database(ISC_STATUS *, isc_db_handle *); |
| 37 | +ISC_STATUS swoole_isc_dsql_execute(ISC_STATUS *, isc_tr_handle *, isc_stmt_handle *, unsigned short, const XSQLDA *); |
| 38 | +ISC_STATUS swoole_isc_dsql_execute2( |
| 39 | + ISC_STATUS *, isc_tr_handle *, isc_stmt_handle *, unsigned short, const XSQLDA *, const XSQLDA *); |
| 40 | +ISC_STATUS swoole_isc_dsql_sql_info(ISC_STATUS *, isc_stmt_handle *, short, const ISC_SCHAR *, short, ISC_SCHAR *); |
| 41 | +ISC_STATUS swoole_isc_dsql_free_statement(ISC_STATUS *, isc_stmt_handle *, unsigned short); |
| 42 | +ISC_STATUS swoole_isc_start_transaction(ISC_STATUS *, isc_tr_handle *, short, isc_db_handle *, size_t, char *); |
| 43 | +ISC_STATUS swoole_isc_commit_retaining(ISC_STATUS *, isc_tr_handle *); |
| 44 | +ISC_STATUS swoole_isc_commit_transaction(ISC_STATUS *, isc_tr_handle *); |
| 45 | +ISC_STATUS swoole_isc_rollback_transaction(ISC_STATUS *, isc_tr_handle *); |
| 46 | +ISC_STATUS swoole_isc_dsql_allocate_statement(ISC_STATUS *, isc_db_handle *, isc_stmt_handle *); |
| 47 | +ISC_STATUS swoole_isc_dsql_prepare( |
| 48 | + ISC_STATUS *, isc_tr_handle *, isc_stmt_handle *, unsigned short, const ISC_SCHAR *, unsigned short, XSQLDA *); |
| 49 | +ISC_STATUS swoole_isc_dsql_fetch(ISC_STATUS *, isc_stmt_handle *, unsigned short, const XSQLDA *); |
| 50 | +ISC_STATUS swoole_isc_open_blob(ISC_STATUS *, isc_db_handle *, isc_tr_handle *, isc_blob_handle *, ISC_QUAD *); |
| 51 | +ISC_STATUS swoole_isc_blob_info(ISC_STATUS *, isc_blob_handle *, short, const ISC_SCHAR *, short, ISC_SCHAR *); |
| 52 | +ISC_STATUS swoole_isc_get_segment(ISC_STATUS *, isc_blob_handle *, unsigned short *, unsigned short, ISC_SCHAR *); |
| 53 | +ISC_STATUS swoole_isc_put_segment(ISC_STATUS *, isc_blob_handle *, unsigned short, const ISC_SCHAR *); |
| 54 | +ISC_STATUS swoole_isc_close_blob(ISC_STATUS *, isc_blob_handle *); |
| 55 | +ISC_STATUS swoole_isc_create_blob(ISC_STATUS *, isc_db_handle *, isc_tr_handle *, isc_blob_handle *, ISC_QUAD *); |
| 56 | +ISC_STATUS swoole_isc_dsql_set_cursor_name(ISC_STATUS *, isc_stmt_handle *, const ISC_SCHAR *, unsigned short); |
| 57 | +ISC_STATUS swoole_fb_ping(ISC_STATUS *, isc_db_handle *); |
| 58 | +int swoole_isc_version(isc_db_handle *, ISC_VERSION_CALLBACK, void *); |
| 59 | + |
| 60 | +#ifdef SW_USE_FIREBIRD_HOOK |
| 61 | +#define isc_attach_database swoole_isc_attach_database |
| 62 | +#define isc_detach_database swoole_isc_detach_database |
| 63 | +#define isc_dsql_execute swoole_isc_dsql_execute |
| 64 | +#define isc_dsql_execute2 swoole_isc_dsql_execute2 |
| 65 | +#define isc_dsql_sql_info swoole_isc_dsql_sql_info |
| 66 | +#define isc_dsql_free_statement swoole_isc_dsql_free_statement |
| 67 | +#define isc_start_transaction swoole_isc_start_transaction |
| 68 | +#define isc_commit_retaining swoole_isc_commit_retaining |
| 69 | +#define isc_commit_transaction swoole_isc_commit_transaction |
| 70 | +#define isc_rollback_transaction swoole_isc_rollback_transaction |
| 71 | +#define isc_dsql_allocate_statement swoole_isc_dsql_allocate_statement |
| 72 | +#define isc_dsql_prepare swoole_isc_dsql_prepare |
| 73 | +#define isc_dsql_fetch swoole_isc_dsql_fetch |
| 74 | +#define isc_open_blob swoole_isc_open_blob |
| 75 | +#define isc_blob_info swoole_isc_blob_info |
| 76 | +#define isc_get_segment swoole_isc_get_segment |
| 77 | +#define isc_put_segment swoole_isc_put_segment |
| 78 | +#define isc_create_blob swoole_isc_create_blob |
| 79 | +#define isc_close_blob swoole_isc_close_blob |
| 80 | +#define isc_dsql_set_cursor_name swoole_isc_dsql_set_cursor_name |
| 81 | +#define fb_ping swoole_fb_ping |
| 82 | +#define isc_version swoole_isc_version |
| 83 | +#endif |
| 84 | +END_EXTERN_C() |
| 85 | +#endif |
| 86 | +#endif |
0 commit comments