Join 4,000+ others and never miss out on new tips, tutorials, and more.
25.x is outdated, please check the latest version 26.x
Latest version:
pecl install openswoole-26.2.0
<?php OpenSwoole\Coroutine\PostgreSQL->metaData(string $tableName): array
The table name you want to get metadata for.
Returns an array of metadata about the given table.
View the metadata of the table. This method executes asynchronously and is non-blocking within coroutine context.
<?php
use OpenSwoole\Coroutine\PostgreSQL;
co::run(function()
{
$pg = new PostgreSQL();
$conn = $pg->connect("host=127.0.0.1;port=5432;dbname=test;user=postgres;password=***");
$result = $pg->metaData('test_table');
var_dump($result);
});