1--  This file is covered by the Internet Software Consortium (ISC) License
2--  Reference: ../License.txt
3
4package AdaBase is
5
6   pragma Pure;
7
8   type Error_Modes      is (silent, warning, raise_exception);
9   type Case_Modes       is (lower_case, natural_case, upper_case);
10   type Trax_Isolation   is (read_uncommitted, read_committed, repeatable_read,
11                             serializable);
12   type Log_Category     is (connecting, disconnecting, transaction, execution,
13                             statement_preparation, statement_execution,
14                             miscellaneous, note);
15   type Driver_Type      is (foundation, driver_mysql, driver_postgresql,
16                             driver_sqlite, driver_firebird);
17   type Null_Priority    is (native, nulls_first, nulls_last);
18   type ISO_Keyword_List is array (Trax_Isolation) of String (1 .. 16);
19   type Trax_ID          is mod 2 ** 64;
20
21   subtype BLOB_Maximum  is Positive range 2 ** 12 .. 2 ** 30;
22   subtype SQL_State     is String (1 .. 5);
23   subtype Driver_Codes  is Integer range -999 .. 4999;
24   subtype Posix_Port    is Natural range 0 .. 65535;
25   subtype Affected_Rows is Trax_ID;
26
27   ISO_Keywords : constant ISO_Keyword_List :=
28     ("READ UNCOMMITTED",
29      "READ COMMITTED  ",
30      "REPEATABLE READ ",
31      "SERIALIZABLE    ");
32
33   blankstring : constant String      := "";
34   stateless   : constant SQL_State   := "     ";
35   portless    : constant Posix_Port  := 0;
36
37   type field_types is (ft_nbyte0, ft_nbyte1, ft_nbyte2, ft_nbyte3, ft_nbyte4,
38                        ft_nbyte8, ft_byte1, ft_byte2, ft_byte3, ft_byte4,
39                        ft_byte8, ft_real9, ft_real18, ft_textual, ft_widetext,
40                        ft_supertext, ft_timestamp, ft_chain, ft_enumtype,
41                        ft_settype, ft_bits, ft_utf8, ft_geometry);
42
43   ERRMODE_EXCEPTION : exception;
44
45end AdaBase;
46