-
Notifications
You must be signed in to change notification settings - Fork 3
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
Develop "patch" system in bundle format #4
Comments
The adoption of this idea would involve generating a |
Implemented in c39c3bb |
|
patchfile phase 0 is now denoted as a special phase that runs before traditional CSV records are processed |
Idea
Develop common format so that most future data additions won't require updating @cougargrades/importer.
"Patch" system would theoretically have individual objects which:
catalog/CHEM 1331
)archetype
:'document' | 'collection'
path
: path to what is being referred towrite
: write the provided object to the Firestore document at the location (will overwrite existing objects) (only fordocument
)merge
: merge the provided object with the object at the existing location (will fail if object doesn't exist) (only fordocument
)append
: appending to an array-type with a provided amount (any
) (only fordocument
)increment
: incrementing to a field by a provided amount (number
) (only fordocument
)create
: write the provided object to a new document in the provided collection (only forcollection
)Distinction
Patches are NOT intended to be flexible or programmatic. They should be discrete ways to modify a specific Firestore document in an explicit or "hard-coded" way. Patch files should be used as a medium of interchange and NOT as a method of describing data updates. Ideally, an intelligent tool will have generated a "patch" file that it is certain will be correct.
"Patch" files should be mostly idempotent.
Usage
This "Patch" system would allow the inclusion of supplementary data such as extra fields from various data in this repository. This is especially applicable to the use of:
edu.uh.core_by_component
com.collegescheduler.uh.subjects
subjectName
across Firestoreedu.uh.publications.courses
Possible models
write
Examplemerge
Exampleappend
Exampleincrement
Examplecreate
ExampleThe text was updated successfully, but these errors were encountered: