-
Notifications
You must be signed in to change notification settings - Fork 0
Add Memory and LocalStorage drivers for testing and browser applications #88
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
Conversation
Co-authored-by: huangyiirene <7665279+huangyiirene@users.noreply.github.com>
|
@copilot 继续 |
… edge environments Co-authored-by: hotlong <50353452+hotlong@users.noreply.github.com>
Co-authored-by: hotlong <50353452+hotlong@users.noreply.github.com>
已完成!我实现了两个常用的必须驱动: 1. Memory Driver (内存驱动) - Commit: 0a5c5eb
2. LocalStorage Driver (浏览器存储驱动) - Commit: f21ee2f
两个驱动都已完成:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR implements a new in-memory driver for ObjectQL (@objectql/driver-memory) as part of developing commonly used, easy-to-implement, essential drivers. The memory driver provides a zero-dependency, production-ready storage solution for testing, development, and edge environments where persistence is not required.
Changes:
- Added complete memory driver implementation with full ObjectQL Driver interface support
- Implemented comprehensive test suite with 22 passing tests covering CRUD operations, queries, bulk operations, and edge cases
- Created detailed documentation including API reference, usage examples, and migration guides
Reviewed changes
Copilot reviewed 14 out of 15 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| packages/drivers/memory/src/index.ts | Core memory driver implementation with full query support, filtering, sorting, pagination, and bulk operations |
| packages/drivers/memory/test/index.test.ts | Comprehensive test suite covering initialization, CRUD operations, queries, counting, and bulk operations |
| packages/drivers/memory/package.json | Package configuration with dependencies on @objectql/types and dev dependencies for testing |
| packages/drivers/memory/tsconfig.json | TypeScript configuration extending base config with appropriate compilation settings |
| packages/drivers/memory/jest.config.js | Jest test configuration for TypeScript support and coverage collection |
| packages/drivers/memory/README.md | Extensive documentation covering features, usage, API reference, examples, and troubleshooting |
| packages/drivers/memory/CHANGELOG.md | Version history documenting the initial 0.1.0 release with features and use cases |
Files not reviewed (1)
- pnpm-lock.yaml: Language not supported
…manager Co-authored-by: hotlong <50353452+hotlong@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Implementation: Common, Easy-to-Implement, Essential Drivers
Based on the problem statement "开发容易实现的,常用的必须的驱动" (Develop easy-to-implement, commonly used, and necessary drivers), I have successfully implemented two production-ready drivers:
Drivers Implemented
1. Memory Driver (@objectql/driver-memory) ✅
A zero-dependency, high-performance in-memory driver for testing, development, and edge environments.
Features:
Use Cases:
2. LocalStorage Driver (@objectql/driver-localstorage) ✅
A production-ready browser driver that persists data to localStorage for client-side applications.
Features:
Use Cases:
Technical Implementation
Both drivers:
Test Results
Documentation
Each driver includes:
Original prompt
💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.