Update example
This commit is contained in:
parent
4b63fcde59
commit
2ca305a34b
1 changed files with 2 additions and 2 deletions
|
@ -88,7 +88,7 @@ class CarController extends Controller {
|
||||||
@Expose('/recalled_since_2008')
|
@Expose('/recalled_since_2008')
|
||||||
carsRecalledSince2008(PostgreSQLConnection connection) {
|
carsRecalledSince2008(PostgreSQLConnection connection) {
|
||||||
// Instantiate a Car query, which is auto-generated. This class helps us build fluent queries easily.
|
// Instantiate a Car query, which is auto-generated. This class helps us build fluent queries easily.
|
||||||
var cars = new CarQuery(connection);
|
var cars = new CarQuery();
|
||||||
cars.where
|
cars.where
|
||||||
..familyFriendly.equals(false)
|
..familyFriendly.equals(false)
|
||||||
..recalledAt.year.greaterThanOrEqualTo(2008);
|
..recalledAt.year.greaterThanOrEqualTo(2008);
|
||||||
|
@ -98,7 +98,7 @@ class CarController extends Controller {
|
||||||
|
|
||||||
// `get()` returns a Stream.
|
// `get()` returns a Stream.
|
||||||
// `get().toList()` returns a Future.
|
// `get().toList()` returns a Future.
|
||||||
return cars.get().toList();
|
return cars.get(connection).toList();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Expose('/create', method: 'POST')
|
@Expose('/create', method: 'POST')
|
||||||
|
|
Loading…
Reference in a new issue