<html><head><meta name="color-scheme" content="light dark"></head><body><pre style="word-wrap: break-word; white-space: pre-wrap;"># $Id: ANSI.pm 8696 2007-01-24 23:12:38Z timbo $
#
# Copyright (c) 2002  Tim Bunce  Ireland
#
# Constant data describing ANSI CLI info types and return values for the
# SQLGetInfo() method of ODBC.
#
# You may distribute under the terms of either the GNU General Public
# License or the Artistic License, as specified in the Perl README file.

package DBI::Const::GetInfo::ANSI;

=head1 NAME

DBI::Const::GetInfo::ANSI - ISO/IEC SQL/CLI Constants for GetInfo

=head1 SYNOPSIS

  The API for this module is private and subject to change.

=head1 DESCRIPTION

Information requested by GetInfo().

See: A.1 C header file SQLCLI.H, Page 316, 317.

The API for this module is private and subject to change.

=head1 REFERENCES

  ISO/IEC FCD 9075-3:200x Information technology - Database Languages -
  SQL - Part 3: Call-Level Interface (SQL/CLI)

  SC32 N00744 = WG3:VIE-005 = H2-2002-007

  Date: 2002-01-15

=cut

my
$VERSION = sprintf("2.%06d", q$Revision: 8696 $ =~ /(\d+)/o);


%InfoTypes =
(
  SQL_ALTER_TABLE                     =&gt;      86
, SQL_CATALOG_NAME                    =&gt;   10003
, SQL_COLLATING_SEQUENCE              =&gt;   10004
, SQL_CURSOR_COMMIT_BEHAVIOR          =&gt;      23
, SQL_CURSOR_SENSITIVITY              =&gt;   10001
, SQL_DATA_SOURCE_NAME                =&gt;       2
, SQL_DATA_SOURCE_READ_ONLY           =&gt;      25
, SQL_DBMS_NAME                       =&gt;      17
, SQL_DBMS_VERSION                    =&gt;      18
, SQL_DEFAULT_TRANSACTION_ISOLATION   =&gt;      26
, SQL_DESCRIBE_PARAMETER              =&gt;   10002
, SQL_FETCH_DIRECTION                 =&gt;       8
, SQL_GETDATA_EXTENSIONS              =&gt;      81
, SQL_IDENTIFIER_CASE                 =&gt;      28
, SQL_INTEGRITY                       =&gt;      73
, SQL_MAXIMUM_CATALOG_NAME_LENGTH     =&gt;      34
, SQL_MAXIMUM_COLUMNS_IN_GROUP_BY     =&gt;      97
, SQL_MAXIMUM_COLUMNS_IN_ORDER_BY     =&gt;      99
, SQL_MAXIMUM_COLUMNS_IN_SELECT       =&gt;     100
, SQL_MAXIMUM_COLUMNS_IN_TABLE        =&gt;     101
, SQL_MAXIMUM_COLUMN_NAME_LENGTH      =&gt;      30
, SQL_MAXIMUM_CONCURRENT_ACTIVITIES   =&gt;       1
, SQL_MAXIMUM_CURSOR_NAME_LENGTH      =&gt;      31
, SQL_MAXIMUM_DRIVER_CONNECTIONS      =&gt;       0
, SQL_MAXIMUM_IDENTIFIER_LENGTH       =&gt;   10005
, SQL_MAXIMUM_SCHEMA_NAME_LENGTH      =&gt;      32
, SQL_MAXIMUM_STMT_OCTETS             =&gt;   20000
, SQL_MAXIMUM_STMT_OCTETS_DATA        =&gt;   20001
, SQL_MAXIMUM_STMT_OCTETS_SCHEMA      =&gt;   20002
, SQL_MAXIMUM_TABLES_IN_SELECT        =&gt;     106
, SQL_MAXIMUM_TABLE_NAME_LENGTH       =&gt;      35
, SQL_MAXIMUM_USER_NAME_LENGTH        =&gt;     107
, SQL_NULL_COLLATION                  =&gt;      85
, SQL_ORDER_BY_COLUMNS_IN_SELECT      =&gt;      90
, SQL_OUTER_JOIN_CAPABILITIES         =&gt;     115
, SQL_SCROLL_CONCURRENCY              =&gt;      43
, SQL_SEARCH_PATTERN_ESCAPE           =&gt;      14
, SQL_SERVER_NAME                     =&gt;      13
, SQL_SPECIAL_CHARACTERS              =&gt;      94
, SQL_TRANSACTION_CAPABLE             =&gt;      46
, SQL_TRANSACTION_ISOLATION_OPTION    =&gt;      72
, SQL_USER_NAME                       =&gt;      47
);

=head2 %ReturnTypes

See: Codes and data types for implementation information (Table 28), Page 85, 86.

Mapped to ODBC datatype names.

=cut

