PHP Class InsertQuery, fluentpdo

Inheritance: extends BaseQuery
Afficher le fichier Open project: fpdo/fluentpdo Class Usage Examples

Méthodes publiques

Méthode Description
__construct ( FluentPDO $fpdo, string $table, $values ) InsertQuery constructor.
delayed ( ) : InsertQuery Force insert operation delay support
execute ( mixed $sequence = null ) : integer Execute insert query
ignore ( ) : InsertQuery Force insert operation to fail silently
onDuplicateKeyUpdate ( array $values ) : InsertQuery Add ON DUPLICATE KEY UPDATE
values ( $values ) : InsertQuery Add VALUES

Méthodes protégées

Méthode Description
buildParameters ( ) : array
filterLiterals ( $statements ) : array Removes all FluentLiteral instances from the argument since they are not to be used as PDO parameters but rather injected directly into the query
getClauseInsertInto ( ) : string
getClauseOnDuplicateKeyUpdate ( ) : string
getClauseValues ( ) : string
parameterGetValue ( $param ) : string

Private Methods

Méthode Description
addOneValue ( array $oneValue )

Method Details

__construct() public méthode

InsertQuery constructor.
public __construct ( FluentPDO $fpdo, string $table, $values )
$fpdo FluentPDO
$table string
$values

buildParameters() protected méthode

protected buildParameters ( ) : array
Résultat array

delayed() public méthode

Force insert operation delay support
public delayed ( ) : InsertQuery
Résultat InsertQuery

execute() public méthode

Execute insert query
public execute ( mixed $sequence = null ) : integer
$sequence mixed
Résultat integer last inserted id or false

filterLiterals() protected méthode

Removes all FluentLiteral instances from the argument since they are not to be used as PDO parameters but rather injected directly into the query
protected filterLiterals ( $statements ) : array
$statements
Résultat array

getClauseInsertInto() protected méthode

protected getClauseInsertInto ( ) : string
Résultat string

getClauseOnDuplicateKeyUpdate() protected méthode

protected getClauseOnDuplicateKeyUpdate ( ) : string
Résultat string

getClauseValues() protected méthode

protected getClauseValues ( ) : string
Résultat string

ignore() public méthode

Force insert operation to fail silently
public ignore ( ) : InsertQuery
Résultat InsertQuery

onDuplicateKeyUpdate() public méthode

Add ON DUPLICATE KEY UPDATE
public onDuplicateKeyUpdate ( array $values ) : InsertQuery
$values array
Résultat InsertQuery

parameterGetValue() protected méthode

protected parameterGetValue ( $param ) : string
$param
Résultat string

values() public méthode

Add VALUES
public values ( $values ) : InsertQuery
$values
Résultat InsertQuery