-
Notifications
You must be signed in to change notification settings - Fork 65
Add nested object query tests #352
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
Added extensive test coverage for querying nested objects across all major query operations: ## Test Coverage Added ### basic.test.ts (6 new tests) - Querying nested object properties with WHERE clauses - Selecting nested object properties - Handling live updates to nested object properties - Spread operator usage with nested objects - Filtering based on deeply nested properties - Computed fields with nested properties ### where.test.ts (6 new tests) - Filtering by nested object properties and arrays - Null checks in nested properties - Combining nested and non-nested conditions - Live updates to nested properties - Computed expressions on nested properties - OR conditions with nested properties ### select.test.ts (7 new tests) - Selecting nested object properties - Selecting deeply nested properties - Spread operator with nested objects - Combining nested and computed properties - Nested arrays and objects with aliasing - Optional chaining with nested properties - Partial nested object selection ### order-by.test.ts (8 new tests) - Ordering by nested object properties (asc/desc) - Ordering by deeply nested properties - Multiple nested properties ordering - Ordering by coordinates (nested numeric) - Handling null/undefined nested properties - Live updates maintaining order - String ordering on nested properties ### group-by.test.ts (7 new tests) - Grouping by nested object properties - Grouping by deeply nested properties - Aggregation with nested properties - Multiple nested properties grouping - Boolean nested properties grouping - Conditional nested properties grouping - Live updates with nested group by ## Enhanced Data Models Updated all test data models with comprehensive nested structures: - User profiles with preferences and statistics - Address information with coordinates - Contact information with emergency contacts - Customer tier information with preferences - Shipping information with tracking details ## Current Test Status Total: 34 new tests added (1,563+ lines) Status: Tests currently fail due to incomplete nested object support in query compiler ### Known Issues Found - "Unknown expression type: undefined" errors for nested property access - Spread operators not supported on nested objects - Null coalescing operators not working in nested contexts - Optional chaining compilation issues These tests serve as a comprehensive specification for nested object querying functionality that needs to be implemented in the query compiler. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]>
Added comprehensive test coverage for querying nested objects across WHERE, SELECT, GROUP BY, and ORDER BY operations. Fixed query builder syntax issues by removing JavaScript expressions, null coalescing operators, and unnecessary optional chaining. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]>
|
More templates
@tanstack/db
@tanstack/db-ivm
@tanstack/electric-db-collection
@tanstack/query-db-collection
@tanstack/react-db
@tanstack/solid-db
@tanstack/svelte-db
@tanstack/trailbase-db-collection
@tanstack/vue-db
commit: |
Size Change: 0 B Total Size: 58.1 kB ℹ️ View Unchanged
|
Size Change: 0 B Total Size: 1.05 kB ℹ️ View Unchanged
|
Replaced by #386 |
Summary
Added comprehensive test coverage for querying nested objects in TanStack DB across WHERE, SELECT, GROUP BY, and ORDER BY operations.
Test Status
✅ Working
❌ Known Issues
0
for missing nested properties but getundefined
Next Steps
The failing tests reveal areas where the query compiler needs better handling of nested object patterns. The working tests demonstrate the correct syntax patterns for nested object queries.
🤖 Generated with Claude Code