Skip to content

Showcases how to write 'WHERE' clauses in Jaguar.

Notifications You must be signed in to change notification settings

jaguar-orm/where

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

where

Showcases how to write 'WHERE' clauses using Jaguar ORM.

A simple 'WHERE' clause:

  Future<User> findByName(String name) => findOneWhere(this.name.eq(name));

A 'WHERE' clause using 'BETWEEN':

  Future<List<User>> ageBetween(int low, int high) =>
      findWhere(this.age.between(low, high));

A 'WHERE' clause using 'AND' operator:

  Future<List<User>> nameAndAge(String name, int low, int high) =>
      findWhere(this.name.eq(name) & this.age.between(low, high));

A 'WHERE' clause using 'OR' operator:

  Future<List<User>> ageAboveOrBelow(int low, int high) =>
      findWhere((this.age < low) | (this.age > high));

About

Showcases how to write 'WHERE' clauses in Jaguar.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages