- Merged stash after pull
This commit is contained in:
1 parent
114fa5be09
commit
efa957fe58
20 files changed
+623
-436
No files matched your search
@@ -305,6 +305,42 @@ class QueryBuilder
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function create(array $fieldlist, string $table, ? string $database = null, ? string $schema = null) : self
|
||||
{
|
||||
if ( null === $this->getFragment(Query\Create::class) ) {
|
||||
if ( $schema ) {
|
||||
$table = "\"$schema\".$table";
|
||||
}
|
||||
|
||||
if ( $database ) {
|
||||
$table = "\"$database\".$table";
|
||||
}
|
||||
|
||||
$create = new Query\Create();
|
||||
$this->push($create);
|
||||
|
||||
$create->fieldList = $fieldlist;
|
||||
$create->table = $table;
|
||||
}
|
||||
else {
|
||||
throw new \Exception("A create SQL fragment was already found within the query builder");
|
||||
}
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function engine(string $value) : self
|
||||
{
|
||||
if ( null === $engine = $this->getFragment(Query\Engine::class) ) {
|
||||
$engine = new Query\Engine();
|
||||
$this->push($engine);
|
||||
}
|
||||
|
||||
$engine->engine = $value;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function push(Query\Fragment $queryFragment) : self
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user