Version 3 #1
@ -792,23 +792,6 @@ class QueryBuilder implements QueryBuilderInterface {
|
||||
return $affectedRows;
|
||||
}
|
||||
|
||||
/**
|
||||
* Insertion with automatic overwrite, rather than attempted duplication
|
||||
*
|
||||
* @param string $table
|
||||
* @param array $data
|
||||
* @return \PDOStatement|null
|
||||
*/
|
||||
public function replace(string $table, $data=[]): PDOStatement
|
||||
{
|
||||
if ( ! empty($data))
|
||||
{
|
||||
$this->set($data);
|
||||
}
|
||||
|
||||
return $this->_run('replace', $table);
|
||||
}
|
||||
|
||||
/**
|
||||
* Deletes data from a table
|
||||
*
|
||||
@ -914,7 +897,9 @@ class QueryBuilder implements QueryBuilderInterface {
|
||||
|
||||
if ( ! \is_string($as))
|
||||
{
|
||||
// @codeCoverageIgnoreStart
|
||||
return $field;
|
||||
// @codeCoverageIgnoreEnd
|
||||
}
|
||||
|
||||
$as = $this->driver->quoteIdent($as);
|
||||
@ -1199,6 +1184,7 @@ class QueryBuilder implements QueryBuilderInterface {
|
||||
/**
|
||||
* Sub-method for generating sql strings
|
||||
*
|
||||
* @codeCoverageIgnore
|
||||
* @param string $type
|
||||
* @param string $table
|
||||
* @return string
|
||||
@ -1221,11 +1207,6 @@ class QueryBuilder implements QueryBuilderInterface {
|
||||
$sql = "UPDATE {$table}\nSET {$setString}";
|
||||
break;
|
||||
|
||||
case 'replace':
|
||||
// @TODO implement
|
||||
$sql = '';
|
||||
break;
|
||||
|
||||
case 'delete':
|
||||
$sql = "DELETE FROM {$table}";
|
||||
break;
|
||||
|
@ -371,15 +371,6 @@ interface QueryBuilderInterface {
|
||||
*/
|
||||
public function insertBatch(string $table, $data=[]): PDOStatement;
|
||||
|
||||
/**
|
||||
* Insertion with automatic overwrite, rather than attempted duplication
|
||||
*
|
||||
* @param string $table
|
||||
* @param array $data
|
||||
* @return PDOStatement
|
||||
*/
|
||||
public function replace(string $table, $data=[]): PDOStatement;
|
||||
|
||||
/**
|
||||
* Creates an update clause, and executes it
|
||||
*
|
||||
|
Loading…
Reference in New Issue
Block a user