Difference between revisions of "API:EPrints/Database"
Line 1: | Line 1: | ||
<!-- Pod2Wiki=_preamble_ | <!-- Pod2Wiki=_preamble_ | ||
This page has been automatically generated from the EPrints 3.2 source. Any wiki changes made between the 'Pod2Wiki=*' and 'Edit below this comment' comments will be lost. | This page has been automatically generated from the EPrints 3.2 source. Any wiki changes made between the 'Pod2Wiki=*' and 'Edit below this comment' comments will be lost. | ||
− | --> | + | -->{{API}}{{Pod2Wiki}}{{API:Source|file=EPrints/Database.pm|package_name=EPrints::Database}}[[Category:API|Database]]<div><!-- Edit below this comment --> |
− | |||
− | {{API}}{{Pod2Wiki}}{{API:Source|file=EPrints/Database.pm|package_name=EPrints::Database}}[[Category:API|Database]]<div><!-- Edit below this comment --> | ||
− | <!-- Pod2Wiki= | + | <!-- Pod2Wiki=_private_ --><!-- Pod2Wiki=head_name --> |
==NAME== | ==NAME== | ||
'''EPrints::Database''' - a connection to the SQL database for an eprints session. | '''EPrints::Database''' - a connection to the SQL database for an eprints session. | ||
<div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> | <div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> | ||
− | + | <span style='display:none'>User Comments</span> | |
<!-- Edit below this comment --> | <!-- Edit below this comment --> | ||
− | <!-- Pod2Wiki= | + | <!-- Pod2Wiki= --> |
+ | </div> | ||
+ | <!-- Pod2Wiki=head_description --> | ||
==DESCRIPTION== | ==DESCRIPTION== | ||
EPrints Database Access Module | EPrints Database Access Module | ||
Line 26: | Line 26: | ||
<div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> | <div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> | ||
− | + | <span style='display:none'>User Comments</span> | |
<!-- Edit below this comment --> | <!-- Edit below this comment --> | ||
− | <!-- Pod2Wiki= | + | <!-- Pod2Wiki= --> |
+ | </div> | ||
+ | <!-- Pod2Wiki=head_cross_database_support --> | ||
===Cross-database Support=== | ===Cross-database Support=== | ||
Any use of SQL must use quote_identifier to quote database tables and columns. The only exception to this are the Database::* modules which provide database-driver specific extensions. | Any use of SQL must use quote_identifier to quote database tables and columns. The only exception to this are the Database::* modules which provide database-driver specific extensions. | ||
Line 37: | Line 39: | ||
<div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> | <div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> | ||
− | + | <span style='display:none'>User Comments</span> | |
<!-- Edit below this comment --> | <!-- Edit below this comment --> | ||
− | <!-- Pod2Wiki= | + | <!-- Pod2Wiki= --> |
+ | </div> | ||
+ | <!-- Pod2Wiki=item_build_connection_string --> | ||
====$dbstr = EPrints::Database::build_connection_string( %params )==== | ====$dbstr = EPrints::Database::build_connection_string( %params )==== | ||
Line 47: | Line 51: | ||
<div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> | <div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> | ||
− | + | <span style='display:none'>User Comments</span> | |
<!-- Edit below this comment --> | <!-- Edit below this comment --> | ||
− | <!-- Pod2Wiki= | + | <!-- Pod2Wiki= --> |
+ | </div> | ||
+ | <!-- Pod2Wiki=item_create --> | ||
====$db = $db->create( $username, $password )==== | ====$db = $db->create( $username, $password )==== | ||
Line 57: | Line 63: | ||
<div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> | <div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> | ||
− | + | <span style='display:none'>User Comments</span> | |
<!-- Edit below this comment --> | <!-- Edit below this comment --> | ||
− | <!-- Pod2Wiki= | + | <!-- Pod2Wiki= --> |
+ | </div> | ||
+ | <!-- Pod2Wiki=item_new --> | ||
====$db = EPrints::Database->new( $session )==== | ====$db = EPrints::Database->new( $session )==== | ||
Line 67: | Line 75: | ||
<div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> | <div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> | ||
− | + | <span style='display:none'>User Comments</span> | |
<!-- Edit below this comment --> | <!-- Edit below this comment --> | ||
− | <!-- Pod2Wiki= | + | <!-- Pod2Wiki= --> |
+ | </div> | ||
+ | <!-- Pod2Wiki=item_connect --> | ||
====$foo = $db->connect==== | ====$foo = $db->connect==== | ||
Line 77: | Line 87: | ||
<div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> | <div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> | ||
− | + | <span style='display:none'>User Comments</span> | |
<!-- Edit below this comment --> | <!-- Edit below this comment --> | ||
− | <!-- Pod2Wiki= | + | <!-- Pod2Wiki= --> |
+ | </div> | ||
+ | <!-- Pod2Wiki=item_disconnect --> | ||
====$foo = $db->disconnect==== | ====$foo = $db->disconnect==== | ||
Line 87: | Line 99: | ||
<div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> | <div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> | ||
− | + | <span style='display:none'>User Comments</span> | |
<!-- Edit below this comment --> | <!-- Edit below this comment --> | ||
− | <!-- Pod2Wiki= | + | <!-- Pod2Wiki= --> |
+ | </div> | ||
+ | <!-- Pod2Wiki=item_error --> | ||
====$errstr = $db->error==== | ====$errstr = $db->error==== | ||
Line 97: | Line 111: | ||
<div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> | <div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> | ||
− | + | <span style='display:none'>User Comments</span> | |
<!-- Edit below this comment --> | <!-- Edit below this comment --> | ||
− | <!-- Pod2Wiki= | + | <!-- Pod2Wiki= --> |
+ | </div> | ||
+ | <!-- Pod2Wiki=item_begin --> | ||
====$db->begin==== | ====$db->begin==== | ||
Line 107: | Line 123: | ||
<div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> | <div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> | ||
− | + | <span style='display:none'>User Comments</span> | |
<!-- Edit below this comment --> | <!-- Edit below this comment --> | ||
− | <!-- Pod2Wiki= | + | <!-- Pod2Wiki= --> |
+ | </div> | ||
+ | <!-- Pod2Wiki=item_commit --> | ||
====$db->commit==== | ====$db->commit==== | ||
Line 117: | Line 135: | ||
<div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> | <div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> | ||
− | + | <span style='display:none'>User Comments</span> | |
<!-- Edit below this comment --> | <!-- Edit below this comment --> | ||
− | <!-- Pod2Wiki= | + | <!-- Pod2Wiki= --> |
+ | </div> | ||
+ | <!-- Pod2Wiki=item_rollback --> | ||
====$db->rollback==== | ====$db->rollback==== | ||
Line 127: | Line 147: | ||
<div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> | <div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> | ||
− | + | <span style='display:none'>User Comments</span> | |
<!-- Edit below this comment --> | <!-- Edit below this comment --> | ||
− | <!-- Pod2Wiki= | + | <!-- Pod2Wiki= --> |
+ | </div> | ||
+ | <!-- Pod2Wiki=item_create_archive_tables --> | ||
====$success = $db->create_archive_tables==== | ====$success = $db->create_archive_tables==== | ||
Line 137: | Line 159: | ||
<div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> | <div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> | ||
− | + | <span style='display:none'>User Comments</span> | |
<!-- Edit below this comment --> | <!-- Edit below this comment --> | ||
− | <!-- Pod2Wiki= | + | <!-- Pod2Wiki= --> |
+ | </div> | ||
+ | <!-- Pod2Wiki=item_drop_archive_tables --> | ||
====$db->drop_archive_tables()==== | ====$db->drop_archive_tables()==== | ||
Line 147: | Line 171: | ||
<div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> | <div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> | ||
− | + | <span style='display:none'>User Comments</span> | |
<!-- Edit below this comment --> | <!-- Edit below this comment --> | ||
− | <!-- Pod2Wiki= | + | <!-- Pod2Wiki= --> |
+ | </div> | ||
+ | <!-- Pod2Wiki=item_create_dataset_tables --> | ||
====$success = $db->create_dataset_tables( $dataset )==== | ====$success = $db->create_dataset_tables( $dataset )==== | ||
Line 157: | Line 183: | ||
<div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> | <div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> | ||
− | + | <span style='display:none'>User Comments</span> | |
<!-- Edit below this comment --> | <!-- Edit below this comment --> | ||
− | <!-- Pod2Wiki= | + | <!-- Pod2Wiki= --> |
+ | </div> | ||
+ | <!-- Pod2Wiki=item_drop_dataset_tables --> | ||
====$db->drop_dataset_tables( $dataset )==== | ====$db->drop_dataset_tables( $dataset )==== | ||
Line 167: | Line 195: | ||
<div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> | <div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> | ||
− | + | <span style='display:none'>User Comments</span> | |
<!-- Edit below this comment --> | <!-- Edit below this comment --> | ||
− | <!-- Pod2Wiki= | + | <!-- Pod2Wiki= --> |
+ | </div> | ||
+ | <!-- Pod2Wiki=item_create_dataset_index_tables --> | ||
====$success = $db->create_dataset_index_tables( $dataset )==== | ====$success = $db->create_dataset_index_tables( $dataset )==== | ||
Line 177: | Line 207: | ||
<div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> | <div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> | ||
− | + | <span style='display:none'>User Comments</span> | |
<!-- Edit below this comment --> | <!-- Edit below this comment --> | ||
− | <!-- Pod2Wiki= | + | <!-- Pod2Wiki= --> |
+ | </div> | ||
+ | <!-- Pod2Wiki=item_create_dataset_ordervalues_tables --> | ||
====$success = $db->create_dataset_ordervalues_tables( $dataset )==== | ====$success = $db->create_dataset_ordervalues_tables( $dataset )==== | ||
Line 187: | Line 219: | ||
<div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> | <div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> | ||
− | + | <span style='display:none'>User Comments</span> | |
<!-- Edit below this comment --> | <!-- Edit below this comment --> | ||
− | <!-- Pod2Wiki= | + | <!-- Pod2Wiki= --> |
+ | </div> | ||
+ | <!-- Pod2Wiki=item_type_info --> | ||
====$type_info = $db->type_info( DATA_TYPE )==== | ====$type_info = $db->type_info( DATA_TYPE )==== | ||
Line 197: | Line 231: | ||
<div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> | <div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> | ||
− | + | <span style='display:none'>User Comments</span> | |
<!-- Edit below this comment --> | <!-- Edit below this comment --> | ||
− | <!-- Pod2Wiki= | + | <!-- Pod2Wiki= --> |
+ | </div> | ||
+ | <!-- Pod2Wiki=item_get_column_type --> | ||
====$real_type = $db->get_column_type( NAME, TYPE, NOT_NULL, [ LENGTH/PRECISION ], [ SCALE ], %opts )==== | ====$real_type = $db->get_column_type( NAME, TYPE, NOT_NULL, [ LENGTH/PRECISION ], [ SCALE ], %opts )==== | ||
Line 238: | Line 274: | ||
<div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> | <div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> | ||
− | + | <span style='display:none'>User Comments</span> | |
<!-- Edit below this comment --> | <!-- Edit below this comment --> | ||
− | <!-- Pod2Wiki= | + | <!-- Pod2Wiki= --> |
+ | </div> | ||
+ | <!-- Pod2Wiki=item_create_table --> | ||
====$success = $db->create_table( $tablename, $dataset, $setkey, @fields );==== | ====$success = $db->create_table( $tablename, $dataset, $setkey, @fields );==== | ||
Line 250: | Line 288: | ||
<div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> | <div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> | ||
− | + | <span style='display:none'>User Comments</span> | |
<!-- Edit below this comment --> | <!-- Edit below this comment --> | ||
− | <!-- Pod2Wiki= | + | <!-- Pod2Wiki= --> |
+ | </div> | ||
+ | <!-- Pod2Wiki=item_has_sequence --> | ||
====$boolean = $db->has_sequence( $name )==== | ====$boolean = $db->has_sequence( $name )==== | ||
Line 260: | Line 300: | ||
<div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> | <div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> | ||
− | + | <span style='display:none'>User Comments</span> | |
<!-- Edit below this comment --> | <!-- Edit below this comment --> | ||
− | <!-- Pod2Wiki= | + | <!-- Pod2Wiki= --> |
+ | </div> | ||
+ | <!-- Pod2Wiki=item_create_sequence --> | ||
====$success = $db->create_sequence( $seq_name )==== | ====$success = $db->create_sequence( $seq_name )==== | ||
Line 270: | Line 312: | ||
<div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> | <div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> | ||
− | + | <span style='display:none'>User Comments</span> | |
<!-- Edit below this comment --> | <!-- Edit below this comment --> | ||
− | <!-- Pod2Wiki= | + | <!-- Pod2Wiki= --> |
+ | </div> | ||
+ | <!-- Pod2Wiki=item_drop_sequence --> | ||
====$success = $db->drop_sequence( $seq_name )==== | ====$success = $db->drop_sequence( $seq_name )==== | ||
Line 280: | Line 324: | ||
<div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> | <div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> | ||
− | + | <span style='display:none'>User Comments</span> | |
<!-- Edit below this comment --> | <!-- Edit below this comment --> | ||
− | <!-- Pod2Wiki= | + | <!-- Pod2Wiki= --> |
+ | </div> | ||
+ | <!-- Pod2Wiki=item_drop_column --> | ||
====$success = $db->drop_column( $table, $column )==== | ====$success = $db->drop_column( $table, $column )==== | ||
Line 290: | Line 336: | ||
<div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> | <div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> | ||
− | + | <span style='display:none'>User Comments</span> | |
<!-- Edit below this comment --> | <!-- Edit below this comment --> | ||
− | <!-- Pod2Wiki= | + | <!-- Pod2Wiki= --> |
+ | </div> | ||
+ | <!-- Pod2Wiki=item_get_primary_key --> | ||
====@columns = $db->get_primary_key( $tablename )==== | ====@columns = $db->get_primary_key( $tablename )==== | ||
Line 302: | Line 350: | ||
<div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> | <div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> | ||
− | + | <span style='display:none'>User Comments</span> | |
<!-- Edit below this comment --> | <!-- Edit below this comment --> | ||
− | <!-- Pod2Wiki= | + | <!-- Pod2Wiki= --> |
+ | </div> | ||
+ | <!-- Pod2Wiki=item_create_index --> | ||
====$success = $db->create_index( $tablename, @columns )==== | ====$success = $db->create_index( $tablename, @columns )==== | ||
Line 312: | Line 362: | ||
<div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> | <div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> | ||
− | + | <span style='display:none'>User Comments</span> | |
<!-- Edit below this comment --> | <!-- Edit below this comment --> | ||
− | <!-- Pod2Wiki= | + | <!-- Pod2Wiki= --> |
+ | </div> | ||
+ | <!-- Pod2Wiki=item_create_unique_index --> | ||
====$success = $db->create_unique_index( $tablename, @columns )==== | ====$success = $db->create_unique_index( $tablename, @columns )==== | ||
Line 322: | Line 374: | ||
<div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> | <div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> | ||
− | + | <span style='display:none'>User Comments</span> | |
<!-- Edit below this comment --> | <!-- Edit below this comment --> | ||
− | <!-- Pod2Wiki= | + | <!-- Pod2Wiki= --> |
+ | </div> | ||
+ | <!-- Pod2Wiki=item__update --> | ||
====$success = $db->_update( $tablename, $keycols, $keyvals, $columns, @values )==== | ====$success = $db->_update( $tablename, $keycols, $keyvals, $columns, @values )==== | ||
Line 334: | Line 388: | ||
<div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> | <div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> | ||
− | + | <span style='display:none'>User Comments</span> | |
<!-- Edit below this comment --> | <!-- Edit below this comment --> | ||
− | <!-- Pod2Wiki= | + | <!-- Pod2Wiki= --> |
+ | </div> | ||
+ | <!-- Pod2Wiki=item__update_quoted --> | ||
====$success = $db->_update_quoted( $tablename, $keycols, $keyvals, $columns, @qvalues )==== | ====$success = $db->_update_quoted( $tablename, $keycols, $keyvals, $columns, @qvalues )==== | ||
Line 346: | Line 402: | ||
<div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> | <div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> | ||
− | + | <span style='display:none'>User Comments</span> | |
<!-- Edit below this comment --> | <!-- Edit below this comment --> | ||
− | <!-- Pod2Wiki= | + | <!-- Pod2Wiki= --> |
+ | </div> | ||
+ | <!-- Pod2Wiki=item_insert --> | ||
====$success = $db->insert( $table, $columns, @values )==== | ====$success = $db->insert( $table, $columns, @values )==== | ||
Line 358: | Line 416: | ||
<div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> | <div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> | ||
− | + | <span style='display:none'>User Comments</span> | |
<!-- Edit below this comment --> | <!-- Edit below this comment --> | ||
− | <!-- Pod2Wiki= | + | <!-- Pod2Wiki= --> |
+ | </div> | ||
+ | <!-- Pod2Wiki=item_insert_quoted --> | ||
====$success = $db->insert_quoted( $table, $columns, @qvalues )==== | ====$success = $db->insert_quoted( $table, $columns, @qvalues )==== | ||
Line 370: | Line 430: | ||
<div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> | <div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> | ||
− | + | <span style='display:none'>User Comments</span> | |
<!-- Edit below this comment --> | <!-- Edit below this comment --> | ||
− | <!-- Pod2Wiki= | + | <!-- Pod2Wiki= --> |
+ | </div> | ||
+ | <!-- Pod2Wiki=item_delete_from --> | ||
====$success = $db->delete_from( $table, $columns, @values )==== | ====$success = $db->delete_from( $table, $columns, @values )==== | ||
Line 382: | Line 444: | ||
<div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> | <div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> | ||
− | + | <span style='display:none'>User Comments</span> | |
<!-- Edit below this comment --> | <!-- Edit below this comment --> | ||
− | <!-- Pod2Wiki= | + | <!-- Pod2Wiki= --> |
+ | </div> | ||
+ | <!-- Pod2Wiki=item_add_record --> | ||
====$success = $db->add_record( $dataset, $data )==== | ====$success = $db->add_record( $dataset, $data )==== | ||
Line 392: | Line 456: | ||
<div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> | <div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> | ||
− | + | <span style='display:none'>User Comments</span> | |
<!-- Edit below this comment --> | <!-- Edit below this comment --> | ||
− | <!-- Pod2Wiki= | + | <!-- Pod2Wiki= --> |
+ | </div> | ||
+ | <!-- Pod2Wiki=item_prep_int --> | ||
====$mungedvalue = EPrints::Database::prep_int( $value )==== | ====$mungedvalue = EPrints::Database::prep_int( $value )==== | ||
Line 402: | Line 468: | ||
<div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> | <div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> | ||
− | + | <span style='display:none'>User Comments</span> | |
<!-- Edit below this comment --> | <!-- Edit below this comment --> | ||
− | <!-- Pod2Wiki= | + | <!-- Pod2Wiki= --> |
+ | </div> | ||
+ | <!-- Pod2Wiki=item_prep_value --> | ||
====$mungedvalue = EPrints::Database::prep_value( $value )==== | ====$mungedvalue = EPrints::Database::prep_value( $value )==== | ||
Line 412: | Line 480: | ||
<div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> | <div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> | ||
− | + | <span style='display:none'>User Comments</span> | |
<!-- Edit below this comment --> | <!-- Edit below this comment --> | ||
− | <!-- Pod2Wiki= | + | <!-- Pod2Wiki= --> |
+ | </div> | ||
+ | <!-- Pod2Wiki=item_prep_like_value --> | ||
====$mungedvalue = EPrints::Database::prep_like_value( $value )==== | ====$mungedvalue = EPrints::Database::prep_like_value( $value )==== | ||
Line 422: | Line 492: | ||
<div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> | <div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> | ||
− | + | <span style='display:none'>User Comments</span> | |
<!-- Edit below this comment --> | <!-- Edit below this comment --> | ||
− | <!-- Pod2Wiki= | + | <!-- Pod2Wiki= --> |
+ | </div> | ||
+ | <!-- Pod2Wiki=item_quote_value --> | ||
====$str = $db->quote_value( $value )==== | ====$str = $db->quote_value( $value )==== | ||
Line 434: | Line 506: | ||
<div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> | <div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> | ||
− | + | <span style='display:none'>User Comments</span> | |
<!-- Edit below this comment --> | <!-- Edit below this comment --> | ||
− | <!-- Pod2Wiki= | + | <!-- Pod2Wiki= --> |
+ | </div> | ||
+ | <!-- Pod2Wiki=item_quote_int --> | ||
====$str = $db->quote_int( $value )==== | ====$str = $db->quote_int( $value )==== | ||
Line 444: | Line 518: | ||
<div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> | <div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> | ||
− | + | <span style='display:none'>User Comments</span> | |
<!-- Edit below this comment --> | <!-- Edit below this comment --> | ||
− | <!-- Pod2Wiki= | + | <!-- Pod2Wiki= --> |
+ | </div> | ||
+ | <!-- Pod2Wiki=item_quote_binary --> | ||
====$str = $db->quote_binary( $bytes )==== | ====$str = $db->quote_binary( $bytes )==== | ||
Line 456: | Line 532: | ||
<div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> | <div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> | ||
− | + | <span style='display:none'>User Comments</span> | |
<!-- Edit below this comment --> | <!-- Edit below this comment --> | ||
− | <!-- Pod2Wiki= | + | <!-- Pod2Wiki= --> |
+ | </div> | ||
+ | <!-- Pod2Wiki=item_quote_identifier --> | ||
====$str = $db->quote_identifier( @parts )==== | ====$str = $db->quote_identifier( @parts )==== | ||
Line 466: | Line 544: | ||
<div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> | <div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> | ||
− | + | <span style='display:none'>User Comments</span> | |
<!-- Edit below this comment --> | <!-- Edit below this comment --> | ||
− | <!-- Pod2Wiki= | + | <!-- Pod2Wiki= --> |
+ | </div> | ||
+ | <!-- Pod2Wiki=item_update --> | ||
====$success = $db->update( $dataset, $data, $changed, $insert )==== | ====$success = $db->update( $dataset, $data, $changed, $insert )==== | ||
Line 478: | Line 558: | ||
<div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> | <div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> | ||
− | + | <span style='display:none'>User Comments</span> | |
<!-- Edit below this comment --> | <!-- Edit below this comment --> | ||
− | <!-- Pod2Wiki= | + | <!-- Pod2Wiki= --> |
+ | </div> | ||
+ | <!-- Pod2Wiki=item_remove --> | ||
====$success = $db->remove( $dataset, $id )==== | ====$success = $db->remove( $dataset, $id )==== | ||
Line 488: | Line 570: | ||
<div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> | <div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> | ||
− | + | <span style='display:none'>User Comments</span> | |
<!-- Edit below this comment --> | <!-- Edit below this comment --> | ||
− | <!-- Pod2Wiki= | + | <!-- Pod2Wiki= --> |
+ | </div> | ||
+ | <!-- Pod2Wiki=item_create_counters --> | ||
====$success = $db->create_counters==== | ====$success = $db->create_counters==== | ||
Line 498: | Line 582: | ||
<div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> | <div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> | ||
− | + | <span style='display:none'>User Comments</span> | |
<!-- Edit below this comment --> | <!-- Edit below this comment --> | ||
− | <!-- Pod2Wiki= | + | <!-- Pod2Wiki= --> |
+ | </div> | ||
+ | <!-- Pod2Wiki=item_has_counter --> | ||
====$success = $db->has_counter( $counter )==== | ====$success = $db->has_counter( $counter )==== | ||
Line 508: | Line 594: | ||
<div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> | <div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> | ||
− | + | <span style='display:none'>User Comments</span> | |
<!-- Edit below this comment --> | <!-- Edit below this comment --> | ||
− | <!-- Pod2Wiki= | + | <!-- Pod2Wiki= --> |
+ | </div> | ||
+ | <!-- Pod2Wiki=item_create_counter --> | ||
====$success = $db->create_counter( $name )==== | ====$success = $db->create_counter( $name )==== | ||
Line 518: | Line 606: | ||
<div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> | <div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> | ||
− | + | <span style='display:none'>User Comments</span> | |
<!-- Edit below this comment --> | <!-- Edit below this comment --> | ||
− | <!-- Pod2Wiki= | + | <!-- Pod2Wiki= --> |
+ | </div> | ||
+ | <!-- Pod2Wiki=item_remove_counters --> | ||
====$success = $db->remove_counters==== | ====$success = $db->remove_counters==== | ||
Line 528: | Line 618: | ||
<div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> | <div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> | ||
− | + | <span style='display:none'>User Comments</span> | |
<!-- Edit below this comment --> | <!-- Edit below this comment --> | ||
− | <!-- Pod2Wiki= | + | <!-- Pod2Wiki= --> |
+ | </div> | ||
+ | <!-- Pod2Wiki=item_drop_counter --> | ||
====$success = $db->drop_counter( $name )==== | ====$success = $db->drop_counter( $name )==== | ||
Line 538: | Line 630: | ||
<div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> | <div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> | ||
− | + | <span style='display:none'>User Comments</span> | |
<!-- Edit below this comment --> | <!-- Edit below this comment --> | ||
− | <!-- Pod2Wiki= | + | <!-- Pod2Wiki= --> |
+ | </div> | ||
+ | <!-- Pod2Wiki=item_next_doc_pos --> | ||
====$n = $db->next_doc_pos( $eprintid )==== | ====$n = $db->next_doc_pos( $eprintid )==== | ||
Line 548: | Line 642: | ||
<div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> | <div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> | ||
− | + | <span style='display:none'>User Comments</span> | |
<!-- Edit below this comment --> | <!-- Edit below this comment --> | ||
− | <!-- Pod2Wiki= | + | <!-- Pod2Wiki= --> |
+ | </div> | ||
+ | <!-- Pod2Wiki=item_counter_current --> | ||
====$n = $db->counter_current( $counter )==== | ====$n = $db->counter_current( $counter )==== | ||
Line 558: | Line 654: | ||
<div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> | <div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> | ||
− | + | <span style='display:none'>User Comments</span> | |
<!-- Edit below this comment --> | <!-- Edit below this comment --> | ||
− | <!-- Pod2Wiki= | + | <!-- Pod2Wiki= --> |
+ | </div> | ||
+ | <!-- Pod2Wiki=item_counter_next --> | ||
====$n = $db->counter_next( $counter )==== | ====$n = $db->counter_next( $counter )==== | ||
Line 568: | Line 666: | ||
<div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> | <div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> | ||
− | + | <span style='display:none'>User Comments</span> | |
<!-- Edit below this comment --> | <!-- Edit below this comment --> | ||
− | <!-- Pod2Wiki= | + | <!-- Pod2Wiki= --> |
+ | </div> | ||
+ | <!-- Pod2Wiki=item_counter_minimum --> | ||
====$db->counter_minimum( $counter, $value )==== | ====$db->counter_minimum( $counter, $value )==== | ||
Line 578: | Line 678: | ||
<div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> | <div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> | ||
− | + | <span style='display:none'>User Comments</span> | |
<!-- Edit below this comment --> | <!-- Edit below this comment --> | ||
− | <!-- Pod2Wiki= | + | <!-- Pod2Wiki= --> |
+ | </div> | ||
+ | <!-- Pod2Wiki=item_counter_reset --> | ||
====$db->counter_reset( $counter )==== | ====$db->counter_reset( $counter )==== | ||
Line 588: | Line 690: | ||
<div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> | <div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> | ||
− | + | <span style='display:none'>User Comments</span> | |
<!-- Edit below this comment --> | <!-- Edit below this comment --> | ||
− | <!-- Pod2Wiki= | + | <!-- Pod2Wiki= --> |
+ | </div> | ||
+ | <!-- Pod2Wiki=item_cache_exp --> | ||
====$searchexp = $db->cache_exp( $cacheid )==== | ====$searchexp = $db->cache_exp( $cacheid )==== | ||
Line 598: | Line 702: | ||
<div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> | <div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> | ||
− | + | <span style='display:none'>User Comments</span> | |
<!-- Edit below this comment --> | <!-- Edit below this comment --> | ||
− | <!-- Pod2Wiki= | + | <!-- Pod2Wiki= --> |
+ | </div> | ||
+ | <!-- Pod2Wiki=item_cache --> | ||
====$cacheid = $db->cache( $searchexp, $dataset, $srctable, [$order], [$list] )==== | ====$cacheid = $db->cache( $searchexp, $dataset, $srctable, [$order], [$list] )==== | ||
Line 614: | Line 720: | ||
<div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> | <div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> | ||
− | + | <span style='display:none'>User Comments</span> | |
<!-- Edit below this comment --> | <!-- Edit below this comment --> | ||
− | <!-- Pod2Wiki= | + | <!-- Pod2Wiki= --> |
+ | </div> | ||
+ | <!-- Pod2Wiki=item_cache_table --> | ||
====$tablename = $db->cache_table( $id )==== | ====$tablename = $db->cache_table( $id )==== | ||
Line 624: | Line 732: | ||
<div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> | <div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> | ||
− | + | <span style='display:none'>User Comments</span> | |
<!-- Edit below this comment --> | <!-- Edit below this comment --> | ||
− | <!-- Pod2Wiki= | + | <!-- Pod2Wiki= --> |
+ | </div> | ||
+ | <!-- Pod2Wiki=item_get_index_ids --> | ||
====$ids = $db->get_index_ids( $table, $condition )==== | ====$ids = $db->get_index_ids( $table, $condition )==== | ||
Line 634: | Line 744: | ||
<div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> | <div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> | ||
− | + | <span style='display:none'>User Comments</span> | |
<!-- Edit below this comment --> | <!-- Edit below this comment --> | ||
− | <!-- Pod2Wiki= | + | <!-- Pod2Wiki= --> |
+ | </div> | ||
+ | <!-- Pod2Wiki=item_search --> | ||
====$ids = $db->search( $keyfield, $tables, $conditions, [$main_table_alias] )==== | ====$ids = $db->search( $keyfield, $tables, $conditions, [$main_table_alias] )==== | ||
Line 646: | Line 758: | ||
<div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> | <div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> | ||
− | + | <span style='display:none'>User Comments</span> | |
<!-- Edit below this comment --> | <!-- Edit below this comment --> | ||
− | <!-- Pod2Wiki= | + | <!-- Pod2Wiki= --> |
+ | </div> | ||
+ | <!-- Pod2Wiki=item_drop_cache --> | ||
====$db->drop_cache( $id )==== | ====$db->drop_cache( $id )==== | ||
Line 656: | Line 770: | ||
<div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> | <div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> | ||
− | + | <span style='display:none'>User Comments</span> | |
<!-- Edit below this comment --> | <!-- Edit below this comment --> | ||
− | <!-- Pod2Wiki= | + | <!-- Pod2Wiki= --> |
+ | </div> | ||
+ | <!-- Pod2Wiki=item_count_table --> | ||
====$n = $db->count_table( $tablename )==== | ====$n = $db->count_table( $tablename )==== | ||
Line 666: | Line 782: | ||
<div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> | <div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> | ||
− | + | <span style='display:none'>User Comments</span> | |
<!-- Edit below this comment --> | <!-- Edit below this comment --> | ||
− | <!-- Pod2Wiki= | + | <!-- Pod2Wiki= --> |
+ | </div> | ||
+ | <!-- Pod2Wiki=item_from_cache --> | ||
====$foo = $db->from_cache( $dataset, $cacheid, [$offset], [$count], [$justids] )==== | ====$foo = $db->from_cache( $dataset, $cacheid, [$offset], [$count], [$justids] )==== | ||
Line 680: | Line 798: | ||
<div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> | <div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> | ||
− | + | <span style='display:none'>User Comments</span> | |
<!-- Edit below this comment --> | <!-- Edit below this comment --> | ||
− | <!-- Pod2Wiki= | + | <!-- Pod2Wiki= --> |
+ | </div> | ||
+ | <!-- Pod2Wiki=item_drop_orphan_cache_tables --> | ||
====$c = $db->drop_orphan_cache_tables==== | ====$c = $db->drop_orphan_cache_tables==== | ||
Line 690: | Line 810: | ||
<div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> | <div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> | ||
− | + | <span style='display:none'>User Comments</span> | |
<!-- Edit below this comment --> | <!-- Edit below this comment --> | ||
− | <!-- Pod2Wiki= | + | <!-- Pod2Wiki= --> |
+ | </div> | ||
+ | <!-- Pod2Wiki=item_get_single --> | ||
====$obj = $db->get_single( $dataset, $id )==== | ====$obj = $db->get_single( $dataset, $id )==== | ||
Line 700: | Line 822: | ||
<div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> | <div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> | ||
− | + | <span style='display:none'>User Comments</span> | |
<!-- Edit below this comment --> | <!-- Edit below this comment --> | ||
− | <!-- Pod2Wiki= | + | <!-- Pod2Wiki= --> |
+ | </div> | ||
+ | <!-- Pod2Wiki=item_get_all --> | ||
====$items = $db->get_all( $dataset )==== | ====$items = $db->get_all( $dataset )==== | ||
Line 710: | Line 834: | ||
<div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> | <div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> | ||
− | + | <span style='display:none'>User Comments</span> | |
<!-- Edit below this comment --> | <!-- Edit below this comment --> | ||
− | <!-- Pod2Wiki= | + | <!-- Pod2Wiki= --> |
+ | </div> | ||
+ | <!-- Pod2Wiki=item_get_cache_ids --> | ||
====@ids = $db->get_cache_ids( $dataset, $cachemap, $offset, $count )==== | ====@ids = $db->get_cache_ids( $dataset, $cachemap, $offset, $count )==== | ||
Line 720: | Line 846: | ||
<div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> | <div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> | ||
− | + | <span style='display:none'>User Comments</span> | |
<!-- Edit below this comment --> | <!-- Edit below this comment --> | ||
− | <!-- Pod2Wiki= | + | <!-- Pod2Wiki= --> |
+ | </div> | ||
+ | <!-- Pod2Wiki=item_get_dataobjs --> | ||
====@dataobjs = $db->get_dataobjs( $dataset [, $id [, $id ] ] )==== | ====@dataobjs = $db->get_dataobjs( $dataset [, $id [, $id ] ] )==== | ||
Line 730: | Line 858: | ||
<div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> | <div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> | ||
− | + | <span style='display:none'>User Comments</span> | |
<!-- Edit below this comment --> | <!-- Edit below this comment --> | ||
− | <!-- Pod2Wiki= | + | <!-- Pod2Wiki= --> |
+ | </div> | ||
+ | <!-- Pod2Wiki=item_get_values --> | ||
====$foo = $db->get_values( $field, $dataset )==== | ====$foo = $db->get_values( $field, $dataset )==== | ||
Line 740: | Line 870: | ||
<div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> | <div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> | ||
− | + | <span style='display:none'>User Comments</span> | |
<!-- Edit below this comment --> | <!-- Edit below this comment --> | ||
− | <!-- Pod2Wiki= | + | <!-- Pod2Wiki= --> |
+ | </div> | ||
+ | <!-- Pod2Wiki=item_sort_values --> | ||
====$values = $db->sort_values( $field, $values [, $langid ] )==== | ====$values = $db->sort_values( $field, $values [, $langid ] )==== | ||
Line 754: | Line 886: | ||
<div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> | <div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> | ||
− | + | <span style='display:none'>User Comments</span> | |
<!-- Edit below this comment --> | <!-- Edit below this comment --> | ||
− | <!-- Pod2Wiki= | + | <!-- Pod2Wiki= --> |
+ | </div> | ||
+ | <!-- Pod2Wiki=item_get_ids_by_field_values --> | ||
====$ids = $db->get_ids_by_field_values( $field, $dataset [ %opts ] )==== | ====$ids = $db->get_ids_by_field_values( $field, $dataset [ %opts ] )==== | ||
Line 764: | Line 898: | ||
<div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> | <div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> | ||
− | + | <span style='display:none'>User Comments</span> | |
<!-- Edit below this comment --> | <!-- Edit below this comment --> | ||
− | <!-- Pod2Wiki= | + | <!-- Pod2Wiki= --> |
+ | </div> | ||
+ | <!-- Pod2Wiki=item_do --> | ||
====$success = $db->do( $sql )==== | ====$success = $db->do( $sql )==== | ||
Line 774: | Line 910: | ||
<div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> | <div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> | ||
− | + | <span style='display:none'>User Comments</span> | |
<!-- Edit below this comment --> | <!-- Edit below this comment --> | ||
− | <!-- Pod2Wiki= | + | <!-- Pod2Wiki= --> |
+ | </div> | ||
+ | <!-- Pod2Wiki=item_prepare --> | ||
====$sth = $db->prepare( $sql )==== | ====$sth = $db->prepare( $sql )==== | ||
Line 784: | Line 922: | ||
<div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> | <div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> | ||
− | + | <span style='display:none'>User Comments</span> | |
<!-- Edit below this comment --> | <!-- Edit below this comment --> | ||
− | <!-- Pod2Wiki= | + | <!-- Pod2Wiki= --> |
+ | </div> | ||
+ | <!-- Pod2Wiki=item_prepare_select --> | ||
====$sth = $db->prepare_select( $sql [, %options ] )==== | ====$sth = $db->prepare_select( $sql [, %options ] )==== | ||
Line 801: | Line 941: | ||
<div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> | <div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> | ||
− | + | <span style='display:none'>User Comments</span> | |
<!-- Edit below this comment --> | <!-- Edit below this comment --> | ||
− | <!-- Pod2Wiki= | + | <!-- Pod2Wiki= --> |
+ | </div> | ||
+ | <!-- Pod2Wiki=item_execute --> | ||
====$success = $db->execute( $sth, $sql )==== | ====$success = $db->execute( $sth, $sql )==== | ||
Line 811: | Line 953: | ||
<div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> | <div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> | ||
− | + | <span style='display:none'>User Comments</span> | |
<!-- Edit below this comment --> | <!-- Edit below this comment --> | ||
− | <!-- Pod2Wiki= | + | <!-- Pod2Wiki= --> |
+ | </div> | ||
+ | <!-- Pod2Wiki=item_has_dataset --> | ||
====$db->has_dataset( $dataset )==== | ====$db->has_dataset( $dataset )==== | ||
Line 823: | Line 967: | ||
<div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> | <div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> | ||
− | + | <span style='display:none'>User Comments</span> | |
<!-- Edit below this comment --> | <!-- Edit below this comment --> | ||
− | <!-- Pod2Wiki= | + | <!-- Pod2Wiki= --> |
+ | </div> | ||
+ | <!-- Pod2Wiki=item_has_field --> | ||
====$db->has_field( $dataset, $field )==== | ====$db->has_field( $dataset, $field )==== | ||
Line 833: | Line 979: | ||
<div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> | <div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> | ||
− | + | <span style='display:none'>User Comments</span> | |
<!-- Edit below this comment --> | <!-- Edit below this comment --> | ||
− | <!-- Pod2Wiki= | + | <!-- Pod2Wiki= --> |
+ | </div> | ||
+ | <!-- Pod2Wiki=item_add_field --> | ||
====$db->add_field( $dataset, $field [, $force ] )==== | ====$db->add_field( $dataset, $field [, $force ] )==== | ||
Line 845: | Line 993: | ||
<div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> | <div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> | ||
− | + | <span style='display:none'>User Comments</span> | |
<!-- Edit below this comment --> | <!-- Edit below this comment --> | ||
− | <!-- Pod2Wiki= | + | <!-- Pod2Wiki= --> |
+ | </div> | ||
+ | <!-- Pod2Wiki=item_remove_field --> | ||
====$db->remove_field( $dataset, $field )==== | ====$db->remove_field( $dataset, $field )==== | ||
Line 855: | Line 1,005: | ||
<div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> | <div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> | ||
− | + | <span style='display:none'>User Comments</span> | |
<!-- Edit below this comment --> | <!-- Edit below this comment --> | ||
− | <!-- Pod2Wiki= | + | <!-- Pod2Wiki= --> |
+ | </div> | ||
+ | <!-- Pod2Wiki=item_rename_field --> | ||
====$ok = $db->rename_field( $dataset, $field, $old_name )==== | ====$ok = $db->rename_field( $dataset, $field, $old_name )==== | ||
Line 867: | Line 1,019: | ||
<div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> | <div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> | ||
− | + | <span style='display:none'>User Comments</span> | |
<!-- Edit below this comment --> | <!-- Edit below this comment --> | ||
− | <!-- Pod2Wiki= | + | <!-- Pod2Wiki= --> |
+ | </div> | ||
+ | <!-- Pod2Wiki=item_exists --> | ||
====$boolean = $db->exists( $dataset, $id )==== | ====$boolean = $db->exists( $dataset, $id )==== | ||
Line 877: | Line 1,031: | ||
<div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> | <div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> | ||
− | + | <span style='display:none'>User Comments</span> | |
<!-- Edit below this comment --> | <!-- Edit below this comment --> | ||
− | <!-- Pod2Wiki= | + | <!-- Pod2Wiki= --> |
+ | </div> | ||
+ | <!-- Pod2Wiki=item_set_debug --> | ||
====$db->set_debug( $boolean )==== | ====$db->set_debug( $boolean )==== | ||
Line 887: | Line 1,043: | ||
<div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> | <div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> | ||
− | + | <span style='display:none'>User Comments</span> | |
<!-- Edit below this comment --> | <!-- Edit below this comment --> | ||
− | <!-- Pod2Wiki= | + | <!-- Pod2Wiki= --> |
+ | </div> | ||
+ | <!-- Pod2Wiki=item_create_version_table --> | ||
====$db->create_version_table==== | ====$db->create_version_table==== | ||
Line 897: | Line 1,055: | ||
<div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> | <div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> | ||
− | + | <span style='display:none'>User Comments</span> | |
<!-- Edit below this comment --> | <!-- Edit below this comment --> | ||
− | <!-- Pod2Wiki= | + | <!-- Pod2Wiki= --> |
+ | </div> | ||
+ | <!-- Pod2Wiki=item_drop_version_table --> | ||
====$db->drop_version_table==== | ====$db->drop_version_table==== | ||
Line 907: | Line 1,067: | ||
<div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> | <div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> | ||
− | + | <span style='display:none'>User Comments</span> | |
<!-- Edit below this comment --> | <!-- Edit below this comment --> | ||
− | <!-- Pod2Wiki= | + | <!-- Pod2Wiki= --> |
+ | </div> | ||
+ | <!-- Pod2Wiki=item_set_version --> | ||
====$db->set_version( $versionid );==== | ====$db->set_version( $versionid );==== | ||
Line 917: | Line 1,079: | ||
<div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> | <div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> | ||
− | + | <span style='display:none'>User Comments</span> | |
<!-- Edit below this comment --> | <!-- Edit below this comment --> | ||
− | <!-- Pod2Wiki= | + | <!-- Pod2Wiki= --> |
+ | </div> | ||
+ | <!-- Pod2Wiki=item_has_table --> | ||
====$boolean = $db->has_table( $tablename )==== | ====$boolean = $db->has_table( $tablename )==== | ||
Line 927: | Line 1,091: | ||
<div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> | <div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> | ||
− | + | <span style='display:none'>User Comments</span> | |
<!-- Edit below this comment --> | <!-- Edit below this comment --> | ||
− | <!-- Pod2Wiki= | + | <!-- Pod2Wiki= --> |
+ | </div> | ||
+ | <!-- Pod2Wiki=item_has_column --> | ||
====$boolean = $db->has_column( $tablename, $columnname )==== | ====$boolean = $db->has_column( $tablename, $columnname )==== | ||
Line 937: | Line 1,103: | ||
<div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> | <div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> | ||
− | + | <span style='display:none'>User Comments</span> | |
<!-- Edit below this comment --> | <!-- Edit below this comment --> | ||
− | <!-- Pod2Wiki= | + | <!-- Pod2Wiki= --> |
+ | </div> | ||
+ | <!-- Pod2Wiki=item_index_name --> | ||
+ | ====$name = $db->index_name( $table, @columns )==== | ||
+ | |||
+ | Returns the name of the first index that starts with @columns on the $table table. | ||
+ | |||
+ | Returns undef if no index exists. | ||
+ | |||
+ | <div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> | ||
+ | <span style='display:none'>User Comments</span> | ||
+ | <!-- Edit below this comment --> | ||
+ | |||
+ | |||
+ | <!-- Pod2Wiki= --> | ||
+ | </div> | ||
+ | <!-- Pod2Wiki=item_drop_table --> | ||
====$db->drop_table( $tablename )==== | ====$db->drop_table( $tablename )==== | ||
Line 947: | Line 1,129: | ||
<div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> | <div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> | ||
− | + | <span style='display:none'>User Comments</span> | |
<!-- Edit below this comment --> | <!-- Edit below this comment --> | ||
− | <!-- Pod2Wiki= | + | <!-- Pod2Wiki= --> |
+ | </div> | ||
+ | <!-- Pod2Wiki=item_clear_table --> | ||
====$db->clear_table( $tablename )==== | ====$db->clear_table( $tablename )==== | ||
Line 957: | Line 1,141: | ||
<div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> | <div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> | ||
− | + | <span style='display:none'>User Comments</span> | |
<!-- Edit below this comment --> | <!-- Edit below this comment --> | ||
− | <!-- Pod2Wiki= | + | <!-- Pod2Wiki= --> |
+ | </div> | ||
+ | <!-- Pod2Wiki=item_rename_table --> | ||
====$db->rename_table( $tablename, $newtablename )==== | ====$db->rename_table( $tablename, $newtablename )==== | ||
Line 967: | Line 1,153: | ||
<div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> | <div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> | ||
− | + | <span style='display:none'>User Comments</span> | |
<!-- Edit below this comment --> | <!-- Edit below this comment --> | ||
− | <!-- Pod2Wiki= | + | <!-- Pod2Wiki= --> |
+ | </div> | ||
+ | <!-- Pod2Wiki=item_swap_table --> | ||
====$db->swap_table( $table_a, $table_b )==== | ====$db->swap_table( $table_a, $table_b )==== | ||
Line 977: | Line 1,165: | ||
<div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> | <div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> | ||
− | + | <span style='display:none'>User Comments</span> | |
<!-- Edit below this comment --> | <!-- Edit below this comment --> | ||
− | <!-- Pod2Wiki= | + | <!-- Pod2Wiki= --> |
+ | </div> | ||
+ | <!-- Pod2Wiki=item_get_tables --> | ||
====@tables = $db->get_tables==== | ====@tables = $db->get_tables==== | ||
Line 987: | Line 1,177: | ||
<div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> | <div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> | ||
− | + | <span style='display:none'>User Comments</span> | |
<!-- Edit below this comment --> | <!-- Edit below this comment --> | ||
− | <!-- Pod2Wiki= | + | <!-- Pod2Wiki= --> |
+ | </div> | ||
+ | <!-- Pod2Wiki=item_get_version --> | ||
====$version = $db->get_version==== | ====$version = $db->get_version==== | ||
Line 997: | Line 1,189: | ||
<div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> | <div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> | ||
− | + | <span style='display:none'>User Comments</span> | |
<!-- Edit below this comment --> | <!-- Edit below this comment --> | ||
− | <!-- Pod2Wiki= | + | <!-- Pod2Wiki= --> |
+ | </div> | ||
+ | <!-- Pod2Wiki=item_is_latest_version --> | ||
====$boolean = $db->is_latest_version==== | ====$boolean = $db->is_latest_version==== | ||
Line 1,007: | Line 1,201: | ||
<div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> | <div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> | ||
− | + | <span style='display:none'>User Comments</span> | |
<!-- Edit below this comment --> | <!-- Edit below this comment --> | ||
− | <!-- Pod2Wiki= | + | <!-- Pod2Wiki= --> |
+ | </div> | ||
+ | <!-- Pod2Wiki=item_valid_login --> | ||
====$db->valid_login( $username, $password )==== | ====$db->valid_login( $username, $password )==== | ||
Line 1,017: | Line 1,213: | ||
<div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> | <div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> | ||
− | + | <span style='display:none'>User Comments</span> | |
<!-- Edit below this comment --> | <!-- Edit below this comment --> | ||
− | <!-- Pod2Wiki= | + | <!-- Pod2Wiki= --> |
+ | </div> | ||
+ | <!-- Pod2Wiki=item_get_server_version --> | ||
====$version = $db->get_server_version==== | ====$version = $db->get_server_version==== | ||
Line 1,027: | Line 1,225: | ||
<div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> | <div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> | ||
− | + | <span style='display:none'>User Comments</span> | |
<!-- Edit below this comment --> | <!-- Edit below this comment --> | ||
− | <!-- Pod2Wiki= | + | <!-- Pod2Wiki= --> |
+ | </div> | ||
+ | <!-- Pod2Wiki=item_get_default_charset --> | ||
====$charset = $db->get_default_charset( LANGUAGE )==== | ====$charset = $db->get_default_charset( LANGUAGE )==== | ||
Line 1,039: | Line 1,239: | ||
<div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> | <div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> | ||
− | + | <span style='display:none'>User Comments</span> | |
<!-- Edit below this comment --> | <!-- Edit below this comment --> | ||
− | <!-- Pod2Wiki= | + | <!-- Pod2Wiki= --> |
+ | </div> | ||
+ | <!-- Pod2Wiki=item_get_default_collation --> | ||
====$collation = $db->get_default_collation( LANGUAGE )==== | ====$collation = $db->get_default_collation( LANGUAGE )==== | ||
Line 1,051: | Line 1,253: | ||
<div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> | <div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> | ||
− | + | <span style='display:none'>User Comments</span> | |
<!-- Edit below this comment --> | <!-- Edit below this comment --> | ||
− | <!-- Pod2Wiki= | + | <!-- Pod2Wiki= --> |
+ | </div> | ||
+ | <!-- Pod2Wiki=item_get_driver_name --> | ||
====$driver = $db->get_driver_name==== | ====$driver = $db->get_driver_name==== | ||
Line 1,061: | Line 1,265: | ||
<div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> | <div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> | ||
− | + | <span style='display:none'>User Comments</span> | |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
<!-- Edit below this comment --> | <!-- Edit below this comment --> | ||
− | <!-- Pod2Wiki= | + | <!-- Pod2Wiki= --> |
+ | </div> | ||
+ | <!-- Pod2Wiki=item_dequeue_events --> | ||
====@events = $db->dequeue_events( $n )==== | ====@events = $db->dequeue_events( $n )==== | ||
Line 1,077: | Line 1,277: | ||
<div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> | <div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> | ||
− | + | <span style='display:none'>User Comments</span> | |
<!-- Edit below this comment --> | <!-- Edit below this comment --> | ||
− | <!-- Pod2Wiki= | + | <!-- Pod2Wiki= --> |
+ | </div> | ||
+ | <!-- Pod2Wiki=item_prepare_regexp --> | ||
====$sql = $db->prepare_regexp( $quoted_column, $quoted_value )==== | ====$sql = $db->prepare_regexp( $quoted_column, $quoted_value )==== | ||
Line 1,087: | Line 1,289: | ||
<div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> | <div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> | ||
− | + | <span style='display:none'>User Comments</span> | |
+ | <!-- Edit below this comment --> | ||
+ | |||
+ | |||
+ | <!-- Pod2Wiki= --> | ||
+ | </div> | ||
+ | <!-- Pod2Wiki=item_alias_glue --> | ||
+ | ====$glue = $db->alias_glue()==== | ||
+ | |||
+ | Returns the syntactic glue to use when aliasing. SQL 92 DBs will happilly use " AS " but some DBs (Oracle!) won't accept it. | ||
+ | |||
+ | <div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> | ||
+ | <span style='display:none'>User Comments</span> | ||
<!-- Edit below this comment --> | <!-- Edit below this comment --> | ||
+ | <!-- Pod2Wiki= --> | ||
+ | </div> | ||
<!-- Pod2Wiki=_postamble_ --><!-- Edit below this comment --> | <!-- Pod2Wiki=_postamble_ --><!-- Edit below this comment --> |
Revision as of 13:21, 25 February 2010
EPrints 3 Reference: Directory Structure - Metadata Fields - Repository Configuration - XML Config Files - XML Export Format - EPrints data structure - Core API - Data Objects
Latest Source Code (3.4, 3.3) | Revision Log | Before editing this page please read Pod2Wiki
Contents
- 1 NAME
- 2 DESCRIPTION
- 2.1 Cross-database Support
- 2.1.1 $dbstr = EPrints::Database::build_connection_string( %params )
- 2.1.2 $db = $db->create( $username, $password )
- 2.1.3 $db = EPrints::Database->new( $session )
- 2.1.4 $foo = $db->connect
- 2.1.5 $foo = $db->disconnect
- 2.1.6 $errstr = $db->error
- 2.1.7 $db->begin
- 2.1.8 $db->commit
- 2.1.9 $db->rollback
- 2.1.10 $success = $db->create_archive_tables
- 2.1.11 $db->drop_archive_tables()
- 2.1.12 $success = $db->create_dataset_tables( $dataset )
- 2.1.13 $db->drop_dataset_tables( $dataset )
- 2.1.14 $success = $db->create_dataset_index_tables( $dataset )
- 2.1.15 $success = $db->create_dataset_ordervalues_tables( $dataset )
- 2.1.16 $type_info = $db->type_info( DATA_TYPE )
- 2.1.17 $real_type = $db->get_column_type( NAME, TYPE, NOT_NULL, [ LENGTH/PRECISION ], [ SCALE ], %opts )
- 2.1.18 $success = $db->create_table( $tablename, $dataset, $setkey, @fields );
- 2.1.19 $boolean = $db->has_sequence( $name )
- 2.1.20 $success = $db->create_sequence( $seq_name )
- 2.1.21 $success = $db->drop_sequence( $seq_name )
- 2.1.22 $success = $db->drop_column( $table, $column )
- 2.1.23 @columns = $db->get_primary_key( $tablename )
- 2.1.24 $success = $db->create_index( $tablename, @columns )
- 2.1.25 $success = $db->create_unique_index( $tablename, @columns )
- 2.1.26 $success = $db->_update( $tablename, $keycols, $keyvals, $columns, @values )
- 2.1.27 $success = $db->_update_quoted( $tablename, $keycols, $keyvals, $columns, @qvalues )
- 2.1.28 $success = $db->insert( $table, $columns, @values )
- 2.1.29 $success = $db->insert_quoted( $table, $columns, @qvalues )
- 2.1.30 $success = $db->delete_from( $table, $columns, @values )
- 2.1.31 $success = $db->add_record( $dataset, $data )
- 2.1.32 $mungedvalue = EPrints::Database::prep_int( $value )
- 2.1.33 $mungedvalue = EPrints::Database::prep_value( $value )
- 2.1.34 $mungedvalue = EPrints::Database::prep_like_value( $value )
- 2.1.35 $str = $db->quote_value( $value )
- 2.1.36 $str = $db->quote_int( $value )
- 2.1.37 $str = $db->quote_binary( $bytes )
- 2.1.38 $str = $db->quote_identifier( @parts )
- 2.1.39 $success = $db->update( $dataset, $data, $changed, $insert )
- 2.1.40 $success = $db->remove( $dataset, $id )
- 2.1.41 $success = $db->create_counters
- 2.1.42 $success = $db->has_counter( $counter )
- 2.1.43 $success = $db->create_counter( $name )
- 2.1.44 $success = $db->remove_counters
- 2.1.45 $success = $db->drop_counter( $name )
- 2.1.46 $n = $db->next_doc_pos( $eprintid )
- 2.1.47 $n = $db->counter_current( $counter )
- 2.1.48 $n = $db->counter_next( $counter )
- 2.1.49 $db->counter_minimum( $counter, $value )
- 2.1.50 $db->counter_reset( $counter )
- 2.1.51 $searchexp = $db->cache_exp( $cacheid )
- 2.1.52 $cacheid = $db->cache( $searchexp, $dataset, $srctable, [$order], [$list] )
- 2.1.53 $tablename = $db->cache_table( $id )
- 2.1.54 $ids = $db->get_index_ids( $table, $condition )
- 2.1.55 $ids = $db->search( $keyfield, $tables, $conditions, [$main_table_alias] )
- 2.1.56 $db->drop_cache( $id )
- 2.1.57 $n = $db->count_table( $tablename )
- 2.1.58 $foo = $db->from_cache( $dataset, $cacheid, [$offset], [$count], [$justids] )
- 2.1.59 $c = $db->drop_orphan_cache_tables
- 2.1.60 $obj = $db->get_single( $dataset, $id )
- 2.1.61 $items = $db->get_all( $dataset )
- 2.1.62 @ids = $db->get_cache_ids( $dataset, $cachemap, $offset, $count )
- 2.1.63 @dataobjs = $db->get_dataobjs( $dataset [, $id [, $id ] ] )
- 2.1.64 $foo = $db->get_values( $field, $dataset )
- 2.1.65 $values = $db->sort_values( $field, $values [, $langid ] )
- 2.1.66 $ids = $db->get_ids_by_field_values( $field, $dataset [ %opts ] )
- 2.1.67 $success = $db->do( $sql )
- 2.1.68 $sth = $db->prepare( $sql )
- 2.1.69 $sth = $db->prepare_select( $sql [, %options ] )
- 2.1.70 $success = $db->execute( $sth, $sql )
- 2.1.71 $db->has_dataset( $dataset )
- 2.1.72 $db->has_field( $dataset, $field )
- 2.1.73 $db->add_field( $dataset, $field [, $force ] )
- 2.1.74 $db->remove_field( $dataset, $field )
- 2.1.75 $ok = $db->rename_field( $dataset, $field, $old_name )
- 2.1.76 $boolean = $db->exists( $dataset, $id )
- 2.1.77 $db->set_debug( $boolean )
- 2.1.78 $db->create_version_table
- 2.1.79 $db->drop_version_table
- 2.1.80 $db->set_version( $versionid );
- 2.1.81 $boolean = $db->has_table( $tablename )
- 2.1.82 $boolean = $db->has_column( $tablename, $columnname )
- 2.1.83 $name = $db->index_name( $table, @columns )
- 2.1.84 $db->drop_table( $tablename )
- 2.1.85 $db->clear_table( $tablename )
- 2.1.86 $db->rename_table( $tablename, $newtablename )
- 2.1.87 $db->swap_table( $table_a, $table_b )
- 2.1.88 @tables = $db->get_tables
- 2.1.89 $version = $db->get_version
- 2.1.90 $boolean = $db->is_latest_version
- 2.1.91 $db->valid_login( $username, $password )
- 2.1.92 $version = $db->get_server_version
- 2.1.93 $charset = $db->get_default_charset( LANGUAGE )
- 2.1.94 $collation = $db->get_default_collation( LANGUAGE )
- 2.1.95 $driver = $db->get_driver_name
- 2.1.96 @events = $db->dequeue_events( $n )
- 2.1.97 $sql = $db->prepare_regexp( $quoted_column, $quoted_value )
- 2.1.98 $glue = $db->alias_glue()
- 2.1 Cross-database Support
NAME
EPrints::Database - a connection to the SQL database for an eprints session.
DESCRIPTION
EPrints Database Access Module
Provides access to the backend database. All database access done via this module, in the hope that the backend can be replaced as easily as possible.
The database object is created automatically when you start a new eprints session. To get a handle on it use:
$db = $session->get_database
Cross-database Support
Any use of SQL must use quote_identifier to quote database tables and columns. The only exception to this are the Database::* modules which provide database-driver specific extensions.
Variables that are database quoted are prefixed with 'Q_'.
$dbstr = EPrints::Database::build_connection_string( %params )
Build the string to use to connect to the database via DBI. %params must contain dbname, and may also contain dbport, dbhost and dbsock.
$db = $db->create( $username, $password )
Create and connect to a new database using super user account $username and $password.
$db = EPrints::Database->new( $session )
Create a connection to the database.
$foo = $db->connect
Connects to the database.
$foo = $db->disconnect
Disconnects from the EPrints database. Should always be done before any script exits.
$errstr = $db->error
Return a string describing the last SQL error.
$db->begin
Begin a transaction.
$db->commit
Commit the previous begun transaction.
$db->rollback
Rollback the partially completed transaction.
$success = $db->create_archive_tables
Create all the SQL tables for each dataset.
$db->drop_archive_tables()
Destroy all tables used by eprints in the database.
$success = $db->create_dataset_tables( $dataset )
Create all the SQL tables for a single dataset.
$db->drop_dataset_tables( $dataset )
Drop all the SQL tables for a single dataset.
$success = $db->create_dataset_index_tables( $dataset )
Create all the index tables for a single dataset.
$success = $db->create_dataset_ordervalues_tables( $dataset )
Create all the ordervalues tables for a single dataset.
$type_info = $db->type_info( DATA_TYPE )
See DBI/type_info.
$real_type = $db->get_column_type( NAME, TYPE, NOT_NULL, [ LENGTH/PRECISION ], [ SCALE ], %opts )
Returns a SQL column definition for NAME of type TYPE, usually something like:
$name $type($length,$scale) [ NOT NULL ]
If NOT_NULL is true column will be set "not null".
LENGTH/PRECISION and SCALE control the maximum lengths of character or decimal types (see below).
Other options available to refine the column definition:
langid - character set/collation to use sorted - whether this column will be used to order by
langid is mapped to real database values by the "dblanguages" configuration option. The database may not be able to order the request column type in which case, if sorted is true, the database may use a substitute column type.
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, SQL_BIGINT.
Floating-point data: SQL_REAL, SQL_DOUBLE.
Time data: SQL_DATE, SQL_TIME.
The actual column types used will be database-specific.
$success = $db->create_table( $tablename, $dataset, $setkey, @fields );
Create the tables used to store metadata for this dataset: the main table and any required for multiple or mulitlang fields.
The first $setkey number of fields are used for a primary key.
$boolean = $db->has_sequence( $name )
Return true if a sequence of the given name exists in the database.
$success = $db->create_sequence( $seq_name )
Creates a new sequence object initialised to zero.
$success = $db->drop_sequence( $seq_name )
Deletes a sequence object.
$success = $db->drop_column( $table, $column )
Drops a column from a table.
@columns = $db->get_primary_key( $tablename )
Returns the list of column names that comprise the primary key for $tablename.
Returns empty list if no primary key exists.
$success = $db->create_index( $tablename, @columns )
Creates an index over @columns for $tablename. Returns true on success.
$success = $db->create_unique_index( $tablename, @columns )
Creates a unique index over @columns for $tablename. Returns true on success.
$success = $db->_update( $tablename, $keycols, $keyvals, $columns, @values )
UPDATES $tablename where $keycols equals $keyvals.
This method is internal.
$success = $db->_update_quoted( $tablename, $keycols, $keyvals, $columns, @qvalues )
UPDATES $tablename where $keycols equals $keyvals. Won't quote $keyvals or @qvalues before use - use this method with care!
This method is internal.
$success = $db->insert( $table, $columns, @values )
Inserts values into the table $table. If $columns is defined it will be used as a list of columns to insert into. @values is a list of arrays containing values to insert.
Values will be quoted before insertion.
$success = $db->insert_quoted( $table, $columns, @qvalues )
Inserts values into the table $table. If $columns is defined it will be used as a list of columns to insert into. @qvalues is a list of arrays containing values to insert.
Values will NOT be quoted before insertion - care must be exercised!
$success = $db->delete_from( $table, $columns, @values )
Perform a SQL DELETE FROM $table using $columns to build a where clause. @values is a list of array references of values in the same order as $columns.
If you want to clear a table completely use clear_table().
$success = $db->add_record( $dataset, $data )
Add the given data as a new record in the given dataset. $data is a reference to a hash containing values structured for a record in the that dataset.
$mungedvalue = EPrints::Database::prep_int( $value )
Escape a numerical value for SQL. undef becomes NULL. Anything else becomes a number (zero if needed).
$mungedvalue = EPrints::Database::prep_value( $value )
Escape a value for SQL. Modify value such that " becomes \" and \ becomes \\ and ' becomes \'
$mungedvalue = EPrints::Database::prep_like_value( $value )
Escape an value for an SQL like field. In addition to ' " and \ also escapes % and _
$str = $db->quote_value( $value )
Return a quoted value. To quote a 'like' value you should do:
my $str = $database->quote_value( EPrints::Database::prep_like_value( $foo ) . '%' );
$str = $db->quote_int( $value )
Return a quoted integer value
$str = $db->quote_binary( $bytes )
Some databases (PostgreSQL) require weird transforms of binary data to work correctly.
This method should be called on data containing nul bytes or back-slashes before being passed on /quote_value.
$str = $db->quote_identifier( @parts )
Quote a database identifier (e.g. table names). Multiple @parts will be joined by dot.
$success = $db->update( $dataset, $data, $changed, $insert )
Updates a record in the database with the given $data. Obviously the value of the primary key must be set.
This also updates the text indexes and the ordering keys.
$success = $db->remove( $dataset, $id )
Attempts to remove the record with the primary key $id from the specified dataset.
$success = $db->create_counters
Create the counters used to store the highest current id of eprints, users etc.
$success = $db->has_counter( $counter )
Returns true if $counter exists.
$success = $db->create_counter( $name )
Create and initialise to zero a new counter called $name.
$success = $db->remove_counters
Destroy all counters.
$success = $db->drop_counter( $name )
Destroy the counter named $name.
$n = $db->next_doc_pos( $eprintid )
Return the next unused document pos for the given eprintid.
$n = $db->counter_current( $counter )
Return the value of the previous counter_next on $counter.
$n = $db->counter_next( $counter )
Return the next unused value for the named counter. Returns undef if the counter doesn't exist.
$db->counter_minimum( $counter, $value )
Ensure that the counter is set no lower than $value. This is used when importing eprints which may not be in scrict sequence.
$db->counter_reset( $counter )
Reset the counter. Use with caution.
$searchexp = $db->cache_exp( $cacheid )
Return the serialised Search of a the cached search with id $cacheid. Return undef if the id is invalid or expired.
$cacheid = $db->cache( $searchexp, $dataset, $srctable, [$order], [$list] )
Create a cache of the specified search expression from the SQL table $srctable.
If $order is set then the cache is ordered by the specified fields. For example "-year/title" orders by year (descending). Records with the same year are ordered by title.
If $srctable is set to "LIST" then order is ignored and the list of ids is taken from the array reference $list.
If $srctable is set to "ALL" every matching record from $dataset is added to the cache, optionally ordered by $order.
$tablename = $db->cache_table( $id )
Return the SQL table used to store the cache with id $id.
$ids = $db->get_index_ids( $table, $condition )
Return a reference to an array of the distinct primary keys from the given SQL table which match the specified condition.
$ids = $db->search( $keyfield, $tables, $conditions, [$main_table_alias] )
Return a reference to an array of ids - the results of the search specified by $conditions accross the tables specified in the $tables hash where keys are tables aliases and values are table names.
If no table alias is passed then M is assumed.
$db->drop_cache( $id )
Remove the cached search with the given id.
$n = $db->count_table( $tablename )
Return the number of rows in the specified SQL table.
$foo = $db->from_cache( $dataset, $cacheid, [$offset], [$count], [$justids] )
Return a reference to an array containing all the items from the given dataset that have id's in the specified cache. The cache may be specified either by id or serialised search expression.
$offset is an offset from the start of the cache and $count is the number of records to return.
If $justids is true then it returns just an ref to an array of the record ids, not the objects.
$c = $db->drop_orphan_cache_tables
Drop tables called "cacheXXX" where XXX is an integer. Returns the number of tables dropped.
$obj = $db->get_single( $dataset, $id )
Return a single item from the given dataset. The one with the specified id.
$items = $db->get_all( $dataset )
Returns a reference to an array with all the items from the given dataset.
@ids = $db->get_cache_ids( $dataset, $cachemap, $offset, $count )
Returns a list of $count ids from $cache_id starting at $offset and in the order in the cachemap.
@dataobjs = $db->get_dataobjs( $dataset [, $id [, $id ] ] )
Retrieves the records in $dataset with the given $id(s). If an $id doesn't exist in the database it will be ignored.
$foo = $db->get_values( $field, $dataset )
Return a reference to an array of all the distinct values of the EPrints::MetaField specified.
$values = $db->sort_values( $field, $values [, $langid ] )
ALPHA!!! Liable to API change!!!
Sorts and returns the list of $values using the database.
$field is used to get the order value for each value. $langid (or $session->get_langid if unset) is used to determine the database collation to use when sorting the resulting order values.
$ids = $db->get_ids_by_field_values( $field, $dataset [ %opts ] )
Return a reference to a hash table where the keys are field value ids and the value is a reference to an array of ids.
$success = $db->do( $sql )
Execute the given SQL.
$sth = $db->prepare( $sql )
Prepare the given $sql and return a handle on it.
$sth = $db->prepare_select( $sql [, %options ] )
Prepare a SELECT statement $sql and return a handle to it. After preparing a statement use execute() to execute it.
The LIMIT SQL keyword is not universally supported, to specify a LIMIT you must use the limit option.
Options:
limit - limit the number of rows returned offset - return limit number of rows after offset
$success = $db->execute( $sth, $sql )
Execute the SQL prepared earlier. $sql is only passed in for debugging purposes.
$db->has_dataset( $dataset )
Returns true if $dataset exists in the database or has no database tables.
This does not check that all fields are configured - see has_field().
$db->has_field( $dataset, $field )
Returns true if $field is in the database for $dataset.
$db->add_field( $dataset, $field [, $force ] )
Add $field to $dataset's tables.
If $force is true will modify/replace an existing column (use with care!).
$db->remove_field( $dataset, $field )
Remove $field from $dataset's tables.
$ok = $db->rename_field( $dataset, $field, $old_name )
Rename a $field in the database from it's old name $old_name.
Returns true if the field was successfully renamed.
$boolean = $db->exists( $dataset, $id )
Return true if a record with the given primary key exists in the dataset, otherwise false.
$db->set_debug( $boolean )
Set the SQL debug mode to true or false.
$db->create_version_table
Make the version table (and set the only value to be the current version of eprints).
$db->drop_version_table
Drop the version table.
$db->set_version( $versionid );
Set the version id table in the SQL database to the given value (used by the upgrade script).
$boolean = $db->has_table( $tablename )
Return true if a table of the given name exists in the database.
$boolean = $db->has_column( $tablename, $columnname )
Return true if the a table of the given name has a column named $columnname in the database.
$name = $db->index_name( $table, @columns )
Returns the name of the first index that starts with @columns on the $table table.
Returns undef if no index exists.
$db->drop_table( $tablename )
Delete the named table. Use with caution!
$db->clear_table( $tablename )
Clears all records from the given table, use with caution!
$db->rename_table( $tablename, $newtablename )
Renames the table from the old name to the new one.
$db->swap_table( $table_a, $table_b )
Swap table a and table b.
@tables = $db->get_tables
Return a list of all the tables in the database.
$version = $db->get_version
Return the version of eprints which the database is compatable with or undef if unknown (before v2.1).
$boolean = $db->is_latest_version
Return true if the SQL tables are in the correct configuration for this edition of eprints. Otherwise false.
$db->valid_login( $username, $password )
Returns whether the clear-text $password matches the stored crypted password for $username.
$version = $db->get_server_version
Return the database server version.
$charset = $db->get_default_charset( LANGUAGE )
Return the character set to use for LANGUAGE.
Returns undef if character sets are unsupported.
$collation = $db->get_default_collation( LANGUAGE )
Return the collation to use for LANGUAGE.
Returns undef if collation is unsupported.
$driver = $db->get_driver_name
Return the database driver name.
@events = $db->dequeue_events( $n )
Attempt to dequeue upto $n events. May return between 0 and $n events depending on parallel processes and how many events are remaining on the queue.
$sql = $db->prepare_regexp( $quoted_column, $quoted_value )
The syntax used for regular expressions varies across databases. This method takes two quoted values and returns a SQL expression that will apply the regexp ($quoted_value) to the column ($quoted_column).
$glue = $db->alias_glue()
Returns the syntactic glue to use when aliasing. SQL 92 DBs will happilly use " AS " but some DBs (Oracle!) won't accept it.