floor_generator 0.6.0

  • README.md
  • CHANGELOG.md
  • Installing
  • Versions
  • 71

Floor #

A supportive SQLite abstraction for your Flutter applications.

This is the dev dependency and contains the annotation processor. Please refer to the floor package on pub or visit Github for more information.


Floor - the bottom layer of a Room.

Bugs and Feedback #

For bugs, questions and discussions please use the Github Issues.

License #

Copyright 2019 Vitus Ortner

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

Changelog #

0.6.0 #

🚀 Features #

  • Add support for IN clauses in query statements
  • Enable compound primary keys

0.5.0 #

Changes #

  • Make tasks deletable in example app

🚀 Features #

  • Allow multiline string queries
  • Allow void-return queries with arguments

0.4.2 #

🐛 Bug Fixes #

  • Fix query parameter substitution regex

0.4.0 #

Changes #

  • Enable coverage report
  • Simplify type assertions and add tests

🚀 Features #

  • Allow more convenient database initialization

🐛 Bug Fixes #

  • Use query argument binding instead of manual binding

0.3.0 #

Changes #

  • Use TypeChecker for all annotations
  • Add publishing instructions
  • Remove unused annotation names
  • Simplify the mapping from an entity to a map
  • Fix database writer test
  • Make stream emit query result on subscription
  • Update example to use StreamBuilder
  • Update README

🐛 Bug Fixes #

  • Correct mapper instance name referenced by generated query methods
  • Fix adapter instances naming

0.2.0 #

Changes #

  • Add database adapters
  • Run floor Flutter tests
  • Move value objects to value_objects directory
  • Map source elements into value objects in processors
  • Use GeneratorForAnnotation and TypeChecker to verify annotations
  • Throw more specific errors on obfuscated database annotation

🚀 Features #

  • Add support for migrations
  • Add support for returning Streams as query result
  • Support accessing data from Data Access Objects
  • Add entity classes to database annotation
  • Add support for indices

0.1.0 #

🚀 Features #

  • Support conflict strategies when inserting and updating records
  • Add support for running queries that return void
  • Add support for foreign keys
  • Add parameter verification for query methods
  • Return deleted row count on delete
  • Return updated rows count on update
  • Return ID/s of inserted item/s
  • Add support for transactions
  • Add support for changing (insert, update, delete) lists
  • Support custom entity name
  • Enable NOT NULL columns
  • Enable custom column name mapping
  • Add delete methods code generation and fix update methods
  • Add update methods code generation
  • Add insert methods code generation
  • Add code generator for query methods
  • Code generation for database creation

Use this package as a library

1. Depend on it

Add this to your package's pubspec.yaml file:


dependencies:
  floor_generator: ^0.6.0

2. Install it

You can install packages from the command line:

with pub:


$ pub get

Alternatively, your editor might support pub get. Check the docs for your editor to learn more.

3. Import it

Now in your Dart code, you can use:


import 'package:floor_generator/builder.dart';
import 'package:floor_generator/generator.dart';
import 'package:floor_generator/misc/annotation_expression.dart';
import 'package:floor_generator/misc/annotations.dart';
import 'package:floor_generator/misc/change_method_processor_helper.dart';
import 'package:floor_generator/misc/change_method_writer_helper.dart';
import 'package:floor_generator/misc/constants.dart';
import 'package:floor_generator/misc/string_utils.dart';
import 'package:floor_generator/misc/type_utils.dart';
import 'package:floor_generator/processor/dao_processor.dart';
import 'package:floor_generator/processor/database_processor.dart';
import 'package:floor_generator/processor/deletion_method_processor.dart';
import 'package:floor_generator/processor/entity_processor.dart';
import 'package:floor_generator/processor/error/database_processor_error.dart';
import 'package:floor_generator/processor/error/entity_processor_error.dart';
import 'package:floor_generator/processor/error/query_method_processor_error.dart';
import 'package:floor_generator/processor/field_processor.dart';
import 'package:floor_generator/processor/insertion_method_processor.dart';
import 'package:floor_generator/processor/processor.dart';
import 'package:floor_generator/processor/query_method_processor.dart';
import 'package:floor_generator/processor/transaction_method_processor.dart';
import 'package:floor_generator/processor/update_method_processor.dart';
import 'package:floor_generator/value_object/change_method.dart';
import 'package:floor_generator/value_object/dao.dart';
import 'package:floor_generator/value_object/dao_getter.dart';
import 'package:floor_generator/value_object/database.dart';
import 'package:floor_generator/value_object/deletion_method.dart';
import 'package:floor_generator/value_object/entity.dart';
import 'package:floor_generator/value_object/field.dart';
import 'package:floor_generator/value_object/foreign_key.dart';
import 'package:floor_generator/value_object/index.dart';
import 'package:floor_generator/value_object/insertion_method.dart';
import 'package:floor_generator/value_object/primary_key.dart';
import 'package:floor_generator/value_object/query_method.dart';
import 'package:floor_generator/value_object/transaction_method.dart';
import 'package:floor_generator/value_object/update_method.dart';
import 'package:floor_generator/writer/dao_writer.dart';
import 'package:floor_generator/writer/database_builder_writer.dart';
import 'package:floor_generator/writer/database_writer.dart';
import 'package:floor_generator/writer/deletion_method_writer.dart';
import 'package:floor_generator/writer/floor_writer.dart';
import 'package:floor_generator/writer/insertion_method_writer.dart';
import 'package:floor_generator/writer/query_method_writer.dart';
import 'package:floor_generator/writer/transaction_method_writer.dart';
import 'package:floor_generator/writer/update_method_writer.dart';
import 'package:floor_generator/writer/writer.dart';
  
