Skip to content

Instantly share code, notes, and snippets.

@vestrel00
Created October 7, 2021 20:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save vestrel00/0460cea533c97fbfecba89287a35869c to your computer and use it in GitHub Desktop.
Save vestrel00/0460cea533c97fbfecba89287a35869c to your computer and use it in GitHub Desktop.
A query to get the first 20 Gmail emails ordered by email address in descending order
val emails = Contacts(context).data()
.query()
.emails()
.where(Fields.Email.Address endsWith "gmail.com")
.orderBy(Fields.Email.Address.desc(ignoreCase = true))
.offset(0)
.limit(20)
.find()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment