PHP Classes

File: DATA/AssociativeIndexingStrategy.php

Recommend this page to a friend!
  Classes of Martin Alterisio   DATA   DATA/AssociativeIndexingStrategy.php   Download  
File: DATA/AssociativeIndexingStrategy.php
Role: Class source
Content type: text/plain
Description: An interface to algorithmic solutions for mapping an associative array index to rows in a database table.
Class: DATA
Access data stored in MySQL tables like arrays
Author: By
Last change: + anonymous access
Date: 17 years ago
Size: 1,470 bytes
 

Contents

Class file image Download
<?php
/**
 * @package DATA
 */

/**
 * An interface to algorithmic solutions for mapping an
 * associative array index to rows in a database table.
 */
interface DATA_AssociativeIndexingStrategy {
   
/**
     * Indicates if this indexing strategy matches single rows.
     *
     * Throws {@link DATA_IndexingStrategyException}.
     *
     * @return boolean True if indexing strategy matches single rows.
     */
   
public function isSingleRowIndexing();
   
/**
     * Returns inboxed version of the row offset provided.
     *
     * Throws {@link DATA_IndexingStrategyException}.
     *
     * @param string|DATA_SQLType $row The row offset.
     * @return DATA_SQLType Inboxed row offset.
     */
   
public function inboxRowOffset($row);
   
/**
     * Builds where conditions to select rows by the index used for array access.
     *
     * Throws {@link DATA_IndexingStrategyException}.
     *
     * @param DATA_SQLType $row The row offset.
     * @return string SQL where conditions to select the requested row.
     */
   
public function buildWhereConditions($row);
   
/**
     * Returns extra fields and values to be added on the insert of a row object.
     *
     * Throws {@link DATA_IndexingStrategyException}.
     *
     * @param DATA_SQLType $row The row offset.
     * @return array Additional fields to be added on insert.
     */
   
public function getAdditionalInsertFields($row);
}
?>