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    /// `SQL_FILE_USAGE`. How a single-tier driver directly treats files in a data source.
86    /// `SQL_FILE_NOT_SUPPORTED` (not a single-tier driver), `SQL_FILE_TABLE` (files are
87    /// treated as tables, e.g. Xbase), or `SQL_FILE_CATALOG` (files are treated as full
88    /// catalogs/databases, e.g. Microsoft Access).
89    SqlFileUsage = 84,
90    NullCollation = 85,
91    AlterTable = 86,
92    /// `SQL_COLUMN_ALIAS`. Whether the data source supports column aliases
93    /// ("Y" or "N").
94    ColumnAlias = 87,
95    /// `SQL_GROUP_BY`. The relationship between the columns in the GROUP BY
96    /// clause and the nonaggregated columns in the select list.
97    GroupBy = 88,
98    OrderByColumnsInSelect = 90,
99    /// `SQL_SCHEMA_USAGE` (also known as `SQL_OWNER_USAGE` in ODBC 2.x). A
100    /// bitmask enumerating the statements in which schemas can be used.
101    SchemaUsage = 91,
102    /// `SQL_CATALOG_USAGE` (also known as `SQL_QUALIFIER_USAGE` in ODBC 2.x). A
103    /// bitmask enumerating the statements in which catalogs can be used.
104    CatalogUsage = 92,
105    /// `SQL_QUOTED_IDENTIFIER_CASE`. Case sensitivity of quoted identifiers in SQL. Returns
106    /// `SQL_IC_UPPER` (not case-sensitive, stored uppercase), `SQL_IC_LOWER` (not case-sensitive,
107    /// stored lowercase), `SQL_IC_SENSITIVE` (case-sensitive, stored mixed case), or
108    /// `SQL_IC_MIXED` (not case-sensitive, stored mixed case).
109    SqlQuotedIdentifierCase = 93,
110    SpecialCharacters = 94,
111    /// `SQL_SUBQUERIES`. A bitmask enumerating the predicates that support
112    /// subqueries.
113    Subqueries = 95,
114    /// `SQL_UNION_STATEMENT` (also known as `SQL_UNION` in ODBC 2.x). A bitmask
115    /// enumerating support for the UNION statement.
116    UnionStatement = 96,
117    MaxColumnsInGroupBy = 97,
118    MaxColumnsInIndex = 98,
119    MaxColumnsInOrderBy = 99,
120    MaxColumnsInSelect = 100,
121    MaxColumnsInTable = 101,
122    MaxIndexSize = 102,
123    /// `SQL_MAX_ROW_SIZE_INCLUDES_LONG`. Whether the maximum row size returned
124    /// for `MaxRowSize` includes the length of all `SQL_LONGVARCHAR` and
125    /// `SQL_LONGVARBINARY` columns.
126    MaxRowSizeIncludesLong = 103,
127    MaxRowSize = 104,
128    MaxStatementLen = 105,
129    MaxTablesInSelect = 106,
130    MaxUserNameLen = 107,
131    /// `SQL_TIMEDATE_ADD_INTERVALS`. A bitmask enumerating the timestamp
132    /// intervals supported by the TIMESTAMPADD scalar function.
133    TimedateAddIntervals = 109,
134    /// `SQL_TIMEDATE_DIFF_INTERVALS`. A bitmask enumerating the timestamp
135    /// intervals supported by the TIMESTAMPDIFF scalar function.
136    TimedateDiffIntervals = 110,
137    /// `SQL_NEED_LONG_DATA_LEN`. Whether the data source needs the length of a
138    /// long data value before that value is sent to the data source ("Y" or "N").
139    NeedLongDataLen = 111,
140    /// `SQL_LIKE_ESCAPE_CLAUSE`. Whether the LIKE predicate supports an escape
141    /// character ("Y" or "N").
142    LikeEscapeClause = 113,
143    /// `SQL_CATALOG_LOCATION` (also known as `SQL_QUALIFIER_LOCATION` in ODBC
144    /// 2.x). The position of the catalog in a qualified table name.
145    CatalogLocation = 114,
146    OuterJoinCapabilities = 115,
147    /// `SQL_ACTIVE_ENVIRONMENTS` C-API places this in the extended header. A `u16` value that
148    /// specifies the maximum number of active environments that the driver can support. If there is
149    /// no specified limit or the limit is unknown, this value is set to zero.
150    ActiveEnvironments = 116,
151    /// `SQL_SQL_CONFORMANCE`. The level of SQL-92 supported by the driver.
152    SqlConformance = 118,
153    /// `SQL_BATCH_ROW_COUNT`. A bitmask enumerating the behavior of the driver
154    /// with respect to the availability of row counts.
155    BatchRowCount = 120,
156    /// `SQL_BATCH_SUPPORT`. A bitmask enumerating the driver's support for
157    /// batches.
158    BatchSupport = 121,
159    /// `SQL_DYNAMIC_CURSOR_ATTRIBUTES1` C-API places this in the extended header. Lists the fetch
160    /// types supported by scrollable cursors. The bits in the return value correspond to the fetch
161    /// types in SQLFetchScroll. See:
162    /// <https://learn.microsoft.com/sql/odbc/reference/develop-app/determining-cursor-capabilities>
163    DynamicCursorAttributes1 = 144,
164    /// `SQL_DYNAMIC_CURSOR_ATTRIBUTES2` C-API places this in the extended header. Lists whether
165    /// cursors can detect their own updates, deletes, and inserts. See:
166    /// <https://learn.microsoft.com/sql/odbc/reference/develop-app/determining-cursor-capabilities>
167    DynamicCursorAttributes2 = 145,
168    /// `SQL_FORWARD_ONLY_CURSOR_ATTRIBUTES1` C-API places this in the extended header. Lists the
169    /// fetch types supported by scrollable cursors. The bits in the return value correspond to the
170    /// fetch types in SQLFetchScroll. See:
171    /// <https://learn.microsoft.com/sql/odbc/reference/develop-app/determining-cursor-capabilities>
172    ForwardOnlyCursorAttributes1 = 146,
173    /// `SQL_FORWARD_ONLY_CURSOR_ATTRIBUTES2` C-API places this in the extended header. Lists
174    /// whether cursors can detect their own updates, deletes, and inserts. See:
175    /// <https://learn.microsoft.com/sql/odbc/reference/develop-app/determining-cursor-capabilities>
176    ForwardOnlyCursorAttributes2 = 147,
177    /// `SQL_KEYSET_CURSOR_ATTRIBUTES1` C-API places this in the extended header. Lists the fetch
178    /// types supported by scrollable cursors. The bits in the return value correspond to the fetch
179    /// types in SQLFetchScroll. See:
180    /// <https://learn.microsoft.com/sql/odbc/reference/develop-app/determining-cursor-capabilities>
181    KeysetCursorAttributes1 = 150,
182    /// `SQL_KEYSET_CURSOR_ATTRIBUTES2` C-API places this in the extended header. Lists whether
183    /// cursors can detect their own updates, deletes, and inserts. See:
184    /// <https://learn.microsoft.com/sql/odbc/reference/develop-app/determining-cursor-capabilities>
185    KeysetCursorAttributes2 = 151,
186    /// `SQL_ODBC_INTERFACE_CONFORMANCE`. The level of the ODBC 3.x interface that
187    /// the driver complies with.
188    OdbcInterfaceConformance = 152,
189    /// `SQL_PARAM_ARRAY_ROW_COUNTS`. A bitmask enumerating the driver's
190    /// properties regarding the availability of row counts in a parameterized
191    /// execution.
192    ParamArrayRowCounts = 153,
193    /// `SQL_PARAM_ARRAY_SELECTS`. A bitmask enumerating the driver's properties
194    /// regarding the availability of result sets in a parameterized execution.
195    ParamArraySelects = 154,
196    /// `SQL_SQL92_DATETIME_FUNCTIONS`. A bitmask enumerating the datetime scalar
197    /// functions supported per SQL-92.
198    Sql92DatetimeFunctions = 155,
199    /// `SQL_SQL92_FOREIGN_KEY_DELETE_RULE`. Rules supported for a foreign key in
200    /// a DELETE statement, as defined in SQL-92.
201    Sql92ForeignKeyDeleteRule = 156,
202    /// `SQL_SQL92_FOREIGN_KEY_UPDATE_RULE`. Rules supported for a foreign key in
203    /// an UPDATE statement, as defined in SQL-92.
204    Sql92ForeignKeyUpdateRule = 157,
205    /// `SQL_SQL92_GRANT`. Clauses supported in the GRANT statement, as defined
206    /// in SQL-92.
207    Sql92Grant = 158,
208    /// `SQL_SQL92_NUMERIC_VALUE_FUNCTIONS`. Numeric value scalar functions
209    /// supported per SQL-92.
210    Sql92NumericValueFunctions = 159,
211    /// `SQL_SQL92_PREDICATES`. Predicates supported in a SELECT statement, as
212    /// defined in SQL-92.
213    Sql92Predicates = 160,
214    /// `SQL_SQL92_RELATIONAL_JOIN_OPERATORS`. Relational join operators supported
215    /// in a SELECT statement, as defined in SQL-92.
216    Sql92RelationalJoinOperators = 161,
217    /// `SQL_SQL92_REVOKE`. Clauses supported in the REVOKE statement, as defined
218    /// in SQL-92.
219    Sql92Revoke = 162,
220    /// `SQL_SQL92_ROW_VALUE_CONSTRUCTOR`. Row value constructor expressions
221    /// supported in a SELECT statement, as defined in SQL-92.
222    Sql92RowValueConstructor = 163,
223    /// `SQL_SQL92_STRING_FUNCTIONS`. String scalar functions supported per
224    /// SQL-92.
225    Sql92StringFunctions = 164,
226    /// `SQL_SQL92_VALUE_EXPRESSIONS`. Value expressions supported, as defined in
227    /// SQL-92.
228    Sql92ValueExpressions = 165,
229    /// `SQL_STATIC_CURSOR_ATTRIBUTES1` C-API places this in the extended header. Lists the fetch
230    /// types supported by scrollable cursors. The bits in the return value correspond to the fetch
231    /// types in SQLFetchScroll. See:
232    /// <https://learn.microsoft.com/sql/odbc/reference/develop-app/determining-cursor-capabilities>
233    StaticCursorAttributes1 = 167,
234    /// `SQL_STATIC_CURSOR_ATTRIBUTES2` C-API places this in the extended header. Lists whether
235    /// cursors can detect their own updates, deletes, and inserts. See:
236    /// <https://learn.microsoft.com/sql/odbc/reference/develop-app/determining-cursor-capabilities>
237    StaticCursorAttributes2 = 168,
238    /// `SQL_AGGREGATE_FUNCTIONS`. A bitmask enumerating support for aggregation
239    /// functions.
240    AggregateFunctions = 169,
241    XopenCliYear = 10000,
242    CursorSensitivity = 10001,
243    DescribeParameter = 10002,
244    CatalogName = 10003,
245    CollationSeq = 10004,
246    MaxIdentifierLen = 10005,
247    AsyncMode = 10021,
248    MaxAsyncConcurrentStatements = 10022,
249    AsyncDbcFunctions = 10023,
250    DriverAwarePoolingSupported = 10024,
251    AsyncNotification = 10025,
252}