import { QueryBuilder } from "https://deno.land/x/cotton@v0.4.9/mod.ts";
Allows to build complex SQL queries and execute those queries.
Methods
private
addWhereClause(options: { column: string; operator?: WhereOperator | "BETWEEN" | "IN"; value: any; type?: WhereType; })Add new where clause to query
notWhere(): QueryBuilder
column: string,
operator: WhereOperator,
value: any,
orderBy(column: string, direction?: OrderDirection): QueryBuilder
Add an "order by" clause to the query.
orWhere(): QueryBuilder
column: string,
operator: WhereOperator,
value: any,
replace(data: QueryValues): QueryBuilder
Perform REPLACE
query to the table.
It will look for PRIMARY
and UNIQUE
constraints.
If something matched, it gets removed from the table
and creates a new row with the given values.
where(): QueryBuilder
column: string,
operator: WhereOperator,
value: any,