- A lot of work done on bug fixing. Added a new SQLite adapter
This commit is contained in:
1 parent
667df92e52
commit
c14644cdda
28 files changed
+727
-234
No files matched your search
@@ -0,0 +1,26 @@
|
||||
<?php
|
||||
|
||||
namespace Ulmus\Repository;
|
||||
|
||||
use Ulmus\{Common\EntityResolver, ConnectionAdapter, QueryBuilder, Repository, Query, Ulmus};
|
||||
|
||||
class MysqlRepository extends Repository {
|
||||
|
||||
public function pragma(/*object|Stringable*/ $pragma, $argument = null, bool $callable = false) : self
|
||||
{
|
||||
$this->queryBuilder->pragma($pragma, $argument, $callable);
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function createSqlQuery() : self
|
||||
{
|
||||
if ( null === $this->queryBuilder->getFragment(Query\Engine::class) ) {
|
||||
if ( $engine = $this->entityResolver->tableAnnotation()->engine ?? $this->entityResolver->databaseAdapter()->adapter()->defaultEngine() ) {
|
||||
$this->queryBuilder->engine($engine);
|
||||
}
|
||||
}
|
||||
|
||||
return parent::createSqlQuery();
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user