| @@ 182-205 (lines=24) @@ | ||
| 179 | } |
|
| 180 | } |
|
| 181 | ||
| 182 | class BoltView { |
|
| 183 | static function insert($clause) { |
|
| 184 | $db = BoltDb::get(); |
|
| 185 | $ret = $db->insert('bolt_view', $clause); |
|
| 186 | if (!$ret) return null; |
|
| 187 | return $db->insert_id(); |
|
| 188 | } |
|
| 189 | static function lookup_id($id) { |
|
| 190 | $db = BoltDb::get(); |
|
| 191 | return $db->lookup_id($id, 'bolt_view', 'BoltView'); |
|
| 192 | } |
|
| 193 | function update($clause) { |
|
| 194 | $db = BoltDb::get(); |
|
| 195 | $db->update($this, 'bolt_view', $clause); |
|
| 196 | } |
|
| 197 | static function enum($clause) { |
|
| 198 | $db = BoltDb::get(); |
|
| 199 | return $db->enum('bolt_view', 'BoltView', $clause); |
|
| 200 | } |
|
| 201 | static function delete_aux($clause) { |
|
| 202 | $db = BoltDb::get(); |
|
| 203 | $db->delete_aux('bolt_view', $clause); |
|
| 204 | } |
|
| 205 | } |
|
| 206 | ||
| 207 | class BoltResult { |
|
| 208 | static function insert($clause) { |
|
| @@ 454-477 (lines=24) @@ | ||
| 451 | } |
|
| 452 | } |
|
| 453 | ||
| 454 | class BoincAppVersion { |
|
| 455 | static function enum($where_clause) { |
|
| 456 | $db = BoincDb::get(); |
|
| 457 | return $db->enum('app_version', 'BoincAppVersion', $where_clause); |
|
| 458 | } |
|
| 459 | static function lookup($clause) { |
|
| 460 | $db = BoincDb::get(); |
|
| 461 | return $db->lookup('app_version', 'BoincAppVersion', $clause); |
|
| 462 | } |
|
| 463 | static function lookup_id($id) { |
|
| 464 | $db = BoincDb::get(); |
|
| 465 | return $db->lookup_id($id, 'app_version', 'BoincAppVersion'); |
|
| 466 | } |
|
| 467 | static function insert($clause) { |
|
| 468 | $db = BoincDb::get(); |
|
| 469 | $ret = $db->insert('app_version', $clause); |
|
| 470 | if (!$ret) return $ret; |
|
| 471 | return $db->insert_id(); |
|
| 472 | } |
|
| 473 | function update($clause) { |
|
| 474 | $db = BoincDb::get(); |
|
| 475 | return $db->update($this, 'app_version', $clause); |
|
| 476 | } |
|
| 477 | } |
|
| 478 | ||
| 479 | class BoincProfile { |
|
| 480 | static function lookup_fields($fields, $clause) { |
|