%ReturnTypes =                                                 #          maxlen
(
  SQL_ALTER_TABLE                     =&gt; 'SQLUINTEGER bitmask' # INTEGER
, SQL_CATALOG_NAME                    =&gt; 'SQLCHAR'             # CHARACTER   (1)
, SQL_COLLATING_SEQUENCE              =&gt; 'SQLCHAR'             # CHARACTER (254)
, SQL_CURSOR_COMMIT_BEHAVIOR          =&gt; 'SQLUSMALLINT'        # SMALLINT
, SQL_CURSOR_SENSITIVITY              =&gt; 'SQLUINTEGER'         # INTEGER
, SQL_DATA_SOURCE_NAME                =&gt; 'SQLCHAR'             # CHARACTER (128)
, SQL_DATA_SOURCE_READ_ONLY           =&gt; 'SQLCHAR'             # CHARACTER   (1)
, SQL_DBMS_NAME                       =&gt; 'SQLCHAR'             # CHARACTER (254)
, SQL_DBMS_VERSION                    =&gt; 'SQLCHAR'             # CHARACTER (254)
, SQL_DEFAULT_TRANSACTION_ISOLATION   =&gt; 'SQLUINTEGER'         # INTEGER
, SQL_DESCRIBE_PARAMETER              =&gt; 'SQLCHAR'             # CHARACTER   (1)
, SQL_FETCH_DIRECTION                 =&gt; 'SQLUINTEGER bitmask' # INTEGER
, SQL_GETDATA_EXTENSIONS              =&gt; 'SQLUINTEGER bitmask' # INTEGER
, SQL_IDENTIFIER_CASE                 =&gt; 'SQLUSMALLINT'        # SMALLINT
, SQL_INTEGRITY                       =&gt; 'SQLCHAR'             # CHARACTER   (1)
, SQL_MAXIMUM_CATALOG_NAME_LENGTH     =&gt; 'SQLUSMALLINT'        # SMALLINT
, SQL_MAXIMUM_COLUMNS_IN_GROUP_BY     =&gt; 'SQLUSMALLINT'        # SMALLINT
, SQL_MAXIMUM_COLUMNS_IN_ORDER_BY     =&gt; 'SQLUSMALLINT'        # SMALLINT
, SQL_MAXIMUM_COLUMNS_IN_SELECT       =&gt; 'SQLUSMALLINT'        # SMALLINT
, SQL_MAXIMUM_COLUMNS_IN_TABLE        =&gt; 'SQLUSMALLINT'        # SMALLINT
, SQL_MAXIMUM_COLUMN_NAME_LENGTH      =&gt; 'SQLUSMALLINT'        # SMALLINT
, SQL_MAXIMUM_CONCURRENT_ACTIVITIES   =&gt; 'SQLUSMALLINT'        # SMALLINT
, SQL_MAXIMUM_CURSOR_NAME_LENGTH      =&gt; 'SQLUSMALLINT'        # SMALLINT
, SQL_MAXIMUM_DRIVER_CONNECTIONS      =&gt; 'SQLUSMALLINT'        # SMALLINT
, SQL_MAXIMUM_IDENTIFIER_LENGTH       =&gt; 'SQLUSMALLINT'        # SMALLINT
, SQL_MAXIMUM_SCHEMA_NAME_LENGTH      =&gt; 'SQLUSMALLINT'        # SMALLINT
, SQL_MAXIMUM_STMT_OCTETS             =&gt; 'SQLUSMALLINT'        # SMALLINT
, SQL_MAXIMUM_STMT_OCTETS_DATA        =&gt; 'SQLUSMALLINT'        # SMALLINT
, SQL_MAXIMUM_STMT_OCTETS_SCHEMA      =&gt; 'SQLUSMALLINT'        # SMALLINT
, SQL_MAXIMUM_TABLES_IN_SELECT        =&gt; 'SQLUSMALLINT'        # SMALLINT
, SQL_MAXIMUM_TABLE_NAME_LENGTH       =&gt; 'SQLUSMALLINT'        # SMALLINT
, SQL_MAXIMUM_USER_NAME_LENGTH        =&gt; 'SQLUSMALLINT'        # SMALLINT
, SQL_NULL_COLLATION                  =&gt; 'SQLUSMALLINT'        # SMALLINT
, SQL_ORDER_BY_COLUMNS_IN_SELECT      =&gt; 'SQLCHAR'             # CHARACTER   (1)
, SQL_OUTER_JOIN_CAPABILITIES         =&gt; 'SQLUINTEGER bitmask' # INTEGER
, SQL_SCROLL_CONCURRENCY              =&gt; 'SQLUINTEGER bitmask' # INTEGER
, SQL_SEARCH_PATTERN_ESCAPE           =&gt; 'SQLCHAR'             # CHARACTER   (1)
, SQL_SERVER_NAME                     =&gt; 'SQLCHAR'             # CHARACTER (128)
, SQL_SPECIAL_CHARACTERS              =&gt; 'SQLCHAR'             # CHARACTER (254)
, SQL_TRANSACTION_CAPABLE             =&gt; 'SQLUSMALLINT'        # SMALLINT
, SQL_TRANSACTION_ISOLATION_OPTION    =&gt; 'SQLUINTEGER bitmask' # INTEGER
, SQL_USER_NAME                       =&gt; 'SQLCHAR'             # CHARACTER (128)
);

