APIDemo

@alinea/store

export const Collection: CollectionConstructor
export const Cursor: CursorConstructor
export namespace Driver {
}
/**
Expression or value of type T */
export const ExprData:
{
BinOp(
op: BinOp,
a: ExprData,
b: ExprData
): ExprData
Call(
method: string,
params: Array<ExprData>
): ExprData
Case(
expr: ExprData,
cases: Record<string, ExprData>,
defaultCase: ExprData
): ExprData
Field(
expr: ExprData,
field: string
): ExprData
Merge(
a: ExprData,
b: ExprData
): ExprData
Param(
param: ParamData
): ExprData
Query(
cursor: CursorData
): ExprData
Record(
fields: Record<string, ExprData>
): ExprData
Row(
from: From
): ExprData
UnOp(
op: UnOp,
expr: ExprData
): ExprData
create(
input: any
): ExprData
}
export namespace Fields {
export function create(
from: ExprData
): {}
}
export namespace From {
export function Column(
of: From,
column: string
): From
export function Each(
expr: ExprData,
alias: string
): From
export function Join(
left: From,
right: From,
join: "left" | "inner",
on: ExprData
): From
export function Table(
name: string,
columns: Array<string>,
alias: string
): From
export function path(
from: From
): Array<string>
export function source(
from: From
): string
}
/**
These will have to be supported in every driver */
export const Functions: Functions
export const ParamData:
{
Named(
name: string
): ParamData
Value(
value: any
): ParamData
}
export namespace Selection {
}
export function sql(
strings: TemplateStringsArray,
inserts: Array<undefined | Statement | Param>
): Statement
export namespace Store {
}