pub struct SelectDyn<Cols, From> { /* private fields */ }Expand description
A dynamic SELECT statement builder using string-based column names.
For compile-time validated queries, use Select from builder::typed.
Uses the typestate pattern to ensure that:
build()is only available when both columns and FROM are specifiedwhere_clause()is only available after FROM is specifiedgroup_by(),having(),order_by()follow SQL semantics
Source§
Source
Adds a GROUP BY clause.
Source
Adds a HAVING clause (only valid after GROUP BY).
Source
Adds an ORDER BY clause.
Source
Adds an ORDER BY DESC clause.
Source
Adds a LIMIT clause.
Source
Adds an OFFSET clause.
Source
Builds the SELECT statement and returns SQL with parameters.
Source
Builds the SELECT statement and returns only the SQL string.
Warning: Parameters are inlined using proper escaping.
Prefer build() for parameterized queries.