LEVIATHAN v962456e · 962456eee1

atlantis · Orm

class Repo<E>

since 0.1.0-alpha.1linux

Constructors

new

new(Db db, () => E make, (Atlantis::Data::Row) => E fromRow)

Fields

db

Db db

fromRow

(Atlantis::Data::Row) => E fromRow

ident

Map<int, E> ident

make

() => E make

proto

E proto

Methods

__adopt

__adopt(int pk, Array raw) -> void

__byPk

__byPk(int pk) -> Promise<Array<E>>

__validate

__validate() -> Promise<void>

all

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

count

count() -> Promise<int>

dbOf

dbOf() -> Db

exists

exists() -> Promise<bool>

find

find(int pk) -> Promise<E>

findOrNone

findOrNone(int pk) -> Promise<E | None>

materialize

materialize(Atlantis::Data::Row r, bool track) -> E

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>

pathKey

pathKey() -> string

protoModel

protoModel() -> Model

query

query() -> Query<E>

skip

skip(int n) -> Query<E>

sql

sql(string text, Array<string | int | float | bool | None> params) -> Promise<Array<E>>

take

take(int n) -> Query<E>

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>