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; 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 * Deletes data from a table
* *
@ -914,7 +897,9 @@ class QueryBuilder implements QueryBuilderInterface {
if ( ! \is_string($as)) if ( ! \is_string($as))
{ {
// @codeCoverageIgnoreStart
return $field; return $field;
// @codeCoverageIgnoreEnd
} }
$as = $this->driver->quoteIdent($as); $as = $this->driver->quoteIdent($as);
@ -1199,6 +1184,7 @@ class QueryBuilder implements QueryBuilderInterface {
/** /**
* Sub-method for generating sql strings * Sub-method for generating sql strings
* *
* @codeCoverageIgnore
* @param string $type * @param string $type
* @param string $table * @param string $table
* @return string * @return string
@ -1221,11 +1207,6 @@ class QueryBuilder implements QueryBuilderInterface {
$sql = "UPDATE {$table}\nSET {$setString}"; $sql = "UPDATE {$table}\nSET {$setString}";
break; break;
case 'replace':
// @TODO implement
$sql = '';
break;
case 'delete': case 'delete':
$sql = "DELETE FROM {$table}"; $sql = "DELETE FROM {$table}";
break; break;

View File

@ -371,15 +371,6 @@ interface QueryBuilderInterface {
*/ */
public function insertBatch(string $table, $data=[]): PDOStatement; 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 * Creates an update clause, and executes it
* *