- Fixed SQLite truncate, added AdapterProxy autoloading
This commit is contained in:
1 parent
1ec582d1ac
commit
761e0401b0
7 files changed
+105
-6
No files matched your search
@@ -3,6 +3,7 @@
|
||||
namespace Ulmus\QueryBuilder\Sql;
|
||||
|
||||
use Ulmus\Query;
|
||||
use Ulmus\Adapter\AdapterInterface;
|
||||
|
||||
# Soon to extends SqlQueryBuilder
|
||||
class SqliteQueryBuilder extends MysqlQueryBuilder
|
||||
@@ -38,4 +39,41 @@ class SqliteQueryBuilder extends MysqlQueryBuilder
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
|
||||
public function insert(array $fieldlist, string $table, ? string $alias = null, ? string $database = null, ? string $schema = null, bool $replace = false) : self
|
||||
{
|
||||
return parent::insert($fieldlist, $table, $alias, null, null, $replace);
|
||||
}
|
||||
|
||||
public function update(string $table, ? string $alias = null, ? string $database = null, ? string $schema = null) : self
|
||||
{
|
||||
return parent::update($table, $alias, null, null);
|
||||
}
|
||||
|
||||
public function create(AdapterInterface $adapter, array $fieldlist, string $table, ? string $database = null, ? string $schema = null) : self
|
||||
{
|
||||
return parent::create($adapter, $fieldlist, $table, null, null);
|
||||
}
|
||||
|
||||
public function alter(AdapterInterface $adapter, array $fieldlist, string $table, ? string $database = null, ? string $schema = null) : self
|
||||
{
|
||||
return parent::alter($adapter, $fieldlist, $table, null, null);
|
||||
}
|
||||
|
||||
public function from(string $table, ? string $alias = null, ? string $database = null, ? string $schema = null) : self
|
||||
{
|
||||
return parent::from($table, $alias, null, null);
|
||||
}
|
||||
|
||||
public function truncate(string $table, ? string $alias = null, ? string $database = null, ? string $schema = null) : self
|
||||
{
|
||||
$truncate = new Query\Sqlite\Truncate($this);
|
||||
|
||||
$this->push($truncate);
|
||||
|
||||
$truncate->set($table);
|
||||
|
||||
return $this;
|
||||
}
|
||||
}
|
||||
@@ -5,7 +5,7 @@ namespace Ulmus\QueryBuilder;
|
||||
use Ulmus\Query\QueryFragmentInterface;
|
||||
|
||||
# TODO -> Extract from MysqlQueryBuilder to build an ISO/IEC 9075:2023 compatible layer for a basic SQL QueryBuilder
|
||||
class SqlQueryBuilder implements QueryBuilderInterface
|
||||
abstract class SqlQueryBuilder implements QueryBuilderInterface
|
||||
{
|
||||
protected string $rendered;
|
||||
|
||||
|
||||
Reference in new issue
Block a user