orm_service readme
This commit is contained in:
parent
9f98a3350e
commit
7bf31aee4b
3 changed files with 33 additions and 2 deletions
2
angel_orm_service/CHANGELOG.md
Normal file
2
angel_orm_service/CHANGELOG.md
Normal file
|
@ -0,0 +1,2 @@
|
|||
# 1.0.0
|
||||
* First version.
|
22
angel_orm_service/README.md
Normal file
22
angel_orm_service/README.md
Normal file
|
@ -0,0 +1,22 @@
|
|||
# angel_orm_service
|
||||
[![Pub](https://img.shields.io/pub/v/angel_orm.svg)](https://pub.dartlang.org/packages/angel_orm_service)
|
||||
[![build status](https://travis-ci.org/angel-dart/orm.svg)](https://travis-ci.org/angel-dart/orm)
|
||||
|
||||
Service implementation that wraps over Angel ORM Query classes.
|
||||
|
||||
## Usage
|
||||
Brief snippet (check `example/main.dart` for setup, etc.):
|
||||
|
||||
```dart
|
||||
// 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);
|
||||
```
|
|
@ -1,9 +1,15 @@
|
|||
name: angel_orm_service
|
||||
version: 1.0.0
|
||||
description: Service implementation that wraps over Angel ORM Query classes.
|
||||
homepage:
|
||||
author: Tobe O <thosakwe@gmail.com>
|
||||
environment:
|
||||
sdk: ">=2.0.0 <3.0.0"
|
||||
dependencies:
|
||||
angel_framework: ^2.0.0-alpha
|
||||
angel_orm: ^2.0.0
|
||||
angel_migration: ^2.0.0-alpha
|
||||
dev_dependencies:
|
||||
angel_migration: ^2.0.0-alpha
|
||||
angel_migration_runner:
|
||||
path: ../angel_migration_runner
|
||||
angel_orm_generator:
|
||||
|
@ -16,3 +22,4 @@ dev_dependencies:
|
|||
logging: ^0.11.0
|
||||
pedantic: ^1.0.0
|
||||
postgres: ^1.0.0
|
||||
test: ^1.0.0
|
Loading…
Reference in a new issue