Swoole\Coroutine\PostgreSQL->metaData(...)

Notice: ext-swoole is supported until v4.7.1, use ext-openswoole >= v4.7.1. Latest version: pecl install openswoole-4.9.1

Declaration

<?php
Swoole\Coroutine\PostgreSQL->metaData(string $tableName): array

Parameters

tableName

The table name you want to get metadata for.

Return

Returns an array of metadata about the given table.


Description

View the metadata of the table. This method executes asynchronously and is non-blocking within coroutine context.


Example

<?php

use Swoole\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);
});