API:EPrints/Database/Oracle
Latest Source Code (3.4, 3.3) | Revision Log | Before editing this page please read Pod2Wiki
Contents
NAME
EPrints::Database::Oracle - custom database methods for Oracle DB
DESCRIPTION
Oracle database wrapper.
Oracle-specific Annoyances
Oracle will uppercase any identifiers that aren't quoted and is case sensitive, hence mixing quoted and unquoted identifiers will lead to problems.
Oracle does not support LIMIT().
Oracle does not support AUTO_INCREMENT (MySQL) nor SERIAL (Postgres).
Oracle won't ORDER BY LOBS.
METHODS
get_server_version
$version = $db->get_server_version
Return the database server version.
get_column_type
$real_type = $db->get_column_type( NAME, TYPE, NOT_NULL, [, LENGTH ] )
Returns a column definition for NAME of type TYPE. If NOT_NULL is true the column will be created NOT NULL. For column types that require a length use LENGTH.
TYPE is the SQL type. The types are constants defined by this module, to import them use:
use EPrints::Database qw( :sql_types );
Supported types (n = requires LENGTH argument):
Character data: SQL_VARCHAR(n), SQL_LONGVARCHAR.
Binary data: SQL_VARBINARY(n), SQL_LONGVARBINARY.
Integer data: SQL_TINYINT, SQL_SMALLINT, SQL_INTEGER.
Floating-point data: SQL_REAL, SQL_DOUBLE.
Time data: SQL_DATE, SQL_TIME.
get_tables
@tables = $db->get_tables
Return a list of all the tables in the database.
has_sequence
$boolean = $db->has_sequence( $name )
Return true if a sequence of the given name exists in the database.
has_column
$boolean = $db->has_column( $tablename, $columnname )
Return true if the a table of the given name has a column named $columnname in the database.