/**
* 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);
}
?>