angel3_orm_service 2.0.0-beta.1
angel3_orm_service: ^2.0.0-beta.1 copied to clipboard

Service implementation that wraps over Angel3 ORM Query classes.

angel3_orm_service #

version Null Safety Gitter

License

Service implementation that wraps over Angel ORM Query classes.

Installation #

In your pubspec.yaml:

dependencies:
    angel3_orm_service: ^2.0.0-beta.1

Usage #

Brief snippet (check example/main.dart for setup, etc.):

// Create an ORM-backed service.
  var todoService = OrmService<int, Todo, TodoQuery>(
      executor, () => TodoQuery(),
      readData: (req, res) => todoSerializer.decode(req.bodyAsMap));

  // Because we provided `readData`, the todoService can face the Web.
  // **IMPORTANT: Providing the type arguments is an ABSOLUTE MUST, if your
  // model has `int` ID's (this is the case when using `angel_orm_generator` and `Model`).
  // **
  app.use<int, Todo, OrmService<int, Todo, TodoQuery>>(
      '/api/todos', todoService);
0
likes
120
pub points
0%
popularity

Publisher

dukefirehawk.com

Service implementation that wraps over Angel3 ORM Query classes.

Homepage
Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (LICENSE)

Dependencies

angel3_framework, angel3_orm, optional, postgres

More

Packages that depend on angel3_orm_service