agoDecl
constagoDecl:Decl
Defined in: packages/aipql/src/ago.ts:18
Checker declaration for the ago() function. Pass to check() as an
extra declaration so that filter expressions like create_time > ago(24h)
type-check correctly.
Example
Section titled “Example”import { parse, check } from "@protoutil/aip/filtering";import { postgres, agoDecl } from "@protoutil/aipql";
const parsed = parse('create_time > ago(24h)');const { checkedExpr } = check(parsed, { decls: [agoDecl] });const { sql, params } = postgres(checkedExpr);