1 | <?php |
||
7 | class DbPgsqlFunctions extends DbBaseFunctions |
||
8 | { |
||
9 | |||
10 | public function concat($str1, $str2 = null) |
||
14 | |||
15 | /** |
||
16 | * Given a SQL returns it with the proper LIMIT or equivalent method included |
||
17 | * @param string $sql |
||
18 | * @param int $start |
||
19 | * @param int $qty |
||
20 | * @return string |
||
21 | */ |
||
22 | public function limit($sql, $start, $qty = null) |
||
38 | |||
39 | /** |
||
40 | * Given a SQL returns it with the proper TOP or equivalent method included |
||
41 | * @param string $sql |
||
42 | * @param int $qty |
||
43 | * @return string |
||
44 | */ |
||
45 | public function top($sql, $qty) |
||
49 | |||
50 | /** |
||
51 | * Return if the database provider have a top or similar function |
||
52 | * @return bool |
||
53 | */ |
||
54 | public function hasTop() |
||
58 | |||
59 | /** |
||
60 | * Return if the database provider have a limit function |
||
61 | * @return bool |
||
62 | */ |
||
63 | public function hasLimit() |
||
67 | |||
68 | /** |
||
69 | * Format date column in sql string given an input format that understands Y M D |
||
70 | * |
||
71 | * @param string $format |
||
72 | * @param string|null $column |
||
73 | * @return string |
||
74 | * @example $db->getDbFunctions()->SQLDate("d/m/Y H:i", "dtcriacao") |
||
75 | */ |
||
76 | public function sqlDate($format, $column = null) |
||
105 | |||
106 | /** |
||
107 | * Format a string date to a string database readable format. |
||
108 | * |
||
109 | * @param string $date |
||
110 | * @param string $dateFormat |
||
111 | * @return string |
||
112 | */ |
||
113 | public function toDate($date, $dateFormat) |
||
117 | |||
118 | /** |
||
119 | * Format a string database readable format to a string date in a free format. |
||
120 | * |
||
121 | * @param string $date |
||
122 | * @param string $dateFormat |
||
123 | * @return string |
||
124 | */ |
||
125 | public function fromDate($date, $dateFormat) |
||
129 | |||
130 | public function executeAndGetInsertedId($dbdataset, $sql, $param, $sequence = null) |
||
147 | } |
||
148 |