Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Generalize AccountsRawContactsQuery to RawContactsQuery #271

Closed
10 tasks done
vestrel00 opened this issue Oct 31, 2022 · 2 comments
Closed
10 tasks done

Generalize AccountsRawContactsQuery to RawContactsQuery #271

vestrel00 opened this issue Oct 31, 2022 · 2 comments
Assignees
Labels
breaking change This may break integration of the library for some consumers enhancement New feature or request

Comments

@vestrel00
Copy link
Owner

vestrel00 commented Oct 31, 2022

Problem

Due to the changes in #268 and #269, the purpose and design of the current AccountsRawContactsQuery no longer makes sense.

Solution

Generalize and expand the functionality of AccountsRawContactsQuery to RawContactsQuery. This is pretty much like Query except RawContact entities are returned instead of Contact entities.

  • Refactor AccountsRawContactsQuery to RawContactsQuery
  • Update RawContactRefresh.kt to use RawContactsQuery
  • Update DataRawContact.kt to use RawContactsQuery
  • Implement includes functions

Additionally;

  • Update sample app
  • Update cheatsheet (also move to basics section)
  • Update relevant documentation in code
  • Update relevant documentation in docs (also rename and move to basics section)
  • Verify that there are no regressions for related API functions
  • Provide a migration guide as a comment in this issue so that it can be copy-pasted into the release notes
@vestrel00 vestrel00 added enhancement New feature or request breaking change This may break integration of the library for some consumers labels Oct 31, 2022
@vestrel00 vestrel00 self-assigned this Oct 31, 2022
@vestrel00 vestrel00 changed the title Generalize AccountsRawContactsQuery to RawContactsQuery Generalize AccountsRawContactsQuery to RawContactsQuery Oct 31, 2022
@vestrel00
Copy link
Owner Author

vestrel00 commented Oct 31, 2022

Migration guide (to be included in release notes)

PREVIOUSLY, the AccountsRawContactsQuery had a very limited set of functions. Its sole purpose was to provide a way to get RawContacts directly via the BlankRawContact entity. It did not allow you to specify fields to include as it had a predefined set of included fields.

You may have used it like so,

val rawContacts = Contacts(context).accounts().queryRawContacts().find()

NOW, it has been refactored to the more powerful RawContactsQuery,

val rawContacts = Contacts(context).rawContactsQuery().find()

Read the new documentation for the full guide; https://vestrel00.github.io/contacts-android/basics/query-raw-contacts/

@vestrel00
Copy link
Owner Author

This is included in 0.3.0!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
breaking change This may break integration of the library for some consumers enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant