Skip to content

Update the website documentation#23

Merged
ichiriac merged 16 commits intowebsitefrom
main
Jan 17, 2026
Merged

Update the website documentation#23
ichiriac merged 16 commits intowebsitefrom
main

Conversation

@ichiriac
Copy link
Owner

No description provided.

Copilot AI and others added 11 commits January 17, 2026 19:26
Co-authored-by: ichiriac <173203+ichiriac@users.noreply.github.com>
- Add ScopeBuilder class for scope normalization and merging
- Add CacheAdapter interface with InMemoryCacheAdapter implementation
- Extend Model class to support scopes and defaultScope
- Add scope() and unscoped() methods to Model
- Update Request class to apply scopes before query execution
- Implement scope merging (AND for where, concat for include, last-wins for others)
- Add comprehensive test suite for scopes feature
- Support parameterized scopes via functions
- Support defaultScope with ability to bypass via unscoped()
- All existing tests still pass

Co-authored-by: ichiriac <173203+ichiriac@users.noreply.github.com>
- Create detailed scopes.md guide covering all scope features
- Update models.md to reference scopes
- Update requests.md with scope examples and caching
- Enhance adoption-sequelize.md with detailed scope migration guide
- Update filtering.md to mention scopes as first option
- Update README.md with scopes feature highlights
- All tests still passing (324 tests)

Co-authored-by: ichiriac <173203+ichiriac@users.noreply.github.com>
- Fix cache eviction timestamp comparison logic in InMemoryCacheAdapter
- Add TODO comment for extractOptionsFromRequest incomplete implementation
- Make ScopeBuilder scopes and defaultScope properties public readonly
- Update Model.ts to use public properties instead of bracket notation
- Improve TODO comment placement in Request.ts for bulk eager loading
- All 324 tests still passing

Co-authored-by: ichiriac <173203+ichiriac@users.noreply.github.com>
- Create interactive demo showcasing all scope features
- Demonstrate basic, parameterized, and composed scopes
- Show default scope behavior and unscoped() usage
- Include scope-level caching examples
- Add demo README with instructions
- Demo successfully runs and outputs expected results

Co-authored-by: ichiriac <173203+ichiriac@users.noreply.github.com>
- Replace Object.defineProperty with static _name in demo models
- Use instance.write() instead of bulk update for soft delete
- Demo works correctly with all functionality preserved
- All 324 tests passing

Co-authored-by: ichiriac <173203+ichiriac@users.noreply.github.com>
- Allow { scopeName: value } in addition to { scopeName: [value] }
- Silently convert single value to array for convenience
- Update demo to use more natural syntax
- Add test for both single value and array syntax
- Update documentation with both syntaxes
- Backward compatible: array syntax still works
- All 326 tests passing (13 scope tests)

Co-authored-by: ichiriac <173203+ichiriac@users.noreply.github.com>
Add model scopes for reusable query filters with default scope support
@ichiriac
Copy link
Owner Author

@copilot update the mixin documentation by providing timestamps mixins, and softdelete examples with overwriting the unlink method - and also how to use mixins on models

Copy link
Contributor

Copilot AI commented Jan 17, 2026

@ichiriac I've opened a new pull request, #24, to work on those changes. Once the pull request is ready, I'll request review from you.

Copilot AI and others added 4 commits January 17, 2026 20:25
… examples

Co-authored-by: ichiriac <173203+ichiriac@users.noreply.github.com>
Co-authored-by: ichiriac <173203+ichiriac@users.noreply.github.com>
Add comprehensive mixin documentation with timestamps and soft delete patterns
Replaced forceUnlink with super.unlink for soft delete.
@ichiriac ichiriac merged commit f6836ed into website Jan 17, 2026
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.

2 participants