wandel 2.0.2

  • README.md
  • CHANGELOG.md
  • Installing
  • Versions
  • 62

wandel #

The wandel lib is a migration lib for dart. The tool itself is not specifically related to databases but basically provides a clean API for running and rolling back tasks. It brings out of the box an MySqlConnector based on sqljocky5.

Installation #

Add it to your dependencies

dependencies:
  wandel: "^2.0.0"

and install the package

$ pub get

Usage #

Take a look into the example folder.

pub run example/basic/basic.dart

import 'package:wandel/wandel.dart';

import 'migrations/2018-01-18-task1.dart';
import 'migrations/2018-01-18-task2.dart';
import 'migrations/2018-01-18-task3.dart';

main() async {

    List<WandelMigration> migrations = [
        new MyWandelMigration1(),
        new MyWandelMigration2(),
        new MyWandelMigration3()
    ];

    Wandel wandel = new Wandel(
        migrations: migrations,
        connector: new WandelMySQLConnector(
            tableName       : '__migration',
            user            : 'username',
            password        : 'password',
            database        : 'databasename',
            host            : 'localhost',
            port            : 3306,
            maxConnections  : 5
        )
    );

    wandel.execute(mode: WANDEL_MODE.UP).then((List<WandelMigration> touchedList) {
        print(touchedList);
        print('finished');
    });
}

Contributing #

  1. Fork it!
  2. Create your feature branch: git checkout -b my-new-feature
  3. Commit your changes: git commit -am 'Add some feature'
  4. Push to the branch: git push origin my-new-feature
  5. Submit a pull request :D

Credits #

Robert Beyer 4sternrb@googlemail.com

License #

MIT

Changelog #

All notable changes to this project will be documented in this file.

[2.0.2] - 2019-02-05

Bugfix #

  • using unix_timestamp() instead of now() for adding the creation-time value to new entries

[2.0.1] - 2019-01-05

Bugfix #

  • bugfix missing changes with the increased version of sqljocky

[2.0.0] - 2019-01-05

Change #

  • change to dart 2.1.0

[1.0.1] - 2018-01-26

Added #

  • analysis_option.yaml to enable better codestyle :)

Change #

  • reduce linter warnings up to zero

[1.0.0] - 2018-01-26

Added #

  • initial import of feature complete package
  • add changelog file

Use this package as a library

1. Depend on it

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


dependencies:
  wandel: ^2.0.2

2. Install it

You can install packages from the command line:

with pub:


$ pub get

with Flutter:


$ flutter packages get

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

3. Import it

Now in your Dart code, you can use:


import 'package:wandel/wandel.dart';
  
Version Uploaded Documentation Archive
2.0.2 Feb 5, 2019 Go to the documentation of wandel 2.0.2 Download wandel 2.0.2 archive
2.0.1 Jan 5, 2019 Go to the documentation of wandel 2.0.1 Download wandel 2.0.1 archive
2.0.0 Jan 5, 2019 Go to the documentation of wandel 2.0.0 Download wandel 2.0.0 archive
1.0.1 Jan 26, 2018 Go to the documentation of wandel 1.0.1 Download wandel 1.0.1 archive
1.0.0 Jan 26, 2018 Go to the documentation of wandel 1.0.0 Download wandel 1.0.0 archive
Popularity:
Describes how popular the package is relative to other packages. [more]
48
Health:
Code health derived from static analysis. [more]
72
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
80
Overall:
Weighted score of the above. [more]
62
Learn more about scoring.

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

  • Dart: 2.1.0
  • pana: 0.12.13+1

Platforms

Detected platforms: Flutter, other

Primary library: package:wandel/wandel.dart with components: io.

Health issues and suggestions

Fix lib/src/Connectors/WandelMySQLConnector.dart. (-26.49 points)

Analysis of lib/src/Connectors/WandelMySQLConnector.dart failed with 1 error, 4 hints:

line 65 col 42: The argument type '(Results) → Future<Null>' can't be assigned to the parameter type '(StreamedResults) → FutureOr<dynamic>'.

line 16 col 23: Use = to separate a named parameter from its default value.

line 17 col 28: Use = to separate a named parameter from its default value.

line 18 col 18: Use = to separate a named parameter from its default value.

line 42 col 31: Use = to separate a named parameter from its default value.

Document public APIs. (-0.44 points)

52 out of 53 API elements have no dartdoc comment.Providing good documentation for libraries, classes, functions, and other API elements improves code readability and helps developers find and use your API.

Fix lib/wandel.dart. (-1 points)

Analysis of lib/wandel.dart reported 2 hints:

line 35 col 60: Use = to separate a named parameter from its default value.

line 49 col 70: Use = to separate a named parameter from its default value.

Format lib/src/WandelConnector.dart.

Run dartfmt to format lib/src/WandelConnector.dart.

Format lib/src/WandelMigration.dart.

Run dartfmt to format lib/src/WandelMigration.dart.

Maintenance issues and suggestions

Support the latest stable Dart SDK in pubspec.yaml. (-20 points)

The SDK constraint in pubspec.yaml doesn't allow the latest stable Dart SDK release.

Maintain an example.

None of the files in the package's example/ directory matches known example patterns.

Common filename patterns include main.dart, example.dart, and wandel.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.1.0
sqljocky5 ^2.0.0 2.2.1
Transitive dependencies
charcode 1.1.2
collection 1.14.11
convert 2.1.1
crypto 2.0.6
synchronized 1.5.3+2 2.0.2+1
typed_buffer 2.1.1
typed_data 1.1.6