- Added Events to repository and entitytrait objects. Some more work to be done on this.
- Diverses bug fixes linked to join and relations - Field date and datetime are now outputed using given locale.
This commit is contained in:
1 parent
1839726dc0
commit
4d221859fc
15 files changed
+421
-99
No files matched your search
@@ -37,6 +37,25 @@ abstract class Ulmus
|
||||
];
|
||||
}
|
||||
|
||||
public static function datasetQueryBuilder(QueryBuilder $queryBuilder, ? ConnectionAdapter $adapter = null) : array
|
||||
{
|
||||
$rows = [];
|
||||
|
||||
$sql = $queryBuilder->render();
|
||||
|
||||
$statement = ( $adapter ?: static::$defaultAdapter )->pdo()->select($sql, $queryBuilder->parameters ?? []);
|
||||
|
||||
while ( $row = $statement->fetch() ) {
|
||||
$rows[] = $row;
|
||||
}
|
||||
|
||||
$statement->closeCursor();
|
||||
|
||||
$queryBuilder->reset();
|
||||
|
||||
return $rows;
|
||||
}
|
||||
|
||||
public static function pdo(? ConnectionAdapter $adapter = null) : Common\PdoObject
|
||||
{
|
||||
return ( $adapter ?: static::$defaultAdapter )->pdo();
|
||||
|
||||
Reference in new issue
Block a user