Moor 2.0: Supercharged SQL for Dart

Learn everything about Dart-SQL interop, the SQL IDE, experimental ffi support and all things new in moor

Get started Migrate an existing project

Generator overhaul

The rewritten compiler is faster than ever, supports more SQL features and gives you more flexibility when writing database code.

Check the updated documentation

Pure SQL API

The new .moor files have been updated and can now hold both CREATE TABLE statements and queries you define. Moor will then generate typesafe Dart APIs based on your tables and statements.

Get started with SQL and moor

Analyzer improvements

We now support more advanced features like compound select statements and window functions, including detailed static analysis and lints. The updated type inference engine provides better results on complex expressions. We also generate simpler methods for queries that only return one column.

Dart-SQL interop

Declare tables in Dart, write your queries in SQL. Or do it the other way around. Or do it all in Dart. Or all in SQL. Moor makes writing database code fun without taking control over your code. For maximum flexibilty, moor lets you inline Dart expressions into SQL and use the best of both worlds.

Builtin SQL IDE

Moor 2.0 expands the previous sql parser and analyzer, providing real-time feedback on your SQL queries as you type. Moor plugs right into the Dart analysis server, so you don’t have to install any additional extensions.

Learn more about the IDE

Quickfixes

Moor lets you write query code faster with helpful actions.

Smart warnings

Moor analyzes statements as you write them and reports errors right away. This helps you identify problems fast, without having to open your app.

Structure view

Moor provides an outline of your tables and queries for a better overview.

And much, much more

Moor 2.0 contains a set of optimizations and makes common tasks simpler

New database helpers

New utils to load database from assets or to perform additional work before creating a database.

Removed deprecated features

We removed a whole bunch of deprecated apis that made it harder to develop new features.

Read the changelog for details

Experimental dart:ffi bindings

The new moor_ffi package brings moor to the desktop and is up to 500x faster than the old implementation.

Please not that the package is still in preview

Try moor now