Conditional Update: Update multiple rows based on conditions.
Delete Operations
Delete Row: Remove rows from a table.
Select Operations
Retrieve Data: Fetch rows from a table.
Retrieve with Conditions: Apply clauses like WHERE, ORDER BY, OFFSET and LIMIT.
Clauses
Drift supports common SQL clauses like WHERE, ORDER BY, OFFSET and LIMIT.
WHERE
Filter rows based on conditions.
ORDER BY
Sort rows based on columns.
OFFSET and LIMIT
Implement pagination.
Like operator
Filter rows based on patterns.
Logical Operators
Combine multiple conditions.
Complex Queries
Drift supports advanced SQL features like joins, subqueries, and transactions.
Joins
Combine data from multiple tables using INNER, LEFT OUTER, RIGHT OUTER, FULL OUTER joins.
Group By
Group rows based on columns.
Subqueries
Nested queries for complex conditions.
Transactions
Ensures atomic operations.
Drift Files ✨
Define complex queries in .drift files.
The biggest advantage of drift files is that Drift can generate type-safe code for them.
For example, the above drift file would generate the following code:
DAOs are classes that provide methods to perform database operations.
Their purpose is to abstract the database layer from the rest of the application, much like data sources do for network requests in Sizzle architecture.
Drift also provides a way to generate DAOs. For more information, visit Drift Documentation.