- 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
@@ -55,12 +55,17 @@ class PdoObject extends PDO {
|
||||
else {
|
||||
throw new \PDOException($statement->errorCode() . " - " . json_encode($statement->errorInfo()));
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (\PDOException $e) {
|
||||
$this->rollback();
|
||||
|
||||
throw $e;
|
||||
}
|
||||
catch (\Throwable $e) {
|
||||
debogueur($statement, $parameters, $commit);
|
||||
|
||||
throw $e;
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
+17
-1
@@ -14,7 +14,7 @@ abstract class Sql {
|
||||
|
||||
protected array $arguments;
|
||||
|
||||
public function __construct(string $name, ...$arguments) {
|
||||
public function __construct( $name, ...$arguments) {
|
||||
$this->name = $name;
|
||||
$this->arguments = $arguments;
|
||||
$this->parseArguments();
|
||||
@@ -39,6 +39,22 @@ abstract class Sql {
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
public static function identifier(string $identifier) : object
|
||||
{
|
||||
return new class($identifier) {
|
||||
|
||||
protected string $identifier;
|
||||
|
||||
public function __construct(string $identifier) {
|
||||
$this->identifier = $identifier;
|
||||
}
|
||||
|
||||
public function __toString() {
|
||||
return $this->identifier;
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
public static function escape($value)
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user