BackendInterface

interface \TYPO3\CMS\Extbase\Persistence\Generic\Storage\BackendInterface

Storage backend interface

Table of Contents

Methods

addRow()  : int
Adds a row to the storage
getObjectCountByQuery()  : int
Returns the number of items matching the query.
getObjectDataByQuery()  : array
Returns the object data matching the $query.
getUidOfAlreadyPersistedValueObject()  : int|null
Checks if a Value Object equal to the given Object exists in the data base
removeRow()  : void
Deletes a row in the storage
updateRelationTableRow()  : void
Updates a relation row in the storage
updateRow()  : void
Updates a row in the storage

Methods

addRow()

Adds a row to the storage

public addRow(string $tableName, array $fieldValues[, bool $isRelation = false ]) : int

Parameters

$tableName : string

The database table name

$fieldValues : array

The fieldValues to insert

$isRelation : bool = false

TRUE if we are currently inserting into a relation table, FALSE by default

Return values

int —

the UID of the inserted row

getObjectCountByQuery()

Returns the number of items matching the query.

public getObjectCountByQuery(QueryInterface $query) : int

Parameters

$query : QueryInterface

Return values

int

getUidOfAlreadyPersistedValueObject()

Checks if a Value Object equal to the given Object exists in the data base

public getUidOfAlreadyPersistedValueObject(AbstractValueObject $object) : int|null

Parameters

$object : AbstractValueObject

The Value Object

Tags

todo

this is the last monster in this persistence series. refactor!

Return values

int|null —

The matching uid if an object was found, else null

removeRow()

Deletes a row in the storage

public removeRow(string $tableName, array $where[, bool $isRelation = false ]) : void

Parameters

$tableName : string

The database table name

$where : array

An array of where array('fieldname' => value). This array will be transformed to a WHERE clause

$isRelation : bool = false

TRUE if we are currently inserting into a relation table, FALSE by default

updateRelationTableRow()

Updates a relation row in the storage

public updateRelationTableRow(string $tableName, array $fieldValues) : void

Parameters

$tableName : string

The database relation table name

$fieldValues : array

The fieldValues to be updated

updateRow()

Updates a row in the storage

public updateRow(string $tableName, array $fieldValues[, bool $isRelation = false ]) : void

Parameters

$tableName : string

The database table name

$fieldValues : array

The fieldValues to update

$isRelation : bool = false

TRUE if we are currently inserting into a relation table, FALSE by default

On this page