mirror of https://github.com/AMT-Cheif/drift.git
Release 1.2
This commit is contained in:
parent
9490cd22fe
commit
93d292cff1
13
README.md
13
README.md
|
@ -1,8 +1,11 @@
|
|||
# Moor
|
||||
[![Build Status](https://travis-ci.com/simolus3/moor.svg?token=u4VnFEE5xnWVvkE6QsqL&branch=master)](https://travis-ci.com/simolus3/moor)
|
||||
[API: ![Generator version](https://img.shields.io/pub/v/moor.svg)](https://pub.dartlang.org/packages/moor)
|
||||
[Runtime: ![Generator version](https://img.shields.io/pub/v/moor_flutter.svg)](https://pub.dartlang.org/packages/moor_flutter)
|
||||
[Generator: ![Generator version](https://img.shields.io/pub/v/moor_generator.svg)](https://pub.dartlang.org/packages/moor_generator)
|
||||
[![codecov](https://codecov.io/gh/simolus3/moor/branch/master/graph/badge.svg)](https://codecov.io/gh/simolus3/moor)
|
||||
|
||||
|
||||
| Core API | Flutter | Generator |
|
||||
|:-------------:|:-------------:|:-----:|
|
||||
| [![Generator version](https://img.shields.io/pub/v/moor.svg)](https://pub.dartlang.org/packages/moor) | [![Flutter version](https://img.shields.io/pub/v/moor_flutter.svg)](https://pub.dartlang.org/packages/moor_flutter) | [![Generator version](https://img.shields.io/pub/v/moor_generator.svg)](https://pub.dartlang.org/packages/moor_generator) |
|
||||
|
||||
Moor is an easy to use and safe way to persist data for Flutter apps. It features
|
||||
a fluent Dart DSL to describe tables and will generate matching database code that
|
||||
|
@ -33,10 +36,10 @@ API that will deliver auto-updating streams for your queries.
|
|||
First, let's add moor to your project's `pubspec.yaml`.
|
||||
```yaml
|
||||
dependencies:
|
||||
moor_flutter:
|
||||
moor_flutter: # use the latest version
|
||||
|
||||
dev_dependencies:
|
||||
moor_generator:
|
||||
moor_generator: # use the latest versions
|
||||
build_runner:
|
||||
```
|
||||
We're going to use the `moor_flutter` library to specify tables and access the database. The
|
||||
|
|
|
@ -1,6 +1,12 @@
|
|||
## 1.2.0
|
||||
- __Breaking__: Generated DAO classes are now called `_$YourNameHere`, it used to
|
||||
be just `_YourNameHere` (without the dollar sign)
|
||||
- Blob data type
|
||||
- `insertOrReplace` method for insert statements
|
||||
- DAOs can now operate on transactions
|
||||
- Custom constraints
|
||||
- Query streams are now cached so that equal queries yield identical streams.
|
||||
This can improve performance.
|
||||
|
||||
## 1.1.0
|
||||
- Transactions
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
name: moor
|
||||
description: Moor is a safe and reactive persistence library for Dart applications
|
||||
version: 1.1.1
|
||||
version: 1.2.0
|
||||
homepage: https://github.com/simolus3/moor
|
||||
authors:
|
||||
- Simon Binder <simolus3@gmail.com>
|
||||
|
@ -14,7 +14,7 @@ dependencies:
|
|||
collection: '>= 1.0.0 <2.0.0'
|
||||
|
||||
dev_dependencies:
|
||||
moor_generator: ^1.1.1
|
||||
moor_generator: ^1.2.0
|
||||
build_runner: ^1.2.0
|
||||
build_test: ^0.10.6
|
||||
test: ^1.5.3
|
||||
|
|
|
@ -1,3 +1,16 @@
|
|||
## 1.2.0
|
||||
Changes from the moor and moor_generator libraries:
|
||||
- __Breaking__: Generated DAO classes are now called `_$YourNameHere`, it used to
|
||||
be just `_YourNameHere` (without the dollar sign)
|
||||
- Blob data type
|
||||
- `insertOrReplace` method for insert statements
|
||||
- DAOs can now operate on transactions
|
||||
- Custom constraints
|
||||
- Query streams are now cached so that equal queries yield identical streams.
|
||||
This can improve performance.
|
||||
- Generated classes now use lazy getters instead of recalculating fields on each access
|
||||
- Data classes can be converted from and to json
|
||||
|
||||
## 1.1.0
|
||||
- Transactions
|
||||
|
||||
|
|
|
@ -1,8 +1,11 @@
|
|||
# Moor
|
||||
[![Build Status](https://travis-ci.com/simolus3/moor.svg?token=u4VnFEE5xnWVvkE6QsqL&branch=master)](https://travis-ci.com/simolus3/moor)
|
||||
[API: ![Generator version](https://img.shields.io/pub/v/moor.svg)](https://pub.dartlang.org/packages/moor)
|
||||
[Runtime: ![Generator version](https://img.shields.io/pub/v/moor_flutter.svg)](https://pub.dartlang.org/packages/moor_flutter)
|
||||
[Generator: ![Generator version](https://img.shields.io/pub/v/moor_generator.svg)](https://pub.dartlang.org/packages/moor_generator)
|
||||
[![codecov](https://codecov.io/gh/simolus3/moor/branch/master/graph/badge.svg)](https://codecov.io/gh/simolus3/moor)
|
||||
|
||||
|
||||
| Core API | Flutter | Generator |
|
||||
|:-------------:|:-------------:|:-----:|
|
||||
| [![Generator version](https://img.shields.io/pub/v/moor.svg)](https://pub.dartlang.org/packages/moor) | [![Flutter version](https://img.shields.io/pub/v/moor_flutter.svg)](https://pub.dartlang.org/packages/moor_flutter) | [![Generator version](https://img.shields.io/pub/v/moor_generator.svg)](https://pub.dartlang.org/packages/moor_generator) |
|
||||
|
||||
Moor is an easy to use and safe way to persist data for Flutter apps. It features
|
||||
a fluent Dart DSL to describe tables and will generate matching database code that
|
||||
|
@ -33,10 +36,10 @@ API that will deliver auto-updating streams for your queries.
|
|||
First, let's add moor to your project's `pubspec.yaml`.
|
||||
```yaml
|
||||
dependencies:
|
||||
moor_flutter:
|
||||
moor_flutter: # use the latest version
|
||||
|
||||
dev_dependencies:
|
||||
moor_generator:
|
||||
moor_generator: # use the latest versions
|
||||
build_runner:
|
||||
```
|
||||
We're going to use the `moor_flutter` library to specify tables and access the database. The
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
import 'dart:async';
|
||||
import 'dart:convert';
|
||||
import 'package:moor_example/database/todos_dao.dart';
|
||||
import 'package:moor_flutter/moor_flutter.dart';
|
||||
|
||||
|
@ -14,10 +13,6 @@ class Todos extends Table {
|
|||
DateTimeColumn get targetDate => dateTime().nullable()();
|
||||
|
||||
IntColumn get category => integer().nullable()();
|
||||
|
||||
String toJson(TodoEntry entry) {
|
||||
return json.encode(entry.toJson());
|
||||
}
|
||||
}
|
||||
|
||||
@DataClassName('Category')
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
name: moor_flutter
|
||||
description: Flutter implementation of moor, a safe and reactive persistence library for Dart applications
|
||||
version: 1.1.0
|
||||
version: 1.2.0
|
||||
homepage: https://github.com/simolus3/moor
|
||||
authors:
|
||||
- Simon Binder <simolus3@gmail.com>
|
||||
|
@ -10,7 +10,7 @@ environment:
|
|||
sdk: ">=2.0.0-dev.68.0 <3.0.0"
|
||||
|
||||
dependencies:
|
||||
moor: ^1.1.1
|
||||
moor: ^1.2.0
|
||||
sqflite: ^1.1.0
|
||||
meta: '>=1.0.0 <1.2.0'
|
||||
path: '>=1.0.0 <2.0.0'
|
||||
|
|
|
@ -1,6 +1,8 @@
|
|||
## 1.2.0
|
||||
- Blob data type
|
||||
- Generated classes now use lazy getters instead of recalculating fields on each access
|
||||
- Custom Constraints
|
||||
- Data classes can be converted from and to json
|
||||
|
||||
## 1.1.0
|
||||
- The generated data classes now implement `toString()`
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
name: moor_generator
|
||||
description: Dev-dependency to generate table and dataclasses together with the moor package.
|
||||
version: 1.1.1
|
||||
version: 1.2.0
|
||||
homepage: https://github.com/simolus3/moor
|
||||
authors:
|
||||
- Simon Binder <simolus3@gmail.com>
|
||||
|
@ -17,7 +17,7 @@ dependencies:
|
|||
build: ^1.1.0
|
||||
build_runner: '>=1.1.0 <1.3.0'
|
||||
build_config: ^0.3.1
|
||||
moor: ^1.1.1
|
||||
moor: ^1.2.0
|
||||
|
||||
dev_dependencies:
|
||||
test: ^1.0.0
|
||||
|
|
Loading…
Reference in New Issue