zeoslib  UNKNOWN
 All Files
ZPlainFirebirdInterbaseConstants.pas
Go to the documentation of this file.
1 {*********************************************************}
2 { }
3 { Zeos Database Objects }
4 { Interbase and Firebird Common constants }
5 { }
6 { Originally written by Sergey Seroukhov }
7 { }
8 {*********************************************************}
9 
10 {@********************************************************}
11 { Copyright (c) 1999-2012 Zeos Development Group }
12 { }
13 { License Agreement: }
14 { }
15 { This library is distributed in the hope that it will be }
16 { useful, but WITHOUT ANY WARRANTY; without even the }
17 { implied warranty of MERCHANTABILITY or FITNESS FOR }
18 { A PARTICULAR PURPOSE. See the GNU Lesser General }
19 { Public License for more details. }
20 { }
21 { The source code of the ZEOS Libraries and packages are }
22 { distributed under the Library GNU General Public }
23 { License (see the file COPYING / COPYING.ZEOS) }
24 { with the following modification: }
25 { As a special exception, the copyright holders of this }
26 { library give you permission to link this library with }
27 { independent modules to produce an executable, }
28 { regardless of the license terms of these independent }
29 { modules, and to copy and distribute the resulting }
30 { executable under terms of your choice, provided that }
31 { you also meet, for each linked independent module, }
32 { the terms and conditions of the license of that module. }
33 { An independent module is a module which is not derived }
34 { from or based on this library. If you modify this }
35 { library, you may extend this exception to your version }
36 { of the library, but you are not obligated to do so. }
37 { If you do not wish to do so, delete this exception }
38 { statement from your version. }
39 { }
40 { }
41 { The project web site is located on: }
42 { http://zeos.firmos.at (FORUM) }
43 { http://sourceforge.net/p/zeoslib/tickets/ (BUGTRACKER)}
44 { svn://svn.code.sf.net/p/zeoslib/code-0/trunk (SVN) }
45 { }
46 { http://www.sourceforge.net/projects/zeoslib. }
47 { }
48 { }
49 { Zeos Development Group. }
50 {********************************************************@}
51 
52 unit ZPlainFirebirdInterbaseConstants;
53 
54 interface
55 
56 {$I ZPlain.inc}
57 
58 uses
59  ZCompatibility;
60 
61 const
62  IBLocalBufferLength = 512;
63  IBBigLocalBufferLength = IBLocalBufferLength * 2;
64  IBHugeLocalBufferLength = IBBigLocalBufferLength * 20;
65 
66  {temporary fix by mdaems
67  I think Andre wanted to use this as a generic error code for a broken connection
68  At the moment I put it here as it's only used in the IB/FB implementation
69  }
70  DISCONNECT_ERROR = -1;
71 
72  ISC_NULL = -1;
73  ISC_NOTNULL = 0;
74 
75  ISC_TRUE = 1;
76  ISC_FALSE = 0;
77  DSQL_CLOSE = 1;
78  DSQL_DROP = 2;
79  DSQL_UNPREPARE = 4;
80 
81 
82  SQLDA_VERSION1 = 1;
83  SQLDA_VERSION2 = 2;
84  SQL_DIALECT_V5 = 1;
85  SQL_DIALECT_V6 = 3;
86  SQL_DIALECT_CURRENT = SQL_DIALECT_V6; (* latest IB DIALECT *)
87 
88  { SQL definitions }
89  SQL_VARYING = 448;
90  SQL_TEXT = 452;
91  SQL_DOUBLE = 480;
92  SQL_FLOAT = 482;
93  SQL_LONG = 496;
94  SQL_SHORT = 500;
95  SQL_TIMESTAMP = 510;
96  SQL_BLOB = 520;
97  SQL_D_FLOAT = 530;
98  SQL_ARRAY = 540;
99  SQL_QUAD = 550;
100  SQL_TYPE_TIME = 560;
101  SQL_TYPE_DATE = 570;
102  SQL_INT64 = 580;
103  SQL_BOOLEAN = 590;
104  SQL_DATE = SQL_TIMESTAMP;
105 
106 (* #define BLR_WORD(x) UCHAR(x), UCHAR((x) >> 8)
107 
108  * WARNING: if you add a new BLR representing a data type, and the value
109  * is greater than the numerically greatest value which now
110  * represents a data type, you must change the define for
111  * DTYPE_BLR_MAX in jrd/align.h, and add the necessary entries
112  * to all the arrays in that file.
113  *)
114 
115  blr_text = 14;
116  blr_text2 = 15;
117  blr_short = 7;
118  blr_long = 8;
119  blr_quad = 9;
120  blr_float = 10;
121  blr_double = 27;
122  blr_d_float = 11;
123  blr_timestamp = 35;
124  blr_varying = 37;
125  blr_varying2 = 38;
126  blr_blob = 261;
127  blr_cstring = 40;
128  blr_cstring2 = 41; // added in 3.2 JPN
129  blr_blob_id = 45; // added from gds.h
130  blr_sql_date = 12;
131  blr_sql_time = 13;
132  blr_int64 = 16;
133  blr_blob2 = 17;
134  blr_domain_name = 18;
135  blr_domain_name2 = 19;
136  blr_not_nullable = 20;
137  blr_column_name = 21;
138  blr_column_name2 = 22;
139  blr_bool = 23;
140 
141  // Historical alias for pre V6 applications
142  blr_date = blr_timestamp;
143 (*
144  // first sub parameter for blr_domain_name[2]
145  blr_domain_type_of = 0;
146  blr_domain_full = 1;
147 
148  blr_inner = 0;
149  blr_left = 1;
150  blr_right = 2;
151  blr_full = 3;
152 
153  blr_gds_code = 0;
154  blr_sql_code = 1;
155  blr_exception = 2;
156  blr_trigger_code = 3;
157  blr_default_code = 4;
158  blr_raise = 5;
159  blr_exception_msg = 6;
160  blr_exception_params= 7;
161 
162  blr_version4 = 4;
163  blr_version5 (unsigned char)5
164 //#define blr_version6 (unsigned char)6
165 #define blr_eoc (unsigned char)76
166 #define blr_end (unsigned char)255
167 
168 #define blr_assignment (unsigned char)1
169 #define blr_begin (unsigned char)2
170 #define blr_dcl_variable (unsigned char)3 /* added from gds.h */
171 #define blr_message (unsigned char)4
172 #define blr_erase (unsigned char)5
173 #define blr_fetch (unsigned char)6
174 #define blr_for (unsigned char)7
175 #define blr_if (unsigned char)8
176 #define blr_loop (unsigned char)9
177 #define blr_modify (unsigned char)10
178 #define blr_handler (unsigned char)11
179 #define blr_receive (unsigned char)12
180 #define blr_select (unsigned char)13
181 #define blr_send (unsigned char)14
182 #define blr_store (unsigned char)15
183 #define blr_label (unsigned char)17
184 #define blr_leave (unsigned char)18
185 #define blr_store2 (unsigned char)19
186 #define blr_post (unsigned char)20
187 #define blr_literal (unsigned char)21
188 #define blr_dbkey (unsigned char)22
189 #define blr_field (unsigned char)23
190 #define blr_fid (unsigned char)24
191 #define blr_parameter (unsigned char)25
192 #define blr_variable (unsigned char)26
193 #define blr_average (unsigned char)27
194 #define blr_count (unsigned char)28
195 #define blr_maximum (unsigned char)29
196 #define blr_minimum (unsigned char)30
197 #define blr_total (unsigned char)31
198 
199 // unused codes: 32..33
200 
201 #define blr_add (unsigned char)34
202 #define blr_subtract (unsigned char)35
203 #define blr_multiply (unsigned char)36
204 #define blr_divide (unsigned char)37
205 #define blr_negate (unsigned char)38
206 #define blr_concatenate (unsigned char)39
207 #define blr_substring (unsigned char)40
208 #define blr_parameter2 (unsigned char)41
209 #define blr_from (unsigned char)42
210 #define blr_via (unsigned char)43
211 #define blr_user_name (unsigned char)44 /* added from gds.h */
212 #define blr_null (unsigned char)45
213 
214 #define blr_equiv (unsigned char)46
215 #define blr_eql (unsigned char)47
216 #define blr_neq (unsigned char)48
217 #define blr_gtr (unsigned char)49
218 #define blr_geq (unsigned char)50
219 #define blr_lss (unsigned char)51
220 #define blr_leq (unsigned char)52
221 #define blr_containing (unsigned char)53
222 #define blr_matching (unsigned char)54
223 #define blr_starting (unsigned char)55
224 #define blr_between (unsigned char)56
225 #define blr_or (unsigned char)57
226 #define blr_and (unsigned char)58
227 #define blr_not (unsigned char)59
228 #define blr_any (unsigned char)60
229 #define blr_missing (unsigned char)61
230 #define blr_unique (unsigned char)62
231 #define blr_like (unsigned char)63
232 
233 // unused codes: 64..66
234 
235 #define blr_rse (unsigned char)67
236 #define blr_first (unsigned char)68
237 #define blr_project (unsigned char)69
238 #define blr_sort (unsigned char)70
239 #define blr_boolean (unsigned char)71
240 #define blr_ascending (unsigned char)72
241 #define blr_descending (unsigned char)73
242 #define blr_relation (unsigned char)74
243 #define blr_rid (unsigned char)75
244 #define blr_union (unsigned char)76
245 #define blr_map (unsigned char)77
246 #define blr_group_by (unsigned char)78
247 #define blr_aggregate (unsigned char)79
248 #define blr_join_type (unsigned char)80
249 
250 // unused codes: 81..82
251 
252 #define blr_agg_count (unsigned char)83
253 #define blr_agg_max (unsigned char)84
254 #define blr_agg_min (unsigned char)85
255 #define blr_agg_total (unsigned char)86
256 #define blr_agg_average (unsigned char)87
257 #define blr_parameter3 (unsigned char)88 /* same as Rdb definition */
258 /* unsupported
259 #define blr_run_max (unsigned char)89
260 #define blr_run_min (unsigned char)90
261 #define blr_run_total (unsigned char)91
262 #define blr_run_average (unsigned char)92
263 */
264 #define blr_agg_count2 (unsigned char)93
265 #define blr_agg_count_distinct (unsigned char)94
266 #define blr_agg_total_distinct (unsigned char)95
267 #define blr_agg_average_distinct (unsigned char)96
268 
269 // unused codes: 97..99
270 
271 #define blr_function (unsigned char)100
272 #define blr_gen_id (unsigned char)101
273 ///#define blr_prot_mask (unsigned char)102
274 #define blr_upcase (unsigned char)103
275 ///#define blr_lock_state (unsigned char)104
276 #define blr_value_if (unsigned char)105
277 #define blr_matching2 (unsigned char)106
278 #define blr_index (unsigned char)107
279 #define blr_ansi_like (unsigned char)108
280 #define blr_scrollable (unsigned char) 109
281 
282 // unused codes: 110..117
283 
284 #define blr_run_count (unsigned char)118 /* changed from 88 to avoid conflict with blr_parameter3 */
285 #define blr_rs_stream (unsigned char)119
286 #define blr_exec_proc (unsigned char)120
287 
288 // unused codes: 121..123
289 
290 #define blr_procedure (unsigned char)124
291 #define blr_pid (unsigned char)125
292 #define blr_exec_pid (unsigned char)126
293 #define blr_singular (unsigned char)127
294 #define blr_abort (unsigned char)128
295 #define blr_block (unsigned char)129
296 #define blr_error_handler (unsigned char)130
297 
298 #define blr_cast (unsigned char)131
299 
300 #define blr_pid2 (unsigned char)132
301 #define blr_procedure2 (unsigned char)133
302 
303 #define blr_start_savepoint (unsigned char)134
304 #define blr_end_savepoint (unsigned char)135
305 
306 // unused codes: 136..138
307 
308 #define blr_plan (unsigned char)139 /* access plan items */
309 #define blr_merge (unsigned char)140
310 #define blr_join (unsigned char)141
311 #define blr_sequential (unsigned char)142
312 #define blr_navigational (unsigned char)143
313 #define blr_indices (unsigned char)144
314 #define blr_retrieve (unsigned char)145
315 
316 #define blr_relation2 (unsigned char)146
317 #define blr_rid2 (unsigned char)147
318 
319 // unused codes: 148..149
320 
321 #define blr_set_generator (unsigned char)150
322 
323 #define blr_ansi_any (unsigned char)151 /* required for NULL handling */
324 #define blr_exists (unsigned char)152 /* required for NULL handling */
325 
326 // unused codes: 153
327 
328 #define blr_record_version (unsigned char)154 /* get tid of record */
329 #define blr_stall (unsigned char)155 /* fake server stall */
330 
331 // unused codes: 156..157
332 
333 #define blr_ansi_all (unsigned char)158 /* required for NULL handling */
334 
335 #define blr_extract (unsigned char)159
336 
337 /* sub parameters for blr_extract */
338 
339 #define blr_extract_year (unsigned char)0
340 #define blr_extract_month (unsigned char)1
341 #define blr_extract_day (unsigned char)2
342 #define blr_extract_hour (unsigned char)3
343 #define blr_extract_minute (unsigned char)4
344 #define blr_extract_second (unsigned char)5
345 #define blr_extract_weekday (unsigned char)6
346 #define blr_extract_yearday (unsigned char)7
347 #define blr_extract_millisecond (unsigned char)8
348 #define blr_extract_week (unsigned char)9
349 
350 #define blr_current_date (unsigned char)160
351 #define blr_current_timestamp (unsigned char)161
352 #define blr_current_time (unsigned char)162
353 
354 /* These codes reuse BLR code space */
355 
356 #define blr_post_arg (unsigned char)163
357 #define blr_exec_into (unsigned char)164
358 #define blr_user_savepoint (unsigned char)165
359 #define blr_dcl_cursor (unsigned char)166
360 #define blr_cursor_stmt (unsigned char)167
361 #define blr_current_timestamp2 (unsigned char)168
362 #define blr_current_time2 (unsigned char)169
363 #define blr_agg_list (unsigned char)170
364 #define blr_agg_list_distinct (unsigned char)171
365 #define blr_modify2 (unsigned char)172
366 
367 // unused codes: 173
368 
369 /* FB 1.0 specific BLR */
370 
371 #define blr_current_role (unsigned char)174
372 #define blr_skip (unsigned char)175
373 
374 /* FB 1.5 specific BLR */
375 
376 #define blr_exec_sql (unsigned char)176
377 #define blr_internal_info (unsigned char)177
378 #define blr_nullsfirst (unsigned char)178
379 #define blr_writelock (unsigned char)179
380 #define blr_nullslast (unsigned char)180
381 
382 /* FB 2.0 specific BLR */
383 
384 #define blr_lowcase (unsigned char)181
385 #define blr_strlen (unsigned char)182
386 
387 /* sub parameter for blr_strlen */
388 #define blr_strlen_bit (unsigned char)0
389 #define blr_strlen_char (unsigned char)1
390 #define blr_strlen_octet (unsigned char)2
391 
392 #define blr_trim (unsigned char)183
393 
394 /* first sub parameter for blr_trim */
395 #define blr_trim_both (unsigned char)0
396 #define blr_trim_leading (unsigned char)1
397 #define blr_trim_trailing (unsigned char)2
398 
399 /* second sub parameter for blr_trim */
400 #define blr_trim_spaces (unsigned char)0
401 #define blr_trim_characters (unsigned char)1
402 
403 /* These codes are actions for user-defined savepoints */
404 
405 #define blr_savepoint_set (unsigned char)0
406 #define blr_savepoint_release (unsigned char)1
407 #define blr_savepoint_undo (unsigned char)2
408 #define blr_savepoint_release_single (unsigned char)3
409 
410 /* These codes are actions for cursors */
411 
412 #define blr_cursor_open (unsigned char)0
413 #define blr_cursor_close (unsigned char)1
414 #define blr_cursor_fetch (unsigned char)2
415 #define blr_cursor_fetch_scroll (unsigned char)3
416 
417 /* scroll options */
418 
419 #define blr_scroll_forward (unsigned char)0
420 #define blr_scroll_backward (unsigned char)1
421 #define blr_scroll_bof (unsigned char)2
422 #define blr_scroll_eof (unsigned char)3
423 #define blr_scroll_absolute (unsigned char)4
424 #define blr_scroll_relative (unsigned char)5
425 
426 /* FB 2.1 specific BLR */
427 
428 #define blr_init_variable (unsigned char)184
429 #define blr_recurse (unsigned char)185
430 #define blr_sys_function (unsigned char)186
431 
432 // FB 2.5 specific BLR
433 
434 #define blr_auto_trans (unsigned char)187
435 #define blr_similar (unsigned char)188
436 #define blr_exec_stmt (unsigned char)189
437 
438 // subcodes of blr_exec_stmt
439 #define blr_exec_stmt_inputs (unsigned char) 1 // input parameters count
440 #define blr_exec_stmt_outputs (unsigned char) 2 // output parameters count
441 #define blr_exec_stmt_sql (unsigned char) 3
442 #define blr_exec_stmt_proc_block (unsigned char) 4
443 #define blr_exec_stmt_data_src (unsigned char) 5
444 #define blr_exec_stmt_user (unsigned char) 6
445 #define blr_exec_stmt_pwd (unsigned char) 7
446 #define blr_exec_stmt_tran (unsigned char) 8 // not implemented yet
447 #define blr_exec_stmt_tran_clone (unsigned char) 9 // make transaction parameters equal to current transaction
448 #define blr_exec_stmt_privs (unsigned char) 10
449 #define blr_exec_stmt_in_params (unsigned char) 11 // not named input parameters
450 #define blr_exec_stmt_in_params2 (unsigned char) 12 // named input parameters
451 #define blr_exec_stmt_out_params (unsigned char) 13 // output parameters
452 #define blr_exec_stmt_role (unsigned char) 14
453 
454 #define blr_stmt_expr (unsigned char) 190
455 #define blr_derived_expr (unsigned char) 191
456 
457 // FB 3.0 specific BLR
458 
459 #define blr_procedure3 (unsigned char) 192
460 #define blr_exec_proc2 (unsigned char) 193
461 #define blr_function2 (unsigned char) 194
462 #define blr_window (unsigned char) 195
463 #define blr_partition_by (unsigned char) 196
464 #define blr_continue_loop (unsigned char) 197
465 #define blr_procedure4 (unsigned char) 198
466 #define blr_agg_function (unsigned char) 199
467 #define blr_substring_similar (unsigned char) 200
468 #define blr_bool_as_value (unsigned char) 201
469 #define blr_coalesce (unsigned char) 202
470 #define blr_decode (unsigned char) 203
471 #define blr_exec_subproc (unsigned char) 204
472 #define blr_subproc_decl (unsigned char) 205
473 #define blr_subproc (unsigned char) 206
474 #define blr_subfunc_decl (unsigned char) 207
475 #define blr_subfunc (unsigned char) 208
476 #define blr_record_version2 (unsigned char) 209
477 
478 #endif // JRD_BLR_H
479 *)
480 
481  { SQL subtypes definitions from RDB$FIELDS}
482  CS_NONE = 0;
483  CS_BINARY = 1;
484  CS_ASCII = 2;
485  CS_UNICODE_FSS = 3;
486  CS_UTF8 = 4;
487  CS_SJIS_0208 = 5;
488  CS_EUCJ_0208 = 6;
489  CS_DOS737 = 9;
490  CS_DOS437 = 10;
491  CS_DOS850 = 11;
492  CS_DOS865 = 12;
493  CS_DOS860 = 13;
494  CS_DOS863 = 14;
495  CS_DOS775 = 15;
496  CS_DOS858 = 16;
497  CS_DOS862 = 17;
498  CS_DOS864 = 18;
499  CS_NEXT = 19;
500 
501  CS_ISO8859_1 = 21;
502  CS_ISO8859_2 = 22;
503  CS_ISO8859_3 = 23;
504  CS_ISO8859_4 = 24;
505 
506  CS_ISO8859_5 = 35;
507  CS_ISO8859_6 = 36;
508  CS_ISO8859_7 = 37;
509  CS_ISO8859_8 = 38;
510  CS_ISO8859_9 = 39;
511  CS_ISO8859_13 = 40;
512  CS_KSC_5601 = 44;
513  CS_DOS852 = 45;
514  CS_DOS857 = 46;
515  CS_DOS861 = 47;
516  CS_DOS866 = 48;
517  CS_DOS869 = 49;
518  CS_CYRL = 50;
519  CS_WIN1250 = 51;
520  CS_WIN1251 = 52;
521  CS_WIN1252 = 53;
522  CS_WIN1253 = 54;
523  CS_WIN1254 = 55;
524 
525  CS_WIN1255 = 58;
526  CS_WIN1256 = 59;
527  CS_WIN1257 = 60;
528  CS_BIG_5 = 56;
529  CS_GB_2312 = 57;
530  CS_KOI8R = 63;
531  CS_KOI8U = 64;
532  CS_WIN1258 = 65;
533  CS_TIS620 = 66;
534  CS_GBK = 67;
535  CS_CP943C = 68;
536  CS_GB18030 = 69;
537 
538  CS_METADATA = CS_UNICODE_FSS;
539 
540  RDB_NUMBERS_NONE = 0;
541  RDB_NUMBERS_NUMERIC = 1;
542  RDB_NUMBERS_DECIMAL = 2;
543 
544  { Blob Subtypes }
545  { types less than zero are reserved for customer use }
546  isc_blob_untyped = 0;
547 
548  { internal subtypes }
549  isc_blob_text = 1;
550  isc_blob_blr = 2;
551  isc_blob_acl = 3;
552  isc_blob_ranges = 4;
553  isc_blob_summary = 5;
554  isc_blob_format = 6;
555  isc_blob_tra = 7;
556  isc_blob_extfile = 8;
557  isc_blob_debug_info = 9;
558  isc_blob_max_predefined_subtype= 10;
559 
560 { > FB2.5 down}
561  { the range 20-30 is reserved for dBASE and Paradox types }
562  isc_blob_formatted_memo = 20;
563  isc_blob_paradox_ole = 21;
564  isc_blob_graphic = 22;
565  isc_blob_dbase_ole = 23;
566  isc_blob_typed_binary = 24;
567 { FB2.5 down < }
568 
569  {* Blob information items *}
570  isc_info_blob_num_segments = 4;
571  isc_info_blob_max_segment = 5;
572  isc_info_blob_total_length = 6;
573  isc_info_blob_type = 7;
574 
575  {* error codes *}
576  isc_segment = 335544366;
577  isc_segstr_eof = 335544367;
578  isc_lock_conflict = 335544345;
579 
580  { Database parameter block stuff }
581  isc_dpb_version1 = 1;
582  isc_dpb_cdd_pathname = 1;
583  isc_dpb_allocation = 2;
584  isc_dpb_journal = 3;
585  isc_dpb_page_size = 4;
586  isc_dpb_num_buffers = 5;
587  isc_dpb_buffer_length = 6;
588  isc_dpb_debug = 7;
589  isc_dpb_garbage_collect = 8;
590  isc_dpb_verify = 9;
591  isc_dpb_sweep = 10;
592  isc_dpb_enable_journal = 11;
593  isc_dpb_disable_journal = 12;
594  isc_dpb_dbkey_scope = 13;
595  isc_dpb_number_of_users = 14;
596  isc_dpb_trace = 15;
597  isc_dpb_no_garbage_collect = 16;
598  isc_dpb_damaged = 17;
599  isc_dpb_license = 18;
600  isc_dpb_sys_user_name = 19;
601  isc_dpb_encrypt_key = 20;
602  isc_dpb_activate_shadow = 21;
603  isc_dpb_sweep_interval = 22;
604  isc_dpb_delete_shadow = 23;
605  isc_dpb_force_write = 24;
606  isc_dpb_begin_log = 25;
607  isc_dpb_quit_log = 26;
608  isc_dpb_no_reserve = 27;
609  isc_dpb_user_name = 28;
610  isc_dpb_password = 29;
611  isc_dpb_password_enc = 30;
612  isc_dpb_sys_user_name_enc = 31;
613  isc_dpb_interp = 32;
614  isc_dpb_online_dump = 33;
615  isc_dpb_old_file_size = 34;
616  isc_dpb_old_num_files = 35;
617  isc_dpb_old_file = 36;
618  isc_dpb_old_start_page = 37;
619  isc_dpb_old_start_seqno = 38;
620  isc_dpb_old_start_file = 39;
621  isc_dpb_drop_walfile = 40;
622  isc_dpb_old_dump_id = 41;
623  isc_dpb_wal_backup_dir = 42;
624  isc_dpb_wal_chkptlen = 43;
625  isc_dpb_wal_numbufs = 44;
626  isc_dpb_wal_bufsize = 45;
627  isc_dpb_wal_grp_cmt_wait = 46;
628  isc_dpb_lc_messages = 47;
629  isc_dpb_lc_ctype = 48;
630  isc_dpb_cache_manager = 49;
631  isc_dpb_shutdown = 50;
632  isc_dpb_online = 51;
633  isc_dpb_shutdown_delay = 52;
634  isc_dpb_reserved = 53;
635  isc_dpb_overwrite = 54;
636  isc_dpb_sec_attach = 55;
637  isc_dpb_disable_wal = 56;
638  isc_dpb_connect_timeout = 57;
639  isc_dpb_dummy_packet_interval = 58;
640  isc_dpb_gbak_attach = 59;
641  isc_dpb_sql_role_name = 60;
642  isc_dpb_set_page_buffers = 61;
643  isc_dpb_working_directory = 62;
644  isc_dpb_SQL_dialect = 63;
645  isc_dpb_set_db_readonly = 64;
646  isc_dpb_set_db_SQL_dialect = 65;
647  isc_dpb_gfix_attach = 66;
648  isc_dpb_gstat_attach = 67;
649  isc_dpb_last_dpb_constant = isc_dpb_gstat_attach;
650 
651  { isc_dpb_verify specific flags }
652  isc_dpb_pages = 1;
653  isc_dpb_records = 2;
654  isc_dpb_indices = 4;
655  isc_dpb_transactions = 8;
656  isc_dpb_no_update = 16;
657  isc_dpb_repair = 32;
658  isc_dpb_ignore = 64;
659 
660  { isc_dpb_shutdown specific flags }
661  isc_dpb_shut_cache = 1;
662  isc_dpb_shut_attachment = 2;
663  isc_dpb_shut_transaction = 4;
664  isc_dpb_shut_force = 8;
665 
666  { Transaction parameter block stuff }
667  isc_tpb_version1 = 1;
668  isc_tpb_version3 = 3;
669  isc_tpb_consistency = 1;
670  isc_tpb_concurrency = 2;
671  isc_tpb_shared = 3;
672  isc_tpb_protected = 4;
673  isc_tpb_exclusive = 5;
674  isc_tpb_wait = 6;
675  isc_tpb_nowait = 7;
676  isc_tpb_read = 8;
677  isc_tpb_write = 9;
678  isc_tpb_lock_read = 10;
679  isc_tpb_lock_write = 11;
680  isc_tpb_verb_time = 12;
681  isc_tpb_commit_time = 13;
682  isc_tpb_ignore_limbo = 14;
683  isc_tpb_read_committed = 15;
684  isc_tpb_autocommit = 16; //EH: Please do not use this JDBC option!
685  //It kills the performance. Let Zeos do the Job by settting AutoCommit = True
686  //see ZDbcInterbase.pas e.g. StartTransaction
687  isc_tpb_rec_version = 17;
688  isc_tpb_no_rec_version = 18;
689  isc_tpb_restart_requests = 19;
690  isc_tpb_no_auto_undo = 20;
691  // Since IB75+
692  isc_tpb_no_savepoint = 21;
693  // Since FB20
694  isc_tpb_lock_timeout = 21;
695 
696  { Blob Parameter Block }
697  isc_bpb_version1 = 1;
698  isc_bpb_source_type = 1;
699  isc_bpb_target_type = 2;
700  isc_bpb_type = 3;
701  isc_bpb_source_interp = 4;
702  isc_bpb_target_interp = 5;
703  isc_bpb_filter_parameter = 6;
704 
705  { SQL information items }
706  isc_info_sql_select = 4;
707  isc_info_sql_bind = 5;
708  isc_info_sql_num_variables = 6;
709  isc_info_sql_describe_vars = 7;
710  isc_info_sql_describe_end = 8;
711  isc_info_sql_sqlda_seq = 9;
712  isc_info_sql_message_seq = 10;
713  isc_info_sql_type = 11;
714  isc_info_sql_sub_type = 12;
715  isc_info_sql_scale = 13;
716  isc_info_sql_length = 14;
717  isc_info_sql_null_ind = 15;
718  isc_info_sql_field = 16;
719  isc_info_sql_relation = 17;
720  isc_info_sql_owner = 18;
721  isc_info_sql_alias = 19;
722  isc_info_sql_sqlda_start = 20;
723  isc_info_sql_stmt_type = 21;
724  isc_info_sql_get_plan = 22;
725  isc_info_sql_records = 23;
726  isc_info_sql_batch_fetch = 24;
727 
728  { SQL information return values }
729  isc_info_sql_stmt_select = 1;
730  isc_info_sql_stmt_insert = 2;
731  isc_info_sql_stmt_update = 3;
732  isc_info_sql_stmt_delete = 4;
733  isc_info_sql_stmt_ddl = 5;
734  isc_info_sql_stmt_get_segment = 6;
735  isc_info_sql_stmt_put_segment = 7;
736  isc_info_sql_stmt_exec_procedure = 8;
737  isc_info_sql_stmt_start_trans = 9;
738  isc_info_sql_stmt_commit = 10;
739  isc_info_sql_stmt_rollback = 11;
740  isc_info_sql_stmt_select_for_upd = 12;
741  isc_info_sql_stmt_set_generator = 13;
742 
743  isc_bpb_type_segmented = 0;
744  isc_bpb_type_stream = 1;
745 
746  {************** Information call declarations **************}
747 
748  { Common, structural codes }
749  isc_info_end = 1;
750  isc_info_truncated = 2;
751  isc_info_error = 3;
752  isc_info_data_not_ready = 4;
753  isc_info_flag_end = 127;
754 
755  { Request information items }
756  isc_info_number_messages = 4;
757  isc_info_max_message = 5;
758  isc_info_max_send = 6;
759  isc_info_max_receive = 7;
760  isc_info_state = 8;
761  isc_info_message_number = 9;
762  isc_info_message_size = 10;
763  isc_info_request_cost = 11;
764  isc_info_access_path = 12;
765  isc_info_req_select_count = 13;
766  isc_info_req_insert_count = 14;
767  isc_info_req_update_count = 15;
768  isc_info_req_delete_count = 16;
769 
770  { Database information items }
771  isc_info_db_id = 4;
772  isc_info_reads = 5;
773  isc_info_writes = 6;
774  isc_info_fetches = 7;
775  isc_info_marks = 8;
776  isc_info_implementation = 11;
777  isc_info_version = 12;
778  isc_info_base_level = 13;
779  isc_info_page_size = 14;
780  isc_info_num_buffers = 15;
781  isc_info_limbo = 16;
782  isc_info_current_memory = 17;
783  isc_info_max_memory = 18;
784  isc_info_window_turns = 19;
785  isc_info_license = 20;
786  isc_info_allocation = 21;
787  isc_info_attachment_id = 22;
788  isc_info_read_seq_count = 23;
789  isc_info_read_idx_count = 24;
790  isc_info_insert_count = 25;
791  isc_info_update_count = 26;
792  isc_info_delete_count = 27;
793  isc_info_backout_count = 28;
794  isc_info_purge_count = 29;
795  isc_info_expunge_count = 30;
796  isc_info_sweep_interval = 31;
797  isc_info_ods_version = 32;
798  isc_info_ods_minor_version = 33;
799  isc_info_no_reserve = 34;
800  isc_info_logfile = 35;
801  isc_info_cur_logfile_name = 36;
802  isc_info_cur_log_part_offset = 37;
803  isc_info_num_wal_buffers = 38;
804  isc_info_wal_buffer_size = 39;
805  isc_info_wal_ckpt_length = 40;
806  isc_info_wal_cur_ckpt_interval = 41;
807  isc_info_wal_prv_ckpt_fname = 42;
808  isc_info_wal_prv_ckpt_poffset = 43;
809  isc_info_wal_recv_ckpt_fname = 44;
810  isc_info_wal_recv_ckpt_poffset = 45;
811  isc_info_wal_grpc_wait_usecs = 47;
812  isc_info_wal_num_io = 48;
813  isc_info_wal_avg_io_size = 49;
814  isc_info_wal_num_commits = 50;
815  isc_info_wal_avg_grpc_size = 51;
816  isc_info_forced_writes = 52;
817  isc_info_user_names = 53;
818  isc_info_page_errors = 54;
819  isc_info_record_errors = 55;
820  isc_info_bpage_errors = 56;
821  isc_info_dpage_errors = 57;
822  isc_info_ipage_errors = 58;
823  isc_info_ppage_errors = 59;
824  isc_info_tpage_errors = 60;
825  isc_info_set_page_buffers = 61;
826  isc_info_db_SQL_dialect = 62;
827  isc_info_db_read_only = 63;
828  isc_info_db_size_in_pages = 64;
829 
830  //Interbase 71
831  isc_info_att_charset = 70;
832  isc_info_svr_min_ver = 71;
833 
834  frb_info_att_charset = 101;
835  isc_info_db_class = 102;
836  isc_info_firebird_version = 103;
837  isc_info_oldest_transaction = 104;
838  isc_info_oldest_active = 105;
839  isc_info_oldest_snapshot = 106;
840  isc_info_next_transaction = 107;
841  isc_info_db_provider = 108;
842  isc_info_active_transactions = 109;
843  isc_info_active_tran_count = 110;
844  isc_info_creation_date = 111;
845  isc_info_db_file_size = 112;
846 
847 type
848  ULong = Cardinal;
849  UChar = AnsiChar;
850  Short = SmallInt;
851 
852  ISC_LONG = LongInt;
853  UISC_LONG = ULong;
854  ISC_INT64 = Int64;
855  ISC_STATUS = NativeInt;
856  UISC_STATUS = ULong;
857  PISC_LONG = ^ISC_LONG;
858  PUISC_LONG = ^UISC_LONG;
859  PISC_STATUS = ^ISC_STATUS;
860  PPISC_STATUS = ^PISC_STATUS;
861  PUISC_STATUS = ^UISC_STATUS;
862  PShort = ^Short;
863  PPAnsiChar = ^PAnsiChar;
864  UShort = Word;
865  PVoid = Pointer;
866 
867  { C Date/Time Structure }
868  TCTimeStructure = record
869  tm_sec: Integer; { Seconds }
870  tm_min: Integer; { Minutes }
871  tm_hour: Integer; { Hour (0--23) }
872  tm_mday: Integer; { Day of month (1--31) }
873  tm_mon: Integer; { Month (0--11) }
874  tm_year: Integer; { Year (calendar year minus 1900) }
875  tm_wday: Integer; { Weekday (0--6) Sunday = 0) }
876  tm_yday: Integer; { Day of year (0--365) }
877  tm_isdst: Integer; { 0 if daylight savings time is not in effect) }
878  end;
879  PCTimeStructure = ^TCTimeStructure;
880  TM = TCTimeStructure;
881  PTM = ^TM;
882 
883  TISC_VARYING = record
884  strlen: Short;
885  str: array[0..0] of AnsiChar; //AVZ - was AnsiChar
886  end;
887  PISC_VARYING = ^TISC_VARYING;
888 
889  { InterBase Handle Definitions }
890  //ludob ib/FB handles are 32 bit even on 64 bit systems
891  TISC_BLOB_HANDLE = LongWord;
892  PISC_BLOB_HANDLE = ^TISC_BLOB_HANDLE;
893  TISC_DB_HANDLE = LongWord;
894  PISC_DB_HANDLE = ^TISC_DB_HANDLE;
895  TISC_STMT_HANDLE = LongWord;
896  PISC_STMT_HANDLE = ^TISC_STMT_HANDLE;
897  TISC_TR_HANDLE = LongWord;
898  PISC_TR_HANDLE = ^TISC_TR_HANDLE;
899  TISC_CALLBACK = procedure;
900 
901  { Time & Date Support }
902  ISC_DATE = LongInt;
903  PISC_DATE = ^ISC_DATE;
904  ISC_TIME = ULong;
905  PISC_TIME = ^ISC_TIME;
906 
907  TISC_TIMESTAMP = record
908  timestamp_date: ISC_DATE;
909  timestamp_time: ISC_TIME;
910  end;
911  PISC_TIMESTAMP = ^TISC_TIMESTAMP;
912 
913  { Blob id structure }
914  TGDS_QUAD = record
915  gds_quad_high: ISC_LONG;
916  gds_quad_low: UISC_LONG;
917  end;
918  PGDS_QUAD = ^TGDS_QUAD;
919 
920  TISC_QUAD = TGDS_QUAD;
921  PISC_QUAD = ^TISC_QUAD;
922 
923  TISC_ARRAY_BOUND = record
924  array_bound_lower: Short;
925  array_bound_upper: Short;
926  end;
927  PISC_ARRAY_BOUND = ^TISC_ARRAY_BOUND;
928 
929  TISC_ARRAY_DESC = record
930  array_desc_dtype: Byte;
931  array_desc_scale: ShortInt;
932  array_desc_length: Word;
933  array_desc_field_name: array[0..31] of AnsiChar;
934  array_desc_relation_name: array[0..31] of AnsiChar;
935  array_desc_dimensions: Short;
936  array_desc_flags: Short;
937  array_desc_bounds: array[0..15] of TISC_ARRAY_BOUND;
938  end;
939  PISC_ARRAY_DESC = ^TISC_ARRAY_DESC;
940 
941  TISC_BLOB_DESC = record
942  blob_desc_subtype: Short;
943  blob_desc_charset: Short;
944  blob_desc_segment_size: Short;
945  blob_desc_field_name: array[0..31] of UChar;
946  blob_desc_relation_name: array[0..31] of UChar;
947  end;
948  PISC_BLOB_DESC = ^TISC_BLOB_DESC;
949 
950  { Declare the extended SQLDA }
951  TXSQLVAR = record
952  sqltype: Short; { datatype of field }
953  sqlscale: Short; { scale factor }
954  sqlsubtype: Short; { datatype subtype - BLOBs }
955  { & text types only }
956  sqllen: Short; { length of data area }
957  sqldata: PAnsiChar; { address of data }
958  sqlind: PSmallInt; { address of indicator }
959  { variable }
960  sqlname_length: Short; { length of sqlname field }
961  { name of field, name length + space for NULL }
962  sqlname: array[0..31] of AnsiChar;
963  relname_length: Short; { length of relation name }
964  { field's relation name + space for NULL }
965  relname: array[0..31] of AnsiChar;
966  ownname_length: Short; { length of owner name }
967  { relation's owner name + space for NULL }
968  ownname: array[0..31] of AnsiChar;
969  aliasname_length: Short; { length of alias name }
970  { relation's alias name + space for NULL }
971  aliasname: array[0..31] of AnsiChar;
972  end;
973  PXSQLVAR = ^TXSQLVAR;
974 
975  TXSQLDA = record
976  version: Short; { version of this XSQLDA }
977  { XSQLDA name field }
978  sqldaid: array[0..7] of AnsiChar;
979  sqldabc: ISC_LONG; { length in bytes of SQLDA }
980  sqln: Short; { number of fields allocated }
981  sqld: Short; { actual number of fields }
982  { first field address }
983  sqlvar: array[0..0] of TXSQLVAR;
984  end;
985  PXSQLDA = ^TXSQLDA;
986 
987  {****************************************************}
988  { This record type is for passing arguments to }
989  { isc_start_transaction (See docs) }
990  {****************************************************}
991  TISC_START_TRANS = record
992  db_handle: PISC_DB_HANDLE;
993  tpb_length: Word;
994  tpb_address: PAnsiChar;
995  end;
996 
997  {****************************************************}
998  { This record type is for passing arguments to }
999  { isc_start_multiple (see docs) }
1000  {****************************************************}
1001  TISC_TEB = record
1002  db_handle: PISC_DB_HANDLE;
1003  tpb_length: LongInt;
1004  tpb_address: PAnsiChar;
1005  end;
1006  PISC_TEB = ^TISC_TEB;
1007  TISC_TEB_ARRAY = array[0..0] of TISC_TEB;
1008  PISC_TEB_ARRAY = ^TISC_TEB_ARRAY;
1009 
1010  { Interbase status array }
1011  PARRAY_ISC_STATUS = ^TARRAY_ISC_STATUS;
1012  TARRAY_ISC_STATUS = array[0..20] of ISC_STATUS;
1013 
1014 { ************** Plain API Function types definition ************* }
1015 
1016  { General database routines }
1017 
1018  Tisc_attach_database = function(status_vector: PISC_STATUS;
1019  db_name_length: Short; db_name: PAnsiChar; db_handle: PISC_DB_HANDLE;
1020  parm_buffer_length: Short; parm_buffer: PAnsiChar): ISC_STATUS;
1021  {$IFDEF MSWINDOWS} stdcall {$ELSE} cdecl {$ENDIF};
1022 
1023  Tisc_detach_database = function(status_vector: PISC_STATUS;
1024  db_handle: PISC_DB_HANDLE): ISC_STATUS;
1025  {$IFDEF MSWINDOWS} stdcall {$ELSE} cdecl {$ENDIF};
1026 
1027  Tisc_drop_database = function(status_vector: PISC_STATUS;
1028  db_handle: PISC_DB_HANDLE): ISC_STATUS;
1029  {$IFDEF MSWINDOWS} stdcall {$ELSE} cdecl {$ENDIF};
1030 
1031  Tisc_database_info = function(status_vector: PISC_STATUS;
1032  db_handle: PISC_DB_HANDLE; item_list_buffer_length: Short;
1033  item_list_buffer: PByte; result_buffer_length: Short;
1034  result_buffer: PAnsiChar): ISC_STATUS;
1035  {$IFDEF MSWINDOWS} stdcall {$ELSE} cdecl {$ENDIF};
1036 
1037  { Array processing routines }
1038  Tisc_array_gen_sdl = function(status_vector: PISC_STATUS;
1039  isc_array_desc: PISC_ARRAY_DESC; isc_arg3: PShort;
1040  isc_arg4: PAnsiChar; isc_arg5: PShort): ISC_STATUS;
1041  {$IFDEF MSWINDOWS} stdcall {$ELSE} cdecl {$ENDIF};
1042 
1043  Tisc_array_get_slice = function(status_vector: PISC_STATUS;
1044  db_handle: PISC_DB_HANDLE; trans_handle: PISC_TR_HANDLE;
1045  array_id: PISC_QUAD; descriptor: PISC_ARRAY_DESC;
1046  dest_array: PVoid; slice_length: ISC_LONG): ISC_STATUS;
1047  {$IFDEF MSWINDOWS} stdcall {$ELSE} cdecl {$ENDIF};
1048 
1049  Tisc_array_lookup_bounds = function(status_vector: PISC_STATUS;
1050  db_handle: PISC_DB_HANDLE; trans_handle: PISC_TR_HANDLE;
1051  table_name, column_name: PAnsiChar;
1052  descriptor: PISC_ARRAY_DESC): ISC_STATUS;
1053  {$IFDEF MSWINDOWS} stdcall {$ELSE} cdecl {$ENDIF};
1054 
1055  Tisc_array_lookup_desc = function(status_vector: PISC_STATUS;
1056  db_handle: PISC_DB_HANDLE; trans_handle: PISC_TR_HANDLE;
1057  table_name, column_name: PAnsiChar;
1058  descriptor: PISC_ARRAY_DESC): ISC_STATUS;
1059  {$IFDEF MSWINDOWS} stdcall {$ELSE} cdecl {$ENDIF};
1060 
1061  Tisc_array_set_desc = function(status_vector: PISC_STATUS;
1062  table_name: PAnsiChar; column_name: PAnsiChar;
1063  sql_dtype, sql_length, sql_dimensions: PShort;
1064  descriptor: PISC_ARRAY_DESC): ISC_STATUS;
1065  {$IFDEF MSWINDOWS} stdcall {$ELSE} cdecl {$ENDIF};
1066 
1067  Tisc_array_put_slice = function(status_vector: PISC_STATUS;
1068  db_handle: PISC_DB_HANDLE; trans_handle: PISC_TR_HANDLE;
1069  array_id: PISC_QUAD; descriptor: PISC_ARRAY_DESC;
1070  source_array: PVoid; slice_length: PISC_LONG): ISC_STATUS;
1071  {$IFDEF MSWINDOWS} stdcall {$ELSE} cdecl {$ENDIF};
1072 
1073  Tisc_free = function(isc_arg1: PAnsiChar): ISC_LONG;
1074  {$IFDEF MSWINDOWS} stdcall {$ELSE} cdecl {$ENDIF};
1075 
1076  Tisc_sqlcode = function(status_vector: PISC_STATUS): ISC_LONG;
1077  {$IFDEF MSWINDOWS} stdcall {$ELSE} cdecl {$ENDIF};
1078 
1079  Tisc_sql_interprete = procedure(sqlcode: Short; buffer: PAnsiChar;
1080  buffer_length: Short); {$IFDEF MSWINDOWS} stdcall {$ELSE} cdecl {$ENDIF};
1081 
1082  Tisc_interprete = function(buffer: PAnsiChar; status_vector: PPISC_STATUS):
1083  ISC_STATUS; {$IFDEF MSWINDOWS} stdcall {$ELSE} cdecl {$ENDIF};
1084 
1085  Tfb_interpret = function(buffer: PAnsiChar; bufsize: integer; status_vector: PPISC_STATUS):
1086  ISC_STATUS; {$IFDEF MSWINDOWS} stdcall {$ELSE} cdecl {$ENDIF};
1087 
1088  { Transaction support routines }
1089 
1090  Tisc_start_transaction = function(status_vector: PISC_STATUS;
1091  tran_handle: PISC_TR_HANDLE; db_handle_count: Short;
1092  db_handle: PISC_DB_HANDLE; tpb_length: Word; tpb_address: PAnsiChar):
1093  ISC_STATUS; {$IFDEF MSWINDOWS} stdcall {$ELSE} cdecl {$ENDIF};
1094 
1095  Tisc_start_multiple = function(status_vector: PISC_STATUS;
1096  tran_handle: PISC_TR_HANDLE; db_handle_count: Short;
1097  teb_vector_address: PISC_TEB): ISC_STATUS;
1098  {$IFDEF MSWINDOWS} stdcall {$ELSE} cdecl {$ENDIF};
1099 
1100  Tisc_rollback_transaction = function(status_vector: PISC_STATUS;
1101  tran_handle: PISC_TR_HANDLE): ISC_STATUS;
1102  {$IFDEF MSWINDOWS} stdcall {$ELSE} cdecl {$ENDIF};
1103 
1104  Tisc_rollback_retaining = function(status_vector: PISC_STATUS;
1105  tran_handle: PISC_TR_HANDLE): ISC_STATUS;
1106  {$IFDEF MSWINDOWS} stdcall {$ELSE} cdecl {$ENDIF};
1107 
1108  Tisc_commit_retaining = function(status_vector: PISC_STATUS;
1109  tran_handle: PISC_TR_HANDLE): ISC_STATUS;
1110  {$IFDEF MSWINDOWS} stdcall {$ELSE} cdecl {$ENDIF};
1111 
1112  Tisc_commit_transaction = function(status_vector: PISC_STATUS;
1113  tran_handle: PISC_TR_HANDLE): ISC_STATUS;
1114  {$IFDEF MSWINDOWS} stdcall {$ELSE} cdecl {$ENDIF};
1115 
1116  Tisc_transaction_info = function(status_vector: PISC_STATUS;
1117  tr_handle: PISC_TR_HANDLE; item_list_buffer_length: Short;
1118  item_list_buffer: PAnsiChar; result_buffer_length: Short;
1119  result_buffer: PAnsiChar): ISC_STATUS;
1120  {$IFDEF MSWINDOWS} stdcall {$ELSE} cdecl {$ENDIF};
1121 
1122  { Dynamic SQL routines }
1123 
1124  Tisc_dsql_allocate_statement = function(status_vector: PISC_STATUS;
1125  db_handle: PISC_DB_HANDLE; stmt_handle: PISC_STMT_HANDLE): ISC_STATUS;
1126  {$IFDEF MSWINDOWS} stdcall {$ELSE} cdecl {$ENDIF};
1127 
1128  Tisc_dsql_alloc_statement2 = function(status_vector: PISC_STATUS;
1129  db_handle: PISC_DB_HANDLE; stmt_handle: PISC_STMT_HANDLE): ISC_STATUS;
1130  {$IFDEF MSWINDOWS} stdcall {$ELSE} cdecl {$ENDIF};
1131 
1132  Tisc_dsql_describe = function(status_vector: PISC_STATUS;
1133  stmt_handle: PISC_STMT_HANDLE; dialect: Word; xsqlda: PXSQLDA): ISC_STATUS;
1134  {$IFDEF MSWINDOWS} stdcall {$ELSE} cdecl {$ENDIF};
1135 
1136  Tisc_dsql_describe_bind = function(status_vector: PISC_STATUS;
1137  stmt_handle: PISC_STMT_HANDLE; dialect: Word; xsqlda: PXSQLDA): ISC_STATUS;
1138  {$IFDEF MSWINDOWS} stdcall {$ELSE} cdecl {$ENDIF};
1139 
1140  Tisc_dsql_execute = function(status_vector: PISC_STATUS;
1141  tran_handle: PISC_TR_HANDLE; stmt_handle: PISC_STMT_HANDLE; dialect: Word;
1142  xsqlda: PXSQLDA): ISC_STATUS;
1143  {$IFDEF MSWINDOWS} stdcall {$ELSE} cdecl {$ENDIF};
1144 
1145  Tisc_dsql_execute2 = function(status_vector: PISC_STATUS;
1146  tran_handle: PISC_TR_HANDLE; stmt_handle: PISC_STMT_HANDLE; dialect: Word;
1147  in_xsqlda, out_xsqlda: PXSQLDA): ISC_STATUS;
1148  {$IFDEF MSWINDOWS} stdcall {$ELSE} cdecl {$ENDIF};
1149 
1150  Tisc_dsql_execute_immediate = function(status_vector: PISC_STATUS;
1151  db_handle: PISC_DB_HANDLE; tran_handle: PISC_TR_HANDLE; length: Word;
1152  statement: PAnsiChar; dialect: Word; xsqlda: PXSQLDA): ISC_STATUS;
1153  {$IFDEF MSWINDOWS} stdcall {$ELSE} cdecl {$ENDIF};
1154 
1155  Tisc_dsql_fetch = function(status_vector: PISC_STATUS;
1156  stmt_handle: PISC_STMT_HANDLE; dialect: Word; xsqlda: PXSQLDA): ISC_STATUS;
1157  {$IFDEF MSWINDOWS} stdcall {$ELSE} cdecl {$ENDIF};
1158 
1159  Tisc_dsql_free_statement = function(status_vector: PISC_STATUS;
1160  stmt_handle: PISC_STMT_HANDLE; options: Word): ISC_STATUS;
1161  {$IFDEF MSWINDOWS} stdcall {$ELSE} cdecl {$ENDIF};
1162 
1163  Tisc_dsql_prepare = function(status_vector: PISC_STATUS;
1164  tran_handle: PISC_TR_HANDLE; stmt_handle: PISC_STMT_HANDLE;
1165  length: Word; statement: PAnsiChar; dialect: Word; xsqlda: PXSQLDA):
1166  ISC_STATUS; {$IFDEF MSWINDOWS} stdcall {$ELSE} cdecl {$ENDIF};
1167 
1168  Tisc_dsql_set_cursor_name = function(status_vector: PISC_STATUS;
1169  stmt_handle: PISC_STMT_HANDLE; cursor_name: PAnsiChar; _type: Word): ISC_STATUS;
1170  {$IFDEF MSWINDOWS} stdcall {$ELSE} cdecl {$ENDIF};
1171 
1172  Tisc_dsql_sql_info = function(status_vector: PISC_STATUS;
1173  stmt_handle: PISC_STMT_HANDLE; item_length: Short; items: PAnsiChar;
1174  buffer_length: Short; buffer: PAnsiChar): ISC_STATUS;
1175  {$IFDEF MSWINDOWS} stdcall {$ELSE} cdecl {$ENDIF};
1176 
1177  { Blob processing routines }
1178 
1179  Tisc_open_blob2 = function(status_vector: PISC_STATUS;
1180  db_handle: PISC_DB_HANDLE; tran_handle: PISC_TR_HANDLE;
1181  blob_handle: PISC_BLOB_HANDLE; blob_id: PISC_QUAD; bpb_length: Short;
1182  bpb_buffer: PAnsiChar): ISC_STATUS;
1183  {$IFDEF MSWINDOWS} stdcall {$ELSE} cdecl {$ENDIF};
1184 
1185  Tisc_create_blob2 = function(status_vector: PISC_STATUS;
1186  db_handle: PISC_DB_HANDLE; tran_handle: PISC_TR_HANDLE;
1187  blob_handle: PISC_BLOB_HANDLE; blob_id: PISC_QUAD; bpb_length: Short;
1188  bpb_address: PAnsiChar): ISC_STATUS;
1189  {$IFDEF MSWINDOWS} stdcall {$ELSE} cdecl {$ENDIF};
1190 
1191  Tisc_blob_info = function(status_vector: PISC_STATUS;
1192  blob_handle: PISC_BLOB_HANDLE; item_list_buffer_length: Short;
1193  item_list_buffer: PAnsiChar; result_buffer_length: Short; result_buffer: PAnsiChar):
1194  ISC_STATUS; {$IFDEF MSWINDOWS} stdcall {$ELSE} cdecl {$ENDIF};
1195 
1196  Tisc_close_blob = function(status_vector: PISC_STATUS;
1197  blob_handle: PISC_BLOB_HANDLE): ISC_STATUS;
1198  {$IFDEF MSWINDOWS} stdcall {$ELSE} cdecl {$ENDIF};
1199 
1200  Tisc_cancel_blob = function(status_vector: PISC_STATUS;
1201  blob_handle: PISC_BLOB_HANDLE): ISC_STATUS;
1202  {$IFDEF MSWINDOWS} stdcall {$ELSE} cdecl {$ENDIF};
1203 
1204  Tisc_get_segment = function(status_vector: PISC_STATUS;
1205  blob_handle: PISC_BLOB_HANDLE; actual_seg_length: PWord;
1206  seg_buffer_length: Word; seg_buffer: PAnsiChar): ISC_STATUS;
1207  {$IFDEF MSWINDOWS} stdcall {$ELSE} cdecl {$ENDIF};
1208 
1209  Tisc_put_segment = function(status_vector: PISC_STATUS;
1210  blob_handle: PISC_BLOB_HANDLE; seg_buffer_len: Word; seg_buffer: PAnsiChar):
1211  ISC_STATUS; {$IFDEF MSWINDOWS} stdcall {$ELSE} cdecl {$ENDIF};
1212 
1213  { Event processing routines }
1214 
1215  Tisc_event_block = function(event_buffer: PPAnsiChar; result_buffer: PPAnsiChar;
1216  id_count: Word; event_list: array of PAnsiChar): ISC_LONG;
1217  {$IFDEF MSWINDOWS} stdcall {$ELSE} cdecl {$ENDIF};
1218 
1219  Tisc_event_counts = procedure(status_vector: PISC_STATUS;
1220  buffer_length: Short; event_buffer: PAnsiChar; result_buffer: PAnsiChar);
1221  {$IFDEF MSWINDOWS} stdcall {$ELSE} cdecl {$ENDIF};
1222 
1223  Tisc_cancel_events = function(status_vector: PISC_STATUS;
1224  db_handle: PISC_DB_HANDLE; event_id: PISC_LONG): ISC_STATUS;
1225  {$IFDEF MSWINDOWS} stdcall {$ELSE} cdecl {$ENDIF};
1226 
1227  Tisc_que_events = function(status_vector: PISC_STATUS;
1228  db_handle: PISC_DB_HANDLE; event_id: PISC_LONG; length: Short;
1229  event_buffer: PAnsiChar; event_function: TISC_CALLBACK;
1230  event_function_arg: PVoid): ISC_STATUS;
1231  {$IFDEF MSWINDOWS} stdcall {$ELSE} cdecl {$ENDIF};
1232 
1233  { Types convertion routines }
1234 
1235  Tisc_decode_date = procedure(ib_date: PISC_QUAD; tm_date: PCTimeStructure);
1236  {$IFDEF MSWINDOWS} stdcall {$ELSE} cdecl {$ENDIF};
1237 
1238  Tisc_encode_date = procedure(tm_date: PCTimeStructure; ib_date: PISC_QUAD);
1239  {$IFDEF MSWINDOWS} stdcall {$ELSE} cdecl {$ENDIF};
1240 
1241  { Interbase Version 6 routines }
1242  Tisc_decode_sql_date = procedure(ib_date: PISC_DATE;
1243  tm_date: PCTimeStructure); {$IFDEF MSWINDOWS} stdcall {$ELSE} cdecl {$ENDIF};
1244 
1245  Tisc_decode_sql_time = procedure(ib_time: PISC_TIME;
1246  tm_date: PCTimeStructure); {$IFDEF MSWINDOWS} stdcall {$ELSE} cdecl {$ENDIF};
1247 
1248  Tisc_decode_timestamp = procedure(ib_timestamp: PISC_TIMESTAMP;
1249  tm_date: PCTimeStructure); {$IFDEF MSWINDOWS} stdcall {$ELSE} cdecl {$ENDIF};
1250 
1251  Tisc_encode_sql_date = procedure(tm_date: PCTimeStructure;
1252  ib_date: PISC_DATE); {$IFDEF MSWINDOWS} stdcall {$ELSE} cdecl {$ENDIF};
1253 
1254  Tisc_encode_sql_time = procedure(tm_date: PCTimeStructure;
1255  ib_time: PISC_TIME); {$IFDEF MSWINDOWS} stdcall {$ELSE} cdecl {$ENDIF};
1256 
1257  Tisc_encode_timestamp = procedure(tm_date: PCTimeStructure;
1258  ib_timestamp: PISC_TIMESTAMP);
1259  {$IFDEF MSWINDOWS} stdcall {$ELSE} cdecl {$ENDIF};
1260 
1261  Tisc_vax_integer = function(buffer: PAnsiChar; length: Short): ISC_LONG;
1262  {$IFDEF MSWINDOWS} stdcall {$ELSE} cdecl {$ENDIF};
1263  Tisc_portable_integer = function(ptr: pbyte; length: Smallint): Int64;
1264  {$IFDEF MSWINDOWS} stdcall {$ELSE} cdecl {$ENDIF};
1265 
1266 { ************** Collection of Plain API Function types definition ************* }
1267 TZFirebird_API = record
1268  { General database routines }
1269  isc_attach_database: Tisc_attach_database;
1270  isc_detach_database: Tisc_detach_database;
1271  isc_drop_database: Tisc_drop_database;
1272  isc_database_info: Tisc_database_info;
1273  isc_free: Tisc_free;
1274  isc_sqlcode: Tisc_sqlcode;
1275  isc_sql_interprete: Tisc_sql_interprete;
1276  isc_interprete: Tisc_interprete;
1277  fb_interpret: Tfb_interpret;
1278 
1279  { Transaction support routines }
1280  isc_start_transaction: Tisc_start_transaction;
1281  isc_start_multiple: Tisc_start_multiple;
1282  isc_rollback_transaction: Tisc_rollback_transaction;
1283  isc_rollback_retaining: Tisc_rollback_retaining;
1284  isc_commit_transaction: Tisc_commit_transaction;
1285  isc_commit_retaining: Tisc_commit_retaining;
1286  isc_transaction_info: Tisc_transaction_info;
1287 
1288  { Dynamic SQL routines }
1289  isc_dsql_allocate_statement: Tisc_dsql_allocate_statement;
1290  isc_dsql_alloc_statement2: Tisc_dsql_alloc_statement2;
1291  isc_dsql_describe: Tisc_dsql_describe;
1292  isc_dsql_describe_bind: Tisc_dsql_describe_bind;
1293  isc_dsql_execute: Tisc_dsql_execute;
1294  isc_dsql_execute2: Tisc_dsql_execute2;
1295  isc_dsql_execute_immediate: Tisc_dsql_execute_immediate;
1296  isc_dsql_fetch: Tisc_dsql_fetch;
1297  isc_dsql_free_statement: Tisc_dsql_free_statement;
1298  isc_dsql_prepare: Tisc_dsql_prepare;
1299  isc_dsql_set_cursor_name: Tisc_dsql_set_cursor_name;
1300  isc_dsql_sql_info: Tisc_dsql_sql_info;
1301 
1302  { Array processing routines }
1303  isc_array_gen_sdl: Tisc_array_gen_sdl;
1304  isc_array_get_slice: Tisc_array_get_slice;
1305  isc_array_lookup_bounds: Tisc_array_lookup_bounds;
1306  isc_array_lookup_desc: Tisc_array_lookup_desc;
1307  isc_array_set_desc: Tisc_array_set_desc;
1308  isc_array_put_slice: Tisc_array_put_slice;
1309 
1310  { Blob processing routines }
1311  isc_open_blob2: Tisc_open_blob2;
1312  isc_create_blob2: Tisc_create_blob2;
1313  isc_blob_info: Tisc_blob_info;
1314  isc_close_blob: Tisc_close_blob;
1315  isc_cancel_blob: Tisc_cancel_blob;
1316  isc_get_segment: Tisc_get_segment;
1317  isc_put_segment: Tisc_put_segment;
1318 
1319  { Event processing routines }
1320  isc_que_events: Tisc_que_events;
1321  isc_event_counts: Tisc_event_counts;
1322  isc_event_block: Tisc_event_block;
1323  isc_cancel_events: Tisc_cancel_events;
1324 
1325  { Types convertion routines }
1326  isc_encode_date: Tisc_encode_date;
1327  isc_decode_date: Tisc_decode_date;
1328  isc_vax_integer: Tisc_vax_integer;
1329  isc_portable_integer: Tisc_portable_integer;
1330 
1331  isc_encode_sql_date: Tisc_encode_sql_date;
1332  isc_decode_sql_date: Tisc_decode_sql_date;
1333 
1334  isc_encode_sql_time: Tisc_encode_sql_time;
1335  isc_decode_sql_time: Tisc_decode_sql_time;
1336 
1337  isc_encode_timestamp: Tisc_encode_timestamp;
1338  isc_decode_timestamp: Tisc_decode_timestamp;
1339 end;
1340 
1341 implementation
1342 
1343 end.