LEVIATHAN v962456e · 962456eee1

atlantis · Orm

class Query<E>

since 0.1.0-alpha.1linux

Constructors

new

new(Repo<E> repo)

Fields

includeDeleted

bool includeDeleted

orderParts

Array<string> orderParts

repo

Repo<E> repo

skipN

int skipN

takeN

int takeN

tracking

bool tracking

whereBinds

Array<Array<string | int | float | bool | None>> whereBinds

whereHasIn

Array<bool> whereHasIn

whereIns

Array<Array<string | int | float | bool | None>> whereIns

wheres

withFields

Array<string> withFields

Methods

__clone

__clone() -> Query<E>

__colsSql

__colsSql() -> string

__orderByTree

__orderByTree(expr::Node t, bool desc) -> Query<E>

__selectSql

__selectSql(int forcedLimit) -> SqlAndParams

__tailSql

__tailSql() -> string

__whereSql

__whereSql(SqlRender r) -> string

all

all() -> Promise<Array<E>>

count

count() -> Promise<int>

delete

delete() -> Promise<int>

exists

exists() -> Promise<bool>

first

first() -> Promise<E>

firstOrNone

firstOrNone() -> Promise<E | None>

noTrack

noTrack() -> Query<E>

orderBy

orderBy(expr::Expr<(E) => string | int | float | bool | None> k) -> Query<E>

orderByDesc

orderByDesc(expr::Expr<(E) => string | int | float | bool | None> k) -> Query<E>

set

set(expr::Expr<(E) => int> assignment) -> Promise<int>

skip

skip(int n) -> Query<E>

take

take(int n) -> Query<E>

thenBy

thenBy(expr::Expr<(E) => string | int | float | bool | None> k) -> Query<E>

thenByDesc

thenByDesc(expr::Expr<(E) => string | int | float | bool | None> k) -> Query<E>

toSql

toSql() -> SqlAndParams

where

where(expr::Expr<(E) => bool> p) -> Query<E>

whereIn

whereIn(expr::Expr<(E) => bool> p, Array<string | int | float | bool | None> contents) -> Query<E>

with

with<R>(expr::Expr<(E) => R> path) -> Query<E>

withDeleted

withDeleted() -> Query<E>