pub struct TableQuery {
pub with: With,
pub table: TableRef,
pub order_by: OrderBy,
pub limit: Limit,
pub offset: Offset,
pub fetch: Fetch,
pub locks: Locks,
pub combines: Combines,
}Expand description
The PostgreSQL TABLE command — TABLE name is SELECT * FROM name.
From https://www.postgresql.org/docs/17/sql-select.html (the TABLE
section): TABLE [ ONLY ] table_name [ * ], and
it can be used as a top-level command or as a space-saving syntax variant in parts of complex queries. Only the
WITH,UNION,INTERSECT,EXCEPT,ORDER BY,LIMIT,OFFSET,FETCHandFORlocking clauses can be used withTABLE; theWHEREclause and any form of aggregation cannot be used.
The struct is that sentence: exactly those clauses, and no others — a
table::where_ is a compile error because HasWhere is not implemented.
Fields§
§with: WithWITH ….
table: TableRefThe table: TABLE [ ONLY ] name. Grammar takes a name only — no alias,
no column list.
order_by: OrderByORDER BY … — this statement’s own.
limit: LimitLIMIT … — this statement’s own.
offset: OffsetOFFSET … — this statement’s own.
fetch: FetchFETCH … — this statement’s own.
locks: LocksFOR UPDATE ….
combines: CombinesThe set operations, and the trailing clauses that belong to their result.
Implementations§
Source§impl TableQuery
impl TableQuery
Sourcepub fn new() -> TableQuery
pub fn new() -> TableQuery
A TABLE with no table yet — which does not build until it has one.
Sourcepub fn apply(&mut self, mods: impl Mod<TableQuery>)
pub fn apply(&mut self, mods: impl Mod<TableQuery>)
Apply more mods to an existing query.
Trait Implementations§
Source§impl Clone for TableQuery
impl Clone for TableQuery
Source§fn clone(&self) -> TableQuery
fn clone(&self) -> TableQuery
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for TableQuery
impl Debug for TableQuery
Source§impl Default for TableQuery
impl Default for TableQuery
Source§fn default() -> TableQuery
fn default() -> TableQuery
Source§impl Expression for TableQuery
impl Expression for TableQuery
Source§impl HasCombines for TableQuery
impl HasCombines for TableQuery
Source§fn combines_mut(&mut self) -> &mut Combines
fn combines_mut(&mut self) -> &mut Combines
Source§impl HasFetch for TableQuery
impl HasFetch for TableQuery
Source§impl HasLimit for TableQuery
impl HasLimit for TableQuery
Source§impl HasLocks for TableQuery
impl HasLocks for TableQuery
Source§impl HasOffset for TableQuery
impl HasOffset for TableQuery
Source§fn offset_mut(&mut self) -> &mut Offset
fn offset_mut(&mut self) -> &mut Offset
OFFSET clause to modify.Source§impl HasOrderBy for TableQuery
impl HasOrderBy for TableQuery
Source§fn order_by_mut(&mut self) -> &mut OrderBy
fn order_by_mut(&mut self) -> &mut OrderBy
ORDER BY clause to modify.