ibase60.h 84 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657
  1. /*
  2. * MODULE: ibase.h
  3. * DESCRIPTION: OSRI entrypoints and defines
  4. *
  5. * copyright (c) 1998, 1999 by InterBase Software Corporation
  6. */
  7. #ifndef _JRD_IBASE_H_
  8. #define _JRD_IBASE_H_
  9. #ifndef HARBOR_MERGE
  10. #define HARBOR_MERGE
  11. #endif
  12. #define isc_version4
  13. #define ISC_TRUE 1
  14. #define ISC_FALSE 0
  15. #if !(defined __cplusplus)
  16. #define ISC__TRUE ISC_TRUE
  17. #define ISC__FALSE ISC_FALSE
  18. #endif
  19. /*!!MVC
  20. #define ISC_USHORT unsigned short
  21. #define ISC_STATUS long
  22. !!MVC*/
  23. #define DSQL_close 1
  24. #define DSQL_drop 2
  25. /******************************************************************/
  26. /* Define type, export and other stuff based on c/c++ and Windows */
  27. /******************************************************************/
  28. /*!!MVC
  29. #if (defined(_MSC_VER) && defined(_WIN32)) || \
  30. (defined(__BORLANDC__) && (defined(__WIN32__) || defined(__OS2__)))
  31. #define ISC_FAR
  32. #define ISC_EXPORT __stdcall
  33. #define ISC_EXPORT_VARARG __cdecl
  34. typedef __int64 ISC_INT64;
  35. typedef unsigned __int64 ISC_UINT64;
  36. #define ISC_INT64_DEFINED
  37. #else
  38. #if (defined(__IBMC__) && defined(__OS2__))
  39. #define ISC_FAR
  40. #define ISC_EXPORT _System
  41. #define ISC_EXPORT_VARARG ISC_EXPORT
  42. #else
  43. #if ( defined( _Windows) || defined( _WINDOWS))
  44. #define ISC_FAR __far
  45. #define ISC_EXPORT ISC_FAR __cdecl __loadds __export
  46. #define ISC_EXPORT_VARARG ISC_EXPORT
  47. #else
  48. #define ISC_FAR
  49. #define ISC_EXPORT
  50. #define ISC_EXPORT_VARARG
  51. #endif
  52. #endif
  53. #endif
  54. !!MVC*/
  55. /*!!MVC
  56. Removed all ISC_FAR, ISC_EXPORT_VARARG and ISC_EXPORT
  57. macros.
  58. They confuse h2pas...
  59. !!MVC*/
  60. /*******************************************************************/
  61. /* 64 bit Integers */
  62. /*******************************************************************/
  63. /*!!MVC
  64. #ifndef ISC_INT64_DEFINED
  65. typedef long long int ISC_INT64;
  66. typedef unsigned long long int ISC_UINT64;
  67. #else
  68. #undef ISC_INT64_DEFINED
  69. #endif
  70. !!MVC*/
  71. /*******************************************************************/
  72. /* Time & Date Support */
  73. /*******************************************************************/
  74. #ifndef _ISC_TIMESTAMP_
  75. typedef long ISC_DATE;
  76. typedef unsigned long ISC_TIME;
  77. typedef struct {
  78. ISC_DATE timestamp_date;
  79. ISC_TIME timestamp_time;
  80. } ISC_TIMESTAMP;
  81. #define _ISC_TIMESTAMP_ 1
  82. #endif
  83. #define ISC_TIME_SECONDS_PRECISION 10000L
  84. #define ISC_TIME_SECONDS_PRECISION_SCALE -4
  85. /*******************************************************************/
  86. /* Blob id structure */
  87. /*******************************************************************/
  88. /*!!MVC
  89. typedef struct {
  90. ISC_LONG gds_quad_high;
  91. unsigned ISC_LONG gds_quad_low;
  92. } GDS_QUAD;
  93. !!MVC*/
  94. #if !(defined __cplusplus)
  95. typedef GDS_QUAD GDS__QUAD;
  96. #endif /* !(defined __cplusplus) */
  97. #define ISC_QUAD GDS_QUAD
  98. #define isc_quad_high gds_quad_high
  99. #define isc_quad_low gds_quad_low
  100. typedef struct {
  101. short array_bound_lower;
  102. short array_bound_upper;
  103. } ISC_ARRAY_BOUND;
  104. typedef struct {
  105. unsigned char array_desc_dtype;
  106. char array_desc_scale;
  107. unsigned short array_desc_length;
  108. char array_desc_field_name [32];
  109. char array_desc_relation_name [32];
  110. short array_desc_dimensions;
  111. short array_desc_flags;
  112. ISC_ARRAY_BOUND array_desc_bounds [16];
  113. } ISC_ARRAY_DESC;
  114. typedef struct {
  115. short blob_desc_subtype;
  116. short blob_desc_charset;
  117. short blob_desc_segment_size;
  118. unsigned char blob_desc_field_name [32];
  119. unsigned char blob_desc_relation_name [32];
  120. } ISC_BLOB_DESC;
  121. /***************************/
  122. /* Blob control structure */
  123. /***************************/
  124. typedef struct isc_blob_ctl{
  125. /*!!MVC
  126. ISC_STATUS ( *ctl_source)();
  127. !!MVC*/ /* Source filter */
  128. /*!!MVC
  129. struct isc_blob_ctl *ctl_source_handle;
  130. !!MVC*/ /* Argument to pass to source */
  131. /* filter */
  132. short ctl_to_sub_type; /* Target type */
  133. short ctl_from_sub_type; /* Source type */
  134. unsigned short ctl_buffer_length; /* Length of buffer */
  135. unsigned short ctl_segment_length; /* Length of current segment */
  136. unsigned short ctl_bpb_length; /* Length of blob parameter */
  137. /* block */
  138. char *ctl_bpb; /* Address of blob parameter */
  139. /* block */
  140. unsigned char *ctl_buffer; /* Address of segment buffer */
  141. ISC_LONG ctl_max_segment; /* Length of longest segment */
  142. ISC_LONG ctl_number_segments; /* Total number of segments */
  143. ISC_LONG ctl_total_length; /* Total length of blob */
  144. ISC_STATUS *ctl_status; /* Address of status vector */
  145. long ctl_data [8]; /* Application specific data */
  146. } *ISC_BLOB_CTL;
  147. /***************************/
  148. /* Blob stream definitions */
  149. /***************************/
  150. typedef struct bstream {
  151. void *bstr_blob; /* Blob handle */
  152. char *bstr_buffer; /* Address of buffer */
  153. char *bstr_ptr; /* Next character */
  154. short bstr_length; /* Length of buffer */
  155. short bstr_cnt; /* Characters in buffer */
  156. char bstr_mode; /* (mode) ? OUTPUT : INPUT */
  157. } BSTREAM;
  158. /*!!MVC
  159. #define getb(p) (--(p)->bstr_cnt >= 0 ? *(p)->bstr_ptr++ & 0377: BLOB_get (p))
  160. #define putb(x,p) (((x) == '\n' || (!(--(p)->bstr_cnt))) ? BLOB_put ((x),p) : ((int) (*(p)->bstr_ptr++ = (unsigned) (x))))
  161. #define putbx(x,p) ((!(--(p)->bstr_cnt)) ? BLOB_put ((x),p) : ((int) (*(p)->bstr_ptr++ = (unsigned) (x))))
  162. !!MVC */
  163. /***************************/
  164. /* Dynamic SQL definitions */
  165. /***************************/
  166. /******************************/
  167. /* Declare the extended SQLDA */
  168. /******************************/
  169. typedef struct {
  170. short sqltype; /* datatype of field */
  171. short sqlscale; /* scale factor */
  172. short sqlsubtype; /* datatype subtype - BLOBs & Text */
  173. /* types only */
  174. short sqllen; /* length of data area */
  175. char *sqldata; /* address of data */
  176. short *sqlind; /* address of indicator variable */
  177. short sqlname_length; /* length of sqlname field */
  178. char sqlname [32]; /* name of field, name length + space */
  179. /* for NULL */
  180. short relname_length; /* length of relation name */
  181. char relname [32]; /* field's relation name + space for */
  182. /* NULL */
  183. short ownname_length; /* length of owner name */
  184. char ownname [32]; /* relation's owner name + space for */
  185. /* NULL */
  186. short aliasname_length; /* length of alias name */
  187. char aliasname [32]; /* relation's alias name + space for */
  188. /* NULL */
  189. } XSQLVAR;
  190. typedef struct {
  191. short version; /* version of this XSQLDA */
  192. char sqldaid [8]; /* XSQLDA name field */
  193. ISC_LONG sqldabc; /* length in bytes of SQLDA */
  194. short sqln; /* number of fields allocated */
  195. short sqld; /* actual number of fields */
  196. XSQLVAR sqlvar [1]; /* first field address */
  197. } XSQLDA;
  198. #define XSQLDA_LENGTH(n) (sizeof (XSQLDA) + ((n)-1) * sizeof (XSQLVAR))
  199. #define SQLDA_VERSION1 1
  200. #define SQL_DIALECT_V5 1/* meaning is same as DIALECT_xsqlda */
  201. #define SQL_DIALECT_V6_TRANSITION 2/* flagging anything that is delimited
  202. by double quotes as an error and
  203. flagging keyword DATE as an error */
  204. #define SQL_DIALECT_V6 3/* supports SQL delimited identifier,
  205. SQLDATE/DATE, TIME, TIMESTAMP,
  206. CURRENT_DATE, CURRENT_TIME,
  207. CURRENT_TIMESTAMP, and 64-bit exact
  208. numeric type */
  209. #define SQL_DIALECT_CURRENT SQL_DIALECT_V6/* latest IB DIALECT */
  210. /********************************/
  211. /* InterBase Handle Definitions */
  212. /********************************/
  213. typedef void *isc_att_handle;
  214. typedef void *isc_blob_handle;
  215. typedef void *isc_db_handle;
  216. typedef void *isc_form_handle;
  217. typedef void *isc_req_handle;
  218. typedef void *isc_stmt_handle;
  219. typedef void *isc_svc_handle;
  220. typedef void *isc_tr_handle;
  221. typedef void *isc_win_handle;
  222. typedef void ( *isc_callback)();
  223. typedef ISC_LONG isc_resv_handle;
  224. /***************************/
  225. /* OSRI database functions */
  226. /***************************/
  227. /*!!MVC
  228. #if defined(__cplusplus) || defined(__STDC__) || defined(_Windows) || \
  229. (defined(_MSC_VER) && defined(WIN32)) || defined( _WINDOWS) || \
  230. (defined(__BORLANDC__) && (defined(__WIN32__) || defined(__OS2__))) || \
  231. (defined(__IBMC__) && defined(__OS2__)) || defined(AIX_PPC)
  232. #ifdef __cplusplus
  233. extern "C" {
  234. #endif
  235. !!MVC*/
  236. ISC_STATUS isc_attach_database (ISC_STATUS *,
  237. short,
  238. char *,
  239. isc_db_handle *,
  240. short,
  241. char *);
  242. ISC_STATUS isc_array_gen_sdl (ISC_STATUS *,
  243. ISC_ARRAY_DESC *,
  244. short *,
  245. char *,
  246. short *);
  247. ISC_STATUS isc_array_get_slice (ISC_STATUS *,
  248. isc_db_handle *,
  249. isc_tr_handle *,
  250. ISC_QUAD *,
  251. ISC_ARRAY_DESC *,
  252. void *,
  253. ISC_LONG *);
  254. ISC_STATUS isc_array_lookup_bounds (ISC_STATUS *,
  255. isc_db_handle *,
  256. isc_tr_handle *,
  257. char *,
  258. char *,
  259. ISC_ARRAY_DESC *);
  260. ISC_STATUS isc_array_lookup_desc (ISC_STATUS *,
  261. isc_db_handle *,
  262. isc_tr_handle *,
  263. char *,
  264. char *,
  265. ISC_ARRAY_DESC *);
  266. ISC_STATUS isc_array_set_desc (ISC_STATUS *,
  267. char *,
  268. char *,
  269. short *,
  270. short *,
  271. short *,
  272. ISC_ARRAY_DESC *);
  273. ISC_STATUS isc_array_put_slice (ISC_STATUS *,
  274. isc_db_handle *,
  275. isc_tr_handle *,
  276. ISC_QUAD *,
  277. ISC_ARRAY_DESC *,
  278. void *,
  279. ISC_LONG *);
  280. void isc_blob_default_desc (ISC_BLOB_DESC *,
  281. unsigned char *,
  282. unsigned char *);
  283. ISC_STATUS isc_blob_gen_bpb (ISC_STATUS *,
  284. ISC_BLOB_DESC *,
  285. ISC_BLOB_DESC *,
  286. unsigned short,
  287. unsigned char *,
  288. unsigned short *);
  289. ISC_STATUS isc_blob_info (ISC_STATUS *,
  290. isc_blob_handle *,
  291. short,
  292. char *,
  293. short,
  294. char *);
  295. ISC_STATUS isc_blob_lookup_desc (ISC_STATUS *,
  296. isc_db_handle *,
  297. isc_tr_handle *,
  298. unsigned char *,
  299. unsigned char *,
  300. ISC_BLOB_DESC *,
  301. unsigned char *);
  302. ISC_STATUS isc_blob_set_desc (ISC_STATUS *,
  303. unsigned char *,
  304. unsigned char *,
  305. short,
  306. short,
  307. short,
  308. ISC_BLOB_DESC *);
  309. ISC_STATUS isc_cancel_blob (ISC_STATUS *,
  310. isc_blob_handle *);
  311. ISC_STATUS isc_cancel_events (ISC_STATUS *,
  312. isc_db_handle *,
  313. ISC_LONG *);
  314. ISC_STATUS isc_close_blob (ISC_STATUS *,
  315. isc_blob_handle *);
  316. ISC_STATUS isc_commit_retaining (ISC_STATUS *,
  317. isc_tr_handle *);
  318. ISC_STATUS isc_commit_transaction (ISC_STATUS *,
  319. isc_tr_handle *);
  320. ISC_STATUS isc_create_blob (ISC_STATUS *,
  321. isc_db_handle *,
  322. isc_tr_handle *,
  323. isc_blob_handle *,
  324. ISC_QUAD *);
  325. ISC_STATUS isc_create_blob2 (ISC_STATUS *,
  326. isc_db_handle *,
  327. isc_tr_handle *,
  328. isc_blob_handle *,
  329. ISC_QUAD *,
  330. short,
  331. char *);
  332. ISC_STATUS isc_create_database (ISC_STATUS *,
  333. short,
  334. char *,
  335. isc_db_handle *,
  336. short,
  337. char *,
  338. short);
  339. ISC_STATUS isc_database_info (ISC_STATUS *,
  340. isc_db_handle *,
  341. short,
  342. char *,
  343. short,
  344. char *);
  345. void isc_decode_date (ISC_QUAD *,
  346. void *);
  347. void isc_decode_sql_date (ISC_DATE *,
  348. void *);
  349. void isc_decode_sql_time (ISC_TIME *,
  350. void *);
  351. void isc_decode_timestamp (ISC_TIMESTAMP *,
  352. void *);
  353. ISC_STATUS isc_detach_database (ISC_STATUS *,
  354. isc_db_handle *);
  355. ISC_STATUS isc_drop_database (ISC_STATUS *,
  356. isc_db_handle *);
  357. ISC_STATUS isc_dsql_allocate_statement (ISC_STATUS *,
  358. isc_db_handle *,
  359. isc_stmt_handle *);
  360. ISC_STATUS isc_dsql_alloc_statement2 (ISC_STATUS *,
  361. isc_db_handle *,
  362. isc_stmt_handle *);
  363. ISC_STATUS isc_dsql_describe (ISC_STATUS *,
  364. isc_stmt_handle *,
  365. unsigned short,
  366. XSQLDA *);
  367. ISC_STATUS isc_dsql_describe_bind (ISC_STATUS *,
  368. isc_stmt_handle *,
  369. unsigned short,
  370. XSQLDA *);
  371. ISC_STATUS isc_dsql_exec_immed2 (ISC_STATUS *,
  372. isc_db_handle *,
  373. isc_tr_handle *,
  374. unsigned short,
  375. char *,
  376. unsigned short,
  377. XSQLDA *,
  378. XSQLDA *);
  379. ISC_STATUS isc_dsql_execute (ISC_STATUS *,
  380. isc_tr_handle *,
  381. isc_stmt_handle *,
  382. unsigned short,
  383. XSQLDA *);
  384. ISC_STATUS isc_dsql_execute2 (ISC_STATUS *,
  385. isc_tr_handle *,
  386. isc_stmt_handle *,
  387. unsigned short,
  388. XSQLDA *,
  389. XSQLDA *);
  390. ISC_STATUS isc_dsql_execute_immediate (ISC_STATUS *,
  391. isc_db_handle *,
  392. isc_tr_handle *,
  393. unsigned short,
  394. char *,
  395. unsigned short,
  396. XSQLDA *);
  397. ISC_STATUS isc_dsql_fetch (ISC_STATUS *,
  398. isc_stmt_handle *,
  399. unsigned short,
  400. XSQLDA *);
  401. ISC_STATUS isc_dsql_finish (isc_db_handle *);
  402. ISC_STATUS isc_dsql_free_statement (ISC_STATUS *,
  403. isc_stmt_handle *,
  404. unsigned short);
  405. ISC_STATUS isc_dsql_insert (ISC_STATUS *,
  406. isc_stmt_handle *,
  407. unsigned short,
  408. XSQLDA *);
  409. ISC_STATUS isc_dsql_prepare (ISC_STATUS *,
  410. isc_tr_handle *,
  411. isc_stmt_handle *,
  412. unsigned short,
  413. char *,
  414. unsigned short,
  415. XSQLDA *);
  416. ISC_STATUS isc_dsql_set_cursor_name (ISC_STATUS *,
  417. isc_stmt_handle *,
  418. char *,
  419. unsigned short);
  420. ISC_STATUS isc_dsql_sql_info (ISC_STATUS *,
  421. isc_stmt_handle *,
  422. short,
  423. char *,
  424. short,
  425. char *);
  426. void isc_encode_date (void *,
  427. ISC_QUAD *);
  428. void isc_encode_sql_date (void *,
  429. ISC_DATE *);
  430. void isc_encode_sql_time (void *,
  431. ISC_TIME *);
  432. void isc_encode_timestamp (void *,
  433. ISC_TIMESTAMP *);
  434. ISC_LONG isc_event_block (char * *,
  435. char * *,
  436. unsigned short, ...);
  437. /*!!MVC
  438. void isc_event_counts (unsigned ISC_LONG *,
  439. short,
  440. char *,
  441. char *);
  442. !!MVC*/
  443. void isc_expand_dpb (char * *,
  444. short *,
  445. ...);
  446. int isc_modify_dpb (char * *,
  447. short *, unsigned short,
  448. char *, short );
  449. ISC_LONG isc_free (char *);
  450. ISC_STATUS isc_get_segment (ISC_STATUS *,
  451. isc_blob_handle *,
  452. unsigned short *,
  453. unsigned short,
  454. char *);
  455. ISC_STATUS isc_get_slice (ISC_STATUS *,
  456. isc_db_handle *,
  457. isc_tr_handle *,
  458. ISC_QUAD *,
  459. short,
  460. char *,
  461. short,
  462. ISC_LONG *,
  463. ISC_LONG,
  464. void *,
  465. ISC_LONG *);
  466. ISC_STATUS isc_interprete (char *,
  467. ISC_STATUS * *);
  468. ISC_STATUS isc_open_blob (ISC_STATUS *,
  469. isc_db_handle *,
  470. isc_tr_handle *,
  471. isc_blob_handle *,
  472. ISC_QUAD *);
  473. ISC_STATUS isc_open_blob2 (ISC_STATUS *,
  474. isc_db_handle *,
  475. isc_tr_handle *,
  476. isc_blob_handle *,
  477. ISC_QUAD *,
  478. short,
  479. char *);
  480. ISC_STATUS isc_prepare_transaction2 (ISC_STATUS *,
  481. isc_tr_handle *,
  482. short,
  483. char *);
  484. void isc_print_sqlerror (short,
  485. ISC_STATUS *);
  486. ISC_STATUS isc_print_status (ISC_STATUS *);
  487. ISC_STATUS isc_put_segment (ISC_STATUS *,
  488. isc_blob_handle *,
  489. unsigned short,
  490. char *);
  491. ISC_STATUS isc_put_slice (ISC_STATUS *,
  492. isc_db_handle *,
  493. isc_tr_handle *,
  494. ISC_QUAD *,
  495. short,
  496. char *,
  497. short,
  498. ISC_LONG *,
  499. ISC_LONG,
  500. void *);
  501. ISC_STATUS isc_que_events (ISC_STATUS *,
  502. isc_db_handle *,
  503. ISC_LONG *,
  504. short,
  505. char *,
  506. isc_callback,
  507. void *);
  508. ISC_STATUS isc_rollback_retaining (ISC_STATUS *,
  509. isc_tr_handle *);
  510. ISC_STATUS isc_rollback_transaction (ISC_STATUS *,
  511. isc_tr_handle *);
  512. ISC_STATUS isc_start_multiple (ISC_STATUS *,
  513. isc_tr_handle *,
  514. short,
  515. void *);
  516. ISC_STATUS isc_start_transaction (ISC_STATUS *,
  517. isc_tr_handle *,
  518. short, ...);
  519. ISC_LONG isc_sqlcode (ISC_STATUS *);
  520. void isc_sql_interprete (short,
  521. char *,
  522. short);
  523. ISC_STATUS isc_transaction_info (ISC_STATUS *,
  524. isc_tr_handle *,
  525. short,
  526. char *,
  527. short,
  528. char *);
  529. ISC_STATUS isc_transact_request (ISC_STATUS *,
  530. isc_db_handle *,
  531. isc_tr_handle *,
  532. unsigned short,
  533. char *,
  534. unsigned short,
  535. char *,
  536. unsigned short,
  537. char *);
  538. ISC_LONG isc_vax_integer (char *,
  539. short);
  540. ISC_INT64 isc_portable_integer (unsigned char *,
  541. short);
  542. /*************************************/
  543. /* Security Functions and structures */
  544. /*************************************/
  545. #define sec_uid_spec 0x01
  546. #define sec_gid_spec 0x02
  547. #define sec_server_spec 0x04
  548. #define sec_password_spec 0x08
  549. #define sec_group_name_spec 0x10
  550. #define sec_first_name_spec 0x20
  551. #define sec_middle_name_spec 0x40
  552. #define sec_last_name_spec 0x80
  553. #define sec_dba_user_name_spec 0x100
  554. #define sec_dba_password_spec 0x200
  555. #define sec_protocol_tcpip 1
  556. #define sec_protocol_netbeui 2
  557. #define sec_protocol_spx 3
  558. #define sec_protocol_local 4
  559. typedef struct {
  560. short sec_flags; /* which fields are specified */
  561. int uid; /* the user's id */
  562. int gid; /* the user's group id */
  563. int protocol; /* protocol to use for connection */
  564. char *server; /* server to administer */
  565. char *user_name; /* the user's name */
  566. char *password; /* the user's password */
  567. char *group_name; /* the group name */
  568. char *first_name; /* the user's first name */
  569. char *middle_name; /* the user's middle name */
  570. char *last_name; /* the user's last name */
  571. char *dba_user_name; /* the dba user name */
  572. char *dba_password; /* the dba password */
  573. } USER_SEC_DATA;
  574. int isc_add_user (ISC_STATUS *, USER_SEC_DATA *);
  575. int isc_delete_user (ISC_STATUS *, USER_SEC_DATA *);
  576. int isc_modify_user (ISC_STATUS *, USER_SEC_DATA *);
  577. /**********************************/
  578. /* Other OSRI functions */
  579. /**********************************/
  580. ISC_STATUS isc_compile_request (ISC_STATUS *,
  581. isc_db_handle *,
  582. isc_req_handle *,
  583. short,
  584. char *);
  585. ISC_STATUS isc_compile_request2 (ISC_STATUS *,
  586. isc_db_handle *,
  587. isc_req_handle *,
  588. short,
  589. char *);
  590. ISC_STATUS isc_ddl (ISC_STATUS *,
  591. isc_db_handle *,
  592. isc_tr_handle *,
  593. short,
  594. char *);
  595. ISC_STATUS isc_prepare_transaction (ISC_STATUS *,
  596. isc_tr_handle *);
  597. ISC_STATUS isc_receive (ISC_STATUS *,
  598. isc_req_handle *,
  599. short,
  600. short,
  601. void *,
  602. short);
  603. ISC_STATUS isc_reconnect_transaction (ISC_STATUS *,
  604. isc_db_handle *,
  605. isc_tr_handle *,
  606. short,
  607. char *);
  608. ISC_STATUS isc_release_request (ISC_STATUS *,
  609. isc_req_handle *);
  610. ISC_STATUS isc_request_info (ISC_STATUS *,
  611. isc_req_handle *,
  612. short,
  613. short,
  614. char *,
  615. short,
  616. char *);
  617. ISC_STATUS isc_seek_blob (ISC_STATUS *,
  618. isc_blob_handle *,
  619. short,
  620. ISC_LONG,
  621. ISC_LONG *);
  622. ISC_STATUS isc_send (ISC_STATUS *,
  623. isc_req_handle *,
  624. short,
  625. short,
  626. void *,
  627. short);
  628. ISC_STATUS isc_start_and_send (ISC_STATUS *,
  629. isc_req_handle *,
  630. isc_tr_handle *,
  631. short,
  632. short,
  633. void *,
  634. short);
  635. ISC_STATUS isc_start_request (ISC_STATUS *,
  636. isc_req_handle *,
  637. isc_tr_handle *,
  638. short);
  639. ISC_STATUS isc_unwind_request (ISC_STATUS *,
  640. isc_tr_handle *,
  641. short);
  642. ISC_STATUS isc_wait_for_event (ISC_STATUS *,
  643. isc_db_handle *,
  644. short,
  645. char *,
  646. char *);
  647. /*****************************/
  648. /* Other Sql functions */
  649. /*****************************/
  650. ISC_STATUS isc_close (ISC_STATUS *,
  651. char *);
  652. ISC_STATUS isc_declare (ISC_STATUS *,
  653. char *,
  654. char *);
  655. ISC_STATUS isc_describe (ISC_STATUS *,
  656. char *,
  657. XSQLDA *);
  658. ISC_STATUS isc_describe_bind (ISC_STATUS *,
  659. char *,
  660. XSQLDA *);
  661. ISC_STATUS isc_execute (ISC_STATUS *,
  662. isc_tr_handle *,
  663. char *,
  664. XSQLDA *);
  665. ISC_STATUS isc_execute_immediate (ISC_STATUS *,
  666. isc_db_handle *,
  667. isc_tr_handle *,
  668. short *,
  669. char *);
  670. ISC_STATUS isc_fetch (ISC_STATUS *,
  671. char *,
  672. XSQLDA *);
  673. ISC_STATUS isc_open (ISC_STATUS *,
  674. isc_tr_handle *,
  675. char *,
  676. XSQLDA *);
  677. ISC_STATUS isc_prepare (ISC_STATUS *,
  678. isc_db_handle *,
  679. isc_tr_handle *,
  680. char *,
  681. short *,
  682. char *,
  683. XSQLDA *);
  684. /*************************************/
  685. /* Other Dynamic sql functions */
  686. /*************************************/
  687. ISC_STATUS isc_dsql_execute_m (ISC_STATUS *,
  688. isc_tr_handle *,
  689. isc_stmt_handle *,
  690. unsigned short,
  691. char *,
  692. unsigned short,
  693. unsigned short,
  694. char *);
  695. ISC_STATUS isc_dsql_execute2_m (ISC_STATUS *,
  696. isc_tr_handle *,
  697. isc_stmt_handle *,
  698. unsigned short,
  699. char *,
  700. unsigned short,
  701. unsigned short,
  702. char *,
  703. unsigned short,
  704. char *,
  705. unsigned short,
  706. unsigned short,
  707. char *);
  708. ISC_STATUS isc_dsql_execute_immediate_m (ISC_STATUS *,
  709. isc_db_handle *,
  710. isc_tr_handle *,
  711. unsigned short,
  712. char *,
  713. unsigned short,
  714. unsigned short,
  715. char *,
  716. unsigned short,
  717. unsigned short,
  718. char *);
  719. ISC_STATUS isc_dsql_exec_immed3_m (ISC_STATUS *,
  720. isc_db_handle *,
  721. isc_tr_handle *,
  722. unsigned short,
  723. char *,
  724. unsigned short,
  725. unsigned short,
  726. char *,
  727. unsigned short,
  728. unsigned short,
  729. char *,
  730. unsigned short,
  731. char *,
  732. unsigned short,
  733. unsigned short,
  734. char *);
  735. ISC_STATUS isc_dsql_fetch_m (ISC_STATUS *,
  736. isc_stmt_handle *,
  737. unsigned short,
  738. char *,
  739. unsigned short,
  740. unsigned short,
  741. char *);
  742. ISC_STATUS isc_dsql_insert_m (ISC_STATUS *,
  743. isc_stmt_handle *,
  744. unsigned short,
  745. char *,
  746. unsigned short,
  747. unsigned short,
  748. char *);
  749. ISC_STATUS isc_dsql_prepare_m (ISC_STATUS *,
  750. isc_tr_handle *,
  751. isc_stmt_handle *,
  752. unsigned short,
  753. char *,
  754. unsigned short,
  755. unsigned short,
  756. char *,
  757. unsigned short,
  758. char *);
  759. ISC_STATUS isc_dsql_release (ISC_STATUS *,
  760. char *);
  761. ISC_STATUS isc_embed_dsql_close (ISC_STATUS *,
  762. char *);
  763. ISC_STATUS isc_embed_dsql_declare (ISC_STATUS *,
  764. char *,
  765. char *);
  766. ISC_STATUS isc_embed_dsql_describe (ISC_STATUS *,
  767. char *,
  768. unsigned short,
  769. XSQLDA *);
  770. ISC_STATUS isc_embed_dsql_describe_bind (ISC_STATUS *,
  771. char *,
  772. unsigned short,
  773. XSQLDA *);
  774. ISC_STATUS isc_embed_dsql_execute (ISC_STATUS *,
  775. isc_tr_handle *,
  776. char *,
  777. unsigned short,
  778. XSQLDA *);
  779. ISC_STATUS isc_embed_dsql_execute2 (ISC_STATUS *,
  780. isc_tr_handle *,
  781. char *,
  782. unsigned short,
  783. XSQLDA *,
  784. XSQLDA *);
  785. ISC_STATUS isc_embed_dsql_execute_immed (ISC_STATUS *,
  786. isc_db_handle *,
  787. isc_tr_handle *,
  788. unsigned short,
  789. char *,
  790. unsigned short,
  791. XSQLDA *);
  792. ISC_STATUS isc_embed_dsql_fetch (ISC_STATUS *,
  793. char *,
  794. unsigned short,
  795. XSQLDA *);
  796. ISC_STATUS isc_embed_dsql_open (ISC_STATUS *,
  797. isc_tr_handle *,
  798. char *,
  799. unsigned short,
  800. XSQLDA *);
  801. ISC_STATUS isc_embed_dsql_open2 (ISC_STATUS *,
  802. isc_tr_handle *,
  803. char *,
  804. unsigned short,
  805. XSQLDA *,
  806. XSQLDA *);
  807. ISC_STATUS isc_embed_dsql_insert (ISC_STATUS *,
  808. char *,
  809. unsigned short,
  810. XSQLDA *);
  811. ISC_STATUS isc_embed_dsql_prepare (ISC_STATUS *,
  812. isc_db_handle *,
  813. isc_tr_handle *,
  814. char *,
  815. unsigned short,
  816. char *,
  817. unsigned short,
  818. XSQLDA *);
  819. ISC_STATUS isc_embed_dsql_release (ISC_STATUS *,
  820. char *);
  821. /******************************/
  822. /* Other Blob functions */
  823. /******************************/
  824. BSTREAM * BLOB_open (isc_blob_handle,
  825. char *,
  826. int);
  827. int BLOB_put (char,
  828. BSTREAM *);
  829. int BLOB_close (BSTREAM *);
  830. int BLOB_get (BSTREAM *);
  831. int BLOB_display (ISC_QUAD *,
  832. isc_db_handle,
  833. isc_tr_handle,
  834. char *);
  835. int BLOB_dump (ISC_QUAD *,
  836. isc_db_handle,
  837. isc_tr_handle,
  838. char *);
  839. int BLOB_edit (ISC_QUAD *,
  840. isc_db_handle,
  841. isc_tr_handle,
  842. char *);
  843. int BLOB_load (ISC_QUAD *,
  844. isc_db_handle,
  845. isc_tr_handle,
  846. char *);
  847. int BLOB_text_dump (ISC_QUAD *,
  848. isc_db_handle,
  849. isc_tr_handle,
  850. char *);
  851. int BLOB_text_load (ISC_QUAD *,
  852. isc_db_handle,
  853. isc_tr_handle,
  854. char *);
  855. BSTREAM * Bopen (ISC_QUAD *,
  856. isc_db_handle,
  857. isc_tr_handle,
  858. char *);
  859. BSTREAM * Bopen2 (ISC_QUAD *,
  860. isc_db_handle,
  861. isc_tr_handle,
  862. char *,
  863. unsigned short);
  864. /******************************/
  865. /* Other Misc functions */
  866. /******************************/
  867. ISC_LONG isc_ftof (char *,
  868. unsigned short,
  869. char *,
  870. unsigned short);
  871. ISC_STATUS isc_print_blr (char *,
  872. isc_callback,
  873. void *,
  874. short);
  875. void isc_set_debug (int);
  876. void isc_qtoq (ISC_QUAD *,
  877. ISC_QUAD *);
  878. void isc_vtof (char *,
  879. char *,
  880. unsigned short);
  881. void isc_vtov (char *,
  882. char *,
  883. short);
  884. int isc_version (isc_db_handle *,
  885. isc_callback,
  886. void *);
  887. ISC_LONG isc_reset_fpe (unsigned short);
  888. /*****************************************/
  889. /* Service manager functions */
  890. /*****************************************/
  891. /*!!MVC
  892. #define ADD_SPB_LENGTH(p, length) {*(p)++ = (length); \
  893. *(p)++ = (length) >> 8;}
  894. #define ADD_SPB_NUMERIC(p, data) {*(p)++ = (data); \
  895. *(p)++ = (data) >> 8; \
  896. *(p)++ = (data) >> 16; \
  897. *(p)++ = (data) >> 24;}
  898. !!MVC*/
  899. ISC_STATUS isc_service_attach (ISC_STATUS *,
  900. unsigned short,
  901. char *,
  902. isc_svc_handle *,
  903. unsigned short,
  904. char *);
  905. ISC_STATUS isc_service_detach (ISC_STATUS *,
  906. isc_svc_handle *);
  907. ISC_STATUS isc_service_query (ISC_STATUS *,
  908. isc_svc_handle *,
  909. isc_resv_handle *,
  910. unsigned short,
  911. char *,
  912. unsigned short,
  913. char *,
  914. unsigned short,
  915. char *);
  916. ISC_STATUS isc_service_start (ISC_STATUS *,
  917. isc_svc_handle *,
  918. isc_resv_handle *,
  919. unsigned short,
  920. char *);
  921. /*******************************/
  922. /* Forms functions */
  923. /*******************************/
  924. ISC_STATUS isc_compile_map (ISC_STATUS *,
  925. isc_form_handle *,
  926. isc_req_handle *,
  927. short *,
  928. char *);
  929. ISC_STATUS isc_compile_menu (ISC_STATUS *,
  930. isc_form_handle *,
  931. isc_req_handle *,
  932. short *,
  933. char *);
  934. ISC_STATUS isc_compile_sub_map (ISC_STATUS *,
  935. isc_win_handle *,
  936. isc_req_handle *,
  937. short *,
  938. char *);
  939. ISC_STATUS isc_create_window (ISC_STATUS *,
  940. isc_win_handle *,
  941. short *,
  942. char *,
  943. short *,
  944. short *);
  945. ISC_STATUS isc_delete_window (ISC_STATUS *,
  946. isc_win_handle *);
  947. ISC_STATUS isc_drive_form (ISC_STATUS *,
  948. isc_db_handle *,
  949. isc_tr_handle *,
  950. isc_win_handle *,
  951. isc_req_handle *,
  952. unsigned char *,
  953. unsigned char *);
  954. ISC_STATUS isc_drive_menu (ISC_STATUS *,
  955. isc_win_handle *,
  956. isc_req_handle *,
  957. short *,
  958. char *,
  959. short *,
  960. char *,
  961. short *,
  962. short *,
  963. char *,
  964. ISC_LONG *);
  965. ISC_STATUS isc_form_delete (ISC_STATUS *,
  966. isc_form_handle *);
  967. ISC_STATUS isc_form_fetch (ISC_STATUS *,
  968. isc_db_handle *,
  969. isc_tr_handle *,
  970. isc_req_handle *,
  971. unsigned char *);
  972. ISC_STATUS isc_form_insert (ISC_STATUS *,
  973. isc_db_handle *,
  974. isc_tr_handle *,
  975. isc_req_handle *,
  976. unsigned char *);
  977. ISC_STATUS isc_get_entree (ISC_STATUS *,
  978. isc_req_handle *,
  979. short *,
  980. char *,
  981. ISC_LONG *,
  982. short *);
  983. ISC_STATUS isc_initialize_menu (ISC_STATUS *,
  984. isc_req_handle *);
  985. ISC_STATUS isc_menu (ISC_STATUS *,
  986. isc_win_handle *,
  987. isc_req_handle *,
  988. short *,
  989. char *);
  990. ISC_STATUS isc_load_form (ISC_STATUS *,
  991. isc_db_handle *,
  992. isc_tr_handle *,
  993. isc_form_handle *,
  994. short *,
  995. char *);
  996. ISC_STATUS isc_pop_window (ISC_STATUS *,
  997. isc_win_handle *);
  998. ISC_STATUS isc_put_entree (ISC_STATUS *,
  999. isc_req_handle *,
  1000. short *,
  1001. char *,
  1002. ISC_LONG *);
  1003. ISC_STATUS isc_reset_form (ISC_STATUS *,
  1004. isc_req_handle *);
  1005. ISC_STATUS isc_suspend_window (ISC_STATUS *,
  1006. isc_win_handle *);
  1007. /*!!MVC
  1008. #ifdef __cplusplus
  1009. };
  1010. #endif
  1011. #else
  1012. !!MVC */
  1013. ISC_STATUS isc_attach_database();
  1014. ISC_STATUS isc_array_gen_sdl();
  1015. ISC_STATUS isc_array_get_slice();
  1016. ISC_STATUS isc_array_lookup_bounds();
  1017. ISC_STATUS isc_array_lookup_desc();
  1018. ISC_STATUS isc_array_set_desc();
  1019. ISC_STATUS isc_array_put_slice();
  1020. ISC_STATUS isc_blob_gen_bpb();
  1021. ISC_STATUS isc_blob_info();
  1022. ISC_STATUS isc_blob_lookup_desc();
  1023. ISC_STATUS isc_blob_set_desc();
  1024. ISC_STATUS isc_cancel_blob();
  1025. ISC_STATUS isc_cancel_events();
  1026. ISC_STATUS isc_close_blob();
  1027. ISC_STATUS isc_commit_retaining();
  1028. ISC_STATUS isc_commit_transaction();
  1029. ISC_STATUS isc_compile_request();
  1030. ISC_STATUS isc_compile_request2();
  1031. ISC_STATUS isc_create_blob();
  1032. ISC_STATUS isc_create_blob2();
  1033. ISC_STATUS isc_create_database();
  1034. ISC_STATUS isc_database_info();
  1035. ISC_STATUS isc_ddl();
  1036. void isc_decode_date();
  1037. void isc_decode_sql_date();
  1038. void isc_decode_sql_time();
  1039. void isc_decode_timestamp();
  1040. ISC_STATUS isc_detach_database();
  1041. ISC_STATUS isc_drop_database();
  1042. void isc_encode_date();
  1043. void isc_encode_sql_date();
  1044. void isc_encode_sql_time();
  1045. void isc_encode_timestamp();
  1046. ISC_LONG isc_event_block();
  1047. void isc_event_counts();
  1048. void isc_expand_dpb();
  1049. int isc_modify_dpb();
  1050. ISC_LONG isc_free();
  1051. ISC_STATUS isc_get_segment();
  1052. ISC_STATUS isc_get_slice();
  1053. ISC_STATUS isc_interprete();
  1054. ISC_STATUS isc_open_blob();
  1055. ISC_STATUS isc_open_blob2();
  1056. ISC_STATUS isc_prepare_transaction();
  1057. ISC_STATUS isc_prepare_transaction2();
  1058. void isc_print_sqlerror();
  1059. ISC_STATUS isc_print_status();
  1060. ISC_STATUS isc_put_segment();
  1061. ISC_STATUS isc_put_slice();
  1062. ISC_STATUS isc_que_events();
  1063. ISC_STATUS isc_receive();
  1064. ISC_STATUS isc_reconnect_transaction();
  1065. ISC_STATUS isc_release_request();
  1066. ISC_STATUS isc_request_info();
  1067. ISC_LONG isc_reset_fpe ();
  1068. ISC_STATUS isc_rollback_transaction();
  1069. ISC_STATUS isc_rollback_retaining();
  1070. ISC_STATUS isc_seek_blob();
  1071. ISC_STATUS isc_send();
  1072. ISC_STATUS isc_service_attach();
  1073. ISC_STATUS isc_service_detach();
  1074. ISC_STATUS isc_service_query();
  1075. ISC_STATUS isc_service_start();
  1076. ISC_STATUS isc_start_and_send();
  1077. ISC_STATUS isc_start_multiple();
  1078. ISC_STATUS isc_start_request();
  1079. ISC_STATUS isc_start_transaction();
  1080. ISC_LONG isc_sqlcode();
  1081. ISC_STATUS isc_transaction_info();
  1082. ISC_STATUS isc_transact_request();
  1083. ISC_STATUS isc_unwind_request();
  1084. ISC_STATUS isc_wait_for_event();
  1085. ISC_LONG isc_ftof();
  1086. ISC_STATUS isc_print_blr();
  1087. void isc_set_debug();
  1088. void isc_qtoq();
  1089. ISC_LONG isc_vax_integer();
  1090. void isc_vtof();
  1091. void isc_vtov();
  1092. int isc_version();
  1093. #ifndef __STDC__
  1094. /******************/
  1095. /* Blob functions */
  1096. /******************/
  1097. BSTREAM * Bopen();
  1098. BSTREAM * BLOB_open();
  1099. BSTREAM * Bopen2();
  1100. #endif /* __STDC__ */
  1101. #endif /* __cplusplus || __STDC__ */
  1102. /***************************************************/
  1103. /* Actions to pass to the blob filter (ctl_source) */
  1104. /***************************************************/
  1105. #define isc_blob_filter_open 0
  1106. #define isc_blob_filter_get_segment 1
  1107. #define isc_blob_filter_close 2
  1108. #define isc_blob_filter_create 3
  1109. #define isc_blob_filter_put_segment 4
  1110. #define isc_blob_filter_alloc 5
  1111. #define isc_blob_filter_free 6
  1112. #define isc_blob_filter_seek 7
  1113. /*******************/
  1114. /* Blr definitions */
  1115. /*******************/
  1116. #ifndef _JRD_BLR_H_
  1117. /*!!MVC
  1118. #define blr_word(n) ((n) % 256), ((n) / 256)
  1119. !!MVC*/
  1120. #define blr_text 14
  1121. #define blr_text2 15
  1122. #define blr_short 7
  1123. #define blr_long 8
  1124. #define blr_quad 9
  1125. #define blr_int64 16
  1126. #define blr_float 10
  1127. #define blr_double 27
  1128. #define blr_d_float 11
  1129. #define blr_timestamp 35
  1130. #define blr_varying 37
  1131. #define blr_varying2 38
  1132. #define blr_blob 261
  1133. #define blr_cstring 40
  1134. #define blr_cstring2 41
  1135. #define blr_blob_id 45
  1136. #define blr_sql_date 12
  1137. #define blr_sql_time 13
  1138. /* Historical alias for pre V6 applications */
  1139. #define blr_date blr_timestamp
  1140. #define blr_inner 0
  1141. #define blr_left 1
  1142. #define blr_right 2
  1143. #define blr_full 3
  1144. #define blr_gds_code 0
  1145. #define blr_sql_code 1
  1146. #define blr_exception 2
  1147. #define blr_trigger_code 3
  1148. #define blr_default_code 4
  1149. #define blr_version4 4
  1150. #define blr_version5 5
  1151. #define blr_eoc 76
  1152. #define blr_end 255
  1153. #define blr_assignment 1
  1154. #define blr_begin 2
  1155. #define blr_dcl_variable 3
  1156. #define blr_message 4
  1157. #define blr_erase 5
  1158. #define blr_fetch 6
  1159. #define blr_for 7
  1160. #define blr_if 8
  1161. #define blr_loop 9
  1162. #define blr_modify 10
  1163. #define blr_handler 11
  1164. #define blr_receive 12
  1165. #define blr_select 13
  1166. #define blr_send 14
  1167. #define blr_store 15
  1168. #define blr_label 17
  1169. #define blr_leave 18
  1170. #define blr_store2 19
  1171. #define blr_post 20
  1172. #define blr_literal 21
  1173. #define blr_dbkey 22
  1174. #define blr_field 23
  1175. #define blr_fid 24
  1176. #define blr_parameter 25
  1177. #define blr_variable 26
  1178. #define blr_average 27
  1179. #define blr_count 28
  1180. #define blr_maximum 29
  1181. #define blr_minimum 30
  1182. #define blr_total 31
  1183. #define blr_add 34
  1184. #define blr_subtract 35
  1185. #define blr_multiply 36
  1186. #define blr_divide 37
  1187. #define blr_negate 38
  1188. #define blr_concatenate 39
  1189. #define blr_substring 40
  1190. #define blr_parameter2 41
  1191. #define blr_from 42
  1192. #define blr_via 43
  1193. #define blr_user_name 44
  1194. #define blr_null 45
  1195. #define blr_eql 47
  1196. #define blr_neq 48
  1197. #define blr_gtr 49
  1198. #define blr_geq 50
  1199. #define blr_lss 51
  1200. #define blr_leq 52
  1201. #define blr_containing 53
  1202. #define blr_matching 54
  1203. #define blr_starting 55
  1204. #define blr_between 56
  1205. #define blr_or 57
  1206. #define blr_and 58
  1207. #define blr_not 59
  1208. #define blr_any 60
  1209. #define blr_missing 61
  1210. #define blr_unique 62
  1211. #define blr_like 63
  1212. #define blr_stream 65
  1213. #define blr_set_index 66
  1214. #define blr_rse 67
  1215. #define blr_first 68
  1216. #define blr_project 69
  1217. #define blr_sort 70
  1218. #define blr_boolean 71
  1219. #define blr_ascending 72
  1220. #define blr_descending 73
  1221. #define blr_relation 74
  1222. #define blr_rid 75
  1223. #define blr_union 76
  1224. #define blr_map 77
  1225. #define blr_group_by 78
  1226. #define blr_aggregate 79
  1227. #define blr_join_type 80
  1228. #define blr_agg_count 83
  1229. #define blr_agg_max 84
  1230. #define blr_agg_min 85
  1231. #define blr_agg_total 86
  1232. #define blr_agg_average 87
  1233. #define blr_parameter3 88
  1234. #define blr_run_count 118
  1235. #define blr_run_max 89
  1236. #define blr_run_min 90
  1237. #define blr_run_total 91
  1238. #define blr_run_average 92
  1239. #define blr_agg_count2 93
  1240. #define blr_agg_count_distinct 94
  1241. #define blr_agg_total_distinct 95
  1242. #define blr_agg_average_distinct 96
  1243. #define blr_function 100
  1244. #define blr_gen_id 101
  1245. #define blr_prot_mask 102
  1246. #define blr_upcase 103
  1247. #define blr_lock_state 104
  1248. #define blr_value_if 105
  1249. #define blr_matching2 106
  1250. #define blr_index 107
  1251. #define blr_ansi_like 108
  1252. #define blr_bookmark 109
  1253. #define blr_crack 110
  1254. #define blr_force_crack 111
  1255. #define blr_seek 112
  1256. #define blr_find 113
  1257. #define blr_continue 0
  1258. #define blr_forward 1
  1259. #define blr_backward 2
  1260. #define blr_bof_forward 3
  1261. #define blr_eof_backward 4
  1262. #define blr_lock_relation 114
  1263. #define blr_lock_record 115
  1264. #define blr_set_bookmark 116
  1265. #define blr_get_bookmark 117
  1266. #define blr_rs_stream 119
  1267. #define blr_exec_proc 120
  1268. #define blr_begin_range 121
  1269. #define blr_end_range 122
  1270. #define blr_delete_range 123
  1271. #define blr_procedure 124
  1272. #define blr_pid 125
  1273. #define blr_exec_pid 126
  1274. #define blr_singular 127
  1275. #define blr_abort 128
  1276. #define blr_block 129
  1277. #define blr_error_handler 130
  1278. #define blr_cast 131
  1279. #define blr_release_lock 132
  1280. #define blr_release_locks 133
  1281. #define blr_start_savepoint 134
  1282. #define blr_end_savepoint 135
  1283. #define blr_find_dbkey 136
  1284. #define blr_range_relation 137
  1285. #define blr_delete_ranges 138
  1286. #define blr_plan 139
  1287. #define blr_merge 140
  1288. #define blr_join 141
  1289. #define blr_sequential 142
  1290. #define blr_navigational 143
  1291. #define blr_indices 144
  1292. #define blr_retrieve 145
  1293. #define blr_relation2 146
  1294. #define blr_rid2 147
  1295. #define blr_reset_stream 148
  1296. #define blr_release_bookmark 149
  1297. #define blr_set_generator 150
  1298. #define blr_ansi_any 151
  1299. #define blr_exists 152
  1300. #define blr_cardinality 153
  1301. #define blr_record_version 154 /* get tid of record */
  1302. #define blr_stall 155 /* fake server stall */
  1303. #define blr_seek_no_warn 156
  1304. #define blr_find_dbkey_version 157
  1305. #define blr_ansi_all 158
  1306. #define blr_extract 159
  1307. /* sub parameters for blr_extract */
  1308. #define blr_extract_year 0
  1309. #define blr_extract_month 1
  1310. #define blr_extract_day 2
  1311. #define blr_extract_hour 3
  1312. #define blr_extract_minute 4
  1313. #define blr_extract_second 5
  1314. #define blr_extract_weekday 6
  1315. #define blr_extract_yearday 7
  1316. #define blr_current_date 160
  1317. #define blr_current_timestamp 161
  1318. #define blr_current_time 162
  1319. /* These verbs were added in 6.0, primarily to support 64-bit integers */
  1320. #define blr_add2 163
  1321. #define blr_subtract2 164
  1322. #define blr_multiply2 165
  1323. #define blr_divide2 166
  1324. #define blr_agg_total2 167
  1325. #define blr_agg_total_distinct2 168
  1326. #define blr_agg_average2 169
  1327. #define blr_agg_average_distinct2 170
  1328. #define blr_average2 171
  1329. #define blr_gen_id2 172
  1330. #define blr_set_generator2 173
  1331. #endif /* _JRD_BLR_H_ */
  1332. /**********************************/
  1333. /* Database parameter block stuff */
  1334. /**********************************/
  1335. #define isc_dpb_version1 1
  1336. #define isc_dpb_cdd_pathname 1
  1337. #define isc_dpb_allocation 2
  1338. #define isc_dpb_journal 3
  1339. #define isc_dpb_page_size 4
  1340. #define isc_dpb_num_buffers 5
  1341. #define isc_dpb_buffer_length 6
  1342. #define isc_dpb_debug 7
  1343. #define isc_dpb_garbage_collect 8
  1344. #define isc_dpb_verify 9
  1345. #define isc_dpb_sweep 10
  1346. #define isc_dpb_enable_journal 11
  1347. #define isc_dpb_disable_journal 12
  1348. #define isc_dpb_dbkey_scope 13
  1349. #define isc_dpb_number_of_users 14
  1350. #define isc_dpb_trace 15
  1351. #define isc_dpb_no_garbage_collect 16
  1352. #define isc_dpb_damaged 17
  1353. #define isc_dpb_license 18
  1354. #define isc_dpb_sys_user_name 19
  1355. #define isc_dpb_encrypt_key 20
  1356. #define isc_dpb_activate_shadow 21
  1357. #define isc_dpb_sweep_interval 22
  1358. #define isc_dpb_delete_shadow 23
  1359. #define isc_dpb_force_write 24
  1360. #define isc_dpb_begin_log 25
  1361. #define isc_dpb_quit_log 26
  1362. #define isc_dpb_no_reserve 27
  1363. #define isc_dpb_user_name 28
  1364. #define isc_dpb_password 29
  1365. #define isc_dpb_password_enc 30
  1366. #define isc_dpb_sys_user_name_enc 31
  1367. #define isc_dpb_interp 32
  1368. #define isc_dpb_online_dump 33
  1369. #define isc_dpb_old_file_size 34
  1370. #define isc_dpb_old_num_files 35
  1371. #define isc_dpb_old_file 36
  1372. #define isc_dpb_old_start_page 37
  1373. #define isc_dpb_old_start_seqno 38
  1374. #define isc_dpb_old_start_file 39
  1375. #define isc_dpb_drop_walfile 40
  1376. #define isc_dpb_old_dump_id 41
  1377. #define isc_dpb_wal_backup_dir 42
  1378. #define isc_dpb_wal_chkptlen 43
  1379. #define isc_dpb_wal_numbufs 44
  1380. #define isc_dpb_wal_bufsize 45
  1381. #define isc_dpb_wal_grp_cmt_wait 46
  1382. #define isc_dpb_lc_messages 47
  1383. #define isc_dpb_lc_ctype 48
  1384. #define isc_dpb_cache_manager 49
  1385. #define isc_dpb_shutdown 50
  1386. #define isc_dpb_online 51
  1387. #define isc_dpb_shutdown_delay 52
  1388. #define isc_dpb_reserved 53
  1389. #define isc_dpb_overwrite 54
  1390. #define isc_dpb_sec_attach 55
  1391. #define isc_dpb_disable_wal 56
  1392. #define isc_dpb_connect_timeout 57
  1393. #define isc_dpb_dummy_packet_interval 58
  1394. #define isc_dpb_gbak_attach 59
  1395. #define isc_dpb_sql_role_name 60
  1396. #define isc_dpb_set_page_buffers 61
  1397. #define isc_dpb_working_directory 62
  1398. #define isc_dpb_SQL_dialect 63
  1399. #define isc_dpb_set_db_readonly 64
  1400. #define isc_dpb_set_db_SQL_dialect 65
  1401. #define isc_dpb_gfix_attach 66
  1402. #define isc_dpb_gstat_attach 67
  1403. /*********************************/
  1404. /* isc_dpb_verify specific flags */
  1405. /*********************************/
  1406. #define isc_dpb_pages 1
  1407. #define isc_dpb_records 2
  1408. #define isc_dpb_indices 4
  1409. #define isc_dpb_transactions 8
  1410. #define isc_dpb_no_update 16
  1411. #define isc_dpb_repair 32
  1412. #define isc_dpb_ignore 64
  1413. /***********************************/
  1414. /* isc_dpb_shutdown specific flags */
  1415. /***********************************/
  1416. #define isc_dpb_shut_cache 1
  1417. #define isc_dpb_shut_attachment 2
  1418. #define isc_dpb_shut_transaction 4
  1419. #define isc_dpb_shut_force 8
  1420. /**************************************/
  1421. /* Bit assignments in RDB$SYSTEM_FLAG */
  1422. /**************************************/
  1423. #define RDB_system 1
  1424. #define RDB_id_assigned 2
  1425. /*************************************/
  1426. /* Transaction parameter block stuff */
  1427. /*************************************/
  1428. #define isc_tpb_version1 1
  1429. #define isc_tpb_version3 3
  1430. #define isc_tpb_consistency 1
  1431. #define isc_tpb_concurrency 2
  1432. #define isc_tpb_shared 3
  1433. #define isc_tpb_protected 4
  1434. #define isc_tpb_exclusive 5
  1435. #define isc_tpb_wait 6
  1436. #define isc_tpb_nowait 7
  1437. #define isc_tpb_read 8
  1438. #define isc_tpb_write 9
  1439. #define isc_tpb_lock_read 10
  1440. #define isc_tpb_lock_write 11
  1441. #define isc_tpb_verb_time 12
  1442. #define isc_tpb_commit_time 13
  1443. #define isc_tpb_ignore_limbo 14
  1444. #define isc_tpb_read_committed 15
  1445. #define isc_tpb_autocommit 16
  1446. #define isc_tpb_rec_version 17
  1447. #define isc_tpb_no_rec_version 18
  1448. #define isc_tpb_restart_requests 19
  1449. #define isc_tpb_no_auto_undo 20
  1450. /************************/
  1451. /* Blob Parameter Block */
  1452. /************************/
  1453. #define isc_bpb_version1 1
  1454. #define isc_bpb_source_type 1
  1455. #define isc_bpb_target_type 2
  1456. #define isc_bpb_type 3
  1457. #define isc_bpb_source_interp 4
  1458. #define isc_bpb_target_interp 5
  1459. #define isc_bpb_filter_parameter 6
  1460. #define isc_bpb_type_segmented 0
  1461. #define isc_bpb_type_stream 1
  1462. /*********************************/
  1463. /* Service parameter block stuff */
  1464. /*********************************/
  1465. #define isc_spb_version1 1
  1466. #define isc_spb_current_version 2
  1467. #define isc_spb_version isc_spb_current_version
  1468. #define isc_spb_user_name isc_dpb_user_name
  1469. #define isc_spb_sys_user_name isc_dpb_sys_user_name
  1470. #define isc_spb_sys_user_name_enc isc_dpb_sys_user_name_enc
  1471. #define isc_spb_password isc_dpb_password
  1472. #define isc_spb_password_enc isc_dpb_password_enc
  1473. #define isc_spb_command_line 105
  1474. #define isc_spb_dbname 106
  1475. #define isc_spb_verbose 107
  1476. #define isc_spb_options 108
  1477. #define isc_spb_connect_timeout isc_dpb_connect_timeout
  1478. #define isc_spb_dummy_packet_interval isc_dpb_dummy_packet_interval
  1479. #define isc_spb_sql_role_name isc_dpb_sql_role_name
  1480. /*********************************/
  1481. /* Information call declarations */
  1482. /*********************************/
  1483. /****************************/
  1484. /* Common, structural codes */
  1485. /****************************/
  1486. #define isc_info_end 1
  1487. #define isc_info_truncated 2
  1488. #define isc_info_error 3
  1489. #define isc_info_data_not_ready 4
  1490. #define isc_info_flag_end 127
  1491. /******************************/
  1492. /* Database information items */
  1493. /******************************/
  1494. #define isc_info_db_id 4
  1495. #define isc_info_reads 5
  1496. #define isc_info_writes 6
  1497. #define isc_info_fetches 7
  1498. #define isc_info_marks 8
  1499. #define isc_info_implementation 11
  1500. #define isc_info_version 12
  1501. #define isc_info_base_level 13
  1502. #define isc_info_page_size 14
  1503. #define isc_info_num_buffers 15
  1504. #define isc_info_limbo 16
  1505. #define isc_info_current_memory 17
  1506. #define isc_info_max_memory 18
  1507. #define isc_info_window_turns 19
  1508. #define isc_info_license 20
  1509. #define isc_info_allocation 21
  1510. #define isc_info_attachment_id 22
  1511. #define isc_info_read_seq_count 23
  1512. #define isc_info_read_idx_count 24
  1513. #define isc_info_insert_count 25
  1514. #define isc_info_update_count 26
  1515. #define isc_info_delete_count 27
  1516. #define isc_info_backout_count 28
  1517. #define isc_info_purge_count 29
  1518. #define isc_info_expunge_count 30
  1519. #define isc_info_sweep_interval 31
  1520. #define isc_info_ods_version 32
  1521. #define isc_info_ods_minor_version 33
  1522. #define isc_info_no_reserve 34
  1523. #define isc_info_logfile 35
  1524. #define isc_info_cur_logfile_name 36
  1525. #define isc_info_cur_log_part_offset 37
  1526. #define isc_info_num_wal_buffers 38
  1527. #define isc_info_wal_buffer_size 39
  1528. #define isc_info_wal_ckpt_length 40
  1529. #define isc_info_wal_cur_ckpt_interval 41
  1530. #define isc_info_wal_prv_ckpt_fname 42
  1531. #define isc_info_wal_prv_ckpt_poffset 43
  1532. #define isc_info_wal_recv_ckpt_fname 44
  1533. #define isc_info_wal_recv_ckpt_poffset 45
  1534. #define isc_info_wal_grpc_wait_usecs 47
  1535. #define isc_info_wal_num_io 48
  1536. #define isc_info_wal_avg_io_size 49
  1537. #define isc_info_wal_num_commits 50
  1538. #define isc_info_wal_avg_grpc_size 51
  1539. #define isc_info_forced_writes 52
  1540. #define isc_info_user_names 53
  1541. #define isc_info_page_errors 54
  1542. #define isc_info_record_errors 55
  1543. #define isc_info_bpage_errors 56
  1544. #define isc_info_dpage_errors 57
  1545. #define isc_info_ipage_errors 58
  1546. #define isc_info_ppage_errors 59
  1547. #define isc_info_tpage_errors 60
  1548. #define isc_info_set_page_buffers 61
  1549. #define isc_info_db_SQL_dialect 62
  1550. #define isc_info_db_read_only 63
  1551. #define isc_info_db_size_in_pages 64
  1552. /**************************************/
  1553. /* Database information return values */
  1554. /**************************************/
  1555. #define isc_info_db_impl_rdb_vms 1
  1556. #define isc_info_db_impl_rdb_eln 2
  1557. #define isc_info_db_impl_rdb_eln_dev 3
  1558. #define isc_info_db_impl_rdb_vms_y 4
  1559. #define isc_info_db_impl_rdb_eln_y 5
  1560. #define isc_info_db_impl_jri 6
  1561. #define isc_info_db_impl_jsv 7
  1562. #define isc_info_db_impl_isc_a 25
  1563. #define isc_info_db_impl_isc_u 26
  1564. #define isc_info_db_impl_isc_v 27
  1565. #define isc_info_db_impl_isc_s 28
  1566. #define isc_info_db_impl_isc_apl_68K 25
  1567. #define isc_info_db_impl_isc_vax_ultr 26
  1568. #define isc_info_db_impl_isc_vms 27
  1569. #define isc_info_db_impl_isc_sun_68k 28
  1570. #define isc_info_db_impl_isc_os2 29
  1571. #define isc_info_db_impl_isc_sun4 30
  1572. #define isc_info_db_impl_isc_hp_ux 31
  1573. #define isc_info_db_impl_isc_sun_386i 32
  1574. #define isc_info_db_impl_isc_vms_orcl 33
  1575. #define isc_info_db_impl_isc_mac_aux 34
  1576. #define isc_info_db_impl_isc_rt_aix 35
  1577. #define isc_info_db_impl_isc_mips_ult 36
  1578. #define isc_info_db_impl_isc_xenix 37
  1579. #define isc_info_db_impl_isc_dg 38
  1580. #define isc_info_db_impl_isc_hp_mpexl 39
  1581. #define isc_info_db_impl_isc_hp_ux68K 40
  1582. #define isc_info_db_impl_isc_sgi 41
  1583. #define isc_info_db_impl_isc_sco_unix 42
  1584. #define isc_info_db_impl_isc_cray 43
  1585. #define isc_info_db_impl_isc_imp 44
  1586. #define isc_info_db_impl_isc_delta 45
  1587. #define isc_info_db_impl_isc_next 46
  1588. #define isc_info_db_impl_isc_dos 47
  1589. #define isc_info_db_impl_isc_winnt 48
  1590. #define isc_info_db_impl_isc_epson 49
  1591. #define isc_info_db_class_access 1
  1592. #define isc_info_db_class_y_valve 2
  1593. #define isc_info_db_class_rem_int 3
  1594. #define isc_info_db_class_rem_srvr 4
  1595. #define isc_info_db_class_pipe_int 7
  1596. #define isc_info_db_class_pipe_srvr 8
  1597. #define isc_info_db_class_sam_int 9
  1598. #define isc_info_db_class_sam_srvr 10
  1599. #define isc_info_db_class_gateway 11
  1600. #define isc_info_db_class_cache 12
  1601. /*****************************/
  1602. /* Request information items */
  1603. /*****************************/
  1604. #define isc_info_number_messages 4
  1605. #define isc_info_max_message 5
  1606. #define isc_info_max_send 6
  1607. #define isc_info_max_receive 7
  1608. #define isc_info_state 8
  1609. #define isc_info_message_number 9
  1610. #define isc_info_message_size 10
  1611. #define isc_info_request_cost 11
  1612. #define isc_info_access_path 12
  1613. #define isc_info_req_select_count 13
  1614. #define isc_info_req_insert_count 14
  1615. #define isc_info_req_update_count 15
  1616. #define isc_info_req_delete_count 16
  1617. /*********************/
  1618. /* Access path items */
  1619. /*********************/
  1620. #define isc_info_rsb_end 0
  1621. #define isc_info_rsb_begin 1
  1622. #define isc_info_rsb_type 2
  1623. #define isc_info_rsb_relation 3
  1624. #define isc_info_rsb_plan 4
  1625. /*************/
  1626. /* Rsb types */
  1627. /*************/
  1628. #define isc_info_rsb_unknown 1
  1629. #define isc_info_rsb_indexed 2
  1630. #define isc_info_rsb_navigate 3
  1631. #define isc_info_rsb_sequential 4
  1632. #define isc_info_rsb_cross 5
  1633. #define isc_info_rsb_sort 6
  1634. #define isc_info_rsb_first 7
  1635. #define isc_info_rsb_boolean 8
  1636. #define isc_info_rsb_union 9
  1637. #define isc_info_rsb_aggregate 10
  1638. #define isc_info_rsb_merge 11
  1639. #define isc_info_rsb_ext_sequential 12
  1640. #define isc_info_rsb_ext_indexed 13
  1641. #define isc_info_rsb_ext_dbkey 14
  1642. #define isc_info_rsb_left_cross 15
  1643. #define isc_info_rsb_select 16
  1644. #define isc_info_rsb_sql_join 17
  1645. #define isc_info_rsb_simulate 18
  1646. #define isc_info_rsb_sim_cross 19
  1647. #define isc_info_rsb_once 20
  1648. #define isc_info_rsb_procedure 21
  1649. /**********************/
  1650. /* Bitmap expressions */
  1651. /**********************/
  1652. #define isc_info_rsb_and 1
  1653. #define isc_info_rsb_or 2
  1654. #define isc_info_rsb_dbkey 3
  1655. #define isc_info_rsb_index 4
  1656. #define isc_info_req_active 2
  1657. #define isc_info_req_inactive 3
  1658. #define isc_info_req_send 4
  1659. #define isc_info_req_receive 5
  1660. #define isc_info_req_select 6
  1661. #define isc_info_req_sql_stall 7
  1662. /**************************/
  1663. /* Blob information items */
  1664. /**************************/
  1665. #define isc_info_blob_num_segments 4
  1666. #define isc_info_blob_max_segment 5
  1667. #define isc_info_blob_total_length 6
  1668. #define isc_info_blob_type 7
  1669. /*********************************/
  1670. /* Transaction information items */
  1671. /*********************************/
  1672. #define isc_info_tra_id 4
  1673. /*****************************
  1674. * Service action items *
  1675. *****************************/
  1676. #define isc_action_svc_backup 1 /* Starts database backup process on the server */
  1677. #define isc_action_svc_restore 2 /* Starts database restore process on the server */
  1678. #define isc_action_svc_repair 3 /* Starts database repair process on the server */
  1679. #define isc_action_svc_add_user 4 /* Adds a new user to the security database */
  1680. #define isc_action_svc_delete_user 5 /* Deletes a user record from the security database */
  1681. #define isc_action_svc_modify_user 6 /* Modifies a user record in the security database */
  1682. #define isc_action_svc_display_user 7 /* Displays a user record from the security database */
  1683. #define isc_action_svc_properties 8 /* Sets database properties */
  1684. #define isc_action_svc_add_license 9 /* Adds a license to the license file */
  1685. #define isc_action_svc_remove_license 10 /* Removes a license from the license file */
  1686. #define isc_action_svc_db_stats 11 /* Retrieves database statistics */
  1687. #define isc_action_svc_get_ib_log 12 /* Retrieves the InterBase log file from the server */
  1688. /*****************************
  1689. * Service information items *
  1690. *****************************/
  1691. #define isc_info_svc_svr_db_info 50 /* Retrieves the number of attachments and databases */
  1692. #define isc_info_svc_get_license 51 /* Retrieves all license keys and IDs from the license file */
  1693. #define isc_info_svc_get_license_mask 52 /* Retrieves a bitmask representing licensed options on the server */
  1694. #define isc_info_svc_get_config 53 /* Retrieves the parameters and values for IB_CONFIG */
  1695. #define isc_info_svc_version 54 /* Retrieves the version of the services manager */
  1696. #define isc_info_svc_server_version 55 /* Retrieves the version of the InterBase server */
  1697. #define isc_info_svc_implementation 56 /* Retrieves the implementation of the InterBase server */
  1698. #define isc_info_svc_capabilities 57 /* Retrieves a bitmask representing the server's capabilities */
  1699. #define isc_info_svc_user_dbpath 58 /* Retrieves the path to the security database in use by the server */
  1700. #define isc_info_svc_get_env 59 /* Retrieves the setting of $INTERBASE */
  1701. #define isc_info_svc_get_env_lock 60 /* Retrieves the setting of $INTERBASE_LCK */
  1702. #define isc_info_svc_get_env_msg 61 /* Retrieves the setting of $INTERBASE_MSG */
  1703. #define isc_info_svc_line 62 /* Retrieves 1 line of service output per call */
  1704. #define isc_info_svc_to_eof 63 /* Retrieves as much of the server output as will fit in the supplied buffer */
  1705. #define isc_info_svc_timeout 64 /* Sets / signifies a timeout value for reading service information */
  1706. #define isc_info_svc_get_licensed_users 65 /* Retrieves the number of users licensed for accessing the server */
  1707. #define isc_info_svc_limbo_trans 66 /* Retrieve the limbo transactions */
  1708. #define isc_info_svc_running 67 /* Checks to see if a service is running on an attachment */
  1709. #define isc_info_svc_get_users 68 /* Returns the user information from isc_action_svc_display_users */
  1710. /******************************************************
  1711. * Parameters for isc_action_{add|delete|modify)_user *
  1712. ******************************************************/
  1713. #define isc_spb_sec_userid 5
  1714. #define isc_spb_sec_groupid 6
  1715. #define isc_spb_sec_username 7
  1716. #define isc_spb_sec_password 8
  1717. #define isc_spb_sec_groupname 9
  1718. #define isc_spb_sec_firstname 10
  1719. #define isc_spb_sec_middlename 11
  1720. #define isc_spb_sec_lastname 12
  1721. /*******************************************************
  1722. * Parameters for isc_action_svc_(add|remove)_license, *
  1723. * isc_info_svc_get_license *
  1724. *******************************************************/
  1725. #define isc_spb_lic_key 5
  1726. #define isc_spb_lic_id 6
  1727. #define isc_spb_lic_desc 7
  1728. /*****************************************
  1729. * Parameters for isc_action_svc_backup *
  1730. *****************************************/
  1731. #define isc_spb_bkp_file 5
  1732. #define isc_spb_bkp_factor 6
  1733. #define isc_spb_bkp_length 7
  1734. #define isc_spb_bkp_ignore_checksums 0x01
  1735. #define isc_spb_bkp_ignore_limbo 0x02
  1736. #define isc_spb_bkp_metadata_only 0x04
  1737. #define isc_spb_bkp_no_garbage_collect 0x08
  1738. #define isc_spb_bkp_old_descriptions 0x10
  1739. #define isc_spb_bkp_non_transportable 0x20
  1740. #define isc_spb_bkp_convert 0x40
  1741. #define isc_spb_bkp_expand 0x80
  1742. /********************************************
  1743. * Parameters for isc_action_svc_properties *
  1744. ********************************************/
  1745. #define isc_spb_prp_page_buffers 5
  1746. #define isc_spb_prp_sweep_interval 6
  1747. #define isc_spb_prp_shutdown_db 7
  1748. #define isc_spb_prp_deny_new_attachments 9
  1749. #define isc_spb_prp_deny_new_transactions 10
  1750. #define isc_spb_prp_reserve_space 11
  1751. #define isc_spb_prp_write_mode 12
  1752. #define isc_spb_prp_access_mode 13
  1753. #define isc_spb_prp_set_sql_dialect 14
  1754. #define isc_spb_prp_activate 0x0100
  1755. #define isc_spb_prp_db_online 0x0200
  1756. /********************************************
  1757. * Parameters for isc_spb_prp_reserve_space *
  1758. ********************************************/
  1759. #define isc_spb_prp_res_use_full 35
  1760. #define isc_spb_prp_res 36
  1761. /******************************************
  1762. * Parameters for isc_spb_prp_write_mode *
  1763. ******************************************/
  1764. #define isc_spb_prp_wm_async 37
  1765. #define isc_spb_prp_wm_sync 38
  1766. /******************************************
  1767. * Parameters for isc_spb_prp_access_mode *
  1768. ******************************************/
  1769. #define isc_spb_prp_am_readonly 39
  1770. #define isc_spb_prp_am_readwrite 40
  1771. /*****************************************
  1772. * Parameters for isc_action_svc_repair *
  1773. *****************************************/
  1774. #define isc_spb_rpr_commit_trans 15
  1775. #define isc_spb_rpr_rollback_trans 34
  1776. #define isc_spb_rpr_recover_two_phase 17
  1777. #define isc_spb_tra_id 18
  1778. #define isc_spb_single_tra_id 19
  1779. #define isc_spb_multi_tra_id 20
  1780. #define isc_spb_tra_state 21
  1781. #define isc_spb_tra_state_limbo 22
  1782. #define isc_spb_tra_state_commit 23
  1783. #define isc_spb_tra_state_rollback 24
  1784. #define isc_spb_tra_state_unknown 25
  1785. #define isc_spb_tra_host_site 26
  1786. #define isc_spb_tra_remote_site 27
  1787. #define isc_spb_tra_db_path 28
  1788. #define isc_spb_tra_advise 29
  1789. #define isc_spb_tra_advise_commit 30
  1790. #define isc_spb_tra_advise_rollback 31
  1791. #define isc_spb_tra_advise_unknown 33
  1792. #define isc_spb_rpr_validate_db 0x01
  1793. #define isc_spb_rpr_sweep_db 0x02
  1794. #define isc_spb_rpr_mend_db 0x04
  1795. #define isc_spb_rpr_list_limbo_trans 0x08
  1796. #define isc_spb_rpr_check_db 0x10
  1797. #define isc_spb_rpr_ignore_checksum 0x20
  1798. #define isc_spb_rpr_kill_shadows 0x40
  1799. #define isc_spb_rpr_full 0x80
  1800. /*****************************************
  1801. * Parameters for isc_action_svc_restore *
  1802. *****************************************/
  1803. #define isc_spb_res_buffers 9
  1804. #define isc_spb_res_page_size 10
  1805. #define isc_spb_res_length 11
  1806. #define isc_spb_res_access_mode 12
  1807. #define isc_spb_res_deactivate_idx 0x0100
  1808. #define isc_spb_res_no_shadow 0x0200
  1809. #define isc_spb_res_no_validity 0x0400
  1810. #define isc_spb_res_one_at_a_time 0x0800
  1811. #define isc_spb_res_replace 0x1000
  1812. #define isc_spb_res_create 0x2000
  1813. #define isc_spb_res_use_all_space 0x4000
  1814. /******************************************
  1815. * Parameters for isc_spb_res_access_mode *
  1816. ******************************************/
  1817. #define isc_spb_res_am_readonly isc_spb_prp_am_readonly
  1818. #define isc_spb_res_am_readwrite isc_spb_prp_am_readwrite
  1819. /*******************************************
  1820. * Parameters for isc_info_svc_svr_db_info *
  1821. *******************************************/
  1822. #define isc_spb_num_att 5
  1823. #define isc_spb_num_db 6
  1824. /*****************************************
  1825. * Parameters for isc_info_svc_db_stats *
  1826. *****************************************/
  1827. #define isc_spb_sts_data_pages 0x01
  1828. #define isc_spb_sts_db_log 0x02
  1829. #define isc_spb_sts_hdr_pages 0x04
  1830. #define isc_spb_sts_idx_pages 0x08
  1831. #define isc_spb_sts_sys_relations 0x10
  1832. /*************************/
  1833. /* SQL information items */
  1834. /*************************/
  1835. #define isc_info_sql_select 4
  1836. #define isc_info_sql_bind 5
  1837. #define isc_info_sql_num_variables 6
  1838. #define isc_info_sql_describe_vars 7
  1839. #define isc_info_sql_describe_end 8
  1840. #define isc_info_sql_sqlda_seq 9
  1841. #define isc_info_sql_message_seq 10
  1842. #define isc_info_sql_type 11
  1843. #define isc_info_sql_sub_type 12
  1844. #define isc_info_sql_scale 13
  1845. #define isc_info_sql_length 14
  1846. #define isc_info_sql_null_ind 15
  1847. #define isc_info_sql_field 16
  1848. #define isc_info_sql_relation 17
  1849. #define isc_info_sql_owner 18
  1850. #define isc_info_sql_alias 19
  1851. #define isc_info_sql_sqlda_start 20
  1852. #define isc_info_sql_stmt_type 21
  1853. #define isc_info_sql_get_plan 22
  1854. #define isc_info_sql_records 23
  1855. #define isc_info_sql_batch_fetch 24
  1856. /*********************************/
  1857. /* SQL information return values */
  1858. /*********************************/
  1859. #define isc_info_sql_stmt_select 1
  1860. #define isc_info_sql_stmt_insert 2
  1861. #define isc_info_sql_stmt_update 3
  1862. #define isc_info_sql_stmt_delete 4
  1863. #define isc_info_sql_stmt_ddl 5
  1864. #define isc_info_sql_stmt_get_segment 6
  1865. #define isc_info_sql_stmt_put_segment 7
  1866. #define isc_info_sql_stmt_exec_procedure 8
  1867. #define isc_info_sql_stmt_start_trans 9
  1868. #define isc_info_sql_stmt_commit 10
  1869. #define isc_info_sql_stmt_rollback 11
  1870. #define isc_info_sql_stmt_select_for_upd 12
  1871. #define isc_info_sql_stmt_set_generator 13
  1872. /***********************************/
  1873. /* Server configuration key values */
  1874. /***********************************/
  1875. #define ISCCFG_LOCKMEM_KEY 0
  1876. #define ISCCFG_LOCKSEM_KEY 1
  1877. #define ISCCFG_LOCKSIG_KEY 2
  1878. #define ISCCFG_EVNTMEM_KEY 3
  1879. #define ISCCFG_DBCACHE_KEY 4
  1880. #define ISCCFG_PRIORITY_KEY 5
  1881. #define ISCCFG_IPCMAP_KEY 6
  1882. #define ISCCFG_MEMMIN_KEY 7
  1883. #define ISCCFG_MEMMAX_KEY 8
  1884. #define ISCCFG_LOCKORDER_KEY 9
  1885. #define ISCCFG_ANYLOCKMEM_KEY 10
  1886. #define ISCCFG_ANYLOCKSEM_KEY 11
  1887. #define ISCCFG_ANYLOCKSIG_KEY 12
  1888. #define ISCCFG_ANYEVNTMEM_KEY 13
  1889. #define ISCCFG_LOCKHASH_KEY 14
  1890. #define ISCCFG_DEADLOCK_KEY 15
  1891. #define ISCCFG_LOCKSPIN_KEY 16
  1892. #define ISCCFG_CONN_TIMEOUT_KEY 17
  1893. #define ISCCFG_DUMMY_INTRVL_KEY 18
  1894. #define ISCCFG_TRACE_POOLS_KEY 19 /* Internal Use only */
  1895. #define ISCCFG_REMOTE_BUFFER_KEY 20
  1896. /***************/
  1897. /* Error codes */
  1898. /***************/
  1899. #define isc_facility 20
  1900. #define isc_err_base 335544320L
  1901. #define isc_err_factor 1
  1902. #define isc_arg_end 0
  1903. #define isc_arg_gds 1
  1904. #define isc_arg_string 2
  1905. #define isc_arg_cstring 3
  1906. #define isc_arg_number 4
  1907. #define isc_arg_interpreted 5
  1908. #define isc_arg_vms 6
  1909. #define isc_arg_unix 7
  1910. #define isc_arg_domain 8
  1911. #define isc_arg_dos 9
  1912. #define isc_arg_mpexl 10
  1913. #define isc_arg_mpexl_ipc 11
  1914. #define isc_arg_next_mach 15
  1915. #define isc_arg_netware 16
  1916. #define isc_arg_win32 17
  1917. #define isc_arg_warning 18
  1918. #include <iberror.h>
  1919. /**********************************************/
  1920. /* Dynamic Data Definition Language operators */
  1921. /**********************************************/
  1922. /******************/
  1923. /* Version number */
  1924. /******************/
  1925. #define isc_dyn_version_1 1
  1926. #define isc_dyn_eoc 255
  1927. /******************************/
  1928. /* Operations (may be nested) */
  1929. /******************************/
  1930. #define isc_dyn_begin 2
  1931. #define isc_dyn_end 3
  1932. #define isc_dyn_if 4
  1933. #define isc_dyn_def_database 5
  1934. #define isc_dyn_def_global_fld 6
  1935. #define isc_dyn_def_local_fld 7
  1936. #define isc_dyn_def_idx 8
  1937. #define isc_dyn_def_rel 9
  1938. #define isc_dyn_def_sql_fld 10
  1939. #define isc_dyn_def_view 12
  1940. #define isc_dyn_def_trigger 15
  1941. #define isc_dyn_def_security_class 120
  1942. #define isc_dyn_def_dimension 140
  1943. #define isc_dyn_def_generator 24
  1944. #define isc_dyn_def_function 25
  1945. #define isc_dyn_def_filter 26
  1946. #define isc_dyn_def_function_arg 27
  1947. #define isc_dyn_def_shadow 34
  1948. #define isc_dyn_def_trigger_msg 17
  1949. #define isc_dyn_def_file 36
  1950. #define isc_dyn_mod_database 39
  1951. #define isc_dyn_mod_rel 11
  1952. #define isc_dyn_mod_global_fld 13
  1953. #define isc_dyn_mod_idx 102
  1954. #define isc_dyn_mod_local_fld 14
  1955. #define isc_dyn_mod_sql_fld 216
  1956. #define isc_dyn_mod_view 16
  1957. #define isc_dyn_mod_security_class 122
  1958. #define isc_dyn_mod_trigger 113
  1959. #define isc_dyn_mod_trigger_msg 28
  1960. #define isc_dyn_delete_database 18
  1961. #define isc_dyn_delete_rel 19
  1962. #define isc_dyn_delete_global_fld 20
  1963. #define isc_dyn_delete_local_fld 21
  1964. #define isc_dyn_delete_idx 22
  1965. #define isc_dyn_delete_security_class 123
  1966. #define isc_dyn_delete_dimensions 143
  1967. #define isc_dyn_delete_trigger 23
  1968. #define isc_dyn_delete_trigger_msg 29
  1969. #define isc_dyn_delete_filter 32
  1970. #define isc_dyn_delete_function 33
  1971. #define isc_dyn_delete_shadow 35
  1972. #define isc_dyn_grant 30
  1973. #define isc_dyn_revoke 31
  1974. #define isc_dyn_def_primary_key 37
  1975. #define isc_dyn_def_foreign_key 38
  1976. #define isc_dyn_def_unique 40
  1977. #define isc_dyn_def_procedure 164
  1978. #define isc_dyn_delete_procedure 165
  1979. #define isc_dyn_def_parameter 135
  1980. #define isc_dyn_delete_parameter 136
  1981. #define isc_dyn_mod_procedure 175
  1982. #define isc_dyn_def_log_file 176
  1983. #define isc_dyn_def_cache_file 180
  1984. #define isc_dyn_def_exception 181
  1985. #define isc_dyn_mod_exception 182
  1986. #define isc_dyn_del_exception 183
  1987. #define isc_dyn_drop_log 194
  1988. #define isc_dyn_drop_cache 195
  1989. #define isc_dyn_def_default_log 202
  1990. /***********************/
  1991. /* View specific stuff */
  1992. /***********************/
  1993. #define isc_dyn_view_blr 43
  1994. #define isc_dyn_view_source 44
  1995. #define isc_dyn_view_relation 45
  1996. #define isc_dyn_view_context 46
  1997. #define isc_dyn_view_context_name 47
  1998. /**********************/
  1999. /* Generic attributes */
  2000. /**********************/
  2001. #define isc_dyn_rel_name 50
  2002. #define isc_dyn_fld_name 51
  2003. #define isc_dyn_new_fld_name 215
  2004. #define isc_dyn_idx_name 52
  2005. #define isc_dyn_description 53
  2006. #define isc_dyn_security_class 54
  2007. #define isc_dyn_system_flag 55
  2008. #define isc_dyn_update_flag 56
  2009. #define isc_dyn_prc_name 166
  2010. #define isc_dyn_prm_name 137
  2011. #define isc_dyn_sql_object 196
  2012. #define isc_dyn_fld_character_set_name 174
  2013. /********************************/
  2014. /* Relation specific attributes */
  2015. /********************************/
  2016. #define isc_dyn_rel_dbkey_length 61
  2017. #define isc_dyn_rel_store_trig 62
  2018. #define isc_dyn_rel_modify_trig 63
  2019. #define isc_dyn_rel_erase_trig 64
  2020. #define isc_dyn_rel_store_trig_source 65
  2021. #define isc_dyn_rel_modify_trig_source 66
  2022. #define isc_dyn_rel_erase_trig_source 67
  2023. #define isc_dyn_rel_ext_file 68
  2024. #define isc_dyn_rel_sql_protection 69
  2025. #define isc_dyn_rel_constraint 162
  2026. #define isc_dyn_delete_rel_constraint 163
  2027. /************************************/
  2028. /* Global field specific attributes */
  2029. /************************************/
  2030. #define isc_dyn_fld_type 70
  2031. #define isc_dyn_fld_length 71
  2032. #define isc_dyn_fld_scale 72
  2033. #define isc_dyn_fld_sub_type 73
  2034. #define isc_dyn_fld_segment_length 74
  2035. #define isc_dyn_fld_query_header 75
  2036. #define isc_dyn_fld_edit_string 76
  2037. #define isc_dyn_fld_validation_blr 77
  2038. #define isc_dyn_fld_validation_source 78
  2039. #define isc_dyn_fld_computed_blr 79
  2040. #define isc_dyn_fld_computed_source 80
  2041. #define isc_dyn_fld_missing_value 81
  2042. #define isc_dyn_fld_default_value 82
  2043. #define isc_dyn_fld_query_name 83
  2044. #define isc_dyn_fld_dimensions 84
  2045. #define isc_dyn_fld_not_null 85
  2046. #define isc_dyn_fld_precision 86
  2047. #define isc_dyn_fld_char_length 172
  2048. #define isc_dyn_fld_collation 173
  2049. #define isc_dyn_fld_default_source 193
  2050. #define isc_dyn_del_default 197
  2051. #define isc_dyn_del_validation 198
  2052. #define isc_dyn_single_validation 199
  2053. #define isc_dyn_fld_character_set 203
  2054. /***********************************/
  2055. /* Local field specific attributes */
  2056. /***********************************/
  2057. #define isc_dyn_fld_source 90
  2058. #define isc_dyn_fld_base_fld 91
  2059. #define isc_dyn_fld_position 92
  2060. #define isc_dyn_fld_update_flag 93
  2061. /*****************************/
  2062. /* Index specific attributes */
  2063. /*****************************/
  2064. #define isc_dyn_idx_unique 100
  2065. #define isc_dyn_idx_inactive 101
  2066. #define isc_dyn_idx_type 103
  2067. #define isc_dyn_idx_foreign_key 104
  2068. #define isc_dyn_idx_ref_column 105
  2069. #define isc_dyn_idx_statistic 204
  2070. /*******************************/
  2071. /* Trigger specific attributes */
  2072. /*******************************/
  2073. #define isc_dyn_trg_type 110
  2074. #define isc_dyn_trg_blr 111
  2075. #define isc_dyn_trg_source 112
  2076. #define isc_dyn_trg_name 114
  2077. #define isc_dyn_trg_sequence 115
  2078. #define isc_dyn_trg_inactive 116
  2079. #define isc_dyn_trg_msg_number 117
  2080. #define isc_dyn_trg_msg 118
  2081. /**************************************/
  2082. /* Security Class specific attributes */
  2083. /**************************************/
  2084. #define isc_dyn_scl_acl 121
  2085. #define isc_dyn_grant_user 130
  2086. #define isc_dyn_grant_proc 186
  2087. #define isc_dyn_grant_trig 187
  2088. #define isc_dyn_grant_view 188
  2089. #define isc_dyn_grant_options 132
  2090. #define isc_dyn_grant_user_group 205
  2091. /**********************************/
  2092. /* Dimension specific information */
  2093. /**********************************/
  2094. #define isc_dyn_dim_lower 141
  2095. #define isc_dyn_dim_upper 142
  2096. /****************************/
  2097. /* File specific attributes */
  2098. /****************************/
  2099. #define isc_dyn_file_name 125
  2100. #define isc_dyn_file_start 126
  2101. #define isc_dyn_file_length 127
  2102. #define isc_dyn_shadow_number 128
  2103. #define isc_dyn_shadow_man_auto 129
  2104. #define isc_dyn_shadow_conditional 130
  2105. /********************************/
  2106. /* Log file specific attributes */
  2107. /********************************/
  2108. #define isc_dyn_log_file_sequence 177
  2109. #define isc_dyn_log_file_partitions 178
  2110. #define isc_dyn_log_file_serial 179
  2111. #define isc_dyn_log_file_overflow 200
  2112. #define isc_dyn_log_file_raw 201
  2113. /***************************/
  2114. /* Log specific attributes */
  2115. /***************************/
  2116. #define isc_dyn_log_group_commit_wait 189
  2117. #define isc_dyn_log_buffer_size 190
  2118. #define isc_dyn_log_check_point_length 191
  2119. #define isc_dyn_log_num_of_buffers 192
  2120. /********************************/
  2121. /* Function specific attributes */
  2122. /********************************/
  2123. #define isc_dyn_function_name 145
  2124. #define isc_dyn_function_type 146
  2125. #define isc_dyn_func_module_name 147
  2126. #define isc_dyn_func_entry_point 148
  2127. #define isc_dyn_func_return_argument 149
  2128. #define isc_dyn_func_arg_position 150
  2129. #define isc_dyn_func_mechanism 151
  2130. #define isc_dyn_filter_in_subtype 152
  2131. #define isc_dyn_filter_out_subtype 153
  2132. #define isc_dyn_description2 154
  2133. #define isc_dyn_fld_computed_source2 155
  2134. #define isc_dyn_fld_edit_string2 156
  2135. #define isc_dyn_fld_query_header2 157
  2136. #define isc_dyn_fld_validation_source2 158
  2137. #define isc_dyn_trg_msg2 159
  2138. #define isc_dyn_trg_source2 160
  2139. #define isc_dyn_view_source2 161
  2140. #define isc_dyn_xcp_msg2 184
  2141. /*********************************/
  2142. /* Generator specific attributes */
  2143. /*********************************/
  2144. #define isc_dyn_generator_name 95
  2145. #define isc_dyn_generator_id 96
  2146. /*********************************/
  2147. /* Procedure specific attributes */
  2148. /*********************************/
  2149. #define isc_dyn_prc_inputs 167
  2150. #define isc_dyn_prc_outputs 168
  2151. #define isc_dyn_prc_source 169
  2152. #define isc_dyn_prc_blr 170
  2153. #define isc_dyn_prc_source2 171
  2154. /*********************************/
  2155. /* Parameter specific attributes */
  2156. /*********************************/
  2157. #define isc_dyn_prm_number 138
  2158. #define isc_dyn_prm_type 139
  2159. /********************************/
  2160. /* Relation specific attributes */
  2161. /********************************/
  2162. #define isc_dyn_xcp_msg 185
  2163. /**********************************************/
  2164. /* Cascading referential integrity values */
  2165. /**********************************************/
  2166. #define isc_dyn_foreign_key_update 205
  2167. #define isc_dyn_foreign_key_delete 206
  2168. #define isc_dyn_foreign_key_cascade 207
  2169. #define isc_dyn_foreign_key_default 208
  2170. #define isc_dyn_foreign_key_null 209
  2171. #define isc_dyn_foreign_key_none 210
  2172. /***********************/
  2173. /* SQL role values */
  2174. /***********************/
  2175. #define isc_dyn_def_sql_role 211
  2176. #define isc_dyn_sql_role_name 212
  2177. #define isc_dyn_grant_admin_options 213
  2178. #define isc_dyn_del_sql_role 214
  2179. /****************************/
  2180. /* Last $dyn value assigned */
  2181. /****************************/
  2182. #define isc_dyn_last_dyn_value 216
  2183. /******************************************/
  2184. /* Array slice description language (SDL) */
  2185. /******************************************/
  2186. #define isc_sdl_version1 1
  2187. #define isc_sdl_eoc 255
  2188. #define isc_sdl_relation 2
  2189. #define isc_sdl_rid 3
  2190. #define isc_sdl_field 4
  2191. #define isc_sdl_fid 5
  2192. #define isc_sdl_struct 6
  2193. #define isc_sdl_variable 7
  2194. #define isc_sdl_scalar 8
  2195. #define isc_sdl_tiny_integer 9
  2196. #define isc_sdl_short_integer 10
  2197. #define isc_sdl_long_integer 11
  2198. #define isc_sdl_literal 12
  2199. #define isc_sdl_add 13
  2200. #define isc_sdl_subtract 14
  2201. #define isc_sdl_multiply 15
  2202. #define isc_sdl_divide 16
  2203. #define isc_sdl_negate 17
  2204. #define isc_sdl_eql 18
  2205. #define isc_sdl_neq 19
  2206. #define isc_sdl_gtr 20
  2207. #define isc_sdl_geq 21
  2208. #define isc_sdl_lss 22
  2209. #define isc_sdl_leq 23
  2210. #define isc_sdl_and 24
  2211. #define isc_sdl_or 25
  2212. #define isc_sdl_not 26
  2213. #define isc_sdl_while 27
  2214. #define isc_sdl_assignment 28
  2215. #define isc_sdl_label 29
  2216. #define isc_sdl_leave 30
  2217. #define isc_sdl_begin 31
  2218. #define isc_sdl_end 32
  2219. #define isc_sdl_do3 33
  2220. #define isc_sdl_do2 34
  2221. #define isc_sdl_do1 35
  2222. #define isc_sdl_element 36
  2223. /********************************************/
  2224. /* International text interpretation values */
  2225. /********************************************/
  2226. #define isc_interp_eng_ascii 0
  2227. #define isc_interp_jpn_sjis 5
  2228. #define isc_interp_jpn_euc 6
  2229. /*******************/
  2230. /* SQL definitions */
  2231. /*******************/
  2232. #define SQL_TEXT 452
  2233. #define SQL_VARYING 448
  2234. #define SQL_SHORT 500
  2235. #define SQL_LONG 496
  2236. #define SQL_FLOAT 482
  2237. #define SQL_DOUBLE 480
  2238. #define SQL_D_FLOAT 530
  2239. #define SQL_TIMESTAMP 510
  2240. #define SQL_BLOB 520
  2241. #define SQL_ARRAY 540
  2242. #define SQL_QUAD 550
  2243. #define SQL_TYPE_TIME 560
  2244. #define SQL_TYPE_DATE 570
  2245. #define SQL_INT64 580
  2246. /* Historical alias for pre V6 applications */
  2247. #define SQL_DATE SQL_TIMESTAMP
  2248. /*****************/
  2249. /* Blob Subtypes */
  2250. /*****************/
  2251. /* types less than zero are reserved for customer use */
  2252. #define isc_blob_untyped 0
  2253. /* internal subtypes */
  2254. #define isc_blob_text 1
  2255. #define isc_blob_blr 2
  2256. #define isc_blob_acl 3
  2257. #define isc_blob_ranges 4
  2258. #define isc_blob_summary 5
  2259. #define isc_blob_format 6
  2260. #define isc_blob_tra 7
  2261. #define isc_blob_extfile 8
  2262. /* the range 20-30 is reserved for dBASE and Paradox types */
  2263. #define isc_blob_formatted_memo 20
  2264. #define isc_blob_paradox_ole 21
  2265. #define isc_blob_graphic 22
  2266. #define isc_blob_dbase_ole 23
  2267. #define isc_blob_typed_binary 24
  2268. #endif /* _JRD_IBASE_H_ */