trestle 0.1.1 copy "trestle: ^0.1.1" to clipboard
trestle: ^0.1.1 copied to clipboard

outdatedDart 1 only

Database gateway and ORM

Trestle #

Database Gateway and ORM for Dart #


ORM #

IN DEVELOPEMENT

Gateway #

IN DEVELOPEMENT

Basic usage

Stream getAllUsersOlderThan18AndTheirAddresses(Gateway gateway) {
  return gateway.table('users')
    .where((user) => user.age > 18)
    .join('addresses', (user, address) => user.addressId == address.id)
    .get();
}

Future getAllRecentPosts(Gateway gateway) {
  return gateway.table('posts')
    .sortBy('created_at')
    .limit(10)
    .get();
}

Future<int> getTheCountOfUsersThatWasRegisteredDuring2014(Gateway gateway) {
  return gateway.table('users')
    .where((user) 
      => user.createdAt > '2014-01-01 00:00:00'
      && user.createdAt < '2015-01-01 00:00:00')
    .count();
}
0
likes
0
pub points
1%
popularity

Publisher

unverified uploader

Database gateway and ORM

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

postgresql, sqljocky

More

Packages that depend on trestle