File Coverage

blib/lib/DBD/CSV/GetInfo.pm
Criterion Covered Total %
statement 6 10 60.0
branch n/a
condition 0 3 0.0
subroutine 2 4 50.0
pod 0 2 0.0
total 8 19 42.1


line stmt bran cond sub pod time code
1             #!/usr/bin/perl
2              
3             # The %info hash was automatically generated by
4             # DBI::DBD::Metadata::write_getinfo_pm v2.014214.
5              
6             package DBD::CSV::GetInfo;
7              
8 4     4   36 use strict;
  4         9  
  4         189  
9 4     4   38 use DBD::CSV;
  4         38  
  4         1160  
10              
11             # Beware: not officially documented interfaces...
12             # use DBI::Const::GetInfoType qw(%GetInfoType);
13             # use DBI::Const::GetInfoReturn qw(%GetInfoReturnTypes %GetInfoReturnValues);
14              
15             my $sql_driver = "CSV"; # DBD::CSV uses tw-partr version string
16             my $sql_ver_fmt = "%02d.%02d.0000"; # ODBC version string: ##.##.#####
17             my $sql_driver_ver = sprintf $sql_ver_fmt, split /\./ => $DBD::CSV::VERSION;
18              
19             sub sql_data_source_name {
20 0     0 0   my $dbh = shift;
21 0           return "dbi:$sql_driver:" . $dbh->{Name};
22             } # sql_data_source_name
23              
24             sub sql_user_name {
25 0     0 0   my $dbh = shift;
26             # CURRENT_USER is a non-standard attribute, probably undef
27             # Username is a standard DBI attribute
28 0   0       return $dbh->{CURRENT_USER} || $dbh->{Username};
29             } # sql_user_name
30              
31             our %info = (
32             # 20 => undef, # SQL_ACCESSIBLE_PROCEDURES
33             # 19 => undef, # SQL_ACCESSIBLE_TABLES
34             # 0 => undef, # SQL_ACTIVE_CONNECTIONS
35             # 116 => undef, # SQL_ACTIVE_ENVIRONMENTS
36             # 1 => undef, # SQL_ACTIVE_STATEMENTS
37             # 169 => undef, # SQL_AGGREGATE_FUNCTIONS
38             # 117 => undef, # SQL_ALTER_DOMAIN
39             # 86 => undef, # SQL_ALTER_TABLE
40             # 10021 => undef, # SQL_ASYNC_MODE
41             # 120 => undef, # SQL_BATCH_ROW_COUNT
42             # 121 => undef, # SQL_BATCH_SUPPORT
43             # 82 => undef, # SQL_BOOKMARK_PERSISTENCE
44             # 114 => undef, # SQL_CATALOG_LOCATION
45             # 10003 => undef, # SQL_CATALOG_NAME
46             # 41 => undef, # SQL_CATALOG_NAME_SEPARATOR
47             # 42 => undef, # SQL_CATALOG_TERM
48             # 92 => undef, # SQL_CATALOG_USAGE
49             # 10004 => undef, # SQL_COLLATING_SEQUENCE
50             # 10004 => undef, # SQL_COLLATION_SEQ
51             # 87 => undef, # SQL_COLUMN_ALIAS
52             # 22 => undef, # SQL_CONCAT_NULL_BEHAVIOR
53             # 53 => undef, # SQL_CONVERT_BIGINT
54             # 54 => undef, # SQL_CONVERT_BINARY
55             # 55 => undef, # SQL_CONVERT_BIT
56             # 56 => undef, # SQL_CONVERT_CHAR
57             # 57 => undef, # SQL_CONVERT_DATE
58             # 58 => undef, # SQL_CONVERT_DECIMAL
59             # 59 => undef, # SQL_CONVERT_DOUBLE
60             # 60 => undef, # SQL_CONVERT_FLOAT
61             # 48 => undef, # SQL_CONVERT_FUNCTIONS
62             # 173 => undef, # SQL_CONVERT_GUID
63             # 61 => undef, # SQL_CONVERT_INTEGER
64             # 123 => undef, # SQL_CONVERT_INTERVAL_DAY_TIME
65             # 124 => undef, # SQL_CONVERT_INTERVAL_YEAR_MONTH
66             # 71 => undef, # SQL_CONVERT_LONGVARBINARY
67             # 62 => undef, # SQL_CONVERT_LONGVARCHAR
68             # 63 => undef, # SQL_CONVERT_NUMERIC
69             # 64 => undef, # SQL_CONVERT_REAL
70             # 65 => undef, # SQL_CONVERT_SMALLINT
71             # 66 => undef, # SQL_CONVERT_TIME
72             # 67 => undef, # SQL_CONVERT_TIMESTAMP
73             # 68 => undef, # SQL_CONVERT_TINYINT
74             # 69 => undef, # SQL_CONVERT_VARBINARY
75             # 70 => undef, # SQL_CONVERT_VARCHAR
76             # 122 => undef, # SQL_CONVERT_WCHAR
77             # 125 => undef, # SQL_CONVERT_WLONGVARCHAR
78             # 126 => undef, # SQL_CONVERT_WVARCHAR
79             # 74 => undef, # SQL_CORRELATION_NAME
80             # 127 => undef, # SQL_CREATE_ASSERTION
81             # 128 => undef, # SQL_CREATE_CHARACTER_SET
82             # 129 => undef, # SQL_CREATE_COLLATION
83             # 130 => undef, # SQL_CREATE_DOMAIN
84             # 131 => undef, # SQL_CREATE_SCHEMA
85             # 132 => undef, # SQL_CREATE_TABLE
86             # 133 => undef, # SQL_CREATE_TRANSLATION
87             # 134 => undef, # SQL_CREATE_VIEW
88             # 23 => undef, # SQL_CURSOR_COMMIT_BEHAVIOR
89             # 24 => undef, # SQL_CURSOR_ROLLBACK_BEHAVIOR
90             # 10001 => undef, # SQL_CURSOR_SENSITIVITY
91             # 16 => undef, # SQL_DATABASE_NAME
92             2 => \&sql_data_source_name, # SQL_DATA_SOURCE_NAME
93             # 25 => undef, # SQL_DATA_SOURCE_READ_ONLY
94             # 119 => undef, # SQL_DATETIME_LITERALS
95             # 17 => undef, # SQL_DBMS_NAME
96             # 18 => undef, # SQL_DBMS_VER
97             # 18 => undef, # SQL_DBMS_VERSION
98             # 170 => undef, # SQL_DDL_INDEX
99             # 26 => undef, # SQL_DEFAULT_TRANSACTION_ISOLATION
100             # 26 => undef, # SQL_DEFAULT_TXN_ISOLATION
101             # 10002 => undef, # SQL_DESCRIBE_PARAMETER
102             # 171 => undef, # SQL_DM_VER
103             # 3 => undef, # SQL_DRIVER_HDBC
104             # 135 => undef, # SQL_DRIVER_HDESC
105             # 4 => undef, # SQL_DRIVER_HENV
106             # 76 => undef, # SQL_DRIVER_HLIB
107             # 5 => undef, # SQL_DRIVER_HSTMT
108             6 => $INC{"DBD/CSV.pm"}, # SQL_DRIVER_NAME
109             # 77 => undef, # SQL_DRIVER_ODBC_VER
110             7 => $sql_driver_ver, # SQL_DRIVER_VER
111             # 136 => undef, # SQL_DROP_ASSERTION
112             # 137 => undef, # SQL_DROP_CHARACTER_SET
113             # 138 => undef, # SQL_DROP_COLLATION
114             # 139 => undef, # SQL_DROP_DOMAIN
115             # 140 => undef, # SQL_DROP_SCHEMA
116             # 141 => undef, # SQL_DROP_TABLE
117             # 142 => undef, # SQL_DROP_TRANSLATION
118             # 143 => undef, # SQL_DROP_VIEW
119             # 144 => undef, # SQL_DYNAMIC_CURSOR_ATTRIBUTES1
120             # 145 => undef, # SQL_DYNAMIC_CURSOR_ATTRIBUTES2
121             # 27 => undef, # SQL_EXPRESSIONS_IN_ORDERBY
122             # 8 => undef, # SQL_FETCH_DIRECTION
123             # 84 => undef, # SQL_FILE_USAGE
124             # 146 => undef, # SQL_FORWARD_ONLY_CURSOR_ATTRIBUTES1
125             # 147 => undef, # SQL_FORWARD_ONLY_CURSOR_ATTRIBUTES2
126             # 81 => undef, # SQL_GETDATA_EXTENSIONS
127             # 88 => undef, # SQL_GROUP_BY
128             # 28 => undef, # SQL_IDENTIFIER_CASE
129             # 29 => undef, # SQL_IDENTIFIER_QUOTE_CHAR
130             # 148 => undef, # SQL_INDEX_KEYWORDS
131             # 149 => undef, # SQL_INFO_SCHEMA_VIEWS
132             # 172 => undef, # SQL_INSERT_STATEMENT
133             # 73 => undef, # SQL_INTEGRITY
134             # 150 => undef, # SQL_KEYSET_CURSOR_ATTRIBUTES1
135             # 151 => undef, # SQL_KEYSET_CURSOR_ATTRIBUTES2
136             # 89 => undef, # SQL_KEYWORDS
137             # 113 => undef, # SQL_LIKE_ESCAPE_CLAUSE
138             # 78 => undef, # SQL_LOCK_TYPES
139             # 34 => undef, # SQL_MAXIMUM_CATALOG_NAME_LENGTH
140             # 97 => undef, # SQL_MAXIMUM_COLUMNS_IN_GROUP_BY
141             # 98 => undef, # SQL_MAXIMUM_COLUMNS_IN_INDEX
142             # 99 => undef, # SQL_MAXIMUM_COLUMNS_IN_ORDER_BY
143             # 100 => undef, # SQL_MAXIMUM_COLUMNS_IN_SELECT
144             # 101 => undef, # SQL_MAXIMUM_COLUMNS_IN_TABLE
145             # 30 => undef, # SQL_MAXIMUM_COLUMN_NAME_LENGTH
146             # 1 => undef, # SQL_MAXIMUM_CONCURRENT_ACTIVITIES
147             # 31 => undef, # SQL_MAXIMUM_CURSOR_NAME_LENGTH
148             # 0 => undef, # SQL_MAXIMUM_DRIVER_CONNECTIONS
149             # 10005 => undef, # SQL_MAXIMUM_IDENTIFIER_LENGTH
150             # 102 => undef, # SQL_MAXIMUM_INDEX_SIZE
151             # 104 => undef, # SQL_MAXIMUM_ROW_SIZE
152             # 32 => undef, # SQL_MAXIMUM_SCHEMA_NAME_LENGTH
153             # 105 => undef, # SQL_MAXIMUM_STATEMENT_LENGTH
154             # 20000 => undef, # SQL_MAXIMUM_STMT_OCTETS
155             # 20001 => undef, # SQL_MAXIMUM_STMT_OCTETS_DATA
156             # 20002 => undef, # SQL_MAXIMUM_STMT_OCTETS_SCHEMA
157             # 106 => undef, # SQL_MAXIMUM_TABLES_IN_SELECT
158             # 35 => undef, # SQL_MAXIMUM_TABLE_NAME_LENGTH
159             # 107 => undef, # SQL_MAXIMUM_USER_NAME_LENGTH
160             # 10022 => undef, # SQL_MAX_ASYNC_CONCURRENT_STATEMENTS
161             # 112 => undef, # SQL_MAX_BINARY_LITERAL_LEN
162             # 34 => undef, # SQL_MAX_CATALOG_NAME_LEN
163             # 108 => undef, # SQL_MAX_CHAR_LITERAL_LEN
164             # 97 => undef, # SQL_MAX_COLUMNS_IN_GROUP_BY
165             # 98 => undef, # SQL_MAX_COLUMNS_IN_INDEX
166             # 99 => undef, # SQL_MAX_COLUMNS_IN_ORDER_BY
167             # 100 => undef, # SQL_MAX_COLUMNS_IN_SELECT
168             # 101 => undef, # SQL_MAX_COLUMNS_IN_TABLE
169             # 30 => undef, # SQL_MAX_COLUMN_NAME_LEN
170             # 1 => undef, # SQL_MAX_CONCURRENT_ACTIVITIES
171             # 31 => undef, # SQL_MAX_CURSOR_NAME_LEN
172             # 0 => undef, # SQL_MAX_DRIVER_CONNECTIONS
173             # 10005 => undef, # SQL_MAX_IDENTIFIER_LEN
174             # 102 => undef, # SQL_MAX_INDEX_SIZE
175             # 32 => undef, # SQL_MAX_OWNER_NAME_LEN
176             # 33 => undef, # SQL_MAX_PROCEDURE_NAME_LEN
177             # 34 => undef, # SQL_MAX_QUALIFIER_NAME_LEN
178             # 104 => undef, # SQL_MAX_ROW_SIZE
179             # 103 => undef, # SQL_MAX_ROW_SIZE_INCLUDES_LONG
180             # 32 => undef, # SQL_MAX_SCHEMA_NAME_LEN
181             # 105 => undef, # SQL_MAX_STATEMENT_LEN
182             # 106 => undef, # SQL_MAX_TABLES_IN_SELECT
183             # 35 => undef, # SQL_MAX_TABLE_NAME_LEN
184             # 107 => undef, # SQL_MAX_USER_NAME_LEN
185             # 37 => undef, # SQL_MULTIPLE_ACTIVE_TXN
186             # 36 => undef, # SQL_MULT_RESULT_SETS
187             # 111 => undef, # SQL_NEED_LONG_DATA_LEN
188             # 75 => undef, # SQL_NON_NULLABLE_COLUMNS
189             # 85 => undef, # SQL_NULL_COLLATION
190             # 49 => undef, # SQL_NUMERIC_FUNCTIONS
191             # 9 => undef, # SQL_ODBC_API_CONFORMANCE
192             # 152 => undef, # SQL_ODBC_INTERFACE_CONFORMANCE
193             # 12 => undef, # SQL_ODBC_SAG_CLI_CONFORMANCE
194             # 15 => undef, # SQL_ODBC_SQL_CONFORMANCE
195             # 73 => undef, # SQL_ODBC_SQL_OPT_IEF
196             # 10 => undef, # SQL_ODBC_VER
197             # 115 => undef, # SQL_OJ_CAPABILITIES
198             # 90 => undef, # SQL_ORDER_BY_COLUMNS_IN_SELECT
199             # 38 => undef, # SQL_OUTER_JOINS
200             # 115 => undef, # SQL_OUTER_JOIN_CAPABILITIES
201             # 39 => undef, # SQL_OWNER_TERM
202             # 91 => undef, # SQL_OWNER_USAGE
203             # 153 => undef, # SQL_PARAM_ARRAY_ROW_COUNTS
204             # 154 => undef, # SQL_PARAM_ARRAY_SELECTS
205             # 80 => undef, # SQL_POSITIONED_STATEMENTS
206             # 79 => undef, # SQL_POS_OPERATIONS
207             # 21 => undef, # SQL_PROCEDURES
208             # 40 => undef, # SQL_PROCEDURE_TERM
209             # 114 => undef, # SQL_QUALIFIER_LOCATION
210             # 41 => undef, # SQL_QUALIFIER_NAME_SEPARATOR
211             # 42 => undef, # SQL_QUALIFIER_TERM
212             # 92 => undef, # SQL_QUALIFIER_USAGE
213             # 93 => undef, # SQL_QUOTED_IDENTIFIER_CASE
214             # 11 => undef, # SQL_ROW_UPDATES
215             # 39 => undef, # SQL_SCHEMA_TERM
216             # 91 => undef, # SQL_SCHEMA_USAGE
217             # 43 => undef, # SQL_SCROLL_CONCURRENCY
218             # 44 => undef, # SQL_SCROLL_OPTIONS
219             # 14 => undef, # SQL_SEARCH_PATTERN_ESCAPE
220             # 13 => undef, # SQL_SERVER_NAME
221             # 94 => undef, # SQL_SPECIAL_CHARACTERS
222             # 155 => undef, # SQL_SQL92_DATETIME_FUNCTIONS
223             # 156 => undef, # SQL_SQL92_FOREIGN_KEY_DELETE_RULE
224             # 157 => undef, # SQL_SQL92_FOREIGN_KEY_UPDATE_RULE
225             # 158 => undef, # SQL_SQL92_GRANT
226             # 159 => undef, # SQL_SQL92_NUMERIC_VALUE_FUNCTIONS
227             # 160 => undef, # SQL_SQL92_PREDICATES
228             # 161 => undef, # SQL_SQL92_RELATIONAL_JOIN_OPERATORS
229             # 162 => undef, # SQL_SQL92_REVOKE
230             # 163 => undef, # SQL_SQL92_ROW_VALUE_CONSTRUCTOR
231             # 164 => undef, # SQL_SQL92_STRING_FUNCTIONS
232             # 165 => undef, # SQL_SQL92_VALUE_EXPRESSIONS
233             # 118 => undef, # SQL_SQL_CONFORMANCE
234             # 166 => undef, # SQL_STANDARD_CLI_CONFORMANCE
235             # 167 => undef, # SQL_STATIC_CURSOR_ATTRIBUTES1
236             # 168 => undef, # SQL_STATIC_CURSOR_ATTRIBUTES2
237             # 83 => undef, # SQL_STATIC_SENSITIVITY
238             # 50 => undef, # SQL_STRING_FUNCTIONS
239             # 95 => undef, # SQL_SUBQUERIES
240             # 51 => undef, # SQL_SYSTEM_FUNCTIONS
241             # 45 => undef, # SQL_TABLE_TERM
242             # 109 => undef, # SQL_TIMEDATE_ADD_INTERVALS
243             # 110 => undef, # SQL_TIMEDATE_DIFF_INTERVALS
244             # 52 => undef, # SQL_TIMEDATE_FUNCTIONS
245             # 46 => undef, # SQL_TRANSACTION_CAPABLE
246             # 72 => undef, # SQL_TRANSACTION_ISOLATION_OPTION
247             # 46 => undef, # SQL_TXN_CAPABLE
248             # 72 => undef, # SQL_TXN_ISOLATION_OPTION
249             # 96 => undef, # SQL_UNION
250             # 96 => undef, # SQL_UNION_STATEMENT
251             47 => \&sql_user_name, # SQL_USER_NAME
252             # 10000 => undef, # SQL_XOPEN_CLI_YEAR
253             );
254              
255             1;