- A lot of bugfixes and fitting to accomodate ldap adapter
This commit is contained in:
1 parent
f14347f01d
commit
16d76470da
15 files changed
+350
-216
No files matched your search
+20
-2
@@ -5,6 +5,7 @@ namespace Ulmus\Adapter;
|
||||
use Ulmus\Common\PdoObject;
|
||||
|
||||
use Ulmus\Exception\AdapterConfigurationException;
|
||||
use Ulmus\Ulmus;
|
||||
|
||||
class MsSQL implements AdapterInterface {
|
||||
|
||||
@@ -93,7 +94,7 @@ class MsSQL implements AdapterInterface {
|
||||
$parts[] = "Encrypt=1";
|
||||
}
|
||||
|
||||
if ( $this->failoverPartner ?? false ) {
|
||||
if ( $this->failoverPartner ?? false ) {
|
||||
$parts[] = "Failover_Partner={$this->failoverPartner}";
|
||||
}
|
||||
|
||||
@@ -200,8 +201,25 @@ class MsSQL implements AdapterInterface {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public function writableValue(/* mixed */ $value) /*: mixed*/
|
||||
{
|
||||
switch (true) {
|
||||
case is_object($value):
|
||||
return Ulmus::convertObject($value);
|
||||
|
||||
case is_array($value):
|
||||
return json_encode($array);
|
||||
|
||||
case is_bool($value):
|
||||
return (int) $value;
|
||||
}
|
||||
|
||||
return $value;
|
||||
}
|
||||
|
||||
public function defaultEngine(): ? string
|
||||
{
|
||||
return null;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user