mirror of
https://github.com/silverstripe/silverstripe-mssql
synced 2024-10-22 08:05:53 +02:00
Merge pull request #47 from NightJar/twowards-ss4-support
WIP: Stable SilverStripe 4 Support
This commit is contained in:
commit
406fcee3cd
@ -1,7 +1,7 @@
|
|||||||
---
|
---
|
||||||
name: mssqlconnectors
|
name: mssqlconnectors
|
||||||
---
|
---
|
||||||
Injector:
|
SilverStripe\Core\Injector\Injector:
|
||||||
# Connect using PDO
|
# Connect using PDO
|
||||||
MSSQLPDODatabase:
|
MSSQLPDODatabase:
|
||||||
class: 'SilverStripe\MSSQL\MSSQLDatabase'
|
class: 'SilverStripe\MSSQL\MSSQLDatabase'
|
||||||
|
@ -2,7 +2,8 @@
|
|||||||
|
|
||||||
namespace SilverStripe\MSSQL;
|
namespace SilverStripe\MSSQL;
|
||||||
|
|
||||||
use SilverStripe\Core\Config\Config;
|
use SilverStripe\Core\Config\Configurable;
|
||||||
|
use SilverStripe\Core\Injector\Injectable;
|
||||||
use SilverStripe\Core\ClassInfo;
|
use SilverStripe\Core\ClassInfo;
|
||||||
use SilverStripe\ORM\ArrayList;
|
use SilverStripe\ORM\ArrayList;
|
||||||
use SilverStripe\ORM\Connect\Database;
|
use SilverStripe\ORM\Connect\Database;
|
||||||
@ -51,6 +52,8 @@ use SilverStripe\ORM\Queries\SQLSelect;
|
|||||||
*/
|
*/
|
||||||
class MSSQLDatabase extends Database
|
class MSSQLDatabase extends Database
|
||||||
{
|
{
|
||||||
|
use Configurable;
|
||||||
|
use Injectable;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Words that will trigger an error if passed to a SQL Server fulltext search
|
* Words that will trigger an error if passed to a SQL Server fulltext search
|
||||||
@ -83,7 +86,7 @@ class MSSQLDatabase extends Database
|
|||||||
*/
|
*/
|
||||||
public static function set_collation($collation)
|
public static function set_collation($collation)
|
||||||
{
|
{
|
||||||
Config::inst()->update('SilverStripe\\MSSQL\\MSSQLDatabase', 'collation', $collation);
|
static::config()->set('collation', $collation);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -95,7 +98,7 @@ class MSSQLDatabase extends Database
|
|||||||
*/
|
*/
|
||||||
public static function get_collation()
|
public static function get_collation()
|
||||||
{
|
{
|
||||||
return Config::inst()->get('SilverStripe\\MSSQL\\MSSQLDatabase', 'collation');
|
return static::config()->get('collation');
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"name": "silverstripe/mssql",
|
"name": "silverstripe/mssql",
|
||||||
"description": "Adds MSSQL support to SilverStripe",
|
"description": "Adds MSSQL support to SilverStripe",
|
||||||
"type": "silverstripe-module",
|
"type": "silverstripe-vendormodule",
|
||||||
"keywords": ["silverstripe", "mssql", "database"],
|
"keywords": ["silverstripe", "mssql", "database"],
|
||||||
"authors": [
|
"authors": [
|
||||||
{
|
{
|
||||||
@ -16,6 +16,10 @@
|
|||||||
"require": {
|
"require": {
|
||||||
"silverstripe/framework": "^4"
|
"silverstripe/framework": "^4"
|
||||||
},
|
},
|
||||||
|
"suggest": {
|
||||||
|
"ext-sqlsrv": "Required to support MSSQLDatabase as the server type",
|
||||||
|
"ext-pdo_sqlsrv": "Required to support MSSQLPDODatabase as the server type"
|
||||||
|
},
|
||||||
"extra": {
|
"extra": {
|
||||||
"branch-alias": {
|
"branch-alias": {
|
||||||
"dev-master": "2.x-dev"
|
"dev-master": "2.x-dev"
|
||||||
|
Loading…
Reference in New Issue
Block a user