THE ORIONIS API
Build with clarity.
Explore the building blocks of an async-first Python framework. Every module, class, and method — connected, searchable, and ready to build with.
class IRawQueryBuilder(IQueryBuilderBase): (source)
Known subclasses: orionis.orm.query.raw_builder.RawQueryBuilder
Contract for the model-less query builder over a plain table name.
It inherits the whole query language from IQueryBuilderBase
and only adds what is specific to running without a model: choosing
the target table and connection, and returning plain dictionaries
instead of hydrated instances.
| Method | connection |
Change the connection this builder runs against. |
| Async Method | first |
Execute the query and return only the first matching row. |
| Async Method | get |
Execute the query and return every matching row. |
| Async Method | paginate |
Execute the query returning a length-aware page of results. |
| Async Method | pluck |
Return one column of every matching row. |
| Method | table |
Change the table this builder queries against. |
| Async Method | value |
Return a single column value of the first matching row. |
| Class Variable | __slots__ |
Undocumented |
Inherited from IQueryBuilderBase:
| Method | add |
Append columns to the current projection. |
| Async Method | avg |
Return the average value of a column among matching rows. |
| Method | clone |
Return an independent copy of this builder. |
| Async Method | count |
Count the rows matched by the query. |
| Method | cross |
Add a CROSS JOIN to the query. |
| Async Method | delete |
Delete the rows matched by the query. |
| Method | distinct |
Collapse duplicate rows from the query results. |
| Async Method | doesnt |
Report whether the query matches no rows. |
| Async Method | exists |
Report whether the query matches at least one row. |
| Method | for |
Limit the query to a single page of results. |
| Method | full |
Add a FULL OUTER JOIN to the query. |
| Method | group |
Add grouping columns to the query. |
| Method | having |
Add a post-grouping condition to the query. |
| Method | having |
Add a raw SQL post-grouping condition. |
| Async Method | insert |
Insert one or many rows into the target table. |
| Method | join |
Add an INNER JOIN to the query. |
| Method | join |
Join a subquery as a derived table with an INNER JOIN. |
| Method | latest |
Order the query by a timestamp column in descending order. |
| Method | left |
Add a LEFT OUTER JOIN to the query. |
| Method | left |
Join a subquery as a derived table with a LEFT OUTER JOIN. |
| Method | limit |
Limit the number of rows returned by the query. |
| Method | lock |
Lock the selected rows against concurrent writes. |
| Async Method | max |
Return the maximum value of a column among matching rows. |
| Async Method | min |
Return the minimum value of a column among matching rows. |
| Method | offset |
Skip the given number of rows before returning results. |
| Method | oldest |
Order the query by a timestamp column in ascending order. |
| Method | order |
Add an ordering rule to the query. |
| Method | or |
Add an OR-combined post-grouping condition to the query. |
| Method | or |
Add an OR-combined filtering condition. |
| Method | or |
Add an OR-combined comparison between two columns. |
| Method | or |
Add an OR-combined EXISTS condition. |
| Method | or |
Add an OR-combined set-membership condition. |
| Method | or |
Add an OR-combined NOT EXISTS condition. |
| Method | or |
Add an OR-combined set-exclusion condition. |
| Method | or |
Add an OR-combined IS NOT NULL condition. |
| Method | or |
Add an OR-combined IS NULL condition. |
| Method | or |
Add an OR-combined raw SQL condition. |
| Method | right |
Add a RIGHT OUTER JOIN to the query. |
| Method | right |
Join a subquery as a derived table with a RIGHT OUTER JOIN. |
| Method | select |
Restrict the query projection to the given columns. |
| Method | select |
Append a raw SQL fragment to the projection. |
| Method | select |
Append a scalar subquery to the projection under an alias. |
| Method | shared |
Lock the selected rows in shared mode. |
| Method | skip |
Skip the given number of rows; alias of offset. |
| Async Method | sum |
Return the sum of a column among matching rows. |
| Method | take |
Limit the number of rows returned; alias of limit. |
| Method | to |
Return the engine-agnostic plan assembled so far. |
| Method | union |
Append another query's rows, collapsing duplicates. |
| Method | union |
Append another query's rows, keeping duplicates. |
| Async Method | update |
Mass update the rows matched by the query. |
| Method | where |
Add an AND-combined filtering condition. |
| Method | where |
Filter rows whose column value lies between two boundaries. |
| Method | where |
Compare two columns of the query against each other. |
| Method | where |
Filter rows whose column value contains the given text. |
| Method | where |
Filter rows whose column value ends with the given text. |
| Method | where |
Keep rows for which a correlated subquery returns any row. |
| Method | where |
Filter rows matching a case-insensitive SQL LIKE pattern. |
| Method | where |
Filter rows whose column value belongs to the given set. |
| Method | where |
Filter rows whose column value matches an SQL LIKE pattern. |
| Method | where |
Filter rows whose column value lies outside two boundaries. |
| Method | where |
Keep rows for which a correlated subquery returns no row. |
| Method | where |
Filter rows not matching a case-insensitive LIKE pattern. |
| Method | where |
Filter rows whose column value is outside the given set. |
| Method | where |
Filter rows not matching an SQL LIKE pattern. |
| Method | where |
Filter rows whose column value is not NULL. |
| Method | where |
Filter rows whose column value is NULL. |
| Method | where |
Add an AND-combined raw SQL condition. |
| Method | where |
Filter rows whose column value matches a regular expression. |
| Method | where |
Filter rows whose column value starts with the given text. |
orionis.orm.query.raw_builder.RawQueryBuilderChange the connection this builder runs against.
| Parameters | |
name:str | Named connection to run the query against. |
| Returns | |
IRawQueryBuilder | The same builder, enabling fluent chaining. |
orionis.orm.query.raw_builder.RawQueryBuilderExecute the query and return every matching row.
| Returns | |
Collection | Collection of plain dictionaries, one per row. |
orionis.orm.query.raw_builder.RawQueryBuilderorionis.orm.query.raw_builder.RawQueryBuilderReturn one column of every matching row.
| Parameters | |
column:str | Column whose values are collected. |
| Returns | |
Collection | Collection of column values. |
orionis.orm.query.raw_builder.RawQueryBuilderChange the table this builder queries against.
| Parameters | |
name:str | Logical table name, without the connection prefix. |
alias:str or None, optional | Alias the table is referred to by inside the query. |
| Returns | |
IRawQueryBuilder | The same builder, enabling fluent chaining. |