edgedb-net icon indicating copy to clipboard operation
edgedb-net copied to clipboard

Query builder v2

Open quinchs opened this issue 3 years ago • 0 comments

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
    • [ ] update
      • [ ] Support for JsonVariable.
    • [ ] delete
      • [ ] Support for JsonVariable.
    • [x] insert
      • [x] Support for JsonVariable.
      • [x] Smart property access (only set properties which are required or dont have default value)
    • [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

quinchs avatar Sep 23 '22 16:09 quinchs