edgedb-net
edgedb-net copied to clipboard
Query builder v2
Summary
This PR adds the long awaited query builder to the main development branch. Before this awesome feature can be added, there is still some stuff to add:
TODO:
- [ ] Base query functions.
- [ ]
select- [x] Basic select funtionality.
- [ ] Support for
JsonVariable. - [ ] Advanced default shape generation.
- [ ] Shape API clarification.:
- [ ] Reference selects, ex:
select x - [ ] Type selects, ex:
select Person - [ ] Mixed shapes for both
- [ ] Reference selects, ex:
- [ ]
update- [ ] Support for
JsonVariable.
- [ ] Support for
- [ ]
delete- [ ] Support for
JsonVariable.
- [ ] Support for
- [x]
insert- [x] Support for
JsonVariable. - [x] Smart property access (only set properties which are required or dont have default value)
- [x] Support for
- [x]
with- [x] Context reflects with blocks
- [ ] Maintain sub query shape on references
- [x] Scalar value serialization
- [x] Array serialization
- [x] Set serialization
- [x] Reference set serialization
- [x]
for- [x] Retest and fix based on https://github.com/edgedb/edgedb/issues/4090, https://github.com/edgedb/edgedb/issues/4080, and https://github.com/edgedb/edgedb/issues/4094
- [ ]
group(dependent on CIL parser)
- [ ]
- [ ] EdgeQL standard library.
- [x] Add generator for stdlib.
- [ ] Update v1 system for calling std functions to newer & faster version.
- [ ] Update naming conventions to match the edgedb docs.
- [ ] Link support.
- [x] Single links
- [x] Multi links
- [ ] Link backreferencing, ex person1 points to person2 which points to person 1 recursively.
- [x] Backlinks
- [x] Property selection/mutation logic
- [x] Free objects
- [x] Anonymous types as shapes
- [x] Base expression to edgeql translators ex:
string (string a) => a.ToLower();->str_lower(a)- [ ] Parameter context (don't allow usage of a parameter in some conditions)
- [x] Binary: 1+1
- [x] Conditional: 1 if true else 2
- [x] Constant: "const"
- [x] Initialization: new Thing{}
- [x] Lambda: () => {}
- [x] Member: x.Property
- [x] MethodCall: EdgeQL.ILike(a,b);
- [x] Array: new int[] { 1, 2, 3 }
- [x] Parameter (x) => x.Thing;
- [x] Unary: (string)thing;
- [x] Contextual function calls
- [x] Object-level constraints
- [x] Property level constraints
- [x] https://github.com/quinchs/EdgeDB.Net/issues/22
- [ ] CIL parser (CIL -> Expressions).
- [ ] Unit tests
- [ ] Docs
Closes #17