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


PostgreSQL driver for Deno
Extremely Popular
interface QueryObjectOptions
implements QueryOptions
import { type QueryObjectOptions } from "";

Options to control the behavior of a Query instance


camelCase: boolean

Enabling camel case will transform any snake case field names coming from the database into camel case ones

Ex: SELECT 1 AS my_field will return { myField: 1 }

This won't have any effect if you explicitly set the field names with the fields parameter

fields: string[]

This parameter supersedes query column names coming from the databases in the order they were provided. Fields must be unique and be in the range of (a-zA-Z0-9_), otherwise the query will throw before execution. A field can not start with a number, just like JavaScript variables

This setting overrides the camel case option

Ex: SELECT 'A', 'B' AS my_field with fields ["field_1", "field_2"] will return { field_1: "A", field_2: "B" }