rawsql-ts
Version:
[beta]High-performance SQL parser and AST analyzer written in TypeScript. Provides fast parsing and advanced transformation capabilities.
28 lines (27 loc) • 964 B
TypeScript
import { SqlComponent } from "./SqlComponent";
import type { SelectQuery } from "./SelectQuery";
import { IdentifierString } from "./ValueComponent";
import { SimpleSelectQuery } from "./SimpleSelectQuery";
export declare class CreateTableQuery extends SqlComponent {
/** SqlComponent kind symbol for visitor pattern */
static kind: symbol;
/** Table name (with optional schema) */
tableName: IdentifierString;
/** If true, this is a temporary table */
isTemporary: boolean;
/** Optional: SELECT query for AS SELECT ... */
asSelectQuery?: SelectQuery;
constructor(params: {
tableName: string;
isTemporary?: boolean;
asSelectQuery?: SelectQuery;
});
/**
* Returns a SelectQuery that selects all columns from this table.
*/
getSelectQuery(): SimpleSelectQuery;
/**
* Returns a SelectQuery that counts all rows in this table.
*/
getCountQuery(): SimpleSelectQuery;
}