Code Coverage |
||||||||||
Classes and Traits |
Functions and Methods |
Lines |
||||||||
Total | |
0.00% |
0 / 1 |
|
66.67% |
4 / 6 |
CRAP | |
88.89% |
24 / 27 |
sgbd_pdo_oracle | |
0.00% |
0 / 1 |
|
66.67% |
4 / 6 |
11.17 | |
88.89% |
24 / 27 |
getInstance | |
100.00% |
1 / 1 |
1 | |
100.00% |
1 / 1 |
|||
getListColumn | |
100.00% |
1 / 1 |
3 | |
100.00% |
8 / 8 |
|||
getListTable | |
0.00% |
0 / 1 |
3.02 | |
87.50% |
7 / 8 |
|||
connect | |
0.00% |
0 / 1 |
2.06 | |
75.00% |
6 / 8 |
|||
getLastInsertId | |
100.00% |
1 / 1 |
1 | |
100.00% |
1 / 1 |
|||
getWhereAll | |
100.00% |
1 / 1 |
1 | |
100.00% |
1 / 1 |
<?php | |
/* | |
This file is part of Mkframework. | |
Mkframework is free software: you can redistribute it and/or modify | |
it under the terms of the GNU Lesser General Public License as published by | |
the Free Software Foundation, either version 3 of the License. | |
Mkframework is distributed in the hope that it will be useful, | |
but WITHOUT ANY WARRANTY; without even the implied warranty of | |
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
GNU Lesser General Public License for more details. | |
You should have received a copy of the GNU Lesser General Public License | |
along with Mkframework. If not, see <http://www.gnu.org/licenses/>. | |
*/ | |
class sgbd_pdo_oracle extends abstract_sgbd_pdo{ | |
public static function getInstance($sConfig){ | |
return self::_getInstance(__CLASS__,$sConfig); | |
} | |
public function getListColumn($sTable){ | |
$pRs=$this->query(sgbd_syntax_oracle::getListColumn($sTable)); | |
$tObj=array(); | |
if(empty($pRs)){ | |
return null; | |
} | |
while($tRow=$pRs->fetch(PDO::FETCH_NUM)){ | |
$tObj[]=$tRow[0]; | |
} | |
return $tObj; | |
} | |
public function getListTable(){ | |
$pRs=$this->query(sgbd_syntax_oracle::getListTable()); | |
if(empty($pRs)){ | |
return null; | |
} | |
$tObj=array(); | |
while($tRow=$pRs->fetch(PDO::FETCH_NUM)){ | |
$tObj[]=$tRow[0]; | |
} | |
return $tObj; | |
} | |
protected function connect(){ | |
if(empty($this->_pDb)){ | |
$this->_pDb=new PDO( | |
$this->_tConfig[$this->_sConfig.'.dsn'], | |
$this->_tConfig[$this->_sConfig.'.username'], | |
$this->_tConfig[$this->_sConfig.'.password'] | |
); | |
} | |
} | |
public function getLastInsertId(){ | |
return null; | |
} | |
public function getWhereAll(){ | |
return '1=1'; | |
} | |
} |