angel_orm 2.0.0-dev

  • README.md
  • CHANGELOG.md
  • Example
  • Installing
  • Versions
  • 35

angel_orm

Runtime support for Angel's ORM. Includes a clean, database-agnostic query builder and relationship/join support.

For documentation about the ORM, head to the main project repo: https://github.com/angel-dart/orm

1.0.0-alpha+11

  • Removed PostgreSQL-specific functionality, so that the ORM can ultimately target all services.
  • Created a better Join model.
  • Created a far better Query model.
  • Removed lib/server.dart

1.0.0-alpha+10

  • Split into angel_orm.dart and server.dart. Prevents DDC failures.

1.0.0-alpha+7

  • Added a @belongsToMany annotation class.
  • Resolved #20. The PostgreSQLConnectionPool keeps track of which connections have been opened now.

1.0.0-alpha+6

  • DateTimeSqlExpressionBuilder will no longer automatically insert quotation marks around names.

1.0.0-alpha+5

  • Corrected a typo that was causing the aforementioned test failures. == becomes =.

1.0.0-alpha+4

  • Added a null-check in lib/src/query.dart#L24 to (hopefully) prevent it from crashing on Travis.

1.0.0-alpha+3

  • Added isIn, isNotIn, isBetween, isNotBetween to SqlExpressionBuilder and its subclasses.
  • Added a dependency on package:meta.

example/main.dart

import 'package:angel_model/angel_model.dart';
import 'package:angel_orm/angel_orm.dart';

Query findEmployees(Company company) {
  return new Query()
    ..['company_id'] = equals(company.id)
    ..['first_name'] = notNull() & (equals('John'))
    ..['salary'] = greaterThanOrEqual(100000.0);
}

@ORM('api/companies')
class Company extends Model {
  String name;
  bool isFortune500;
}

@orm
class Employee extends Model {
  @belongsTo
  Company company;

  String firstName, lastName;

  double salary;

  bool get isFortune500Employee => company.isFortune500;
}

Use this package as a library

1. Depend on it

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


dependencies:
  angel_orm: ^2.0.0-dev

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:angel_orm/angel_orm.dart';
  
Version Uploaded Documentation Archive
2.0.0-dev May 16, 2018 Go to the documentation of angel_orm 2.0.0-dev Download angel_orm 2.0.0-dev archive
1.0.0-alpha+12 Dec 7, 2017 Go to the documentation of angel_orm 1.0.0-alpha+12 Download angel_orm 1.0.0-alpha+12 archive
1.0.0-alpha+11 Nov 29, 2017 Go to the documentation of angel_orm 1.0.0-alpha+11 Download angel_orm 1.0.0-alpha+11 archive
1.0.0-alpha+10 Nov 23, 2017 Go to the documentation of angel_orm 1.0.0-alpha+10 Download angel_orm 1.0.0-alpha+10 archive
1.0.0-alpha+9 Nov 23, 2017 Go to the documentation of angel_orm 1.0.0-alpha+9 Download angel_orm 1.0.0-alpha+9 archive
1.0.0-alpha+8 Nov 18, 2017 Go to the documentation of angel_orm 1.0.0-alpha+8 Download angel_orm 1.0.0-alpha+8 archive
1.0.0-alpha+7 Jul 15, 2017 Go to the documentation of angel_orm 1.0.0-alpha+7 Download angel_orm 1.0.0-alpha+7 archive
1.0.0-alpha+6 Jul 15, 2017 Go to the documentation of angel_orm 1.0.0-alpha+6 Download angel_orm 1.0.0-alpha+6 archive
1.0.0-alpha+5 Jul 14, 2017 Go to the documentation of angel_orm 1.0.0-alpha+5 Download angel_orm 1.0.0-alpha+5 archive
1.0.0-alpha+4 Jul 14, 2017 Go to the documentation of angel_orm 1.0.0-alpha+4 Download angel_orm 1.0.0-alpha+4 archive

All 14 versions...

Popularity:
Describes how popular the package is relative to other packages. [more]
71
Health:
Code health derived from static analysis. [more]
0
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
0
Overall:
Weighted score of the above. [more]
35
Learn more about scoring.

The package version is not analyzed, because it does not support Dart 2. Until this is resolved, the package will receive a health and maintenance score of 0.

Issues and suggestions

Support Dart 2 in pubspec.yaml.

The SDK constraint in pubspec.yaml doesn't allow the Dart 2.0.0 release. For information about upgrading it to be Dart 2 compatible, please see https://www.dartlang.org/dart-2#migration.

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.0.0-dev.1.2 <2.0.0