Version 3 #1

Manually merged
timw4mail merged 47 commits from develop into master 2020-04-23 18:39:27 -04:00
2 changed files with 3 additions and 31 deletions
Showing only changes of commit 09b6610eb1 - Show all commits

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
*