constructor(table) {
        if (typeof table === 'string') {
            this.table = table;
        } else {
            const config = assert(table, ['table', 'schema']);
            this.table = config.table;
            if (npm.utils.isText(config.schema)) {
                this.schema = config.schema;
            }
        }
        if (!npm.utils.isText(this.table)) {
            throw new TypeError('Table name must be a non-empty text string.');
        }
        this.name = npm.format.name(this.table);
        if (this.schema) {
            this.name = npm.format.name(this.schema) + '.' + this.name;
        }
        Object.freeze(this);
    }
@class helpers.TableName
@description
Represents a full table name that can be injected into queries directly.

This is a read-only type that can be used wherever parameter `table` is supported.

It supports $[Custom Type Formatting], which means you can use the type directly as a formatting
parameter, without specifying any escaping.

Filter `:alias` is an alternative approach to splitting an SQL name into multiple ones.

@param {string|Table} table
Table name details, depending on the type:

- table name, if `table` is a string
- {@link Table} object

@property {string} name
Formatted/escaped full table name, combining `schema` + `table`.

@property {string} table
Table name.

@property {string} schema
Database schema name.

It is `undefined` when no valid schema was specified.

@returns {helpers.TableName}

@see
{@link helpers._TN _TN},
{@link helpers.TableName#toPostgres toPostgres}

@example

const table = new pgp.helpers.TableName({table: 'my-table', schema: 'my-schema'});
console.log(table);
//=> "my-schema"."my-table"

// Formatting the type directly:
pgp.as.format('SELECT * FROM $1', table);
//=> SELECT * FROM "my-schema"."my-table"