deno.land / x / pg_mem@2.8.1 / execution / show.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
import { _IStatementExecutor, _Transaction, StatementResult, GLOBAL_VARS, QueryError } from '../interfaces-private.ts';import { ShowStatement } from 'https://deno.land/x/pgsql_ast_parser@12.0.1/mod.ts';import { locOf } from './exec-utils.ts';
export class ShowExecutor implements _IStatementExecutor { constructor(private statement: ShowStatement) { }
execute(t: _Transaction): StatementResult { const p = this.statement; const got = t.getMap(GLOBAL_VARS); if (!got.has(p.variable.name)) { throw new QueryError(`unrecognized configuration parameter "${p.variable.name}"`); } return { state: t, result: { rows: [{ [p.variable.name]: got.get(p.variable.name) }], rowCount: 1, command: 'SHOW', fields: [], location: locOf(p), }, } }}
pg_mem

Version Info

Tagged at
4 months ago