@uwdata/mosaic-sql
Version:
SQL query construction and analysis.
13 lines • 492 B
JavaScript
import { TableRefNode } from '../ast/table-ref.js';
import { exprList } from '../util/function.js';
/**
* Returns a named table or view reference.
* @param ids Table and namespace identifiers.
* For example 'name' or ['schema', 'name'].
* @returns A table reference or undefined if the input list is empty.
*/
export function tableRef(...ids) {
const args = exprList(ids, String);
return args?.length ? new TableRefNode(args) : undefined;
}
//# sourceMappingURL=table-ref.js.map