1: <?php
2:
3: /**
4: * This file is part of the Nette Framework (http://nette.org)
5: *
6: * Copyright (c) 2004, 2011 David Grudl (http://davidgrudl.com)
7: *
8: * For the full copyright and license information, please view
9: * the file license.txt that was distributed with this source code.
10: * @package Nette\Database
11: */
12:
13:
14:
15: /**
16: * Supplemental PDO database driver.
17: *
18: * @author David Grudl
19: */
20: interface ISupplementalDriver
21: {
22:
23: /**
24: * Delimites identifier for use in a SQL statement.
25: * @param string
26: * @return string
27: */
28: function delimite($name);
29:
30: /**
31: * Formats date-time for use in a SQL statement.
32: * @param DateTime
33: * @return string
34: */
35: function formatDateTime(DateTime $value);
36:
37: /**
38: * Encodes string for use in a LIKE statement.
39: * @param string
40: * @param int
41: * @return string
42: */
43: function formatLike($value, $pos);
44:
45: /**
46: * Injects LIMIT/OFFSET to the SQL query.
47: * @param string SQL query that will be modified.
48: * @param int
49: * @param int
50: * @return void
51: */
52: function applyLimit(&$sql, $limit, $offset);
53:
54: /**
55: * Normalizes result row.
56: * @param array
57: * @param Statement
58: * @return array
59: */
60: function normalizeRow($row, $statement);
61:
62: }
63: