Skip to main content
Using Deno in production at your company? Earn free Deno merch.
Give us feedback
Module

x/cotton/src/querybuilder.ts>QueryDescription

SQL Database Toolkit for Deno
Latest
interface QueryDescription
import { type QueryDescription } from "https://deno.land/x/cotton@v0.7.5/src/querybuilder.ts";

All information about the query

Properties

tableName: string

The table which the query is targeting

type: QueryType

Query type

columns: (string | [string, string])[]

Table columns that are going to be fetched

optional
values: QueryValues | QueryValues[]

Query values for INSERT and UPDATE

wheres: WhereBinding[]

The where constraints of the query

orders: OrderBinding[]

The orderings for the query

optional
limit: number

The maximum number of records to return

optional
offset: number

The number of records to skip

returning: string[]

Values to be returned by the query

joins: JoinBinding[]

Tables to be joined

counts: CountBinding[]

Count records with given conditions

isDistinct: boolean

Check if the SELECT statement is using DISTINCT keyword

havings: WhereBinding[]

The having clauses in the query

groupBy: string[]

Group records by column