Completed
Push — master ( ae0103...9b98c5 )
by Joao
04:23 queued 56s
created

PdoDblib   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 20
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
wmc 1
lcom 0
cbo 1
dl 0
loc 20
ccs 0
cts 10
cp 0
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 16 1
1
<?php
2
3
namespace ByJG\AnyDataset\Store;
4
5
class PdoDblib extends DbPdoDriver
6
{
7
8
    public function __construct($connUri)
9
    {
10
        $this->setSupportMultRowset(true);
11
12
        parent::__construct($connUri, null, null);
13
14
        // Solve the error:
15
        // SQLSTATE[HY000]: General error: 1934 General SQL Server error: Check messages from the SQL Server [1934] (severity 16) [(null)]
16
        // http://gullele.wordpress.com/2010/12/15/accessing-xml-column-of-sql-server-from-php-pdo/
17
        // http://stackoverflow.com/questions/5499128/error-when-using-xml-in-stored-procedure-pdo-ms-sql-2008
18
        $this->getDbConnection()->exec('SET QUOTED_IDENTIFIER ON');
19
        $this->getDbConnection()->exec('SET ANSI_WARNINGS ON');
20
        $this->getDbConnection()->exec('SET ANSI_PADDING ON');
21
        $this->getDbConnection()->exec('SET ANSI_NULLS ON');
22
        $this->getDbConnection()->exec('SET CONCAT_NULL_YIELDS_NULL ON');
23
    }
24
}
25