alias(name) {
        name = resolveFunc(name);
        if (name && typeof name === 'string') {
            return name.split('.')
                .filter(f => f)
                .map(a => {
                    const m = a.match(/^([a-z_][a-z0-9_$]*|[A-Z_][A-Z0-9_$]*)$/);
                    if (m && m[0] === a) {
                        return a;
                    }
                    return `"${a.replace(/"/g, '""')}"`;
                }).join('.');
        }
        throw new TypeError(`Invalid sql alias: ${npm.utils.toJson(name)}`);
    }
@method formatting.alias
@description
Simpler (non-verbose) version of method {@link formatting.name name}, to handle only a regular string-identifier
that's mostly used as an SQL alias, i.e. it doesn't support `*` or an array/object of names, which in the context of
an SQL alias would be incorrect. However, it supports `.` as name-separator, for simpler escaping of composite names.

The surrounding double quotes are not added when the alias uses a simple syntax:
 - it is a same-case single word, without spaces
 - it can contain underscores, and can even start with them
 - it can contain digits and `$`, but cannot start with those

The method will automatically split the string with `.`, to support composite SQL names.

When formatting a query, a variable makes use of this method via modifier `:alias`. See method {@link formatting.format format}.

@param {string|function} name
SQL alias name, or a function that returns it.

The name must be at least 1 character long. And it can contain `.`, to split into multiple SQL names.

If `name` doesn't resolve into a non-empty string, it throws {@link external:TypeError TypeError} = `Invalid sql alias: ...`

@returns {string}
The SQL alias, properly escaped for compliance with the PostgreSQL standard for $[SQL Names] and identifiers.

@see
{@link formatting.name name},
{@link formatting.format format}