spoof
 All Data Structures Namespaces Files Functions Variables Pages
ITable Interface Reference
Inheritance diagram for ITable:
Collaboration diagram for ITable:

Public Member Functions

 select (\lib360\db\condition\ICondition $condition=NULL, array $values=NULL, array $fields=NULL)
 selectRecords (array $conditions=array(), array $fields=NULL)
 update (array $fields,\lib360\db\condition\ICondition $condition=NULL, array $values=array())
 insert (array $fields)
 delete (\lib360\db\condition\ICondition $condition=NULL, array $values=array())
- Public Member Functions inherited from IStore
 getName ()
 getDB ()
 setName ($name)
 setDB ($db)
 getExecutor ()
 getLanguage ()

Detailed Description

Data table interface extends data storage interface. Data table implementations must be based on this interface.


Member Function Documentation

delete ( \lib360\db\condition\ICondition  $condition = NULL,
array  $values = array() 
)

Deletes table records that match the supplied database condition.

Parameters:
\lib360\db\condition\ICondition$conditionoptional condition to apply to the query
array$valuesoptional associative array of values for aliases in the condition object
Returns:
integer number of rows deleted

Implemented in Table.

insert ( array  $fields)

Inserts a database record.

Parameters:
array$fieldsassociative array of fields for insert (table field) => (update value)
Returns:
integer number of rows inserted

Implemented in Table.

select ( \lib360\db\condition\ICondition  $condition = NULL,
array  $values = NULL,
array  $fields = NULL 
)

Gets table records that match the supplied database condition.

Parameters:
\lib360\db\condition\ICondition$conditionoptional condition to apply to the query
array$valuesoptional associative array of values for aliases in the condition object
array$fieldsoptional array of fields to return, can be associative for (table field) => (select as field) or a simple array of table field names, will override default $fields property
Returns:
IRecordList a database recordlist object,
See also:
RecordList TODO add order/group by support

Implemented in Table.

selectRecords ( array  $conditions = array(),
array  $fields = NULL 
)

Gets table records by field criteria.

Parameters:
array$conditionsoptional associative array of column names and their values to use as conditions, values will explicitly be cast as strings
array$fieldsoptional array of fields to return, can be associative for (table field) => (select as field) or a simple array of table field names, will override default $fields property
Returns:
IRecordList object containing matched rows
See also:
RecordList

Implemented in Table.

update ( array  $fields,
\lib360\db\condition\ICondition  $condition = NULL,
array  $values = array() 
)

Updates database record(s) based on supplied criteria and values.

Parameters:
array$fieldsassociative array of fields to update (table field) => (update value)
\lib360\db\condition\ICondition$conditionoptional object to apply to the update
array$valuesoptional associative array of values for aliases in the condition object
Returns:
integer number of rows updated

Implemented in Table.


The documentation for this interface was generated from the following file: