Skip to content

Feat/add missing adapter methods #13

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

Merged
merged 5 commits into from
Aug 6, 2025

Conversation

DominusKelvin
Copy link
Member

Resolves #12

- Add ENOENT error handling in find, findOne, and count methods
- Return empty results instead of crashing when directories don't exist
- Add defensive programming for query.criteria.select when undefined
- Properly handle omit fields when select criteria is not provided

This allows applications to start successfully even when content directories
haven't been created yet, and prevents crashes from Sails archive system
when archiveModelIdentity is not properly configured.

Closes #10
- Add create, createEach, update, destroy methods as no-ops
- Add setSequence method for auto-increment sequence handling
- Implement proper fetch behavior - only return data when query.meta.fetch is true
- Fix Waterline warnings about unexpected return values when fetch not enabled
- Ensure adapter compatibility with Sails auto-migration process

This makes the adapter fully compatible with Waterline's expected interface
while maintaining its read-only nature for content management.

Closes #12
@DominusKelvin DominusKelvin merged commit a05e15a into develop Aug 6, 2025
2 checks passed
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.

Add missing Waterline adapter methods and fix fetch behavior
1 participant