ViewVC Help
View File | Revision Log | Show Annotations | Download File | View Changeset | Root Listing
root/public/ibx/branches/udr/client/include/blr.inc
Revision: 371
Committed: Wed Jan 5 15:21:22 2022 UTC (2 years, 3 months ago) by tony
File size: 13647 byte(s)
Log Message:
Beta Release 0.1

File Contents

# User Rev Content
1 tony 329
2     {$IFDEF FPC}
3     {$PACKRECORDS C}
4     {$ENDIF}
5    
6    
7     {
8     * PROGRAM: C preprocessor
9     * MODULE: blr.h
10     * DESCRIPTION: BLR constants
11     *
12     * The contents of this file are subject to the Interbase Public
13     * License Version 1.0 (the "License"); you may not use this file
14     * except in compliance with the License. You may obtain a copy
15     * of the License at http://www.Inprise.com/IPL.html
16     *
17     * Software distributed under the License is distributed on an
18     * "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express
19     * or implied. See the License for the specific language governing
20     * rights and limitations under the License.
21     *
22     * The Original Code was created by Inprise Corporation
23     * and its predecessors. Portions created by Inprise Corporation are
24     * Copyright (C) Inprise Corporation.
25     *
26     * All Rights Reserved.
27     * Contributor(s): ______________________________________.
28     *
29     * Claudio Valderrama: 2001.6.18: Add blr_current_role.
30     * 2002.09.28 Dmitry Yemanov: Reworked internal_info stuff, enhanced
31     * exception handling in SPs/triggers,
32     * implemented ROWS_AFFECTED system variable
33     * 2002.10.21 Nickolay Samofatov: Added support for explicit pessimistic locks
34     * 2002.10.29 Nickolay Samofatov: Added support for savepoints
35     * 2003.10.05 Dmitry Yemanov: Added support for explicit cursors in PSQL
36     * Adriano dos Santos Fernandes
37     }
38     {$ifndef FIREBIRD_IMPL_BLR_H}
39     {$define FIREBIRD_IMPL_BLR_H}
40     (* error
41     #define BLR_WORD(x) UCHAR(x), UCHAR((x) >> 8)
42     in define line 36 *)
43     { WARNING: if you add a new BLR representing a data type, and the value
44     * is greater than the numerically greatest value which now
45     * represents a data type, you must change the define for
46     * DTYPE_BLR_MAX in jrd/align.h, and add the necessary entries
47     * to all the arrays in that file.
48     }
49    
50     const
51     blr_text = 14;
52     { added in 3.2 JPN }
53     blr_text2 = 15;
54     blr_short = 7;
55     blr_long = 8;
56     blr_quad = 9;
57     blr_float = 10;
58     blr_double = 27;
59     blr_d_float = 11;
60     blr_timestamp = 35;
61     blr_varying = 37;
62     { added in 3.2 JPN }
63     blr_varying2 = 38;
64     blr_blob = 261;
65     blr_cstring = 40;
66     { added in 3.2 JPN }
67     blr_cstring2 = 41;
68     { added from gds.h }
69     blr_blob_id = 45;
70     blr_sql_date = 12;
71     blr_sql_time = 13;
72     blr_int64 = 16;
73     blr_blob2 = 17;
74     blr_domain_name = 18;
75     blr_domain_name2 = 19;
76     blr_not_nullable = 20;
77     blr_column_name = 21;
78     blr_column_name2 = 22;
79     blr_bool = 23;
80     blr_dec64 = 24;
81     blr_dec128 = 25;
82     blr_int128 = 26;
83     blr_sql_time_tz = 28;
84     blr_timestamp_tz = 29;
85     blr_ex_time_tz = 30;
86     blr_ex_timestamp_tz = 31;
87     { first sub parameter for blr_domain_name[2] }
88     blr_domain_type_of = 0;
89     blr_domain_full = 1;
90     { Historical alias for pre V6 applications }
91     blr_date = blr_timestamp;
92     blr_inner = 0;
93     blr_left = 1;
94     blr_right = 2;
95     blr_full = 3;
96     blr_gds_code = 0;
97     blr_sql_code = 1;
98     blr_exception = 2;
99     blr_trigger_code = 3;
100     blr_default_code = 4;
101     blr_raise = 5;
102     blr_exception_msg = 6;
103     blr_exception_params = 7;
104     blr_sql_state = 8;
105     blr_version4 = 4;
106     blr_version5 = 5;
107     {#define blr_version6 6 }
108     blr_eoc = 76;
109     blr_end = 255;
110     blr_assignment = 1;
111     blr_begin = 2;
112     { added from gds.h }
113     blr_dcl_variable = 3;
114     blr_message = 4;
115     blr_erase = 5;
116     blr_fetch = 6;
117     blr_for = 7;
118     blr_if = 8;
119     blr_loop = 9;
120     blr_modify = 10;
121     blr_handler = 11;
122     blr_receive = 12;
123     blr_select = 13;
124     blr_send = 14;
125     blr_store = 15;
126     blr_label = 17;
127     blr_leave = 18;
128     blr_store2 = 19;
129     blr_post = 20;
130     blr_literal = 21;
131     blr_dbkey = 22;
132     blr_field = 23;
133     blr_fid = 24;
134     blr_parameter = 25;
135     blr_variable = 26;
136     blr_average = 27;
137     blr_count = 28;
138     blr_maximum = 29;
139     blr_minimum = 30;
140     blr_total = 31;
141     blr_receive_batch = 32;
142     { unused code: 33 }
143     blr_add = 34;
144     blr_subtract = 35;
145     blr_multiply = 36;
146     blr_divide = 37;
147     blr_negate = 38;
148     blr_concatenate = 39;
149     blr_substring = 40;
150     blr_parameter2 = 41;
151     blr_from = 42;
152     blr_via = 43;
153     { added from gds.h }
154     blr_user_name = 44;
155     blr_null = 45;
156     blr_equiv = 46;
157     blr_eql = 47;
158     blr_neq = 48;
159     blr_gtr = 49;
160     blr_geq = 50;
161     blr_lss = 51;
162     blr_leq = 52;
163     blr_containing = 53;
164     blr_matching = 54;
165     blr_starting = 55;
166     blr_between = 56;
167     blr_or = 57;
168     blr_and = 58;
169     blr_not = 59;
170     blr_any = 60;
171     blr_missing = 61;
172     blr_unique = 62;
173     blr_like = 63;
174     { unused codes: 64..66 }
175     blr_rse = 67;
176     blr_first = 68;
177     blr_project = 69;
178     blr_sort = 70;
179     blr_boolean = 71;
180     blr_ascending = 72;
181     blr_descending = 73;
182     blr_relation = 74;
183     blr_rid = 75;
184     blr_union = 76;
185     blr_map = 77;
186     blr_group_by = 78;
187     blr_aggregate = 79;
188     blr_join_type = 80;
189     { unused codes: 81..82 }
190     blr_agg_count = 83;
191     blr_agg_max = 84;
192     blr_agg_min = 85;
193     blr_agg_total = 86;
194     blr_agg_average = 87;
195     { same as Rdb definition }
196     blr_parameter3 = 88;
197     { unsupported
198     #define blr_run_max 89
199     #define blr_run_min 90
200     #define blr_run_total 91
201     #define blr_run_average 92
202     }
203     blr_agg_count2 = 93;
204     blr_agg_count_distinct = 94;
205     blr_agg_total_distinct = 95;
206     blr_agg_average_distinct = 96;
207     { unused codes: 97..99 }
208     blr_function = 100;
209     blr_gen_id = 101;
210     {/#define blr_prot_mask 102 }
211     blr_upcase = 103;
212     {/#define blr_lock_state 104 }
213     blr_value_if = 105;
214     blr_matching2 = 106;
215     blr_index = 107;
216     blr_ansi_like = 108;
217     blr_scrollable = 109;
218 tony 345 blr_lateral_rse = 110;
219     { unused codes: 111..117 }
220 tony 329 { changed from 88 to avoid conflict with blr_parameter3 }
221     blr_run_count = 118;
222     blr_rs_stream = 119;
223     blr_exec_proc = 120;
224     { unused codes: 121..123 }
225     blr_procedure = 124;
226     blr_pid = 125;
227     blr_exec_pid = 126;
228     blr_singular = 127;
229     blr_abort = 128;
230     blr_block = 129;
231     blr_error_handler = 130;
232     blr_cast = 131;
233     blr_pid2 = 132;
234     blr_procedure2 = 133;
235     blr_start_savepoint = 134;
236     blr_end_savepoint = 135;
237     { unused codes: 136..138 }
238     { access plan items }
239     blr_plan = 139;
240     blr_merge = 140;
241     blr_join = 141;
242     blr_sequential = 142;
243     blr_navigational = 143;
244     blr_indices = 144;
245     blr_retrieve = 145;
246     blr_relation2 = 146;
247     blr_rid2 = 147;
248     { unused codes: 148..149 }
249     blr_set_generator = 150;
250     { required for NULL handling }
251     blr_ansi_any = 151;
252     { required for NULL handling }
253     blr_exists = 152;
254     { unused codes: 153 }
255     { get tid of record }
256     blr_record_version = 154;
257     { fake server stall }
258     blr_stall = 155;
259     { unused codes: 156..157 }
260     { required for NULL handling }
261     blr_ansi_all = 158;
262     blr_extract = 159;
263     { sub parameters for blr_extract }
264     blr_extract_year = 0;
265     blr_extract_month = 1;
266     blr_extract_day = 2;
267     blr_extract_hour = 3;
268     blr_extract_minute = 4;
269     blr_extract_second = 5;
270     blr_extract_weekday = 6;
271     blr_extract_yearday = 7;
272     blr_extract_millisecond = 8;
273     blr_extract_week = 9;
274     blr_extract_timezone_hour = 10;
275     blr_extract_timezone_minute = 11;
276     blr_current_date = 160;
277     blr_current_timestamp = 161;
278     blr_current_time = 162;
279     { These codes reuse BLR code space }
280     blr_post_arg = 163;
281     blr_exec_into = 164;
282     blr_user_savepoint = 165;
283     blr_dcl_cursor = 166;
284     blr_cursor_stmt = 167;
285     blr_current_timestamp2 = 168;
286     blr_current_time2 = 169;
287     blr_agg_list = 170;
288     blr_agg_list_distinct = 171;
289     blr_modify2 = 172;
290     { unused codes: 173 }
291     { FB 1.0 specific BLR }
292     blr_current_role = 174;
293     blr_skip = 175;
294     { FB 1.5 specific BLR }
295     blr_exec_sql = 176;
296     blr_internal_info = 177;
297     blr_nullsfirst = 178;
298     blr_writelock = 179;
299     blr_nullslast = 180;
300     { FB 2.0 specific BLR }
301     blr_lowcase = 181;
302     blr_strlen = 182;
303     { sub parameter for blr_strlen }
304     blr_strlen_bit = 0;
305     blr_strlen_char = 1;
306     blr_strlen_octet = 2;
307     blr_trim = 183;
308     { first sub parameter for blr_trim }
309     blr_trim_both = 0;
310     blr_trim_leading = 1;
311     blr_trim_trailing = 2;
312     { second sub parameter for blr_trim }
313     blr_trim_spaces = 0;
314     blr_trim_characters = 1;
315     { These codes are actions for user-defined savepoints }
316     blr_savepoint_set = 0;
317     blr_savepoint_release = 1;
318     blr_savepoint_undo = 2;
319     blr_savepoint_release_single = 3;
320     { These codes are actions for cursors }
321     blr_cursor_open = 0;
322     blr_cursor_close = 1;
323     blr_cursor_fetch = 2;
324     blr_cursor_fetch_scroll = 3;
325     { scroll options }
326     blr_scroll_forward = 0;
327     blr_scroll_backward = 1;
328     blr_scroll_bof = 2;
329     blr_scroll_eof = 3;
330     blr_scroll_absolute = 4;
331     blr_scroll_relative = 5;
332     { FB 2.1 specific BLR }
333     blr_init_variable = 184;
334     blr_recurse = 185;
335     blr_sys_function = 186;
336     { FB 2.5 specific BLR }
337     blr_auto_trans = 187;
338     blr_similar = 188;
339     blr_exec_stmt = 189;
340     { subcodes of blr_exec_stmt }
341     blr_exec_stmt_inputs = 1; { input parameters count }
342     blr_exec_stmt_outputs = 2; { output parameters count }
343     blr_exec_stmt_sql = 3;
344     blr_exec_stmt_proc_block = 4;
345     blr_exec_stmt_data_src = 5;
346     blr_exec_stmt_user = 6;
347     blr_exec_stmt_pwd = 7;
348     blr_exec_stmt_tran = 8; { not implemented yet }
349     blr_exec_stmt_tran_clone = 9; { make transaction parameters equal to current transaction }
350     blr_exec_stmt_privs = 10;
351     blr_exec_stmt_in_params = 11; { not named input parameters }
352     blr_exec_stmt_in_params2 = 12; { named input parameters }
353     blr_exec_stmt_out_params = 13; { output parameters }
354     blr_exec_stmt_role = 14;
355     blr_exec_stmt_in_excess = 15; { excess input params numbers }
356     blr_stmt_expr = 190;
357     blr_derived_expr = 191;
358     { FB 3.0 specific BLR }
359     blr_procedure3 = 192;
360     blr_exec_proc2 = 193;
361     blr_function2 = 194;
362     blr_window = 195;
363     blr_partition_by = 196;
364     blr_continue_loop = 197;
365     blr_procedure4 = 198;
366     blr_agg_function = 199;
367     blr_substring_similar = 200;
368     blr_bool_as_value = 201;
369     blr_coalesce = 202;
370     blr_decode = 203;
371     blr_exec_subproc = 204;
372     blr_subproc_decl = 205;
373     blr_subproc = 206;
374     blr_subfunc_decl = 207;
375     blr_subfunc = 208;
376     blr_record_version2 = 209;
377     blr_gen_id2 = 210; { NEXT VALUE FOR generator }
378     { FB 4.0 specific BLR }
379     blr_window_win = 211;
380     { subcodes of blr_window_win }
381     blr_window_win_partition = 1;
382     blr_window_win_order = 2;
383     blr_window_win_map = 3;
384     blr_window_win_extent_unit = 4;
385     blr_window_win_extent_frame_bound = 5;
386     blr_window_win_extent_frame_value = 6;
387     blr_window_win_exclusion = 7;
388     blr_default = 212;
389     blr_store3 = 213;
390 tony 345 { subcodes of blr_store3 }
391     blr_store_override_user = 1;
392     blr_store_override_system = 2;
393 tony 329 blr_local_timestamp = 214;
394     blr_local_time = 215;
395     blr_at = 216;
396     { subcodes of blr_at }
397     blr_at_local = 0;
398 tony 345 blr_at_zone = 1;
399     blr_marks = 217; { mark some blr code with specific flags }
400 tony 329 {$endif}
401     { FIREBIRD_IMPL_BLR_H }
402