- Added a MssqlRepository

- Adapter some code to allow more flexibility for the new LDAP adapter from ulmus-ldap.
- Insert's fields are now escaped by default.
- A new RelationBuilder was added, a lot of code from the EntityTrait was moved into this. Some code from the Repository class will need to be moved there too.
This commit is contained in:
mcndave committed 2021-03-01 16:26:06 +00:00
1 parent 8f9332fbad
commit 16c6eb57fb
32 files changed
+641 -243

No files matched your search

+2 -1
View File
@@ -9,8 +9,9 @@ interface AdapterInterface {
public const IDENTIFIER_TABLE = 2;
public const IDENTIFIER_DATABASE = 3;
public const IDENTIFIER_SCHEMA = 4;
public const IDENTIFIER_VALUE = 5;
public function connect() : PdoObject;
public function connect() : object /* | PdoObject|mixed */;
public function buildDataSourceName() : string;
public function setup(array $configuration) : void;
public function escapeIdentifier(string $segment, int $type) : string;
+3
View File
@@ -194,6 +194,9 @@ class MsSQL implements AdapterInterface {
case static::IDENTIFIER_TABLE:
case static::IDENTIFIER_FIELD:
return "[" . str_replace(["[", "]"], [ "[[", "]]" ], $segment) . "]";
case static::IDENTIFIER_VALUE:
return "'$segment'";
}
}
+3
View File
@@ -131,6 +131,9 @@ class MySQL implements AdapterInterface {
case static::IDENTIFIER_TABLE:
case static::IDENTIFIER_FIELD:
return "`" . str_replace("`", "``", $segment) . "`";
case static::IDENTIFIER_VALUE:
return "\"$segment\"";
}
}