deno.land / x / pg_mem@2.8.1 / execution / set.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
import { _IStatementExecutor, _Transaction, StatementResult, GLOBAL_VARS, QueryError } from '../interfaces-private.ts';import { SetGlobalStatement, SetTimezone, SetNames } from 'https://deno.land/x/pgsql_ast_parser@12.0.1/mod.ts';import { ignore } from '../utils.ts';import { ExecHelper } from './exec-utils.ts';
export class SetExecutor extends ExecHelper implements _IStatementExecutor {
constructor(private p: SetGlobalStatement | SetTimezone | SetNames) { super(p); // todo handle set statements timezone ? // They are just ignored as of today (in order to handle pg_dump exports) ignore(p); }
execute(t: _Transaction): StatementResult { const p = this.p; if (p.type === 'set' && p.set.type === 'value') { t.set(GLOBAL_VARS, t.getMap(GLOBAL_VARS) .set(p.variable.name, p.set.value)); } return this.noData(t, 'SET'); }}
pg_mem

Version Info

Tagged at
4 months ago