1 | <?php |
||
8 | class DbDblibFunctions extends DbBaseFunctions |
||
9 | { |
||
10 | |||
11 | public function concat($s1, $s2 = null) |
||
15 | |||
16 | /** |
||
17 | * Given a SQL returns it with the proper LIMIT or equivalent method included |
||
18 | * @param string $sql |
||
19 | * @param int $start |
||
20 | * @param int $qty |
||
21 | * @return string |
||
22 | * @throws NotAvailableException |
||
23 | */ |
||
24 | public function limit($sql, $start, $qty = null) |
||
28 | |||
29 | /** |
||
30 | * Given a SQL returns it with the proper TOP or equivalent method included |
||
31 | * @param string $sql |
||
32 | * @param int $qty |
||
33 | * @return string |
||
34 | */ |
||
35 | public function top($sql, $qty) |
||
47 | |||
48 | /** |
||
49 | * Return if the database provider have a top or similar function |
||
50 | * @return bool |
||
51 | */ |
||
52 | public function hasTop() |
||
56 | |||
57 | /** |
||
58 | * Return if the database provider have a limit function |
||
59 | * @return bool |
||
60 | */ |
||
61 | public function hasLimit() |
||
65 | |||
66 | /** |
||
67 | * Format date column in sql string given an input format that understands Y M D |
||
68 | |||
69 | * |
||
70 | *@param string $format |
||
71 | * @param bool|string $column |
||
72 | * @return string |
||
73 | * @example $db->getDbFunctions()->SQLDate("d/m/Y H:i", "dtcriacao") |
||
74 | */ |
||
75 | public function sqlDate($format, $column = null) |
||
106 | |||
107 | /** |
||
108 | * Format a string date to a string database readable format. |
||
109 | * |
||
110 | * @param string $date |
||
111 | * @param string $dateFormat |
||
112 | * @return string |
||
113 | */ |
||
114 | public function toDate($date, $dateFormat) |
||
118 | |||
119 | /** |
||
120 | * Format a string database readable format to a string date in a free format. |
||
121 | * |
||
122 | * @param string $date |
||
123 | * @param string $dateFormat |
||
124 | * @return string |
||
125 | */ |
||
126 | public function fromDate($date, $dateFormat) |
||
130 | |||
131 | /** |
||
132 | * |
||
133 | * @param DBDataset $dbdataset |
||
134 | * @param string $sql |
||
135 | * @param array $param |
||
136 | * @return int |
||
137 | */ |
||
138 | public function executeAndGetInsertedId($dbdataset, $sql, $param) |
||
149 | } |
||
150 |