You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
## Changes
### 1. Added Reserved Property Support
- Created `ReservedProp` enum for built-in properties (id, label, version, etc.)
- Added `Step::ReservedPropertyAccess` variant to generate direct field access
- Reserved properties now return correct Value types (e.g., Value::Id for id field)
### 2. Updated Property Access Generator
- Modified `gen_property_access()` to identify reserved vs user-defined properties
- Reserved properties use direct struct field access
- User-defined properties continue using `get_property()` HashMap lookup
### 3. Enhanced Boolean Operation Optimization
- Updated `WhereRef` Display implementation for reserved property optimization
- Generates `Value::Id(ID::from(val.id))` for id field in filters
- Maintains `get_property()` optimization for user-defined properties
### 4. Fixed IS_IN Validation
- Separated IS_IN from scalar boolean operations
- IS_IN now correctly expects `Type::Array` arguments with scalar elements
- Added `get_reserved_property_type()` helper for type validation
- Updated Node/Edge/Vector validation to check reserved properties first
### 5. Testing
- Added IS_IN test with both reserved (id) and user-defined (field) properties
- Verified correct code generation and type safety
## Impact
Resolves the issues from original PR #666:
- IS_IN with arrays now validates at compile-time
- Reserved property access returns correct Value types for IS_IN operations
- Queries like `WHERE(_::{id}::IS_IN(node_ids))` now compile and execute correctly
Co-Authored-By: ishaksebsib <[email protected]>
0 commit comments