ibase60types.inc 48 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598
  1. {
  2. Contains the types needed for use with Interbase/Firebird
  3. }
  4. type
  5. { Unsigned types }
  6. UChar = Byte;
  7. UShort = Word;
  8. UInt = DWord;
  9. ULong = DWord;
  10. { Signed types }
  11. Int = LongInt;
  12. Long = LongInt;
  13. Short = Integer;
  14. Float = Single;
  15. { Pointers to basic types }
  16. PInt = ^Int;
  17. PShort = ^Short;
  18. PUShort = ^UShort;
  19. PLong = ^Long;
  20. PULong = ^ULong;
  21. PFloat = ^Float;
  22. PUChar = ^UChar;
  23. PVoid = ^Pointer;
  24. {$PACKRECORDS C}
  25. const
  26. ISC_TRUE = 1;
  27. ISC_FALSE = 0;
  28. const
  29. ISC__TRUE = ISC_TRUE;
  30. ISC__FALSE = ISC_FALSE;
  31. Type
  32. ISC_USHORT = word;
  33. ISC_STATUS = longint;
  34. ISC_INT64 = int64;
  35. ISC_UINT64 = qword;
  36. ISC_LONG = Longint;
  37. PISC_USHORT = ^ISC_USHORT;
  38. PISC_STATUS = ^ISC_STATUS;
  39. PPISC_STATUS = ^PISC_STATUS;
  40. PISC_INT64 = ^ISC_INT64;
  41. PISC_UINT64 = ^ISC_UINT64;
  42. PISC_LONG = ^ISC_LONG;
  43. const
  44. DSQL_close = 1;
  45. DSQL_drop = 2;
  46. {!!MVC
  47. Removed all ISC_FAR, ISC_EXPORT_VARARG and ISC_EXPORT
  48. macros.
  49. They confuse h2pas...
  50. !!MVC }
  51. { }
  52. { Time & Date Support }
  53. { }
  54. {$ifndef _ISC_TIMESTAMP_}
  55. type
  56. ISC_DATE = longint;
  57. ISC_TIME = dword;
  58. ISC_TIMESTAMP = record
  59. timestamp_date : ISC_DATE;
  60. timestamp_time : ISC_TIME;
  61. end;
  62. TISC_DATE = ISC_DATE;
  63. TISC_TIME = ISC_TIME;
  64. TISC_TIMESTAMP = ISC_TIMESTAMP;
  65. PISC_DATE = ^ISC_DATE;
  66. PISC_TIME = ^ISC_TIME;
  67. PISC_TIMESTAMP = ^ISC_TIMESTAMP;
  68. const
  69. _ISC_TIMESTAMP_ = 1;
  70. {$endif}
  71. const
  72. ISC_TIME_SECONDS_PRECISION = 10000;
  73. ISC_TIME_SECONDS_PRECISION_SCALE = -4;
  74. { }
  75. { Blob id structure }
  76. { }
  77. Type
  78. GDS_QUAD = record
  79. gds_quad_high : ISC_LONG;
  80. gds_quad_low : ISC_LONG;
  81. end;
  82. TGDS_QUAD = GDS_QUAD;
  83. PGDS_QUAD = ^GDS_QUAD;
  84. Type
  85. ISC_QUAD = GDS_QUAD;
  86. TISC_QUAD = ISC_QUAD;
  87. PISC_QUAD = ^ISC_QUAD;
  88. { !!field redefinitions !!
  89. isc_quad_high = gds_quad_high;
  90. isc_quad_low = gds_quad_low;
  91. }
  92. type
  93. ISC_ARRAY_BOUND = record
  94. array_bound_lower : smallint;
  95. array_bound_upper : smallint;
  96. end;
  97. TISC_ARRAY_BOUND = ISC_ARRAY_BOUND;
  98. PISC_ARRAY_BOUND = ^ISC_ARRAY_BOUND;
  99. ISC_ARRAY_DESC = record
  100. array_desc_dtype : byte;
  101. array_desc_scale : char;
  102. array_desc_length : word;
  103. array_desc_field_name : array[0..31] of char;
  104. array_desc_relation_name : array[0..31] of char;
  105. array_desc_dimensions : smallint;
  106. array_desc_flags : smallint;
  107. array_desc_bounds : array[0..15] of ISC_ARRAY_BOUND;
  108. end;
  109. TISC_ARRAY_DESC = ISC_ARRAY_DESC;
  110. PISC_ARRAY_DESC = ^ISC_ARRAY_DESC;
  111. ISC_BLOB_DESC = record
  112. blob_desc_subtype : smallint;
  113. blob_desc_charset : smallint;
  114. blob_desc_segment_size : smallint;
  115. blob_desc_field_name : array[0..31] of byte;
  116. blob_desc_relation_name : array[0..31] of byte;
  117. end;
  118. TISC_BLOB_DESC = ISC_BLOB_DESC;
  119. PISC_BLOB_DESC = ^ISC_BLOB_DESC ;
  120. { }
  121. { Blob control structure }
  122. { }
  123. {!!MVC
  124. !!MVC }
  125. { Source filter }
  126. {!!MVC
  127. !!MVC }
  128. { Argument to pass to source }
  129. { filter }
  130. { Target type }
  131. { Source type }
  132. { Length of buffer }
  133. { Length of current segment }
  134. { Length of blob parameter }
  135. { block }
  136. { Address of blob parameter }
  137. { block }
  138. { Address of segment buffer }
  139. { Length of longest segment }
  140. { Total number of segments }
  141. { Total length of blob }
  142. { Address of status vector }
  143. { Application specific data }
  144. TCTLSourceFunction = function : isc_long;
  145. PISC_BLOB_CTL = ^ISC_BLOB_CTL ;
  146. ISC_BLOB_CTL = record
  147. ctl_source : TCTLSourceFunction; // was ISC_STATUS ( *ctl_source)();
  148. ctl_source_handle : pisc_blob_ctl ; // was struct isc_blob_ctl * ctl_source_handle;
  149. ctl_to_sub_type : smallint;
  150. ctl_from_sub_type : smallint;
  151. ctl_buffer_length : word;
  152. ctl_segment_length : word;
  153. ctl_bpb_length : word;
  154. ctl_bpb : Pchar;
  155. ctl_buffer : Pbyte;
  156. ctl_max_segment : ISC_LONG;
  157. ctl_number_segments : ISC_LONG;
  158. ctl_total_length : ISC_LONG;
  159. ctl_status : PISC_STATUS;
  160. ctl_data : array[0..7] of longint;
  161. end;
  162. TISC_BLOB_CTL = ISC_BLOB_CTL;
  163. { }
  164. { Blob stream definitions }
  165. { }
  166. { Blob handle }
  167. { Address of buffer }
  168. { Next character }
  169. { Length of buffer }
  170. { Characters in buffer }
  171. { (mode) ? OUTPUT : INPUT }
  172. BSTREAM = record
  173. bstr_blob : pointer;
  174. bstr_buffer : Pchar;
  175. bstr_ptr : Pchar;
  176. bstr_length : smallint;
  177. bstr_cnt : smallint;
  178. bstr_mode : char;
  179. end;
  180. TBSTREAM = BSTREAM;
  181. PBstream = ^BSTREAM;
  182. {!!MVC
  183. #define getb(p) (--(p)->bstr_cnt >= 0 ? (p)->bstr_ptr++ & 0377: BLOB_get (p))
  184. #define putb(x,p) (((x) == '\n' || (!(--(p)->bstr_cnt))) ? BLOB_put ((x),p) : ((int) ( (p)->bstr_ptr++ = (unsigned) (x))))
  185. #define putbx(x,p) ((!(--(p)->bstr_cnt)) ? BLOB_put ((x),p) : ((int) ( (p)->bstr_ptr++ = (unsigned) (x))))
  186. !!MVC }
  187. { }
  188. { Dynamic SQL definitions }
  189. { }
  190. { }
  191. { Declare the extended SQLDA }
  192. { }
  193. { datatype of field }
  194. { scale factor }
  195. { datatype subtype - BLOBs & Text }
  196. { types only }
  197. { length of data area }
  198. { address of data }
  199. { address of indicator variable }
  200. { length of sqlname field }
  201. { name of field, name length + space }
  202. { for NULL }
  203. { length of relation name }
  204. { field's relation name + space for }
  205. { NULL }
  206. { length of owner name }
  207. { relation's owner name + space for }
  208. { NULL }
  209. { length of alias name }
  210. { relation's alias name + space for }
  211. { NULL }
  212. XSQLVAR = record
  213. sqltype : smallint;
  214. sqlscale : smallint;
  215. sqlsubtype : smallint;
  216. sqllen : smallint;
  217. sqldata : Pchar;
  218. sqlind : Psmallint;
  219. sqlname_length : smallint;
  220. sqlname : array[0..31] of char;
  221. relname_length : smallint;
  222. relname : array[0..31] of char;
  223. ownname_length : smallint;
  224. ownname : array[0..31] of char;
  225. aliasname_length : smallint;
  226. aliasname : array[0..31] of char;
  227. end;
  228. TXSQLVAR = XSQLVAR;
  229. PXSQLVAR =^XSQLVAR;
  230. { version of this XSQLDA }
  231. { XSQLDA name field }
  232. { length in bytes of SQLDA }
  233. { number of fields allocated }
  234. { actual number of fields }
  235. { first field address }
  236. XSQLDA = record
  237. version : smallint;
  238. sqldaid : array[0..7] of char;
  239. sqldabc : ISC_LONG;
  240. sqln : smallint;
  241. sqld : smallint;
  242. sqlvar : array[0..0] of XSQLVAR;
  243. end;
  244. TXSQLDA = XSQLDA;
  245. PXSQLDA =^XSQLDA;
  246. function XSQLDA_LENGTH(n: Integer): Integer;
  247. const
  248. SQLDA_VERSION1 = 1;
  249. { meaning is same as DIALECT_xsqlda }
  250. SQL_DIALECT_V5 = 1;
  251. { flagging anything that is delimited
  252. by double quotes as an error and
  253. flagging keyword DATE as an error }
  254. SQL_DIALECT_V6_TRANSITION = 2;
  255. { supports SQL delimited identifier,
  256. SQLDATE/DATE, TIME, TIMESTAMP,
  257. CURRENT_DATE, CURRENT_TIME,
  258. CURRENT_TIMESTAMP, and 64-bit exact
  259. numeric type }
  260. SQL_DIALECT_V6 = 3;
  261. { latest IB DIALECT }
  262. SQL_DIALECT_CURRENT = SQL_DIALECT_V6;
  263. { }
  264. { InterBase Handle Definitions }
  265. { }
  266. type
  267. isc_att_handle = pointer;
  268. isc_blob_handle = pointer;
  269. isc_db_handle = pointer;
  270. isc_form_handle = pointer;
  271. isc_req_handle = pointer;
  272. isc_stmt_handle = pointer;
  273. isc_svc_handle = pointer;
  274. isc_tr_handle = pointer;
  275. isc_win_handle = pointer;
  276. isc_callback = procedure ;gdsdecl;
  277. isc_resv_handle = ISC_LONG;
  278. tisc_att_handle = isc_att_handle;
  279. tisc_blob_handle = isc_blob_handle;
  280. tisc_db_handle = isc_db_handle;
  281. tisc_form_handle = isc_form_handle;
  282. tisc_req_handle = isc_req_handle;
  283. tisc_stmt_handle = isc_stmt_handle;
  284. tisc_svc_handle = isc_svc_handle;
  285. tisc_tr_handle = isc_tr_handle;
  286. tisc_win_handle = isc_win_handle;
  287. tisc_callback = isc_callback;
  288. tisc_resv_handle = isc_resv_handle;
  289. pisc_att_handle =^isc_att_handle ;
  290. pisc_blob_handle =^isc_blob_handle ;
  291. pisc_db_handle =^isc_db_handle ;
  292. pisc_form_handle =^isc_form_handle ;
  293. pisc_req_handle =^isc_req_handle ;
  294. pisc_stmt_handle =^isc_stmt_handle ;
  295. pisc_svc_handle =^isc_svc_handle ;
  296. pisc_tr_handle =^isc_tr_handle ;
  297. pisc_win_handle =^isc_win_handle ;
  298. pisc_callback = ^isc_callback;
  299. pisc_resv_handle =^isc_resv_handle ;
  300. { }
  301. { Security structures }
  302. { }
  303. const
  304. sec_uid_spec = $01;
  305. sec_gid_spec = $02;
  306. sec_server_spec = $04;
  307. sec_password_spec = $08;
  308. sec_group_name_spec = $10;
  309. sec_first_name_spec = $20;
  310. sec_middle_name_spec = $40;
  311. sec_last_name_spec = $80;
  312. sec_dba_user_name_spec = $100;
  313. sec_dba_password_spec = $200;
  314. sec_protocol_tcpip = 1;
  315. sec_protocol_netbeui = 2;
  316. sec_protocol_spx = 3;
  317. sec_protocol_local = 4;
  318. { which fields are specified }
  319. { the user's id }
  320. { the user's group id }
  321. { protocol to use for connection }
  322. { server to administer }
  323. { the user's name }
  324. { the user's password }
  325. { the group name }
  326. { the user's first name }
  327. { the user's middle name }
  328. { the user's last name }
  329. { the dba user name }
  330. { the dba password }
  331. type
  332. USER_SEC_DATA = record
  333. sec_flags : smallint;
  334. uid : longint;
  335. gid : longint;
  336. protocol : longint;
  337. server : Pchar;
  338. user_name : Pchar;
  339. password : Pchar;
  340. group_name : Pchar;
  341. first_name : Pchar;
  342. middle_name : Pchar;
  343. last_name : Pchar;
  344. dba_user_name : Pchar;
  345. dba_password : Pchar;
  346. end;
  347. TUSER_SEC_DATA = USER_SEC_DATA;
  348. PUSER_SEC_DATA = ^USER_SEC_DATA;
  349. { }
  350. { Actions to pass to the blob filter (ctl_source) }
  351. { }
  352. const
  353. isc_blob_filter_open = 0;
  354. isc_blob_filter_get_segment = 1;
  355. isc_blob_filter_close = 2;
  356. isc_blob_filter_create = 3;
  357. isc_blob_filter_put_segment = 4;
  358. isc_blob_filter_alloc = 5;
  359. isc_blob_filter_free = 6;
  360. isc_blob_filter_seek = 7;
  361. { }
  362. { Blr definitions }
  363. { }
  364. {$ifndef _JRD_BLR_H_}
  365. {!!MVC
  366. #define blr_word(n) ((n) % 256), ((n) / 256)
  367. !!MVC }
  368. const
  369. blr_text = 14;
  370. blr_text2 = 15;
  371. blr_short = 7;
  372. blr_long = 8;
  373. blr_quad = 9;
  374. blr_int64 = 16;
  375. blr_float = 10;
  376. blr_double = 27;
  377. blr_d_float = 11;
  378. blr_timestamp = 35;
  379. blr_varying = 37;
  380. blr_varying2 = 38;
  381. blr_blob = 261;
  382. blr_cstring = 40;
  383. blr_cstring2 = 41;
  384. blr_blob_id = 45;
  385. blr_sql_date = 12;
  386. blr_sql_time = 13;
  387. { Historical alias for pre V6 applications }
  388. blr_date = blr_timestamp;
  389. blr_inner = 0;
  390. blr_left = 1;
  391. blr_right = 2;
  392. blr_full = 3;
  393. blr_gds_code = 0;
  394. blr_sql_code = 1;
  395. blr_exception = 2;
  396. blr_trigger_code = 3;
  397. blr_default_code = 4;
  398. blr_version4 = 4;
  399. blr_version5 = 5;
  400. blr_eoc = 76;
  401. blr_end = 255;
  402. blr_assignment = 1;
  403. blr_begin = 2;
  404. blr_dcl_variable = 3;
  405. blr_message = 4;
  406. blr_erase = 5;
  407. blr_fetch = 6;
  408. blr_for = 7;
  409. blr_if = 8;
  410. blr_loop = 9;
  411. blr_modify = 10;
  412. blr_handler = 11;
  413. blr_receive = 12;
  414. blr_select = 13;
  415. blr_send = 14;
  416. blr_store = 15;
  417. blr_label = 17;
  418. blr_leave = 18;
  419. blr_store2 = 19;
  420. blr_post = 20;
  421. blr_literal = 21;
  422. blr_dbkey = 22;
  423. blr_field = 23;
  424. blr_fid = 24;
  425. blr_parameter = 25;
  426. blr_variable = 26;
  427. blr_average = 27;
  428. blr_count = 28;
  429. blr_maximum = 29;
  430. blr_minimum = 30;
  431. blr_total = 31;
  432. blr_add = 34;
  433. blr_subtract = 35;
  434. blr_multiply = 36;
  435. blr_divide = 37;
  436. blr_negate = 38;
  437. blr_concatenate = 39;
  438. blr_substring = 40;
  439. blr_parameter2 = 41;
  440. blr_from = 42;
  441. blr_via = 43;
  442. blr_user_name = 44;
  443. blr_null = 45;
  444. blr_eql = 47;
  445. blr_neq = 48;
  446. blr_gtr = 49;
  447. blr_geq = 50;
  448. blr_lss = 51;
  449. blr_leq = 52;
  450. blr_containing = 53;
  451. blr_matching = 54;
  452. blr_starting = 55;
  453. blr_between = 56;
  454. blr_or = 57;
  455. blr_and = 58;
  456. blr_not = 59;
  457. blr_any = 60;
  458. blr_missing = 61;
  459. blr_unique = 62;
  460. blr_like = 63;
  461. blr_stream = 65;
  462. blr_set_index = 66;
  463. blr_rse = 67;
  464. blr_first = 68;
  465. blr_project = 69;
  466. blr_sort = 70;
  467. blr_boolean = 71;
  468. blr_ascending = 72;
  469. blr_descending = 73;
  470. blr_relation = 74;
  471. blr_rid = 75;
  472. blr_union = 76;
  473. blr_map = 77;
  474. blr_group_by = 78;
  475. blr_aggregate = 79;
  476. blr_join_type = 80;
  477. blr_agg_count = 83;
  478. blr_agg_max = 84;
  479. blr_agg_min = 85;
  480. blr_agg_total = 86;
  481. blr_agg_average = 87;
  482. blr_parameter3 = 88;
  483. blr_run_count = 118;
  484. blr_run_max = 89;
  485. blr_run_min = 90;
  486. blr_run_total = 91;
  487. blr_run_average = 92;
  488. blr_agg_count2 = 93;
  489. blr_agg_count_distinct = 94;
  490. blr_agg_total_distinct = 95;
  491. blr_agg_average_distinct = 96;
  492. blr_function = 100;
  493. blr_gen_id = 101;
  494. blr_prot_mask = 102;
  495. blr_upcase = 103;
  496. blr_lock_state = 104;
  497. blr_value_if = 105;
  498. blr_matching2 = 106;
  499. blr_index = 107;
  500. blr_ansi_like = 108;
  501. blr_bookmark = 109;
  502. blr_crack = 110;
  503. blr_force_crack = 111;
  504. blr_seek = 112;
  505. blr_find = 113;
  506. blr_continue = 0;
  507. blr_forward = 1;
  508. blr_backward = 2;
  509. blr_bof_forward = 3;
  510. blr_eof_backward = 4;
  511. blr_lock_relation = 114;
  512. blr_lock_record = 115;
  513. blr_set_bookmark = 116;
  514. blr_get_bookmark = 117;
  515. blr_rs_stream = 119;
  516. blr_exec_proc = 120;
  517. blr_begin_range = 121;
  518. blr_end_range = 122;
  519. blr_delete_range = 123;
  520. blr_procedure = 124;
  521. blr_pid = 125;
  522. blr_exec_pid = 126;
  523. blr_singular = 127;
  524. blr_abort = 128;
  525. blr_block = 129;
  526. blr_error_handler = 130;
  527. blr_cast = 131;
  528. blr_release_lock = 132;
  529. blr_release_locks = 133;
  530. blr_start_savepoint = 134;
  531. blr_end_savepoint = 135;
  532. blr_find_dbkey = 136;
  533. blr_range_relation = 137;
  534. blr_delete_ranges = 138;
  535. blr_plan = 139;
  536. blr_merge = 140;
  537. blr_join = 141;
  538. blr_sequential = 142;
  539. blr_navigational = 143;
  540. blr_indices = 144;
  541. blr_retrieve = 145;
  542. blr_relation2 = 146;
  543. blr_rid2 = 147;
  544. blr_reset_stream = 148;
  545. blr_release_bookmark = 149;
  546. blr_set_generator = 150;
  547. blr_ansi_any = 151;
  548. blr_exists = 152;
  549. blr_cardinality = 153;
  550. { get tid of record }
  551. blr_record_version = 154;
  552. { fake server stall }
  553. blr_stall = 155;
  554. blr_seek_no_warn = 156;
  555. blr_find_dbkey_version = 157;
  556. blr_ansi_all = 158;
  557. blr_extract = 159;
  558. { sub parameters for blr_extract }
  559. blr_extract_year = 0;
  560. blr_extract_month = 1;
  561. blr_extract_day = 2;
  562. blr_extract_hour = 3;
  563. blr_extract_minute = 4;
  564. blr_extract_second = 5;
  565. blr_extract_weekday = 6;
  566. blr_extract_yearday = 7;
  567. blr_current_date = 160;
  568. blr_current_timestamp = 161;
  569. blr_current_time = 162;
  570. { These verbs were added in 6.0, primarily to support 64-bit integers }
  571. blr_add2 = 163;
  572. blr_subtract2 = 164;
  573. blr_multiply2 = 165;
  574. blr_divide2 = 166;
  575. blr_agg_total2 = 167;
  576. blr_agg_total_distinct2 = 168;
  577. blr_agg_average2 = 169;
  578. blr_agg_average_distinct2 = 170;
  579. blr_average2 = 171;
  580. blr_gen_id2 = 172;
  581. blr_set_generator2 = 173;
  582. {$endif}
  583. { _JRD_BLR_H_ }
  584. { }
  585. { Database parameter block stuff }
  586. { }
  587. const
  588. isc_dpb_version1 = 1;
  589. isc_dpb_cdd_pathname = 1;
  590. isc_dpb_allocation = 2;
  591. isc_dpb_journal = 3;
  592. isc_dpb_page_size = 4;
  593. isc_dpb_num_buffers = 5;
  594. isc_dpb_buffer_length = 6;
  595. isc_dpb_debug = 7;
  596. isc_dpb_garbage_collect = 8;
  597. isc_dpb_verify = 9;
  598. isc_dpb_sweep = 10;
  599. isc_dpb_enable_journal = 11;
  600. isc_dpb_disable_journal = 12;
  601. isc_dpb_dbkey_scope = 13;
  602. isc_dpb_number_of_users = 14;
  603. isc_dpb_trace = 15;
  604. isc_dpb_no_garbage_collect = 16;
  605. isc_dpb_damaged = 17;
  606. isc_dpb_license = 18;
  607. isc_dpb_sys_user_name = 19;
  608. isc_dpb_encrypt_key = 20;
  609. isc_dpb_activate_shadow = 21;
  610. isc_dpb_sweep_interval = 22;
  611. isc_dpb_delete_shadow = 23;
  612. isc_dpb_force_write = 24;
  613. isc_dpb_begin_log = 25;
  614. isc_dpb_quit_log = 26;
  615. isc_dpb_no_reserve = 27;
  616. isc_dpb_user_name = 28;
  617. isc_dpb_password = 29;
  618. isc_dpb_password_enc = 30;
  619. isc_dpb_sys_user_name_enc = 31;
  620. isc_dpb_interp = 32;
  621. isc_dpb_online_dump = 33;
  622. isc_dpb_old_file_size = 34;
  623. isc_dpb_old_num_files = 35;
  624. isc_dpb_old_file = 36;
  625. isc_dpb_old_start_page = 37;
  626. isc_dpb_old_start_seqno = 38;
  627. isc_dpb_old_start_file = 39;
  628. isc_dpb_drop_walfile = 40;
  629. isc_dpb_old_dump_id = 41;
  630. isc_dpb_wal_backup_dir = 42;
  631. isc_dpb_wal_chkptlen = 43;
  632. isc_dpb_wal_numbufs = 44;
  633. isc_dpb_wal_bufsize = 45;
  634. isc_dpb_wal_grp_cmt_wait = 46;
  635. isc_dpb_lc_messages = 47;
  636. isc_dpb_lc_ctype = 48;
  637. isc_dpb_cache_manager = 49;
  638. isc_dpb_shutdown = 50;
  639. isc_dpb_online = 51;
  640. isc_dpb_shutdown_delay = 52;
  641. isc_dpb_reserved = 53;
  642. isc_dpb_overwrite = 54;
  643. isc_dpb_sec_attach = 55;
  644. isc_dpb_disable_wal = 56;
  645. isc_dpb_connect_timeout = 57;
  646. isc_dpb_dummy_packet_interval = 58;
  647. isc_dpb_gbak_attach = 59;
  648. isc_dpb_sql_role_name = 60;
  649. isc_dpb_set_page_buffers = 61;
  650. isc_dpb_working_directory = 62;
  651. isc_dpb_SQL_dialect = 63;
  652. isc_dpb_set_db_readonly = 64;
  653. isc_dpb_set_db_SQL_dialect = 65;
  654. isc_dpb_gfix_attach = 66;
  655. isc_dpb_gstat_attach = 67;
  656. { }
  657. { isc_dpb_verify specific flags }
  658. { }
  659. isc_dpb_pages = 1;
  660. isc_dpb_records = 2;
  661. isc_dpb_indices = 4;
  662. isc_dpb_transactions = 8;
  663. isc_dpb_no_update = 16;
  664. isc_dpb_repair = 32;
  665. isc_dpb_ignore = 64;
  666. { }
  667. { isc_dpb_shutdown specific flags }
  668. { }
  669. isc_dpb_shut_cache = 1;
  670. isc_dpb_shut_attachment = 2;
  671. isc_dpb_shut_transaction = 4;
  672. isc_dpb_shut_force = 8;
  673. { }
  674. { Bit assignments in RDB$SYSTEM_FLAG }
  675. { }
  676. RDB_system = 1;
  677. RDB_id_assigned = 2;
  678. { }
  679. { Transaction parameter block stuff }
  680. { }
  681. isc_tpb_version1 = 1;
  682. isc_tpb_version3 = 3;
  683. isc_tpb_consistency = 1;
  684. isc_tpb_concurrency = 2;
  685. isc_tpb_shared = 3;
  686. isc_tpb_protected = 4;
  687. isc_tpb_exclusive = 5;
  688. isc_tpb_wait = 6;
  689. isc_tpb_nowait = 7;
  690. isc_tpb_read = 8;
  691. isc_tpb_write = 9;
  692. isc_tpb_lock_read = 10;
  693. isc_tpb_lock_write = 11;
  694. isc_tpb_verb_time = 12;
  695. isc_tpb_commit_time = 13;
  696. isc_tpb_ignore_limbo = 14;
  697. isc_tpb_read_committed = 15;
  698. isc_tpb_autocommit = 16;
  699. isc_tpb_rec_version = 17;
  700. isc_tpb_no_rec_version = 18;
  701. isc_tpb_restart_requests = 19;
  702. isc_tpb_no_auto_undo = 20;
  703. { }
  704. { Blob Parameter Block }
  705. { }
  706. isc_bpb_version1 = 1;
  707. isc_bpb_source_type = 1;
  708. isc_bpb_target_type = 2;
  709. isc_bpb_type = 3;
  710. isc_bpb_source_interp = 4;
  711. isc_bpb_target_interp = 5;
  712. isc_bpb_filter_parameter = 6;
  713. isc_bpb_type_segmented = 0;
  714. isc_bpb_type_stream = 1;
  715. { }
  716. { Service parameter block stuff }
  717. { }
  718. isc_spb_version1 = 1;
  719. isc_spb_current_version = 2;
  720. isc_spb_version = isc_spb_current_version;
  721. isc_spb_user_name = isc_dpb_user_name;
  722. isc_spb_sys_user_name = isc_dpb_sys_user_name;
  723. isc_spb_sys_user_name_enc = isc_dpb_sys_user_name_enc;
  724. isc_spb_password = isc_dpb_password;
  725. isc_spb_password_enc = isc_dpb_password_enc;
  726. isc_spb_command_line = 105;
  727. isc_spb_dbname = 106;
  728. isc_spb_verbose = 107;
  729. isc_spb_options = 108;
  730. isc_spb_connect_timeout = isc_dpb_connect_timeout;
  731. isc_spb_dummy_packet_interval = isc_dpb_dummy_packet_interval;
  732. isc_spb_sql_role_name = isc_dpb_sql_role_name;
  733. { }
  734. { Information call declarations }
  735. { }
  736. { }
  737. { Common, structural codes }
  738. { }
  739. isc_info_end = 1;
  740. isc_info_truncated = 2;
  741. isc_info_error = 3;
  742. isc_info_data_not_ready = 4;
  743. isc_info_flag_end = 127;
  744. { }
  745. { Database information items }
  746. { }
  747. isc_info_db_id = 4;
  748. isc_info_reads = 5;
  749. isc_info_writes = 6;
  750. isc_info_fetches = 7;
  751. isc_info_marks = 8;
  752. isc_info_implementation = 11;
  753. isc_info_version = 12;
  754. isc_info_base_level = 13;
  755. isc_info_page_size = 14;
  756. isc_info_num_buffers = 15;
  757. isc_info_limbo = 16;
  758. isc_info_current_memory = 17;
  759. isc_info_max_memory = 18;
  760. isc_info_window_turns = 19;
  761. isc_info_license = 20;
  762. isc_info_allocation = 21;
  763. isc_info_attachment_id = 22;
  764. isc_info_read_seq_count = 23;
  765. isc_info_read_idx_count = 24;
  766. isc_info_insert_count = 25;
  767. isc_info_update_count = 26;
  768. isc_info_delete_count = 27;
  769. isc_info_backout_count = 28;
  770. isc_info_purge_count = 29;
  771. isc_info_expunge_count = 30;
  772. isc_info_sweep_interval = 31;
  773. isc_info_ods_version = 32;
  774. isc_info_ods_minor_version = 33;
  775. isc_info_no_reserve = 34;
  776. isc_info_logfile = 35;
  777. isc_info_cur_logfile_name = 36;
  778. isc_info_cur_log_part_offset = 37;
  779. isc_info_num_wal_buffers = 38;
  780. isc_info_wal_buffer_size = 39;
  781. isc_info_wal_ckpt_length = 40;
  782. isc_info_wal_cur_ckpt_interval = 41;
  783. isc_info_wal_prv_ckpt_fname = 42;
  784. isc_info_wal_prv_ckpt_poffset = 43;
  785. isc_info_wal_recv_ckpt_fname = 44;
  786. isc_info_wal_recv_ckpt_poffset = 45;
  787. isc_info_wal_grpc_wait_usecs = 47;
  788. isc_info_wal_num_io = 48;
  789. isc_info_wal_avg_io_size = 49;
  790. isc_info_wal_num_commits = 50;
  791. isc_info_wal_avg_grpc_size = 51;
  792. isc_info_forced_writes = 52;
  793. isc_info_user_names = 53;
  794. isc_info_page_errors = 54;
  795. isc_info_record_errors = 55;
  796. isc_info_bpage_errors = 56;
  797. isc_info_dpage_errors = 57;
  798. isc_info_ipage_errors = 58;
  799. isc_info_ppage_errors = 59;
  800. isc_info_tpage_errors = 60;
  801. isc_info_set_page_buffers = 61;
  802. isc_info_db_SQL_dialect = 62;
  803. isc_info_db_read_only = 63;
  804. isc_info_db_size_in_pages = 64;
  805. { }
  806. { Database information return values }
  807. { }
  808. isc_info_db_impl_rdb_vms = 1;
  809. isc_info_db_impl_rdb_eln = 2;
  810. isc_info_db_impl_rdb_eln_dev = 3;
  811. isc_info_db_impl_rdb_vms_y = 4;
  812. isc_info_db_impl_rdb_eln_y = 5;
  813. isc_info_db_impl_jri = 6;
  814. isc_info_db_impl_jsv = 7;
  815. isc_info_db_impl_isc_a = 25;
  816. isc_info_db_impl_isc_u = 26;
  817. isc_info_db_impl_isc_v = 27;
  818. isc_info_db_impl_isc_s = 28;
  819. isc_info_db_impl_isc_apl_68K = 25;
  820. isc_info_db_impl_isc_vax_ultr = 26;
  821. isc_info_db_impl_isc_vms = 27;
  822. isc_info_db_impl_isc_sun_68k = 28;
  823. isc_info_db_impl_isc_os2 = 29;
  824. isc_info_db_impl_isc_sun4 = 30;
  825. isc_info_db_impl_isc_hp_ux = 31;
  826. isc_info_db_impl_isc_sun_386i = 32;
  827. isc_info_db_impl_isc_vms_orcl = 33;
  828. isc_info_db_impl_isc_mac_aux = 34;
  829. isc_info_db_impl_isc_rt_aix = 35;
  830. isc_info_db_impl_isc_mips_ult = 36;
  831. isc_info_db_impl_isc_xenix = 37;
  832. isc_info_db_impl_isc_dg = 38;
  833. isc_info_db_impl_isc_hp_mpexl = 39;
  834. isc_info_db_impl_isc_hp_ux68K = 40;
  835. isc_info_db_impl_isc_sgi = 41;
  836. isc_info_db_impl_isc_sco_unix = 42;
  837. isc_info_db_impl_isc_cray = 43;
  838. isc_info_db_impl_isc_imp = 44;
  839. isc_info_db_impl_isc_delta = 45;
  840. isc_info_db_impl_isc_next = 46;
  841. isc_info_db_impl_isc_dos = 47;
  842. isc_info_db_impl_isc_winnt = 48;
  843. isc_info_db_impl_isc_epson = 49;
  844. isc_info_db_class_access = 1;
  845. isc_info_db_class_y_valve = 2;
  846. isc_info_db_class_rem_int = 3;
  847. isc_info_db_class_rem_srvr = 4;
  848. isc_info_db_class_pipe_int = 7;
  849. isc_info_db_class_pipe_srvr = 8;
  850. isc_info_db_class_sam_int = 9;
  851. isc_info_db_class_sam_srvr = 10;
  852. isc_info_db_class_gateway = 11;
  853. isc_info_db_class_cache = 12;
  854. { }
  855. { Request information items }
  856. { }
  857. isc_info_number_messages = 4;
  858. isc_info_max_message = 5;
  859. isc_info_max_send = 6;
  860. isc_info_max_receive = 7;
  861. isc_info_state = 8;
  862. isc_info_message_number = 9;
  863. isc_info_message_size = 10;
  864. isc_info_request_cost = 11;
  865. isc_info_access_path = 12;
  866. isc_info_req_select_count = 13;
  867. isc_info_req_insert_count = 14;
  868. isc_info_req_update_count = 15;
  869. isc_info_req_delete_count = 16;
  870. { }
  871. { Access path items }
  872. { }
  873. isc_info_rsb_end = 0;
  874. isc_info_rsb_begin = 1;
  875. isc_info_rsb_type = 2;
  876. isc_info_rsb_relation = 3;
  877. isc_info_rsb_plan = 4;
  878. { }
  879. { Rsb types }
  880. { }
  881. isc_info_rsb_unknown = 1;
  882. isc_info_rsb_indexed = 2;
  883. isc_info_rsb_navigate = 3;
  884. isc_info_rsb_sequential = 4;
  885. isc_info_rsb_cross = 5;
  886. isc_info_rsb_sort = 6;
  887. isc_info_rsb_first = 7;
  888. isc_info_rsb_boolean = 8;
  889. isc_info_rsb_union = 9;
  890. isc_info_rsb_aggregate = 10;
  891. isc_info_rsb_merge = 11;
  892. isc_info_rsb_ext_sequential = 12;
  893. isc_info_rsb_ext_indexed = 13;
  894. isc_info_rsb_ext_dbkey = 14;
  895. isc_info_rsb_left_cross = 15;
  896. isc_info_rsb_select = 16;
  897. isc_info_rsb_sql_join = 17;
  898. isc_info_rsb_simulate = 18;
  899. isc_info_rsb_sim_cross = 19;
  900. isc_info_rsb_once = 20;
  901. isc_info_rsb_procedure = 21;
  902. { }
  903. { Bitmap expressions }
  904. { }
  905. isc_info_rsb_and = 1;
  906. isc_info_rsb_or = 2;
  907. isc_info_rsb_dbkey = 3;
  908. isc_info_rsb_index = 4;
  909. isc_info_req_active = 2;
  910. isc_info_req_inactive = 3;
  911. isc_info_req_send = 4;
  912. isc_info_req_receive = 5;
  913. isc_info_req_select = 6;
  914. isc_info_req_sql_stall = 7;
  915. { }
  916. { Blob information items }
  917. { }
  918. isc_info_blob_num_segments = 4;
  919. isc_info_blob_max_segment = 5;
  920. isc_info_blob_total_length = 6;
  921. isc_info_blob_type = 7;
  922. { }
  923. { Transaction information items }
  924. { }
  925. isc_info_tra_id = 4;
  926. {
  927. Service action items
  928. }
  929. { Starts database backup process on the server }
  930. isc_action_svc_backup = 1;
  931. { Starts database restore process on the server }
  932. isc_action_svc_restore = 2;
  933. { Starts database repair process on the server }
  934. isc_action_svc_repair = 3;
  935. { Adds a new user to the security database }
  936. isc_action_svc_add_user = 4;
  937. { Deletes a user record from the security database }
  938. isc_action_svc_delete_user = 5;
  939. { Modifies a user record in the security database }
  940. isc_action_svc_modify_user = 6;
  941. { Displays a user record from the security database }
  942. isc_action_svc_display_user = 7;
  943. { Sets database properties }
  944. isc_action_svc_properties = 8;
  945. { Adds a license to the license file }
  946. isc_action_svc_add_license = 9;
  947. { Removes a license from the license file }
  948. isc_action_svc_remove_license = 10;
  949. { Retrieves database statistics }
  950. isc_action_svc_db_stats = 11;
  951. { Retrieves the InterBase log file from the server }
  952. isc_action_svc_get_ib_log = 12;
  953. {
  954. Service information items
  955. }
  956. { Retrieves the number of attachments and databases }
  957. isc_info_svc_svr_db_info = 50;
  958. { Retrieves all license keys and IDs from the license file }
  959. isc_info_svc_get_license = 51;
  960. { Retrieves a bitmask representing licensed options on the server }
  961. isc_info_svc_get_license_mask = 52;
  962. { Retrieves the parameters and values for IB_CONFIG }
  963. isc_info_svc_get_config = 53;
  964. { Retrieves the version of the services manager }
  965. isc_info_svc_version = 54;
  966. { Retrieves the version of the InterBase server }
  967. isc_info_svc_server_version = 55;
  968. { Retrieves the implementation of the InterBase server }
  969. isc_info_svc_implementation = 56;
  970. { Retrieves a bitmask representing the server's capabilities }
  971. isc_info_svc_capabilities = 57;
  972. { Retrieves the path to the security database in use by the server }
  973. isc_info_svc_user_dbpath = 58;
  974. { Retrieves the setting of $INTERBASE }
  975. isc_info_svc_get_env = 59;
  976. { Retrieves the setting of $INTERBASE_LCK }
  977. isc_info_svc_get_env_lock = 60;
  978. { Retrieves the setting of $INTERBASE_MSG }
  979. isc_info_svc_get_env_msg = 61;
  980. { Retrieves 1 line of service output per call }
  981. isc_info_svc_line = 62;
  982. { Retrieves as much of the server output as will fit in the supplied buffer }
  983. isc_info_svc_to_eof = 63;
  984. { Sets / signifies a timeout value for reading service information }
  985. isc_info_svc_timeout = 64;
  986. { Retrieves the number of users licensed for accessing the server }
  987. isc_info_svc_get_licensed_users = 65;
  988. { Retrieve the limbo transactions }
  989. isc_info_svc_limbo_trans = 66;
  990. { Checks to see if a service is running on an attachment }
  991. isc_info_svc_running = 67;
  992. { Returns the user information from isc_action_svc_display_users }
  993. isc_info_svc_get_users = 68;
  994. {
  995. Parameters for isc_action_(add|delete|modify)_user
  996. }
  997. isc_spb_sec_userid = 5;
  998. isc_spb_sec_groupid = 6;
  999. isc_spb_sec_username = 7;
  1000. isc_spb_sec_password = 8;
  1001. isc_spb_sec_groupname = 9;
  1002. isc_spb_sec_firstname = 10;
  1003. isc_spb_sec_middlename = 11;
  1004. isc_spb_sec_lastname = 12;
  1005. {
  1006. Parameters for isc_action_svc_(add|remove)_license,
  1007. isc_info_svc_get_license
  1008. }
  1009. isc_spb_lic_key = 5;
  1010. isc_spb_lic_id = 6;
  1011. isc_spb_lic_desc = 7;
  1012. {
  1013. Parameters for isc_action_svc_backup
  1014. }
  1015. isc_spb_bkp_file = 5;
  1016. isc_spb_bkp_factor = 6;
  1017. isc_spb_bkp_length = 7;
  1018. isc_spb_bkp_ignore_checksums = $01;
  1019. isc_spb_bkp_ignore_limbo = $02;
  1020. isc_spb_bkp_metadata_only = $04;
  1021. isc_spb_bkp_no_garbage_collect = $08;
  1022. isc_spb_bkp_old_descriptions = $10;
  1023. isc_spb_bkp_non_transportable = $20;
  1024. isc_spb_bkp_convert = $40;
  1025. isc_spb_bkp_expand = $80;
  1026. {
  1027. Parameters for isc_action_svc_properties
  1028. }
  1029. isc_spb_prp_page_buffers = 5;
  1030. isc_spb_prp_sweep_interval = 6;
  1031. isc_spb_prp_shutdown_db = 7;
  1032. isc_spb_prp_deny_new_attachments = 9;
  1033. isc_spb_prp_deny_new_transactions = 10;
  1034. isc_spb_prp_reserve_space = 11;
  1035. isc_spb_prp_write_mode = 12;
  1036. isc_spb_prp_access_mode = 13;
  1037. isc_spb_prp_set_sql_dialect = 14;
  1038. isc_spb_prp_activate = $0100;
  1039. isc_spb_prp_db_online = $0200;
  1040. {
  1041. Parameters for isc_spb_prp_reserve_space
  1042. }
  1043. isc_spb_prp_res_use_full = 35;
  1044. isc_spb_prp_res = 36;
  1045. {
  1046. Parameters for isc_spb_prp_write_mode
  1047. }
  1048. isc_spb_prp_wm_async = 37;
  1049. isc_spb_prp_wm_sync = 38;
  1050. {
  1051. Parameters for isc_spb_prp_access_mode
  1052. }
  1053. isc_spb_prp_am_readonly = 39;
  1054. isc_spb_prp_am_readwrite = 40;
  1055. {
  1056. Parameters for isc_action_svc_repair
  1057. }
  1058. isc_spb_rpr_commit_trans = 15;
  1059. isc_spb_rpr_rollback_trans = 34;
  1060. isc_spb_rpr_recover_two_phase = 17;
  1061. isc_spb_tra_id = 18;
  1062. isc_spb_single_tra_id = 19;
  1063. isc_spb_multi_tra_id = 20;
  1064. isc_spb_tra_state = 21;
  1065. isc_spb_tra_state_limbo = 22;
  1066. isc_spb_tra_state_commit = 23;
  1067. isc_spb_tra_state_rollback = 24;
  1068. isc_spb_tra_state_unknown = 25;
  1069. isc_spb_tra_host_site = 26;
  1070. isc_spb_tra_remote_site = 27;
  1071. isc_spb_tra_db_path = 28;
  1072. isc_spb_tra_advise = 29;
  1073. isc_spb_tra_advise_commit = 30;
  1074. isc_spb_tra_advise_rollback = 31;
  1075. isc_spb_tra_advise_unknown = 33;
  1076. isc_spb_rpr_validate_db = $01;
  1077. isc_spb_rpr_sweep_db = $02;
  1078. isc_spb_rpr_mend_db = $04;
  1079. isc_spb_rpr_list_limbo_trans = $08;
  1080. isc_spb_rpr_check_db = $10;
  1081. isc_spb_rpr_ignore_checksum = $20;
  1082. isc_spb_rpr_kill_shadows = $40;
  1083. isc_spb_rpr_full = $80;
  1084. {
  1085. Parameters for isc_action_svc_restore
  1086. }
  1087. isc_spb_res_buffers = 9;
  1088. isc_spb_res_page_size = 10;
  1089. isc_spb_res_length = 11;
  1090. isc_spb_res_access_mode = 12;
  1091. isc_spb_res_deactivate_idx = $0100;
  1092. isc_spb_res_no_shadow = $0200;
  1093. isc_spb_res_no_validity = $0400;
  1094. isc_spb_res_one_at_a_time = $0800;
  1095. isc_spb_res_replace = $1000;
  1096. isc_spb_res_create = $2000;
  1097. isc_spb_res_use_all_space = $4000;
  1098. {
  1099. Parameters for isc_spb_res_access_mode
  1100. }
  1101. isc_spb_res_am_readonly = isc_spb_prp_am_readonly;
  1102. isc_spb_res_am_readwrite = isc_spb_prp_am_readwrite;
  1103. {
  1104. Parameters for isc_info_svc_svr_db_info
  1105. }
  1106. isc_spb_num_att = 5;
  1107. isc_spb_num_db = 6;
  1108. {
  1109. Parameters for isc_info_svc_db_stats
  1110. }
  1111. isc_spb_sts_data_pages = $01;
  1112. isc_spb_sts_db_log = $02;
  1113. isc_spb_sts_hdr_pages = $04;
  1114. isc_spb_sts_idx_pages = $08;
  1115. isc_spb_sts_sys_relations = $10;
  1116. { }
  1117. { SQL information items }
  1118. { }
  1119. isc_info_sql_select = 4;
  1120. isc_info_sql_bind = 5;
  1121. isc_info_sql_num_variables = 6;
  1122. isc_info_sql_describe_vars = 7;
  1123. isc_info_sql_describe_end = 8;
  1124. isc_info_sql_sqlda_seq = 9;
  1125. isc_info_sql_message_seq = 10;
  1126. isc_info_sql_type = 11;
  1127. isc_info_sql_sub_type = 12;
  1128. isc_info_sql_scale = 13;
  1129. isc_info_sql_length = 14;
  1130. isc_info_sql_null_ind = 15;
  1131. isc_info_sql_field = 16;
  1132. isc_info_sql_relation = 17;
  1133. isc_info_sql_owner = 18;
  1134. isc_info_sql_alias = 19;
  1135. isc_info_sql_sqlda_start = 20;
  1136. isc_info_sql_stmt_type = 21;
  1137. isc_info_sql_get_plan = 22;
  1138. isc_info_sql_records = 23;
  1139. isc_info_sql_batch_fetch = 24;
  1140. { }
  1141. { SQL information return values }
  1142. { }
  1143. isc_info_sql_stmt_select = 1;
  1144. isc_info_sql_stmt_insert = 2;
  1145. isc_info_sql_stmt_update = 3;
  1146. isc_info_sql_stmt_delete = 4;
  1147. isc_info_sql_stmt_ddl = 5;
  1148. isc_info_sql_stmt_get_segment = 6;
  1149. isc_info_sql_stmt_put_segment = 7;
  1150. isc_info_sql_stmt_exec_procedure = 8;
  1151. isc_info_sql_stmt_start_trans = 9;
  1152. isc_info_sql_stmt_commit = 10;
  1153. isc_info_sql_stmt_rollback = 11;
  1154. isc_info_sql_stmt_select_for_upd = 12;
  1155. isc_info_sql_stmt_set_generator = 13;
  1156. { }
  1157. { Server configuration key values }
  1158. { }
  1159. ISCCFG_LOCKMEM_KEY = 0;
  1160. ISCCFG_LOCKSEM_KEY = 1;
  1161. ISCCFG_LOCKSIG_KEY = 2;
  1162. ISCCFG_EVNTMEM_KEY = 3;
  1163. ISCCFG_DBCACHE_KEY = 4;
  1164. ISCCFG_PRIORITY_KEY = 5;
  1165. ISCCFG_IPCMAP_KEY = 6;
  1166. ISCCFG_MEMMIN_KEY = 7;
  1167. ISCCFG_MEMMAX_KEY = 8;
  1168. ISCCFG_LOCKORDER_KEY = 9;
  1169. ISCCFG_ANYLOCKMEM_KEY = 10;
  1170. ISCCFG_ANYLOCKSEM_KEY = 11;
  1171. ISCCFG_ANYLOCKSIG_KEY = 12;
  1172. ISCCFG_ANYEVNTMEM_KEY = 13;
  1173. ISCCFG_LOCKHASH_KEY = 14;
  1174. ISCCFG_DEADLOCK_KEY = 15;
  1175. ISCCFG_LOCKSPIN_KEY = 16;
  1176. ISCCFG_CONN_TIMEOUT_KEY = 17;
  1177. ISCCFG_DUMMY_INTRVL_KEY = 18;
  1178. { Internal Use only }
  1179. ISCCFG_TRACE_POOLS_KEY = 19;
  1180. ISCCFG_REMOTE_BUFFER_KEY = 20;
  1181. { }
  1182. { Error codes }
  1183. { }
  1184. isc_facility = 20;
  1185. isc_err_base = 335544320;
  1186. isc_err_factor = 1;
  1187. isc_arg_end = 0;
  1188. isc_arg_gds = 1;
  1189. isc_arg_string = 2;
  1190. isc_arg_cstring = 3;
  1191. isc_arg_number = 4;
  1192. isc_arg_interpreted = 5;
  1193. isc_arg_vms = 6;
  1194. isc_arg_unix = 7;
  1195. isc_arg_domain = 8;
  1196. isc_arg_dos = 9;
  1197. isc_arg_mpexl = 10;
  1198. isc_arg_mpexl_ipc = 11;
  1199. isc_arg_next_mach = 15;
  1200. isc_arg_netware = 16;
  1201. isc_arg_win32 = 17;
  1202. isc_arg_warning = 18;
  1203. { }
  1204. { Dynamic Data Definition Language operators }
  1205. { }
  1206. { }
  1207. { Version number }
  1208. { }
  1209. const
  1210. isc_dyn_version_1 = 1;
  1211. isc_dyn_eoc = 255;
  1212. { }
  1213. { Operations (may be nested) }
  1214. { }
  1215. isc_dyn_begin = 2;
  1216. isc_dyn_end = 3;
  1217. isc_dyn_if = 4;
  1218. isc_dyn_def_database = 5;
  1219. isc_dyn_def_global_fld = 6;
  1220. isc_dyn_def_local_fld = 7;
  1221. isc_dyn_def_idx = 8;
  1222. isc_dyn_def_rel = 9;
  1223. isc_dyn_def_sql_fld = 10;
  1224. isc_dyn_def_view = 12;
  1225. isc_dyn_def_trigger = 15;
  1226. isc_dyn_def_security_class = 120;
  1227. isc_dyn_def_dimension = 140;
  1228. isc_dyn_def_generator = 24;
  1229. isc_dyn_def_function = 25;
  1230. isc_dyn_def_filter = 26;
  1231. isc_dyn_def_function_arg = 27;
  1232. isc_dyn_def_shadow = 34;
  1233. isc_dyn_def_trigger_msg = 17;
  1234. isc_dyn_def_file = 36;
  1235. isc_dyn_mod_database = 39;
  1236. isc_dyn_mod_rel = 11;
  1237. isc_dyn_mod_global_fld = 13;
  1238. isc_dyn_mod_idx = 102;
  1239. isc_dyn_mod_local_fld = 14;
  1240. isc_dyn_mod_sql_fld = 216;
  1241. isc_dyn_mod_view = 16;
  1242. isc_dyn_mod_security_class = 122;
  1243. isc_dyn_mod_trigger = 113;
  1244. isc_dyn_mod_trigger_msg = 28;
  1245. isc_dyn_delete_database = 18;
  1246. isc_dyn_delete_rel = 19;
  1247. isc_dyn_delete_global_fld = 20;
  1248. isc_dyn_delete_local_fld = 21;
  1249. isc_dyn_delete_idx = 22;
  1250. isc_dyn_delete_security_class = 123;
  1251. isc_dyn_delete_dimensions = 143;
  1252. isc_dyn_delete_trigger = 23;
  1253. isc_dyn_delete_trigger_msg = 29;
  1254. isc_dyn_delete_filter = 32;
  1255. isc_dyn_delete_function = 33;
  1256. isc_dyn_delete_shadow = 35;
  1257. isc_dyn_grant = 30;
  1258. isc_dyn_revoke = 31;
  1259. isc_dyn_def_primary_key = 37;
  1260. isc_dyn_def_foreign_key = 38;
  1261. isc_dyn_def_unique = 40;
  1262. isc_dyn_def_procedure = 164;
  1263. isc_dyn_delete_procedure = 165;
  1264. isc_dyn_def_parameter = 135;
  1265. isc_dyn_delete_parameter = 136;
  1266. isc_dyn_mod_procedure = 175;
  1267. isc_dyn_def_log_file = 176;
  1268. isc_dyn_def_cache_file = 180;
  1269. isc_dyn_def_exception = 181;
  1270. isc_dyn_mod_exception = 182;
  1271. isc_dyn_del_exception = 183;
  1272. isc_dyn_drop_log = 194;
  1273. isc_dyn_drop_cache = 195;
  1274. isc_dyn_def_default_log = 202;
  1275. { }
  1276. { View specific stuff }
  1277. { }
  1278. isc_dyn_view_blr = 43;
  1279. isc_dyn_view_source = 44;
  1280. isc_dyn_view_relation = 45;
  1281. isc_dyn_view_context = 46;
  1282. isc_dyn_view_context_name = 47;
  1283. { }
  1284. { Generic attributes }
  1285. { }
  1286. isc_dyn_rel_name = 50;
  1287. isc_dyn_fld_name = 51;
  1288. isc_dyn_new_fld_name = 215;
  1289. isc_dyn_idx_name = 52;
  1290. isc_dyn_description = 53;
  1291. isc_dyn_security_class = 54;
  1292. isc_dyn_system_flag = 55;
  1293. isc_dyn_update_flag = 56;
  1294. isc_dyn_prc_name = 166;
  1295. isc_dyn_prm_name = 137;
  1296. isc_dyn_sql_object = 196;
  1297. isc_dyn_fld_character_set_name = 174;
  1298. { }
  1299. { Relation specific attributes }
  1300. { }
  1301. isc_dyn_rel_dbkey_length = 61;
  1302. isc_dyn_rel_store_trig = 62;
  1303. isc_dyn_rel_modify_trig = 63;
  1304. isc_dyn_rel_erase_trig = 64;
  1305. isc_dyn_rel_store_trig_source = 65;
  1306. isc_dyn_rel_modify_trig_source = 66;
  1307. isc_dyn_rel_erase_trig_source = 67;
  1308. isc_dyn_rel_ext_file = 68;
  1309. isc_dyn_rel_sql_protection = 69;
  1310. isc_dyn_rel_constraint = 162;
  1311. isc_dyn_delete_rel_constraint = 163;
  1312. { }
  1313. { Global field specific attributes }
  1314. { }
  1315. isc_dyn_fld_type = 70;
  1316. isc_dyn_fld_length = 71;
  1317. isc_dyn_fld_scale = 72;
  1318. isc_dyn_fld_sub_type = 73;
  1319. isc_dyn_fld_segment_length = 74;
  1320. isc_dyn_fld_query_header = 75;
  1321. isc_dyn_fld_edit_string = 76;
  1322. isc_dyn_fld_validation_blr = 77;
  1323. isc_dyn_fld_validation_source = 78;
  1324. isc_dyn_fld_computed_blr = 79;
  1325. isc_dyn_fld_computed_source = 80;
  1326. isc_dyn_fld_missing_value = 81;
  1327. isc_dyn_fld_default_value = 82;
  1328. isc_dyn_fld_query_name = 83;
  1329. isc_dyn_fld_dimensions = 84;
  1330. isc_dyn_fld_not_null = 85;
  1331. isc_dyn_fld_precision = 86;
  1332. isc_dyn_fld_char_length = 172;
  1333. isc_dyn_fld_collation = 173;
  1334. isc_dyn_fld_default_source = 193;
  1335. isc_dyn_del_default = 197;
  1336. isc_dyn_del_validation = 198;
  1337. isc_dyn_single_validation = 199;
  1338. isc_dyn_fld_character_set = 203;
  1339. { }
  1340. { Local field specific attributes }
  1341. { }
  1342. isc_dyn_fld_source = 90;
  1343. isc_dyn_fld_base_fld = 91;
  1344. isc_dyn_fld_position = 92;
  1345. isc_dyn_fld_update_flag = 93;
  1346. { }
  1347. { Index specific attributes }
  1348. { }
  1349. isc_dyn_idx_unique = 100;
  1350. isc_dyn_idx_inactive = 101;
  1351. isc_dyn_idx_type = 103;
  1352. isc_dyn_idx_foreign_key = 104;
  1353. isc_dyn_idx_ref_column = 105;
  1354. isc_dyn_idx_statistic = 204;
  1355. { }
  1356. { Trigger specific attributes }
  1357. { }
  1358. isc_dyn_trg_type = 110;
  1359. isc_dyn_trg_blr = 111;
  1360. isc_dyn_trg_source = 112;
  1361. isc_dyn_trg_name = 114;
  1362. isc_dyn_trg_sequence = 115;
  1363. isc_dyn_trg_inactive = 116;
  1364. isc_dyn_trg_msg_number = 117;
  1365. isc_dyn_trg_msg = 118;
  1366. { }
  1367. { Security Class specific attributes }
  1368. { }
  1369. isc_dyn_scl_acl = 121;
  1370. isc_dyn_grant_user = 130;
  1371. isc_dyn_grant_proc = 186;
  1372. isc_dyn_grant_trig = 187;
  1373. isc_dyn_grant_view = 188;
  1374. isc_dyn_grant_options = 132;
  1375. isc_dyn_grant_user_group = 205;
  1376. { }
  1377. { Dimension specific information }
  1378. { }
  1379. isc_dyn_dim_lower = 141;
  1380. isc_dyn_dim_upper = 142;
  1381. { }
  1382. { File specific attributes }
  1383. { }
  1384. isc_dyn_file_name = 125;
  1385. isc_dyn_file_start = 126;
  1386. isc_dyn_file_length = 127;
  1387. isc_dyn_shadow_number = 128;
  1388. isc_dyn_shadow_man_auto = 129;
  1389. isc_dyn_shadow_conditional = 130;
  1390. { }
  1391. { Log file specific attributes }
  1392. { }
  1393. isc_dyn_log_file_sequence = 177;
  1394. isc_dyn_log_file_partitions = 178;
  1395. isc_dyn_log_file_serial = 179;
  1396. isc_dyn_log_file_overflow = 200;
  1397. isc_dyn_log_file_raw = 201;
  1398. { }
  1399. { Log specific attributes }
  1400. { }
  1401. isc_dyn_log_group_commit_wait = 189;
  1402. isc_dyn_log_buffer_size = 190;
  1403. isc_dyn_log_check_point_length = 191;
  1404. isc_dyn_log_num_of_buffers = 192;
  1405. { }
  1406. { Function specific attributes }
  1407. { }
  1408. isc_dyn_function_name = 145;
  1409. isc_dyn_function_type = 146;
  1410. isc_dyn_func_module_name = 147;
  1411. isc_dyn_func_entry_point = 148;
  1412. isc_dyn_func_return_argument = 149;
  1413. isc_dyn_func_arg_position = 150;
  1414. isc_dyn_func_mechanism = 151;
  1415. isc_dyn_filter_in_subtype = 152;
  1416. isc_dyn_filter_out_subtype = 153;
  1417. isc_dyn_description2 = 154;
  1418. isc_dyn_fld_computed_source2 = 155;
  1419. isc_dyn_fld_edit_string2 = 156;
  1420. isc_dyn_fld_query_header2 = 157;
  1421. isc_dyn_fld_validation_source2 = 158;
  1422. isc_dyn_trg_msg2 = 159;
  1423. isc_dyn_trg_source2 = 160;
  1424. isc_dyn_view_source2 = 161;
  1425. isc_dyn_xcp_msg2 = 184;
  1426. { }
  1427. { Generator specific attributes }
  1428. { }
  1429. isc_dyn_generator_name = 95;
  1430. isc_dyn_generator_id = 96;
  1431. { }
  1432. { Procedure specific attributes }
  1433. { }
  1434. isc_dyn_prc_inputs = 167;
  1435. isc_dyn_prc_outputs = 168;
  1436. isc_dyn_prc_source = 169;
  1437. isc_dyn_prc_blr = 170;
  1438. isc_dyn_prc_source2 = 171;
  1439. { }
  1440. { Parameter specific attributes }
  1441. { }
  1442. isc_dyn_prm_number = 138;
  1443. isc_dyn_prm_type = 139;
  1444. { }
  1445. { Relation specific attributes }
  1446. { }
  1447. isc_dyn_xcp_msg = 185;
  1448. { }
  1449. { Cascading referential integrity values }
  1450. { }
  1451. isc_dyn_foreign_key_update = 205;
  1452. isc_dyn_foreign_key_delete = 206;
  1453. isc_dyn_foreign_key_cascade = 207;
  1454. isc_dyn_foreign_key_default = 208;
  1455. isc_dyn_foreign_key_null = 209;
  1456. isc_dyn_foreign_key_none = 210;
  1457. { }
  1458. { SQL role values }
  1459. { }
  1460. isc_dyn_def_sql_role = 211;
  1461. isc_dyn_sql_role_name = 212;
  1462. isc_dyn_grant_admin_options = 213;
  1463. isc_dyn_del_sql_role = 214;
  1464. { }
  1465. { Last $dyn value assigned }
  1466. { }
  1467. isc_dyn_last_dyn_value = 216;
  1468. { }
  1469. { Array slice description language (SDL) }
  1470. { }
  1471. isc_sdl_version1 = 1;
  1472. isc_sdl_eoc = 255;
  1473. isc_sdl_relation = 2;
  1474. isc_sdl_rid = 3;
  1475. isc_sdl_field = 4;
  1476. isc_sdl_fid = 5;
  1477. isc_sdl_struct = 6;
  1478. isc_sdl_variable = 7;
  1479. isc_sdl_scalar = 8;
  1480. isc_sdl_tiny_integer = 9;
  1481. isc_sdl_short_integer = 10;
  1482. isc_sdl_long_integer = 11;
  1483. isc_sdl_literal = 12;
  1484. isc_sdl_add = 13;
  1485. isc_sdl_subtract = 14;
  1486. isc_sdl_multiply = 15;
  1487. isc_sdl_divide = 16;
  1488. isc_sdl_negate = 17;
  1489. isc_sdl_eql = 18;
  1490. isc_sdl_neq = 19;
  1491. isc_sdl_gtr = 20;
  1492. isc_sdl_geq = 21;
  1493. isc_sdl_lss = 22;
  1494. isc_sdl_leq = 23;
  1495. isc_sdl_and = 24;
  1496. isc_sdl_or = 25;
  1497. isc_sdl_not = 26;
  1498. isc_sdl_while = 27;
  1499. isc_sdl_assignment = 28;
  1500. isc_sdl_label = 29;
  1501. isc_sdl_leave = 30;
  1502. isc_sdl_begin = 31;
  1503. isc_sdl_end = 32;
  1504. isc_sdl_do3 = 33;
  1505. isc_sdl_do2 = 34;
  1506. isc_sdl_do1 = 35;
  1507. isc_sdl_element = 36;
  1508. { }
  1509. { International text interpretation values }
  1510. { }
  1511. isc_interp_eng_ascii = 0;
  1512. isc_interp_jpn_sjis = 5;
  1513. isc_interp_jpn_euc = 6;
  1514. { }
  1515. { SQL definitions }
  1516. { }
  1517. SQL_TEXT = 452;
  1518. SQL_VARYING = 448;
  1519. SQL_SHORT = 500;
  1520. SQL_LONG = 496;
  1521. SQL_FLOAT = 482;
  1522. SQL_DOUBLE = 480;
  1523. SQL_D_FLOAT = 530;
  1524. SQL_TIMESTAMP = 510;
  1525. SQL_BLOB = 520;
  1526. SQL_ARRAY = 540;
  1527. SQL_QUAD = 550;
  1528. SQL_TYPE_TIME = 560;
  1529. SQL_TYPE_DATE = 570;
  1530. SQL_INT64 = 580;
  1531. { Historical alias for pre V6 applications }
  1532. SQL_DATE = SQL_TIMESTAMP;
  1533. { }
  1534. { Blob Subtypes }
  1535. { }
  1536. { types less than zero are reserved for customer use }
  1537. isc_blob_untyped = 0;
  1538. { internal subtypes }
  1539. isc_blob_text = 1;
  1540. isc_blob_blr = 2;
  1541. isc_blob_acl = 3;
  1542. isc_blob_ranges = 4;
  1543. isc_blob_summary = 5;
  1544. isc_blob_format = 6;
  1545. isc_blob_tra = 7;
  1546. isc_blob_extfile = 8;
  1547. { the range 20-30 is reserved for dBASE and Paradox types }
  1548. isc_blob_formatted_memo = 20;
  1549. isc_blob_paradox_ole = 21;
  1550. isc_blob_graphic = 22;
  1551. isc_blob_dbase_ole = 23;
  1552. isc_blob_typed_binary = 24;