@@ 282-292 (lines=11) @@ | ||
279 | * @return string|null |
|
280 | * @deprecated |
|
281 | */ |
|
282 | public function getTableComment($table_oid) |
|
283 | { |
|
284 | $sql = <<<SQL |
|
285 | select description from pg_catalog.pg_description where {condition} |
|
286 | SQL; |
|
287 | ||
288 | $where = Where::create('objoid = $*', [$table_oid]); |
|
289 | $iterator = $this->executeSql($sql, $where); |
|
290 | ||
291 | return $iterator->isEmpty() ? null : $iterator->current()['description']; |
|
292 | } |
|
293 | ||
294 | /** |
|
295 | * getTypeInformation |
|
@@ 339-357 (lines=19) @@ | ||
336 | * @return array|null |
|
337 | * @deprecated |
|
338 | */ |
|
339 | public function getTypeCategory($oid) |
|
340 | { |
|
341 | $sql = <<<SQL |
|
342 | select |
|
343 | case |
|
344 | when n is null then t.type_name |
|
345 | else n.nspname||'.'||t.type_name |
|
346 | end as "name", |
|
347 | t.typcategory as "category" |
|
348 | from |
|
349 | pg_catalog.pg_type t |
|
350 | left join pg_namespace n on n.oid = t.typnamespace |
|
351 | where |
|
352 | {condition} |
|
353 | SQL; |
|
354 | $iterator = $this->executeSql($sql, Where::create('t.oid = $*', [$oid])); |
|
355 | ||
356 | return $iterator->isEmpty() ? null : $iterator->current(); |
|
357 | } |
|
358 | ||
359 | /** |
|
360 | * getTypeEnumValues |