OxL Справочник OxL
РусскийEnglish

type Table

impl Table<T>

С версии. 1.0.0-beta

Методы

query() -> Query<T> db
A query over every row of the table; add sqlWhere, sqlOrder, skip, take and run it.
insert(x: &T) db
Inserts a row; a failure panics (Db.tryInsert returns a DbError).
upsert(x: &T) db
Inserts the row, or replaces the row with the same primary key.
update(x: &T) db
Updates the row with the primary key of x; a missing row panics (Db.tryUpdate returns a DbError).
delete(x: &T) db
Deletes the row with the primary key of x; a missing row panics (Db.tryDelete returns a DbError).
all() -> List<T> db
Every row of the table.
count() -> i64 db
The number of rows of the table.

Определено в: std/orm/orm.oxl:987

См. также