Spaces:
Sleeping
Sleeping
File size: 1,578 Bytes
6491ad4 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 | import type { AnyColumn } from "./column.cjs";
import { Column } from "./column.cjs";
import { entityKind } from "./entity.cjs";
import type { Relation } from "./relations.cjs";
import type { View } from "./sql/sql.cjs";
import { SQL } from "./sql/sql.cjs";
import { Table } from "./table.cjs";
export declare class ColumnAliasProxyHandler<TColumn extends Column> implements ProxyHandler<TColumn> {
private table;
static readonly [entityKind]: string;
constructor(table: Table | View);
get(columnObj: TColumn, prop: string | symbol): any;
}
export declare class TableAliasProxyHandler<T extends Table | View> implements ProxyHandler<T> {
private alias;
private replaceOriginalName;
static readonly [entityKind]: string;
constructor(alias: string, replaceOriginalName: boolean);
get(target: T, prop: string | symbol): any;
}
export declare class RelationTableAliasProxyHandler<T extends Relation> implements ProxyHandler<T> {
private alias;
static readonly [entityKind]: string;
constructor(alias: string);
get(target: T, prop: string | symbol): any;
}
export declare function aliasedTable<T extends Table | View>(table: T, tableAlias: string): T;
export declare function aliasedRelation<T extends Relation>(relation: T, tableAlias: string): T;
export declare function aliasedTableColumn<T extends AnyColumn>(column: T, tableAlias: string): T;
export declare function mapColumnsInAliasedSQLToAlias(query: SQL.Aliased, alias: string): SQL.Aliased;
export declare function mapColumnsInSQLToAlias(query: SQL, alias: string): SQL;
|