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

Standardize interface for all CRUD APIs accessible via Contacts instance #154

Closed
vestrel00 opened this issue Dec 29, 2021 · 2 comments
Closed
Assignees
Labels
refactor This may involve a refactor

Comments

@vestrel00
Copy link
Owner

vestrel00 commented Dec 29, 2021

While working on #147 in preparation for #144 and #145, I realized that having an interface that all Create (Insert), Read (Query), Update, and Delete (C.R.U.D.) implements will give us some structure to follow and help a lot. It has the following benefits;

  1. It gives a sense of uniformity for consumers as well as maintainers.
  2. It allows maintainers to easily add functions that all APIs must implement.
  3. It allows internal hooks to every API's lifecycle.

The contract should be as loose as possible to give the most amount of flexibility. Only bare essential functions should be added.

@vestrel00 vestrel00 added the refactor This may involve a refactor label Dec 29, 2021
@vestrel00 vestrel00 self-assigned this Dec 29, 2021
@vestrel00
Copy link
Owner Author

vestrel00 commented Dec 29, 2021

My initial thoughts on what this should look like,

package contacts.core

interface CrudApi : Redactable {

    interface Result : Redactable
}

@vestrel00 vestrel00 changed the title Create an interface that all CRUD APIs must implement for uniformity Create an interface that all CRUD APIs must implement Dec 29, 2021
@vestrel00 vestrel00 changed the title Create an interface that all CRUD APIs must implement Standardize interface for all CRUD APIs accessible via Contacts instance Dec 29, 2021
vestrel00 added a commit that referenced this issue Dec 30, 2021


* Implements part of #147 - Redactable Entities

* #147 Redactable Where

* #147 Redactable Query

* #147 Redactable Mutable and New RawContactData extensions utils and fixed Query not maintaining redactable integrity

* #147 Redactable Update API

* #147 Redactable Insert

* #147 Redactable BroadQuery

* #147 Redactable Delete

* #147 Redactable AccountsQuery

* #147 Redactable ProfileQuery

* #147 Redactable ProfileInsert

* #147 Redactable ProfileUpdate

* #147 Redactable ProfileDelete

* Closes #152 Cleanup API for attaching local RawContacts to an Account

* #147 Redactable AccountsRawContactsQuery and GroupsQuery

* #152 Fixed regression - AccountsLocalRawContactsUpdate returning false on successful result

* #147 Fixed account in some Group entities not being redacted

* Closes #153 Simplify API for querying for Accounts

* Use existential Kotlin function

* #154 Prepare ProfileQuery for standard API interface

* #147 Redactable GroupsInsert

* #147 Redactable GroupsUpdate

* #147 Redactable GroupsDelete

* #147 Redactable DataUpdate

* #147 Redactable DataDelete

* #147 Redactable DataQuery

* #147 Added howto page for Redactable
@vestrel00 vestrel00 pinned this issue Dec 30, 2021
vestrel00 added a commit that referenced this issue Dec 30, 2021
@vestrel00 vestrel00 unpinned this issue Dec 30, 2021
@vestrel00
Copy link
Owner Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
refactor This may involve a refactor
Projects
None yet
Development

No branches or pull requests

1 participant