Using SQL

Write typesafe sql with drift

Drift lets you express a variety of queries in pure Dart. However, you don't have to miss out on its features when you need more complex queries or simply prefer sql. Drift has a builtin sql parser and analyzer, so it can generate a typesafe API for sql statements you write. It can also warn about errors in your sql at build time.

Drift files

Learn everything about the .drift files, a powerful tool to define your database in SQL.

Experimental IDE

Get real-time feedback as you type sql

Supported sqlite extensions

Information on json1 and fts5 support in the generator

Custom queries

Write SQL for advanced queries that drift can't express in Dart yet.