Trait ormx::Table [−][src]
A database table in which each row is identified by a unique ID.
Associated Types
Loading content...Required methods
fn id(&self) -> Self::Id
[src]
Returns the id of this row.
fn get<'a, 'c: 'a>(
db: impl Executor<'c, Database = Db> + 'a,
id: Self::Id
) -> BoxFuture<'a, Result<Self>>
[src]
db: impl Executor<'c, Database = Db> + 'a,
id: Self::Id
) -> BoxFuture<'a, Result<Self>>
Queries the row of the given id.
fn stream_all<'a, 'c: 'a>(
db: impl Executor<'c, Database = Db> + 'a
) -> BoxStream<'a, Result<Self>>
[src]
db: impl Executor<'c, Database = Db> + 'a
) -> BoxStream<'a, Result<Self>>
Stream all rows from this table.
fn stream_all_paginated<'a, 'c: 'a>(
db: impl Executor<'c, Database = Db> + 'a,
offset: i64,
limit: i64
) -> BoxStream<'a, Result<Self>>
[src]
db: impl Executor<'c, Database = Db> + 'a,
offset: i64,
limit: i64
) -> BoxStream<'a, Result<Self>>
fn update<'a, 'c: 'a>(
&'a self,
db: impl Executor<'c, Database = Db> + 'a
) -> BoxFuture<'a, Result<()>>
[src]
&'a self,
db: impl Executor<'c, Database = Db> + 'a
) -> BoxFuture<'a, Result<()>>
Updates all fields of this row, regardless if they have been changed or not.
fn delete_row<'a, 'c: 'a>(
db: impl Executor<'c, Database = Db> + 'a,
id: Self::Id
) -> BoxFuture<'a, Result<()>>
[src]
db: impl Executor<'c, Database = Db> + 'a,
id: Self::Id
) -> BoxFuture<'a, Result<()>>
Delete a row from the database
Provided methods
fn insert(
db: &mut <Db as Database>::Connection,
row: impl Insert<Table = Self>
) -> BoxFuture<'_, Result<Self>>
[src]
db: &mut <Db as Database>::Connection,
row: impl Insert<Table = Self>
) -> BoxFuture<'_, Result<Self>>
Insert a row into the database.
fn all<'a, 'c: 'a>(
db: impl Executor<'c, Database = Db> + 'a
) -> BoxFuture<'a, Result<Vec<Self>>>
[src]
db: impl Executor<'c, Database = Db> + 'a
) -> BoxFuture<'a, Result<Vec<Self>>>
Load all rows from this table.
fn all_paginated<'a, 'c: 'a>(
db: impl Executor<'c, Database = Db> + 'a,
offset: i64,
limit: i64
) -> BoxFuture<'a, Result<Vec<Self>>>
[src]
db: impl Executor<'c, Database = Db> + 'a,
offset: i64,
limit: i64
) -> BoxFuture<'a, Result<Vec<Self>>>
fn patch<'a, 'c: 'a, P>(
&'a mut self,
db: impl Executor<'c, Database = Db> + 'a,
patch: P
) -> BoxFuture<'a, Result<()>> where
P: Patch<Table = Self>,
[src]
&'a mut self,
db: impl Executor<'c, Database = Db> + 'a,
patch: P
) -> BoxFuture<'a, Result<()>> where
P: Patch<Table = Self>,
Applies a patch to this row.
fn reload<'a, 'c: 'a>(
&'a mut self,
db: impl Executor<'c, Database = Db> + 'a
) -> BoxFuture<'a, Result<()>>
[src]
&'a mut self,
db: impl Executor<'c, Database = Db> + 'a
) -> BoxFuture<'a, Result<()>>
fn delete<'a, 'c: 'a>(
self,
db: impl Executor<'c, Database = Db> + 'a
) -> BoxFuture<'a, Result<()>>
[src]
self,
db: impl Executor<'c, Database = Db> + 'a
) -> BoxFuture<'a, Result<()>>
Deletes this row from the database.