FOSSology  3.2.0rc1
Open Source License Compliance by Open Source Software
Driver.php
1 <?php
2 /*
3 Copyright (C) 2014, Siemens AG
4 Author: Andreas Würl, Steffen Weber
5 
6 This program is free software; you can redistribute it and/or
7 modify it under the terms of the GNU General Public License
8 version 2 as published by the Free Software Foundation.
9 
10 This program is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 GNU General Public License for more details.
14 
15 You should have received a copy of the GNU General Public License along
16 with this program; if not, write to the Free Software Foundation, Inc.,
17 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
18 */
19 
20 
21 namespace Fossology\Lib\Db;
22 
23 interface Driver
24 {
25 
31  public function prepare($statementName, $sqlStatement);
32 
38  public function execute($statementName, $parameters);
39 
44  public function query($sqlStatement);
45 
49  public function isConnected();
50 
54  public function getLastError();
55 
60  public function freeResult($res);
61 
66  public function fetchArray($res);
67 
72  public function fetchAll($res);
73 
77  public function begin();
78 
82  public function commit();
83 
87  public function rollback();
88 
93  public function booleanFromDb($booleanValue);
94 
99  public function booleanToDb($booleanValue);
100 
105  public function escapeString($string);
106 
111  public function existsTable($tableName);
112 
118  public function existsColumn($tableName, $columnName);
119 
126  public function insertPreparedAndReturn($stmt, $sql, $params, $colName);
127 }
existsColumn($tableName, $columnName)
booleanToDb($booleanValue)
query($sqlStatement)
prepare($statementName, $sqlStatement)
booleanFromDb($booleanValue)
execute($statementName, $parameters)
insertPreparedAndReturn($stmt, $sql, $params, $colName)