Difference between revisions of "API:EPrints/Database/Oracle"

From EPrints Documentation
Jump to: navigation, search
(New page: <!-- Pod2Wiki=_preamble_ This page has been automatically generated from the EPrints source. Any wiki changes made between the 'Pod2Wiki=*' and 'End of Pod2Wiki' comments will be lost. -...)
 
(Removing all content from page)
Line 1: Line 1:
<!-- Pod2Wiki=_preamble_
 
This page has been automatically generated from the EPrints source. Any wiki changes made between the 'Pod2Wiki=*' and 'End of Pod2Wiki' comments will be lost.
 
-->{{Pod2Wiki}}{{API:Source|file=EPrints/Database/Oracle.pm|package_name=EPrints::Database::Oracle}}[[Category:API|Oracle]]<!-- End of Pod2Wiki -->
 
<!-- Pod2Wiki=head_name -->=NAME=
 
'''EPrints::Database::Oracle''' - custom database methods for Oracle DB
 
  
<!-- End of Pod2Wiki -->
 
<!-- Pod2Wiki=head_description -->=DESCRIPTION=
 
Oracle database wrapper.
 
 
<!-- End of Pod2Wiki -->
 
<!-- Pod2Wiki=head_oracle_specific_annoyances -->==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.
 
 
<!-- End of Pod2Wiki -->
 
<!-- Pod2Wiki=head_methods -->=METHODS=
 
<!-- End of Pod2Wiki -->
 
<!-- Pod2Wiki=item_get_server_version -->==get_server_version==
 
 
  $version = $db-&gt;get_server_version
 
 
Return the database server version.
 
 
<!-- End of Pod2Wiki -->
 
<!-- Pod2Wiki=item_get_column_type -->==get_column_type==
 
 
  $real_type = $db-&gt;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.
 
 
<!-- End of Pod2Wiki -->
 
<!-- Pod2Wiki=item_get_tables -->==get_tables==
 
 
  @tables = $db-&gt;get_tables
 
 
Return a list of all the tables in the database.
 
 
<!-- End of Pod2Wiki -->
 
<!-- Pod2Wiki=item_has_sequence -->==has_sequence==
 
 
  $boolean = $db-&gt;has_sequence( $name )
 
 
Return true if a sequence of the given name exists in the database.
 
 
<!-- End of Pod2Wiki -->
 
<!-- Pod2Wiki=item_has_column -->==has_column==
 
 
  $boolean = $db-&gt;has_column( $tablename, $columnname )
 
 
Return true if the a table of the given name has a column named $columnname in the database.
 
 
<!-- End of Pod2Wiki -->
 
<!-- Pod2Wiki=head_undocumented_methods -->=UNDOCUMENTED METHODS=
 
{{API:Undocumented Methods}}<!-- End of Pod2Wiki -->
 
<!-- Pod2Wiki=item_connect -->==connect==
 
 
<!-- End of Pod2Wiki -->
 
<!-- Pod2Wiki=item_create_archive_tables -->==create_archive_tables==
 
 
<!-- End of Pod2Wiki -->
 
<!-- Pod2Wiki=item_create_dataset_ordervalues_tables -->==create_dataset_ordervalues_tables==
 
 
<!-- End of Pod2Wiki -->
 
<!-- Pod2Wiki=item_prepare_select -->==prepare_select==
 
 
<!-- End of Pod2Wiki -->
 
<!-- Pod2Wiki=_postamble_ --><!-- End of Pod2Wiki -->
 

Revision as of 15:39, 12 August 2009