1 {*********************************************************}
3 { Zeos Database Objects }
4 { Interbase and Firebird Common constants }
6 { Originally written by Sergey Seroukhov }
8 {*********************************************************}
10 {@********************************************************}
11 { Copyright (c) 1999-2012 Zeos Development Group }
13 { License Agreement: }
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. }
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. }
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) }
46 { http://www.sourceforge.net/projects/zeoslib. }
49 { Zeos Development Group. }
50 {********************************************************@}
52 unit ZPlainFirebirdInterbaseConstants;
62 IBLocalBufferLength = 512;
63 IBBigLocalBufferLength = IBLocalBufferLength * 2;
64 IBHugeLocalBufferLength = IBBigLocalBufferLength * 20;
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
70 DISCONNECT_ERROR = -1;
86 SQL_DIALECT_CURRENT = SQL_DIALECT_V6; (* latest IB DIALECT *)
104 SQL_DATE = SQL_TIMESTAMP;
106 (* #define BLR_WORD(x) UCHAR(x), UCHAR((x) >> 8)
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.
128 blr_cstring2 = 41; // added in 3.2 JPN
129 blr_blob_id = 45; // added from gds.h
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;
141 // Historical alias for pre V6 applications
142 blr_date = blr_timestamp;
144 // first sub parameter for blr_domain_name[2]
145 blr_domain_type_of = 0;
156 blr_trigger_code = 3;
157 blr_default_code = 4;
159 blr_exception_msg = 6;
160 blr_exception_params= 7;
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
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
199 // unused codes: 32..33
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
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
233 // unused codes: 64..66
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
250 // unused codes: 81..82
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 */
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
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
269 // unused codes: 97..99
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
282 // unused codes: 110..117
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
288 // unused codes: 121..123
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
298 #define blr_cast (unsigned char)131
300 #define blr_pid2 (unsigned char)132
301 #define blr_procedure2 (unsigned char)133
303 #define blr_start_savepoint (unsigned char)134
304 #define blr_end_savepoint (unsigned char)135
306 // unused codes: 136..138
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
316 #define blr_relation2 (unsigned char)146
317 #define blr_rid2 (unsigned char)147
319 // unused codes: 148..149
321 #define blr_set_generator (unsigned char)150
323 #define blr_ansi_any (unsigned char)151 /* required for NULL handling */
324 #define blr_exists (unsigned char)152 /* required for NULL handling */
328 #define blr_record_version (unsigned char)154 /* get tid of record */
329 #define blr_stall (unsigned char)155 /* fake server stall */
331 // unused codes: 156..157
333 #define blr_ansi_all (unsigned char)158 /* required for NULL handling */
335 #define blr_extract (unsigned char)159
337 /* sub parameters for blr_extract */
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
350 #define blr_current_date (unsigned char)160
351 #define blr_current_timestamp (unsigned char)161
352 #define blr_current_time (unsigned char)162
354 /* These codes reuse BLR code space */
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
369 /* FB 1.0 specific BLR */
371 #define blr_current_role (unsigned char)174
372 #define blr_skip (unsigned char)175
374 /* FB 1.5 specific BLR */
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
382 /* FB 2.0 specific BLR */
384 #define blr_lowcase (unsigned char)181
385 #define blr_strlen (unsigned char)182
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
392 #define blr_trim (unsigned char)183
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
399 /* second sub parameter for blr_trim */
400 #define blr_trim_spaces (unsigned char)0
401 #define blr_trim_characters (unsigned char)1
403 /* These codes are actions for user-defined savepoints */
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
410 /* These codes are actions for cursors */
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
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
426 /* FB 2.1 specific BLR */
428 #define blr_init_variable (unsigned char)184
429 #define blr_recurse (unsigned char)185
430 #define blr_sys_function (unsigned char)186
432 // FB 2.5 specific BLR
434 #define blr_auto_trans (unsigned char)187
435 #define blr_similar (unsigned char)188
436 #define blr_exec_stmt (unsigned char)189
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
454 #define blr_stmt_expr (unsigned char) 190
455 #define blr_derived_expr (unsigned char) 191
457 // FB 3.0 specific BLR
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
481 { SQL subtypes definitions from RDB$FIELDS}
538 CS_METADATA = CS_UNICODE_FSS;
540 RDB_NUMBERS_NONE = 0;
541 RDB_NUMBERS_NUMERIC = 1;
542 RDB_NUMBERS_DECIMAL = 2;
545 { types less than zero are reserved for customer use }
546 isc_blob_untyped = 0;
548 { internal subtypes }
553 isc_blob_summary = 5;
556 isc_blob_extfile = 8;
557 isc_blob_debug_info = 9;
558 isc_blob_max_predefined_subtype= 10;
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;
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;
576 isc_segment = 335544366;
577 isc_segstr_eof = 335544367;
578 isc_lock_conflict = 335544345;
580 { Database parameter block stuff }
581 isc_dpb_version1 = 1;
582 isc_dpb_cdd_pathname = 1;
583 isc_dpb_allocation = 2;
585 isc_dpb_page_size = 4;
586 isc_dpb_num_buffers = 5;
587 isc_dpb_buffer_length = 6;
589 isc_dpb_garbage_collect = 8;
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;
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;
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;
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;
651 { isc_dpb_verify specific flags }
655 isc_dpb_transactions = 8;
656 isc_dpb_no_update = 16;
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;
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;
672 isc_tpb_protected = 4;
673 isc_tpb_exclusive = 5;
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;
692 isc_tpb_no_savepoint = 21;
694 isc_tpb_lock_timeout = 21;
696 { Blob Parameter Block }
697 isc_bpb_version1 = 1;
698 isc_bpb_source_type = 1;
699 isc_bpb_target_type = 2;
701 isc_bpb_source_interp = 4;
702 isc_bpb_target_interp = 5;
703 isc_bpb_filter_parameter = 6;
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;
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;
743 isc_bpb_type_segmented = 0;
744 isc_bpb_type_stream = 1;
746 {************** Information call declarations **************}
748 { Common, structural codes }
750 isc_info_truncated = 2;
752 isc_info_data_not_ready = 4;
753 isc_info_flag_end = 127;
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;
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;
770 { Database information items }
774 isc_info_fetches = 7;
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;
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;
831 isc_info_att_charset = 70;
832 isc_info_svr_min_ver = 71;
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;
855 ISC_STATUS = NativeInt;
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;
863 PPAnsiChar = ^PAnsiChar;
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) }
879 PCTimeStructure = ^TCTimeStructure;
880 TM = TCTimeStructure;
883 TISC_VARYING = record
885 str: array[0..0] of AnsiChar; //AVZ - was AnsiChar
887 PISC_VARYING = ^TISC_VARYING;
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;
901 { Time & Date Support }
903 PISC_DATE = ^ISC_DATE;
905 PISC_TIME = ^ISC_TIME;
907 TISC_TIMESTAMP = record
908 timestamp_date: ISC_DATE;
909 timestamp_time: ISC_TIME;
911 PISC_TIMESTAMP = ^TISC_TIMESTAMP;
913 { Blob id structure }
915 gds_quad_high: ISC_LONG;
916 gds_quad_low: UISC_LONG;
918 PGDS_QUAD = ^TGDS_QUAD;
920 TISC_QUAD = TGDS_QUAD;
921 PISC_QUAD = ^TISC_QUAD;
923 TISC_ARRAY_BOUND = record
924 array_bound_lower: Short;
925 array_bound_upper: Short;
927 PISC_ARRAY_BOUND = ^TISC_ARRAY_BOUND;
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;
939 PISC_ARRAY_DESC = ^TISC_ARRAY_DESC;
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;
948 PISC_BLOB_DESC = ^TISC_BLOB_DESC;
950 { Declare the extended SQLDA }
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 }
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;
973 PXSQLVAR = ^TXSQLVAR;
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;
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;
994 tpb_address: PAnsiChar;
997 {****************************************************}
998 { This record type is for passing arguments to }
999 { isc_start_multiple (see docs) }
1000 {****************************************************}
1002 db_handle: PISC_DB_HANDLE;
1003 tpb_length: LongInt;
1004 tpb_address: PAnsiChar;
1006 PISC_TEB = ^TISC_TEB;
1007 TISC_TEB_ARRAY = array[0..0] of TISC_TEB;
1008 PISC_TEB_ARRAY = ^TISC_TEB_ARRAY;
1010 { Interbase status array }
1011 PARRAY_ISC_STATUS = ^TARRAY_ISC_STATUS;
1012 TARRAY_ISC_STATUS = array[0..20] of ISC_STATUS;
1014 { ************** Plain API Function types definition ************* }
1016 { General database routines }
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};
1023 Tisc_detach_database = function(status_vector: PISC_STATUS;
1024 db_handle: PISC_DB_HANDLE): ISC_STATUS;
1025 {$IFDEF MSWINDOWS} stdcall {$ELSE} cdecl {$ENDIF};
1027 Tisc_drop_database = function(status_vector: PISC_STATUS;
1028 db_handle: PISC_DB_HANDLE): ISC_STATUS;
1029 {$IFDEF MSWINDOWS} stdcall {$ELSE} cdecl {$ENDIF};
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};
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};
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};
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};
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};
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};
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};
1073 Tisc_free = function(isc_arg1: PAnsiChar): ISC_LONG;
1074 {$IFDEF MSWINDOWS} stdcall {$ELSE} cdecl {$ENDIF};
1076 Tisc_sqlcode = function(status_vector: PISC_STATUS): ISC_LONG;
1077 {$IFDEF MSWINDOWS} stdcall {$ELSE} cdecl {$ENDIF};
1079 Tisc_sql_interprete = procedure(sqlcode: Short; buffer: PAnsiChar;
1080 buffer_length: Short); {$IFDEF MSWINDOWS} stdcall {$ELSE} cdecl {$ENDIF};
1082 Tisc_interprete = function(buffer: PAnsiChar; status_vector: PPISC_STATUS):
1083 ISC_STATUS; {$IFDEF MSWINDOWS} stdcall {$ELSE} cdecl {$ENDIF};
1085 Tfb_interpret = function(buffer: PAnsiChar; bufsize: integer; status_vector: PPISC_STATUS):
1086 ISC_STATUS; {$IFDEF MSWINDOWS} stdcall {$ELSE} cdecl {$ENDIF};
1088 { Transaction support routines }
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};
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};
1100 Tisc_rollback_transaction = function(status_vector: PISC_STATUS;
1101 tran_handle: PISC_TR_HANDLE): ISC_STATUS;
1102 {$IFDEF MSWINDOWS} stdcall {$ELSE} cdecl {$ENDIF};
1104 Tisc_rollback_retaining = function(status_vector: PISC_STATUS;
1105 tran_handle: PISC_TR_HANDLE): ISC_STATUS;
1106 {$IFDEF MSWINDOWS} stdcall {$ELSE} cdecl {$ENDIF};
1108 Tisc_commit_retaining = function(status_vector: PISC_STATUS;
1109 tran_handle: PISC_TR_HANDLE): ISC_STATUS;
1110 {$IFDEF MSWINDOWS} stdcall {$ELSE} cdecl {$ENDIF};
1112 Tisc_commit_transaction = function(status_vector: PISC_STATUS;
1113 tran_handle: PISC_TR_HANDLE): ISC_STATUS;
1114 {$IFDEF MSWINDOWS} stdcall {$ELSE} cdecl {$ENDIF};
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};
1122 { Dynamic SQL routines }
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};
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};
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};
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};
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};
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};
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};
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};
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};
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};
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};
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};
1177 { Blob processing routines }
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};
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};
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};
1196 Tisc_close_blob = function(status_vector: PISC_STATUS;
1197 blob_handle: PISC_BLOB_HANDLE): ISC_STATUS;
1198 {$IFDEF MSWINDOWS} stdcall {$ELSE} cdecl {$ENDIF};
1200 Tisc_cancel_blob = function(status_vector: PISC_STATUS;
1201 blob_handle: PISC_BLOB_HANDLE): ISC_STATUS;
1202 {$IFDEF MSWINDOWS} stdcall {$ELSE} cdecl {$ENDIF};
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};
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};
1213 { Event processing routines }
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};
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};
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};
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};
1233 { Types convertion routines }
1235 Tisc_decode_date = procedure(ib_date: PISC_QUAD; tm_date: PCTimeStructure);
1236 {$IFDEF MSWINDOWS} stdcall {$ELSE} cdecl {$ENDIF};
1238 Tisc_encode_date = procedure(tm_date: PCTimeStructure; ib_date: PISC_QUAD);
1239 {$IFDEF MSWINDOWS} stdcall {$ELSE} cdecl {$ENDIF};
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};
1245 Tisc_decode_sql_time = procedure(ib_time: PISC_TIME;
1246 tm_date: PCTimeStructure); {$IFDEF MSWINDOWS} stdcall {$ELSE} cdecl {$ENDIF};
1248 Tisc_decode_timestamp = procedure(ib_timestamp: PISC_TIMESTAMP;
1249 tm_date: PCTimeStructure); {$IFDEF MSWINDOWS} stdcall {$ELSE} cdecl {$ENDIF};
1251 Tisc_encode_sql_date = procedure(tm_date: PCTimeStructure;
1252 ib_date: PISC_DATE); {$IFDEF MSWINDOWS} stdcall {$ELSE} cdecl {$ENDIF};
1254 Tisc_encode_sql_time = procedure(tm_date: PCTimeStructure;
1255 ib_time: PISC_TIME); {$IFDEF MSWINDOWS} stdcall {$ELSE} cdecl {$ENDIF};
1257 Tisc_encode_timestamp = procedure(tm_date: PCTimeStructure;
1258 ib_timestamp: PISC_TIMESTAMP);
1259 {$IFDEF MSWINDOWS} stdcall {$ELSE} cdecl {$ENDIF};
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};
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;
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;
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;
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;
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;
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;
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;
1331 isc_encode_sql_date: Tisc_encode_sql_date;
1332 isc_decode_sql_date: Tisc_decode_sql_date;
1334 isc_encode_sql_time: Tisc_encode_sql_time;
1335 isc_decode_sql_time: Tisc_decode_sql_time;
1337 isc_encode_timestamp: Tisc_encode_timestamp;
1338 isc_decode_timestamp: Tisc_decode_timestamp;