Skip to main content

odbc_sys/
info_type.rs

1/// Information requested by SQLGetInfo
2#[repr(u16)]
3#[derive(Debug, PartialEq, Eq, Clone, Copy)]
4pub enum InfoType {
5    MaxDriverConnections = 0,
6    MaxConcurrentActivities = 1,
7    DataSourceName = 2,
8    /// `SQL_DRIVER_NAME`. The name of the driver implementation file.
9    DriverName = 6,
10    /// `SQL_DRIVER_VER`. The version of the driver, in the form "MM.mm.rrrr".
11    DriverVer = 7,
12    // FetchDirection = 8, Deprecated in ODBC 3
13    ServerName = 13,
14    SearchPatternEscape = 14,
15    DbmsName = 17,
16    DbmsVer = 18,
17    AccessibleTables = 19,
18    AccessibleProcedures = 20,
19    /// `SQL_CONCAT_NULL_BEHAVIOR`. How the data source handles concatenation of
20    /// NULL-valued character columns with non-NULL valued character columns.
21    ConcatNullBehavior = 22,
22    CursorCommitBehaviour = 23,
23    DataSourceReadOnly = 25,
24    DefaultTxnIsolation = 26,
25    /// `SQL_EXPRESSIONS_IN_ORDERBY`. Whether the data source supports expressions
26    /// in the ORDER BY list ("Y" or "N").
27    ExpressionsInOrderBy = 27,
28    IdentifierCase = 28,
29    IdentifierQuoteChar = 29,
30    MaxColumnNameLen = 30,
31    MaxCursorNameLen = 31,
32    MaxSchemaNameLen = 32,
33    MaxCatalogNameLen = 34,
34    MaxTableNameLen = 35,
35    /// `SQL_MULT_RESULT_SETS`. Whether the data source supports multiple result
36    /// sets ("Y" or "N").
37    MultResultSets = 36,
38    /// `SQL_OUTER_JOINS` (ODBC 2.x). Replaced by `OuterJoinCapabilities` in
39    /// ODBC 3.x, but some Driver Managers still query this value.
40    OuterJoins = 38,
41    /// `SQL_SCHEMA_TERM` (also known as `SQL_OWNER_TERM` in ODBC 2.x). The data
42    /// source vendor's name for a schema (e.g. "schema", "owner").
43    SchemaTerm = 39,
44    /// `SQL_CATALOG_NAME_SEPARATOR` (also known as `SQL_QUALIFIER_NAME_SEPARATOR`
45    /// in ODBC 2.x). The character used as a separator between a catalog name and
46    /// the qualified name element that follows or precedes it.
47    CatalogNameSeparator = 41,
48    /// `SQL_CATALOG_TERM` (also known as `SQL_QUALIFIER_TERM` in ODBC 2.x). The
49    /// data source vendor's name for a catalog (e.g. "catalog", "database").
50    CatalogTerm = 42,
51    // ScrollConcurrency = 43, deprecated in ODBC 3
52    /// `SQL_SCROLL_OPTIONS` C-API places this in the extended header. Lists the supported cursor
53    /// types (forward-only, static, keyset-driven, dynamic, or mixed). All data sources must
54    /// support forward-only cursors. See:
55    /// <https://learn.microsoft.com/sql/odbc/reference/develop-app/determining-cursor-capabilities>
56    ScrollOptions = 44,
57    TransactionCapable = 46,
58    UserName = 47,
59    /// `SQL_CONVERT_FUNCTIONS`. The scalar conversion functions supported by the
60    /// driver and data source (bitmask: `SQL_FN_CVT_CAST`, `SQL_FN_CVT_CONVERT`).
61    ConvertFunctions = 48,
62    /// `SQL_NUMERIC_FUNCTIONS`. The scalar numeric functions supported by the
63    /// driver and data source (bitmask).
64    NumericFunctions = 49,
65    /// `SQL_STRING_FUNCTIONS`. The scalar string functions supported by the driver
66    /// and data source (bitmask).
67    StringFunctions = 50,
68    /// `SQL_SYSTEM_FUNCTIONS`. The scalar system functions supported by the driver
69    /// and data source (bitmask).
70    SystemFunctions = 51,
71    /// `SQL_TIMEDATE_FUNCTIONS`. The scalar date and time functions supported by
72    /// the driver and data source (bitmask).
73    TimedateFunctions = 52,
74    TransactionIsolationProtocol = 72,
75    Integrity = 73,
76    /// `SQL_CORRELATION_NAME`. Whether correlated table names are supported.
77    CorrelationName = 74,
78    /// `SQL_NON_NULLABLE_COLUMNS`. Whether the data source supports NOT NULL in
79    /// columns.
80    NonNullableColumns = 75,
81    /// `SQL_DRIVER_ODBC_VER`. The version of ODBC that the driver supports, in
82    /// the form "MM.mm" (e.g. "03.80").
83    DriverOdbcVer = 77,
84    GetDataExtensions = 81,
85    NullCollation = 85,
86    AlterTable = 86,
87    /// `SQL_COLUMN_ALIAS`. Whether the data source supports column aliases
88    /// ("Y" or "N").
89    ColumnAlias = 87,
90    /// `SQL_GROUP_BY`. The relationship between the columns in the GROUP BY
91    /// clause and the nonaggregated columns in the select list.
92    GroupBy = 88,
93    OrderByColumnsInSelect = 90,
94    /// `SQL_SCHEMA_USAGE` (also known as `SQL_OWNER_USAGE` in ODBC 2.x). A
95    /// bitmask enumerating the statements in which schemas can be used.
96    SchemaUsage = 91,
97    /// `SQL_CATALOG_USAGE` (also known as `SQL_QUALIFIER_USAGE` in ODBC 2.x). A
98    /// bitmask enumerating the statements in which catalogs can be used.
99    CatalogUsage = 92,
100    SpecialCharacters = 94,
101    /// `SQL_SUBQUERIES`. A bitmask enumerating the predicates that support
102    /// subqueries.
103    Subqueries = 95,
104    /// `SQL_UNION_STATEMENT` (also known as `SQL_UNION` in ODBC 2.x). A bitmask
105    /// enumerating support for the UNION statement.
106    UnionStatement = 96,
107    MaxColumnsInGroupBy = 97,
108    MaxColumnsInIndex = 98,
109    MaxColumnsInOrderBy = 99,
110    MaxColumnsInSelect = 100,
111    MaxColumnsInTable = 101,
112    MaxIndexSize = 102,
113    /// `SQL_MAX_ROW_SIZE_INCLUDES_LONG`. Whether the maximum row size returned
114    /// for `MaxRowSize` includes the length of all `SQL_LONGVARCHAR` and
115    /// `SQL_LONGVARBINARY` columns.
116    MaxRowSizeIncludesLong = 103,
117    MaxRowSize = 104,
118    MaxStatementLen = 105,
119    MaxTablesInSelect = 106,
120    MaxUserNameLen = 107,
121    /// `SQL_TIMEDATE_ADD_INTERVALS`. A bitmask enumerating the timestamp
122    /// intervals supported by the TIMESTAMPADD scalar function.
123    TimedateAddIntervals = 109,
124    /// `SQL_TIMEDATE_DIFF_INTERVALS`. A bitmask enumerating the timestamp
125    /// intervals supported by the TIMESTAMPDIFF scalar function.
126    TimedateDiffIntervals = 110,
127    /// `SQL_NEED_LONG_DATA_LEN`. Whether the data source needs the length of a
128    /// long data value before that value is sent to the data source ("Y" or "N").
129    NeedLongDataLen = 111,
130    /// `SQL_LIKE_ESCAPE_CLAUSE`. Whether the LIKE predicate supports an escape
131    /// character ("Y" or "N").
132    LikeEscapeClause = 113,
133    /// `SQL_CATALOG_LOCATION` (also known as `SQL_QUALIFIER_LOCATION` in ODBC
134    /// 2.x). The position of the catalog in a qualified table name.
135    CatalogLocation = 114,
136    OuterJoinCapabilities = 115,
137    /// `SQL_ACTIVE_ENVIRONMENTS` C-API places this in the extended header. A `u16` value that
138    /// specifies the maximum number of active environments that the driver can support. If there is
139    /// no specified limit or the limit is unknown, this value is set to zero.
140    ActiveEnvironments = 116,
141    /// `SQL_SQL_CONFORMANCE`. The level of SQL-92 supported by the driver.
142    SqlConformance = 118,
143    /// `SQL_BATCH_ROW_COUNT`. A bitmask enumerating the behavior of the driver
144    /// with respect to the availability of row counts.
145    BatchRowCount = 120,
146    /// `SQL_BATCH_SUPPORT`. A bitmask enumerating the driver's support for
147    /// batches.
148    BatchSupport = 121,
149    /// `SQL_DYNAMIC_CURSOR_ATTRIBUTES1` C-API places this in the extended header. Lists the fetch
150    /// types supported by scrollable cursors. The bits in the return value correspond to the fetch
151    /// types in SQLFetchScroll. See:
152    /// <https://learn.microsoft.com/sql/odbc/reference/develop-app/determining-cursor-capabilities>
153    DynamicCursorAttributes1 = 144,
154    /// `SQL_DYNAMIC_CURSOR_ATTRIBUTES2` C-API places this in the extended header. Lists whether
155    /// cursors can detect their own updates, deletes, and inserts. See:
156    /// <https://learn.microsoft.com/sql/odbc/reference/develop-app/determining-cursor-capabilities>
157    DynamicCursorAttributes2 = 145,
158    /// `SQL_FORWARD_ONLY_CURSOR_ATTRIBUTES1` C-API places this in the extended header. Lists the
159    /// fetch types supported by scrollable cursors. The bits in the return value correspond to the
160    /// fetch types in SQLFetchScroll. See:
161    /// <https://learn.microsoft.com/sql/odbc/reference/develop-app/determining-cursor-capabilities>
162    ForwardOnlyCursorAttributes1 = 146,
163    /// `SQL_FORWARD_ONLY_CURSOR_ATTRIBUTES2` C-API places this in the extended header. Lists
164    /// whether cursors can detect their own updates, deletes, and inserts. See:
165    /// <https://learn.microsoft.com/sql/odbc/reference/develop-app/determining-cursor-capabilities>
166    ForwardOnlyCursorAttributes2 = 147,
167    /// `SQL_KEYSET_CURSOR_ATTRIBUTES1` C-API places this in the extended header. Lists the fetch
168    /// types supported by scrollable cursors. The bits in the return value correspond to the fetch
169    /// types in SQLFetchScroll. See:
170    /// <https://learn.microsoft.com/sql/odbc/reference/develop-app/determining-cursor-capabilities>
171    KeysetCursorAttributes1 = 150,
172    /// `SQL_KEYSET_CURSOR_ATTRIBUTES2` C-API places this in the extended header. Lists whether
173    /// cursors can detect their own updates, deletes, and inserts. See:
174    /// <https://learn.microsoft.com/sql/odbc/reference/develop-app/determining-cursor-capabilities>
175    KeysetCursorAttributes2 = 151,
176    /// `SQL_ODBC_INTERFACE_CONFORMANCE`. The level of the ODBC 3.x interface that
177    /// the driver complies with.
178    OdbcInterfaceConformance = 152,
179    /// `SQL_PARAM_ARRAY_ROW_COUNTS`. A bitmask enumerating the driver's
180    /// properties regarding the availability of row counts in a parameterized
181    /// execution.
182    ParamArrayRowCounts = 153,
183    /// `SQL_PARAM_ARRAY_SELECTS`. A bitmask enumerating the driver's properties
184    /// regarding the availability of result sets in a parameterized execution.
185    ParamArraySelects = 154,
186    /// `SQL_SQL92_DATETIME_FUNCTIONS`. A bitmask enumerating the datetime scalar
187    /// functions supported per SQL-92.
188    Sql92DatetimeFunctions = 155,
189    /// `SQL_SQL92_FOREIGN_KEY_DELETE_RULE`. Rules supported for a foreign key in
190    /// a DELETE statement, as defined in SQL-92.
191    Sql92ForeignKeyDeleteRule = 156,
192    /// `SQL_SQL92_FOREIGN_KEY_UPDATE_RULE`. Rules supported for a foreign key in
193    /// an UPDATE statement, as defined in SQL-92.
194    Sql92ForeignKeyUpdateRule = 157,
195    /// `SQL_SQL92_GRANT`. Clauses supported in the GRANT statement, as defined
196    /// in SQL-92.
197    Sql92Grant = 158,
198    /// `SQL_SQL92_NUMERIC_VALUE_FUNCTIONS`. Numeric value scalar functions
199    /// supported per SQL-92.
200    Sql92NumericValueFunctions = 159,
201    /// `SQL_SQL92_PREDICATES`. Predicates supported in a SELECT statement, as
202    /// defined in SQL-92.
203    Sql92Predicates = 160,
204    /// `SQL_SQL92_RELATIONAL_JOIN_OPERATORS`. Relational join operators supported
205    /// in a SELECT statement, as defined in SQL-92.
206    Sql92RelationalJoinOperators = 161,
207    /// `SQL_SQL92_REVOKE`. Clauses supported in the REVOKE statement, as defined
208    /// in SQL-92.
209    Sql92Revoke = 162,
210    /// `SQL_SQL92_ROW_VALUE_CONSTRUCTOR`. Row value constructor expressions
211    /// supported in a SELECT statement, as defined in SQL-92.
212    Sql92RowValueConstructor = 163,
213    /// `SQL_SQL92_STRING_FUNCTIONS`. String scalar functions supported per
214    /// SQL-92.
215    Sql92StringFunctions = 164,
216    /// `SQL_SQL92_VALUE_EXPRESSIONS`. Value expressions supported, as defined in
217    /// SQL-92.
218    Sql92ValueExpressions = 165,
219    /// `SQL_STATIC_CURSOR_ATTRIBUTES1` C-API places this in the extended header. Lists the fetch
220    /// types supported by scrollable cursors. The bits in the return value correspond to the fetch
221    /// types in SQLFetchScroll. See:
222    /// <https://learn.microsoft.com/sql/odbc/reference/develop-app/determining-cursor-capabilities>
223    StaticCursorAttributes1 = 167,
224    /// `SQL_STATIC_CURSOR_ATTRIBUTES2` C-API places this in the extended header. Lists whether
225    /// cursors can detect their own updates, deletes, and inserts. See:
226    /// <https://learn.microsoft.com/sql/odbc/reference/develop-app/determining-cursor-capabilities>
227    StaticCursorAttributes2 = 168,
228    /// `SQL_AGGREGATE_FUNCTIONS`. A bitmask enumerating support for aggregation
229    /// functions.
230    AggregateFunctions = 169,
231    XopenCliYear = 10000,
232    CursorSensitivity = 10001,
233    DescribeParameter = 10002,
234    CatalogName = 10003,
235    CollationSeq = 10004,
236    MaxIdentifierLen = 10005,
237    AsyncMode = 10021,
238    MaxAsyncConcurrentStatements = 10022,
239    AsyncDbcFunctions = 10023,
240    DriverAwarePoolingSupported = 10024,
241    AsyncNotification = 10025,
242}