# SQL Portability - Driver Capabilities

- ## How can you tell what functionality the current driver and database support?

  $value = $dbh->get_info( … );

- ## Here’s a small sample of the information potentially available:

  - AGGREGATE_FUNCTIONS BATCH_SUPPORT CATALOG_NAME_SEPARATOR CONCAT_NULL_BEHAVIOR CONVERT_DATE CONVERT_FUNCTIONS CURSOR_COMMIT_BEHAVIOR CURSOR_SENSITIVITY DATETIME_LITERALS DBMS_NAME DBMS_VER DEFAULT_TXN_ISOLATION EXPRESSIONS_IN_ORDERBY GETDATA_EXTENSIONS GROUP_BY IDENTIFIER_CASE IDENTIFIER_QUOTE_CHAR INTEGRITY KEYWORDS LIKE_ESCAPE_CLAUSE LOCK_TYPES MAX_COLUMNS_IN_INDEX MAX_COLUMNS_IN_SELECT MAX_IDENTIFIER_LEN MAX_STATEMENT_LEN MAX_TABLES_IN_SELECT MULT_RESULT_SETS OJ_CAPABILITIES PROCEDURES SQL_CONFORMANCE TXN_CAPABLE TXN_ISOLATION_OPTION UNION …

- ## A specific item of information is requested using its standard numeric value

  $db_version = $dbh->get_info( 18 ); # 18 == SQL_DBMS_VER

- ## The standard names can be mapped to numeric values using:

  use DBI::Const::GetInfo;
  $dbh->get_info($GetInfoType{SQL_DBMS_VER})

Previous slide | Next slide | Back to first slide | View graphic version