Remove unimplemented replace method

This commit is contained in:
Timothy Warren 2018-02-12 16:17:22 -05:00
parent 2839e6ad6e
commit 09b6610eb1
2 changed files with 3 additions and 31 deletions

View File

@ -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;

View File

@ -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
*