Version Uploaded Documentation Archive
0.6.0 Jun 17, 2019 Go to the documentation of floor_generator 0.6.0 Download floor_generator 0.6.0 archive
0.5.0 May 17, 2019 Go to the documentation of floor_generator 0.5.0 Download floor_generator 0.5.0 archive
0.4.2 Apr 29, 2019 Go to the documentation of floor_generator 0.4.2 Download floor_generator 0.4.2 archive
0.4.1 Apr 29, 2019 Go to the documentation of floor_generator 0.4.1 Download floor_generator 0.4.1 archive
0.4.0 Apr 14, 2019 Go to the documentation of floor_generator 0.4.0 Download floor_generator 0.4.0 archive
0.3.0 Apr 4, 2019 Go to the documentation of floor_generator 0.3.0 Download floor_generator 0.3.0 archive
0.2.0 Mar 11, 2019 Go to the documentation of floor_generator 0.2.0 Download floor_generator 0.2.0 archive
0.1.0 Mar 9, 2019 Go to the documentation of floor_generator 0.1.0 Download floor_generator 0.1.0 archive
Popularity:
Describes how popular the package is relative to other packages. [more]
46
Health:
Code health derived from static analysis. [more]
100
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
90
Overall:
Weighted score of the above. [more]
71
Learn more about scoring.

We analyzed this package on Jun 17, 2019, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.3.2
  • pana: 0.12.18

Platforms

Detected platforms: other

Platform components identified in package: build, io, mirrors.

Maintenance suggestions

Maintain an example. (-10 points)

Create a short demo in the example/ directory to show how to use this package.

Common filename patterns include main.dart, example.dart, and floor_generator.dart. Packages with multiple examples should provide example/README.md.

For more information see the pub package layout conventions.

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.3.0-dev <3.0.0
analyzer ^0.36.3 0.36.3
build ^1.1.4 1.1.4
build_config ^0.4.0 0.4.0
code_builder ^3.2.0 3.2.0
collection ^1.14.11 1.14.11
floor_annotation ^0.4.0 0.4.0
meta ^1.1.6 1.1.7
source_gen ^0.9.4+2 0.9.4+2
Transitive dependencies
args 1.5.2
async 2.2.0
built_collection 4.2.2
built_value 6.6.0
charcode 1.1.2
convert 2.1.1
crypto 2.0.6
csslib 0.16.0
fixnum 0.10.9
front_end 0.1.18
glob 1.1.7
html 0.14.0+2
json_annotation 2.4.0
kernel 0.3.18
logging 0.11.3+2
matcher 0.12.5
package_config 1.0.5
pedantic 1.7.0
pub_semver 1.4.2
pubspec_parse 0.1.4
quiver 2.0.3
source_span 1.5.5
stack_trace 1.9.3
string_scanner 1.0.4
term_glyph 1.1.0
typed_data 1.1.6
watcher 0.9.7+10
yaml 2.1.16
Dev dependencies
build_test ^0.10.7+3
dart_style ^1.2.7 1.2.8
mockito ^4.0.0
path ^1.6.2 1.6.2
test ^1.6.3
test_cov ^0.2.0