drift/docs/pages/v2.html

116 lines
5.1 KiB
HTML

---
template: layouts/home.html
path: v2
---
{% block "blocks/cover" title="Moor 2.0: Supercharged SQL for Dart" image_anchor="top" height="min" color="indigo" %}
<div class="mx-auto">
<p class="lead mt-5">
Learn everything about Dart-SQL interop, the SQL IDE, experimental ffi support and all things new in moor
</p>
<a class="btn btn-lg btn-primary mr-3 mb-4" href="{{ "docs/index.md" | pageUrl }}">
Get started <i class="fas fa-arrow-alt-circle-right ml-2"></i>
</a>
<a class="btn btn-lg btn-secondary mr-3 mb-4" href="{{ "docs/Getting started/starting_with_sql.md" | pageUrl }}">
Migrate an existing project <i class="fas fa-code ml-2 "></i>
</a>
</div>
{% endblock %}
{% block "blocks/lead" color="blue" %}
{% block "blocks/markdown" %}
## 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]({{ "docs/Using SQL/moor_files.md" | pageUrl }})
{% endblock %}
{% endblock %}
{% block "blocks/section" color="light" %}
{% block "blocks/feature" icon="fas fa-database" title="Pure SQL API" %} {% block "blocks/markdown" %}
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]({{ "docs/Getting started/starting_with_sql.md" | pageUrl }})
{% endblock %} {% endblock %}
{% block "blocks/feature" icon="fas fa-plus" title="Analyzer improvements" %} {% block "blocks/markdown" %}
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.
{% endblock %} {% endblock %}
{% block "blocks/feature" icon="fas fa-code-branch" title="Dart-SQL interop" %} {% block "blocks/markdown" %}
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.
{% endblock %} {% endblock %}
{% endblock %}
{% block "blocks/lead" color="green" %} {% block "blocks/markdown" %}
## 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]({{ "docs/Using SQL/sql_ide.md" | pageUrl }})
{% endblock %} {% endblock %}
{% block "blocks/section" color="dark" %}
{% block "blocks/feature" icon="fas fa-lightbulb" title="Quickfixes" %} {% block "blocks/markdown" %}
![](quickfix.png)
Moor lets you write query code faster with helpful actions.
{% endblock %} {% endblock %}
{% block "blocks/feature" icon="fas fa-exclamation-circle" title="Smart warnings" %} {% block "blocks/markdown" %}
![](warning.png)
Moor analyzes statements as you write them and reports errors right away.
This helps you identify problems fast, without having to open your app.
{% endblock %} {% endblock %}
{% block "blocks/feature" icon="fas fa-info-circle" title="Structure view" %} {% block "blocks/markdown" %}
![](outline.png)
Moor provides an outline of your tables and queries for a better overview.
{% endblock %} {% endblock %}
{% endblock %}
{% block "blocks/lead" color="purple" %} {% block "blocks/markdown" %}
## And much, much more
Moor 2.0 contains a set of optimizations and makes common tasks simpler
{% endblock %} {% endblock %}
{% block "blocks/section" color="light" %}
{% block "blocks/feature" icon="fas fa-lightbulb" title="New database helpers" %} {% block "blocks/markdown" %}
New utils to load database from assets or to perform additional work before creating a database.
{% endblock %} {% endblock %}
{% block "blocks/feature" icon="fas fa-exclamation" title="Removed deprecated features" %} {% block "blocks/markdown" %}
We removed a whole bunch of deprecated apis that made it harder to develop new features.
[Read the changelog for details](https://pub.dev/packages/moor#-changelog-tab-)
{% endblock %} {% endblock %}
{% block "blocks/feature" icon="fas fa-bolt" title="Experimental `dart:ffi` bindings" %} {% block "blocks/markdown" %}
The new [moor_ffi](https://pub.dev/packages/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_
{% endblock %} {% endblock %}
{% endblock %}
{% block "blocks/section" color="dark" type="section" %} {% block "blocks/markdown" %}
## Try moor now
- To get started with moor, follow our [getting started guide]({{ "docs/Getting started/index.md" | pageUrl }}) here.
- To get started with SQL in moor, or to migrate an existing project to moor, follow our
[migration guide]({{ "docs/Getting started/starting_with_sql.md" | pageUrl }})
{% endblock %} {% endblock %}