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

feat: MapeoProject class with updated DataStore, DataType & IndexWriter #149

Merged
merged 20 commits into from
Aug 9, 2023

Conversation

gmaclennan
Copy link
Member

This creates a new MapeoProject class that integrates the new DataStore, IndexWriter and DataType classes, and creates a minimal prototype for CRUD methods on observation records.

gmaclennan and others added 16 commits August 7, 2023 16:00
Squashed commits:
[a8267eb] Switch moduleResolution so @digidem/types work
[1205a2b] Fixes and add forks
[981070a] Add tests and fix accordingly
[2dac678] Add tests and fixes
[01ac065] add types for brittle
[537ff7a] Add project, preset, field schemas
[ad186ae] cleanup code and add comments
[c23cf09] fix: extract correct schema w/out schemaName param
[d8786c8] fix: docId as primary key
[36eda92] fix enum type
[f0c7eed] Remove db artifact
[89468e2] WIP: Generate SQL table schema from JSON Schemas
TODO: Figure out best way to test types
Co-authored-by: Andrew Chou <andrewchou@fastmail.com>
Depends on:

- [ ] digidem/mapeo-sqlite-indexer#11
- [ ] digidem/mapeo-sqlite-indexer#14

Makes more sense to e2e test rather than unit test, which depends on
the new DataType class, which is next up.
Ensures you can't create a dataType in the wrong DataStore
- More explicit relationship between indexWriter and Datastore
- Allows some type-checking to ensure  IndexWriter can process entries
- better-sqlite3 instances = sqlite
- drizzle table definitions = table
@gmaclennan gmaclennan self-assigned this Aug 8, 2023
@gmaclennan gmaclennan linked an issue Aug 8, 2023 that may be closed by this pull request
@gmaclennan gmaclennan mentioned this pull request Aug 8, 2023
4 tasks
Copy link
Member

@achou11 achou11 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

couple of non-blocking suggestions. looks great!

test-e2e/crud.js Outdated Show resolved Hide resolved
lib/mapeo-project.js Outdated Show resolved Hide resolved
@gmaclennan gmaclennan changed the base branch from feat/data-type-class to main August 8, 2023 15:54
@gmaclennan
Copy link
Member Author

Changed base branch to main to get tests to run (have been seeing issues recently with Github when changing base branches, and so far tests are not running)

@gmaclennan gmaclennan changed the title feat: create new MapeoProject class feat: MapeoProject class with updated DataStore, DataType & IndexWriter Aug 9, 2023
@gmaclennan gmaclennan changed the title feat: MapeoProject class with updated DataStore, DataType & IndexWriter feat: MapeoProject class with updated DataStore, DataType & IndexWriter Aug 9, 2023
@gmaclennan gmaclennan merged commit 1ffd49f into main Aug 9, 2023
@gmaclennan gmaclennan deleted the feat/new-datatype-integration branch August 9, 2023 10:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Integrate into new DataStore and DataType into Mapeo class
2 participants