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 dbfromRow
(Atlantis::Data::Row) => E fromRowident
Map<int, E> identmake
() => E makeproto
E protoMethods
__adopt
__adopt(int pk, Array raw) -> void__byPk
__validate
__validate() -> Promise<void>all
count
count() -> Promise<int>dbOf
dbOf() -> Dbexists
exists() -> Promise<bool>find
find(int pk) -> Promise<E>findOrNone
findOrNone(int pk) -> Promise<E | None>materialize
materialize(Atlantis::Data::Row r, bool track) -> EnoTrack
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() -> stringprotoModel
protoModel() -> Modelquery
query() -> Query<E>skip
skip(int n) -> Query<E>sql
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>