1 |
|
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 |
{ unused codes: 110..117 } |
219 |
{ changed from 88 to avoid conflict with blr_parameter3 } |
220 |
blr_run_count = 118; |
221 |
blr_rs_stream = 119; |
222 |
blr_exec_proc = 120; |
223 |
{ unused codes: 121..123 } |
224 |
blr_procedure = 124; |
225 |
blr_pid = 125; |
226 |
blr_exec_pid = 126; |
227 |
blr_singular = 127; |
228 |
blr_abort = 128; |
229 |
blr_block = 129; |
230 |
blr_error_handler = 130; |
231 |
blr_cast = 131; |
232 |
blr_pid2 = 132; |
233 |
blr_procedure2 = 133; |
234 |
blr_start_savepoint = 134; |
235 |
blr_end_savepoint = 135; |
236 |
{ unused codes: 136..138 } |
237 |
{ access plan items } |
238 |
blr_plan = 139; |
239 |
blr_merge = 140; |
240 |
blr_join = 141; |
241 |
blr_sequential = 142; |
242 |
blr_navigational = 143; |
243 |
blr_indices = 144; |
244 |
blr_retrieve = 145; |
245 |
blr_relation2 = 146; |
246 |
blr_rid2 = 147; |
247 |
{ unused codes: 148..149 } |
248 |
blr_set_generator = 150; |
249 |
{ required for NULL handling } |
250 |
blr_ansi_any = 151; |
251 |
{ required for NULL handling } |
252 |
blr_exists = 152; |
253 |
{ unused codes: 153 } |
254 |
{ get tid of record } |
255 |
blr_record_version = 154; |
256 |
{ fake server stall } |
257 |
blr_stall = 155; |
258 |
{ unused codes: 156..157 } |
259 |
{ required for NULL handling } |
260 |
blr_ansi_all = 158; |
261 |
blr_extract = 159; |
262 |
{ sub parameters for blr_extract } |
263 |
blr_extract_year = 0; |
264 |
blr_extract_month = 1; |
265 |
blr_extract_day = 2; |
266 |
blr_extract_hour = 3; |
267 |
blr_extract_minute = 4; |
268 |
blr_extract_second = 5; |
269 |
blr_extract_weekday = 6; |
270 |
blr_extract_yearday = 7; |
271 |
blr_extract_millisecond = 8; |
272 |
blr_extract_week = 9; |
273 |
blr_extract_timezone_hour = 10; |
274 |
blr_extract_timezone_minute = 11; |
275 |
blr_current_date = 160; |
276 |
blr_current_timestamp = 161; |
277 |
blr_current_time = 162; |
278 |
{ These codes reuse BLR code space } |
279 |
blr_post_arg = 163; |
280 |
blr_exec_into = 164; |
281 |
blr_user_savepoint = 165; |
282 |
blr_dcl_cursor = 166; |
283 |
blr_cursor_stmt = 167; |
284 |
blr_current_timestamp2 = 168; |
285 |
blr_current_time2 = 169; |
286 |
blr_agg_list = 170; |
287 |
blr_agg_list_distinct = 171; |
288 |
blr_modify2 = 172; |
289 |
{ unused codes: 173 } |
290 |
{ FB 1.0 specific BLR } |
291 |
blr_current_role = 174; |
292 |
blr_skip = 175; |
293 |
{ FB 1.5 specific BLR } |
294 |
blr_exec_sql = 176; |
295 |
blr_internal_info = 177; |
296 |
blr_nullsfirst = 178; |
297 |
blr_writelock = 179; |
298 |
blr_nullslast = 180; |
299 |
{ FB 2.0 specific BLR } |
300 |
blr_lowcase = 181; |
301 |
blr_strlen = 182; |
302 |
{ sub parameter for blr_strlen } |
303 |
blr_strlen_bit = 0; |
304 |
blr_strlen_char = 1; |
305 |
blr_strlen_octet = 2; |
306 |
blr_trim = 183; |
307 |
{ first sub parameter for blr_trim } |
308 |
blr_trim_both = 0; |
309 |
blr_trim_leading = 1; |
310 |
blr_trim_trailing = 2; |
311 |
{ second sub parameter for blr_trim } |
312 |
blr_trim_spaces = 0; |
313 |
blr_trim_characters = 1; |
314 |
{ These codes are actions for user-defined savepoints } |
315 |
blr_savepoint_set = 0; |
316 |
blr_savepoint_release = 1; |
317 |
blr_savepoint_undo = 2; |
318 |
blr_savepoint_release_single = 3; |
319 |
{ These codes are actions for cursors } |
320 |
blr_cursor_open = 0; |
321 |
blr_cursor_close = 1; |
322 |
blr_cursor_fetch = 2; |
323 |
blr_cursor_fetch_scroll = 3; |
324 |
{ scroll options } |
325 |
blr_scroll_forward = 0; |
326 |
blr_scroll_backward = 1; |
327 |
blr_scroll_bof = 2; |
328 |
blr_scroll_eof = 3; |
329 |
blr_scroll_absolute = 4; |
330 |
blr_scroll_relative = 5; |
331 |
{ FB 2.1 specific BLR } |
332 |
blr_init_variable = 184; |
333 |
blr_recurse = 185; |
334 |
blr_sys_function = 186; |
335 |
{ FB 2.5 specific BLR } |
336 |
blr_auto_trans = 187; |
337 |
blr_similar = 188; |
338 |
blr_exec_stmt = 189; |
339 |
{ subcodes of blr_exec_stmt } |
340 |
blr_exec_stmt_inputs = 1; { input parameters count } |
341 |
blr_exec_stmt_outputs = 2; { output parameters count } |
342 |
blr_exec_stmt_sql = 3; |
343 |
blr_exec_stmt_proc_block = 4; |
344 |
blr_exec_stmt_data_src = 5; |
345 |
blr_exec_stmt_user = 6; |
346 |
blr_exec_stmt_pwd = 7; |
347 |
blr_exec_stmt_tran = 8; { not implemented yet } |
348 |
blr_exec_stmt_tran_clone = 9; { make transaction parameters equal to current transaction } |
349 |
blr_exec_stmt_privs = 10; |
350 |
blr_exec_stmt_in_params = 11; { not named input parameters } |
351 |
blr_exec_stmt_in_params2 = 12; { named input parameters } |
352 |
blr_exec_stmt_out_params = 13; { output parameters } |
353 |
blr_exec_stmt_role = 14; |
354 |
blr_exec_stmt_in_excess = 15; { excess input params numbers } |
355 |
blr_stmt_expr = 190; |
356 |
blr_derived_expr = 191; |
357 |
{ FB 3.0 specific BLR } |
358 |
blr_procedure3 = 192; |
359 |
blr_exec_proc2 = 193; |
360 |
blr_function2 = 194; |
361 |
blr_window = 195; |
362 |
blr_partition_by = 196; |
363 |
blr_continue_loop = 197; |
364 |
blr_procedure4 = 198; |
365 |
blr_agg_function = 199; |
366 |
blr_substring_similar = 200; |
367 |
blr_bool_as_value = 201; |
368 |
blr_coalesce = 202; |
369 |
blr_decode = 203; |
370 |
blr_exec_subproc = 204; |
371 |
blr_subproc_decl = 205; |
372 |
blr_subproc = 206; |
373 |
blr_subfunc_decl = 207; |
374 |
blr_subfunc = 208; |
375 |
blr_record_version2 = 209; |
376 |
blr_gen_id2 = 210; { NEXT VALUE FOR generator } |
377 |
{ FB 4.0 specific BLR } |
378 |
blr_window_win = 211; |
379 |
{ subcodes of blr_window_win } |
380 |
blr_window_win_partition = 1; |
381 |
blr_window_win_order = 2; |
382 |
blr_window_win_map = 3; |
383 |
blr_window_win_extent_unit = 4; |
384 |
blr_window_win_extent_frame_bound = 5; |
385 |
blr_window_win_extent_frame_value = 6; |
386 |
blr_window_win_exclusion = 7; |
387 |
blr_default = 212; |
388 |
blr_store3 = 213; |
389 |
blr_local_timestamp = 214; |
390 |
blr_local_time = 215; |
391 |
blr_at = 216; |
392 |
{ subcodes of blr_at } |
393 |
blr_at_local = 0; |
394 |
blr_at_zone = 1; |
395 |
blr_marks = 217; |
396 |
{$endif} |
397 |
{ FIREBIRD_IMPL_BLR_H } |
398 |
|