-
Notifications
You must be signed in to change notification settings - Fork 280
/
query-compiler.ts
36 lines (34 loc) · 1.37 KB
/
query-compiler.ts
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
33
34
35
36
import { AlterTableNode } from '../operation-node/alter-table-node.js'
import { CreateIndexNode } from '../operation-node/create-index-node.js'
import { CreateSchemaNode } from '../operation-node/create-schema-node.js'
import { CreateTableNode } from '../operation-node/create-table-node.js'
import { CreateTypeNode } from '../operation-node/create-type-node.js'
import { CreateViewNode } from '../operation-node/create-view-node.js'
import { DropIndexNode } from '../operation-node/drop-index-node.js'
import { DropSchemaNode } from '../operation-node/drop-schema-node.js'
import { DropTableNode } from '../operation-node/drop-table-node.js'
import { DropTypeNode } from '../operation-node/drop-type-node.js'
import { DropViewNode } from '../operation-node/drop-view-node.js'
import { QueryNode } from '../operation-node/query-node.js'
import { RawNode } from '../operation-node/raw-node.js'
import { CompiledQuery } from './compiled-query.js'
export type RootOperationNode =
| QueryNode
| CreateTableNode
| CreateIndexNode
| CreateSchemaNode
| CreateViewNode
| DropTableNode
| DropIndexNode
| DropSchemaNode
| DropViewNode
| AlterTableNode
| RawNode
| CreateTypeNode
| DropTypeNode
/**
* a `QueryCompiler` compiles a query expressed as a tree of `OperationNodes` into SQL.
*/
export interface QueryCompiler {
compileQuery(node: RootOperationNode): CompiledQuery
}