=head2 %ReturnValues

See: A.1 C header file SQLCLI.H, Page 317, 318.

=cut

$ReturnValues{SQL_ALTER_TABLE} =
{
  SQL_AT_ADD_COLUMN                         =&gt; 0x00000001
, SQL_AT_DROP_COLUMN                        =&gt; 0x00000002
, SQL_AT_ALTER_COLUMN                       =&gt; 0x00000004
, SQL_AT_ADD_CONSTRAINT                     =&gt; 0x00000008
, SQL_AT_DROP_CONSTRAINT                    =&gt; 0x00000010
};
$ReturnValues{SQL_CURSOR_COMMIT_BEHAVIOR} =
{
  SQL_CB_DELETE                             =&gt; 0
, SQL_CB_CLOSE                              =&gt; 1
, SQL_CB_PRESERVE                           =&gt; 2
};
$ReturnValues{SQL_FETCH_DIRECTION} =
{
  SQL_FD_FETCH_NEXT                         =&gt; 0x00000001
, SQL_FD_FETCH_FIRST                        =&gt; 0x00000002
, SQL_FD_FETCH_LAST                         =&gt; 0x00000004
, SQL_FD_FETCH_PRIOR                        =&gt; 0x00000008
, SQL_FD_FETCH_ABSOLUTE                     =&gt; 0x00000010
, SQL_FD_FETCH_RELATIVE                     =&gt; 0x00000020
};
$ReturnValues{SQL_GETDATA_EXTENSIONS} =
{
  SQL_GD_ANY_COLUMN                         =&gt; 0x00000001
, SQL_GD_ANY_ORDER                          =&gt; 0x00000002
};
$ReturnValues{SQL_IDENTIFIER_CASE} =
{
  SQL_IC_UPPER                              =&gt; 1
, SQL_IC_LOWER                              =&gt; 2
, SQL_IC_SENSITIVE                          =&gt; 3
, SQL_IC_MIXED                              =&gt; 4
};
$ReturnValues{SQL_NULL_COLLATION} =
{
  SQL_NC_HIGH                               =&gt; 1
, SQL_NC_LOW                                =&gt; 2
};
$ReturnValues{SQL_OUTER_JOIN_CAPABILITIES} =
{
  SQL_OUTER_JOIN_LEFT                       =&gt; 0x00000001
, SQL_OUTER_JOIN_RIGHT                      =&gt; 0x00000002
, SQL_OUTER_JOIN_FULL                       =&gt; 0x00000004
, SQL_OUTER_JOIN_NESTED                     =&gt; 0x00000008
, SQL_OUTER_JOIN_NOT_ORDERED                =&gt; 0x00000010
, SQL_OUTER_JOIN_INNER                      =&gt; 0x00000020
, SQL_OUTER_JOIN_ALL_COMPARISON_OPS         =&gt; 0x00000040
};
$ReturnValues{SQL_SCROLL_CONCURRENCY} =
{
  SQL_SCCO_READ_ONLY                        =&gt; 0x00000001
, SQL_SCCO_LOCK                             =&gt; 0x00000002
, SQL_SCCO_OPT_ROWVER                       =&gt; 0x00000004
, SQL_SCCO_OPT_VALUES                       =&gt; 0x00000008
};
$ReturnValues{SQL_TRANSACTION_ACCESS_MODE} =
{
  SQL_TRANSACTION_READ_ONLY                 =&gt; 0x00000001
, SQL_TRANSACTION_READ_WRITE                =&gt; 0x00000002
};
$ReturnValues{SQL_TRANSACTION_CAPABLE} =
{
  SQL_TC_NONE                               =&gt; 0
, SQL_TC_DML                                =&gt; 1
, SQL_TC_ALL                                =&gt; 2
, SQL_TC_DDL_COMMIT                         =&gt; 3
, SQL_TC_DDL_IGNORE                         =&gt; 4
};
$ReturnValues{SQL_TRANSACTION_ISOLATION} =
{
  SQL_TRANSACTION_READ_UNCOMMITTED          =&gt; 0x00000001
, SQL_TRANSACTION_READ_COMMITTED            =&gt; 0x00000002
, SQL_TRANSACTION_REPEATABLE_READ           =&gt; 0x00000004
, SQL_TRANSACTION_SERIALIZABLE              =&gt; 0x00000008
};

1;

=head1 TODO

Corrections, e.g.:

  SQL_TRANSACTION_ISOLATION_OPTION vs. SQL_TRANSACTION_ISOLATION

=cut
</pre></body></html>