-
Notifications
You must be signed in to change notification settings - Fork 290
/
Copy pathquery-compiler.ts
28 lines (26 loc) · 1.03 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
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 { 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 { 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
| AlterTableNode
| DropTableNode
| DropIndexNode
| CreateSchemaNode
| DropSchemaNode
| RawNode
/**
* a `QueryCompiler` compiles a query expressed as a tree of `OperationNodes` into SQL.
*/
export interface QueryCompiler {
compileQuery(node: RootOperationNode): CompiledQuery
}