Skip to content
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

Query builder v2 #1

Open
wants to merge 131 commits into
base: dev
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
131 commits
Select commit Hold shift + click to select a range
ec76977
Rebase to v1 driver
quinchs Oct 19, 2022
5fe680a
Generate docs
github-actions[bot] Oct 19, 2022
2806100
update querybuilder example
quinchs Oct 19, 2022
09e2337
Merge branch 'feat/querybuilder-v2' of https://github.com/edgedb/edge…
quinchs Oct 19, 2022
e148256
Merge branch 'dev' into feat/querybuilder-v2
quinchs Oct 19, 2022
0fd1140
Merge branch 'dev' into feat/querybuilder-v2
quinchs Oct 19, 2022
5ef6be1
Merge branch 'dev' into feat/querybuilder-v2
quinchs Oct 19, 2022
89e7d8a
add querybuilder back to prerelease workflow
quinchs Oct 21, 2022
7c1497b
Merge branch 'dev' into feat/querybuilder-v2
quinchs Oct 21, 2022
9107dd3
Fix cherrypicking of properties
quinchs Oct 21, 2022
bc722ab
Generate docs
github-actions[bot] Oct 21, 2022
45b683e
update config method ref
quinchs Oct 24, 2022
5972880
Merge branch 'dev' into feat/querybuilder-v2
quinchs Oct 25, 2022
e205a38
Generate docs
github-actions[bot] Oct 25, 2022
4ce520a
Merge branch 'dev' into feat/querybuilder-v2
quinchs Oct 25, 2022
26de1fd
Merge branch 'dev' into feat/querybuilder-v2
quinchs Oct 26, 2022
81cea4d
Merge branch 'dev' into feat/querybuilder-v2
quinchs Oct 28, 2022
5a8cbed
Update deploy-prerelease.yml
quinchs Oct 29, 2022
0829eb9
Update deploy-prerelease.yml
quinchs Oct 29, 2022
bdaa848
add sub shape depth
quinchs Oct 30, 2022
13c1f0a
add new select to static def
quinchs Oct 30, 2022
48d8878
Fix #8
quinchs Nov 2, 2022
033c473
make new context type for referencing self
quinchs Nov 2, 2022
89cae60
fix summaries
quinchs Nov 2, 2022
1775bc7
Merge branch 'dev' into feat/querybuilder-v2
quinchs Nov 8, 2022
7551bc3
Merge branch 'dev' into feat/querybuilder-v2
quinchs Nov 8, 2022
673fddb
Generate docs
github-actions[bot] Nov 8, 2022
db2376c
Merge branch 'dev' into feat/querybuilder-v2
quinchs Nov 14, 2022
d77fae5
Merge branch 'dev' into feat/querybuilder-v2
quinchs Nov 17, 2022
682a35b
Merge branch 'dev' into feat/querybuilder-v2
quinchs Nov 17, 2022
792aff7
Add support for custom converters in QB
quinchs Nov 17, 2022
64670cc
Add expression visitor
quinchs Dec 7, 2022
4f05896
Revert "Add expression visitor"
quinchs Dec 7, 2022
b2507f4
Merge branch 'dev' into feat/querybuilder-v2
quinchs Dec 27, 2022
5c9cb37
bump querybuilder to .net7
quinchs Dec 27, 2022
ae81067
add new shape builder. optimizer for with statements
quinchs Jan 4, 2023
efbffd3
Merge branch 'dev' into feat/querybuilder-v2
quinchs Jan 4, 2023
a549273
fix summary errors
quinchs Jan 4, 2023
d2afc77
add explicit shape definition
quinchs Feb 2, 2023
109e8bd
Merge branch 'dev' into feat/querybuilder-v2
quinchs Feb 3, 2023
74added
change pre-releases to myget
quinchs Feb 5, 2023
0cf44f5
Revert "change pre-releases to myget"
quinchs Feb 5, 2023
5359ee3
Merge branch 'dev' into feat/querybuilder-v2
quinchs May 22, 2023
7691d7b
LINQ ext
quinchs May 22, 2023
95485e1
fix merge issues
quinchs May 22, 2023
98f1e5e
Add select expressional with shape
quinchs May 22, 2023
0f9cb6c
add missing summary
quinchs May 22, 2023
df33f42
Add cardinality control to IMultiCardinalityExecutable
quinchs May 22, 2023
57288b0
Add contextual Update methods
quinchs May 22, 2023
6f5d4e3
add global contextual Update methods
quinchs May 22, 2023
943613d
Add contextual Update and With functions
quinchs May 23, 2023
15a2f22
add static update methods for QB
quinchs Jun 3, 2023
94279e5
clean up querybuilder code
quinchs Jun 28, 2023
d7a3453
Add basic expression tests
quinchs Jun 28, 2023
f1bd9d4
updated grammar
quinchs Jun 30, 2023
2a7d508
remove test code
quinchs Oct 10, 2023
2afcc52
Merge branch 'dev' into feat/querybuilder-v2
quinchs Oct 12, 2023
e7a469e
fix merge related stuff
quinchs Oct 31, 2023
5019c2d
start work on switching to stringbuilder
quinchs Nov 19, 2023
3dff00e
Merge branch 'dev' into feat/querybuilder-v2
quinchs Jan 11, 2024
0587f02
query string refactor
quinchs Jan 12, 2024
afcbcf6
Fix generator
quinchs Jan 13, 2024
6f64d6e
remove old impl of stdlib
quinchs Jan 13, 2024
2e5b5d4
fix tests and queryable project
quinchs Jan 13, 2024
5ca77ff
Continue work on rework
quinchs Jan 17, 2024
06b9167
root writer and labels
quinchs Jan 17, 2024
5090201
More questionable work on the query builder
quinchs Jan 19, 2024
6760edf
Merge branch 'dev' into feat/querybuilder-v2
quinchs Jan 25, 2024
23594db
more in-depth lexical labelling
quinchs Jan 25, 2024
fe33002
contextual shape exclusion
quinchs Jan 25, 2024
6792a25
woah! its more query builder work
quinchs Feb 20, 2024
ad2aae7
fix allocs and references
quinchs Feb 23, 2024
cf934d4
small bug fixes
quinchs Feb 24, 2024
0aa1c3f
partially fix list problems :cry:
quinchs Feb 26, 2024
878fbf4
make looselinkedlist safe
quinchs Mar 4, 2024
2451099
it actually works :O
quinchs Mar 9, 2024
975f2c6
Build -> Compile
quinchs Mar 9, 2024
8cc1ebb
debug views
quinchs Mar 9, 2024
e035d58
debug view flame-graph
quinchs Mar 9, 2024
ebaa4e4
don't look at verbose markers
quinchs Mar 9, 2024
49529e2
more changes to inner generation
quinchs Mar 9, 2024
4fcd9d5
refactor and fix FOR iterator
quinchs Mar 9, 2024
3ed6b58
compact debug view
quinchs Mar 10, 2024
165a03b
fix insert being dumb cuz of generics
quinchs Mar 10, 2024
c1eb806
groups!
quinchs Mar 11, 2024
2b25bb2
cast reduction, fix groups, smart markers, aggregation
quinchs Mar 13, 2024
c40352a
faster method translation lookup
quinchs Mar 29, 2024
cddba32
whoops x2
quinchs Mar 29, 2024
d33e5a1
new update builder
Apr 8, 2024
597206e
Merge branch 'dev' into feat/querybuilder-v2
Apr 8, 2024
c122421
Merge branch 'feat/querybuilder-v2' of https://github.com/edgedb/edge…
Apr 9, 2024
8c5ca54
benchmarking
Apr 13, 2024
fb435ed
updates?
Apr 16, 2024
2faa75e
fix summaries
Apr 16, 2024
912f81e
support enums :100:
Apr 17, 2024
e65d9bb
only write ',' when an element was written
Apr 17, 2024
b942a6b
don't require proxy to write something
Apr 17, 2024
2bc986f
make use of optional parameters
Apr 17, 2024
08258d2
Merge branch 'dev' into feat/querybuilder-v2
Apr 18, 2024
16c204c
Merge branch 'dev' into feat/querybuilder-v2
Apr 19, 2024
c728790
fix comma separation of globals
Apr 22, 2024
b34429c
don't rely on tryadd for scalar check
Apr 22, 2024
27ef99c
select of type
Apr 26, 2024
8bb87b7
add json resolve for memebrs
Apr 26, 2024
0df0c61
Add overloads for adding/removing sets for update
Apr 26, 2024
0ecd6ee
FOR iterator signature change
Apr 26, 2024
f249509
AsSetAggregation, fix group wrapping & keying
Apr 27, 2024
a84bc69
orderby doesn't box, fix unary cast exp
Apr 27, 2024
4a1aaaa
Delete is now a method, add generic overload
Apr 27, 2024
4663959
add AsSet to mirror the revers of AsSetAggregation
Apr 27, 2024
de28bc3
Handle optional function args better internally
Apr 27, 2024
3426f98
fix summaries
Apr 27, 2024
2df336e
fix context type of update
Apr 27, 2024
ccb6b1c
fix for type check
Apr 27, 2024
9268575
fix static member reference for variables
Apr 29, 2024
1fd32f2
some more enumerable translations
quinchs May 4, 2024
40a3919
some generics doohickery
May 5, 2024
017c701
Merge branch 'feat/querybuilder-v2' of https://github.com/edgedb/edge…
May 5, 2024
41e5be7
massive additions to query writer internals + reducers
May 14, 2024
d625ba7
reducers update
May 21, 2024
a75fd35
select shape reducer
May 27, 2024
9bd7e7f
fix marker move
May 27, 2024
df9bc0b
minor fixes
May 27, 2024
85ffe96
Marker -> Term, Value -> Token
May 27, 2024
847d213
code cleanup
May 27, 2024
560b997
more minor refactors
May 28, 2024
55d4c22
add EdgeQL global support
May 28, 2024
a162ec7
small refactors
Jun 5, 2024
c24d335
api consistency with context
Jun 5, 2024
e1a797a
update context usage
Jun 5, 2024
88b3329
update stdlib
Jun 5, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
10 changes: 7 additions & 3 deletions .github/workflows/deploy-prerelease.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: NuGet Deploy (Prerelease)

on:
push:
branches: [ dev ]
branches: [ dev, feat/querybuilder-v2 ]

env:
BuildNumber: "${{ github.run_number }}"
Expand All @@ -20,8 +20,12 @@ jobs:
- name: Install dependencies
run: dotnet restore
- name: Build
run: dotnet build src/EdgeDB.Net.Driver/EdgeDB.Net.Driver.csproj --configuration Release --no-restore
run: |
dotnet build src/EdgeDB.Net.Driver/EdgeDB.Net.Driver.csproj --configuration Release --no-restore
dotnet build src/EdgeDB.Net.QueryBuilder/EdgeDB.Net.QueryBuilder.csproj --configuration Release --no-restore
- name: Pack
run: dotnet pack src/EdgeDB.Net.Driver/EdgeDB.Net.Driver.csproj -c Release -o ./artifacts --no-build
run: |
dotnet pack src/EdgeDB.Net.Driver/EdgeDB.Net.Driver.csproj -c Release -o ./artifacts --no-build
dotnet pack src/EdgeDB.Net.QueryBuilder/EdgeDB.Net.QueryBuilder.csproj -c Release -o ./artifacts --no-build
- name: Upload
run: dotnet nuget push ./artifacts/EdgeDB.Net.*.nupkg --api-key ${{ secrets.NUGET_KEY }} --source https://www.myget.org/F/edgedb-net/api/v2/package
23 changes: 22 additions & 1 deletion EdgeDB.Net.sln
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,13 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EdgeDB.Examples.ExampleTODO
EndProject
Project("{6EC3EE1D-3C4E-46DD-8F32-0CC8E7565705}") = "EdgeDB.Examples.FSharp", "examples\EdgeDB.Examples.FSharp\EdgeDB.Examples.FSharp.fsproj", "{F25AA805-163F-46B4-942E-B1A5EBE8383C}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "EdgeDB.DocGenerator", "tools\EdgeDB.DocGenerator\EdgeDB.DocGenerator.csproj", "{776EAE34-5A30-45B0-9277-C399CC2ABA53}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EdgeDB.DocGenerator", "tools\EdgeDB.DocGenerator\EdgeDB.DocGenerator.csproj", "{776EAE34-5A30-45B0-9277-C399CC2ABA53}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EdgeDB.Net.QueryBuilder", "src\EdgeDB.Net.QueryBuilder\EdgeDB.Net.QueryBuilder.csproj", "{0E7F8D0A-621C-4F82-84B6-136DA819E10C}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EdgeDB.QueryBuilder.StandardLibGenerator", "tools\EdgeDB.QueryBuilder.StandardLibGenerator\EdgeDB.QueryBuilder.StandardLibGenerator.csproj", "{A13D17CE-1715-44AE-9E89-66DFE37583B1}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "EdgeDB.Net.Queryable", "src\EdgeDB.Net.Queryable\EdgeDB.Net.Queryable.csproj", "{1821FFB3-460F-4987-B32C-F8CDA000AD25}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Expand Down Expand Up @@ -83,6 +89,18 @@ Global
{776EAE34-5A30-45B0-9277-C399CC2ABA53}.Debug|Any CPU.Build.0 = Debug|Any CPU
{776EAE34-5A30-45B0-9277-C399CC2ABA53}.Release|Any CPU.ActiveCfg = Release|Any CPU
{776EAE34-5A30-45B0-9277-C399CC2ABA53}.Release|Any CPU.Build.0 = Release|Any CPU
{0E7F8D0A-621C-4F82-84B6-136DA819E10C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{0E7F8D0A-621C-4F82-84B6-136DA819E10C}.Debug|Any CPU.Build.0 = Debug|Any CPU
{0E7F8D0A-621C-4F82-84B6-136DA819E10C}.Release|Any CPU.ActiveCfg = Release|Any CPU
{0E7F8D0A-621C-4F82-84B6-136DA819E10C}.Release|Any CPU.Build.0 = Release|Any CPU
{A13D17CE-1715-44AE-9E89-66DFE37583B1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{A13D17CE-1715-44AE-9E89-66DFE37583B1}.Debug|Any CPU.Build.0 = Debug|Any CPU
{A13D17CE-1715-44AE-9E89-66DFE37583B1}.Release|Any CPU.ActiveCfg = Release|Any CPU
{A13D17CE-1715-44AE-9E89-66DFE37583B1}.Release|Any CPU.Build.0 = Release|Any CPU
{1821FFB3-460F-4987-B32C-F8CDA000AD25}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{1821FFB3-460F-4987-B32C-F8CDA000AD25}.Debug|Any CPU.Build.0 = Debug|Any CPU
{1821FFB3-460F-4987-B32C-F8CDA000AD25}.Release|Any CPU.ActiveCfg = Release|Any CPU
{1821FFB3-460F-4987-B32C-F8CDA000AD25}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand All @@ -99,6 +117,9 @@ Global
{E38429C6-53A5-4311-8189-1F78238666DC} = {6FC214F5-C912-4D99-91B1-3E9F52A4E11B}
{F25AA805-163F-46B4-942E-B1A5EBE8383C} = {6FC214F5-C912-4D99-91B1-3E9F52A4E11B}
{776EAE34-5A30-45B0-9277-C399CC2ABA53} = {67ED9EF0-7828-44C0-8CB0-DEBD69EC94CA}
{0E7F8D0A-621C-4F82-84B6-136DA819E10C} = {025AAADF-16AF-4367-9C3D-9E60EDED832F}
{A13D17CE-1715-44AE-9E89-66DFE37583B1} = {67ED9EF0-7828-44C0-8CB0-DEBD69EC94CA}
{1821FFB3-460F-4987-B32C-F8CDA000AD25} = {025AAADF-16AF-4367-9C3D-9E60EDED832F}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {4E90C94F-D693-4411-82F3-2051DE1BE052}
Expand Down
2 changes: 2 additions & 0 deletions dbschema/default.esdl
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ module default {
required property email -> str {
constraint exclusive;
}
link best_friend -> Person;
multi link friends -> Person;
}

# for example todo app
Expand Down
80 changes: 77 additions & 3 deletions dbschema/migrations/00001.edgeql
Original file line number Diff line number Diff line change
@@ -1,8 +1,82 @@
CREATE MIGRATION m1gajj2cjvikxjfhwnczhcfrcdlycg5pbg7vvehuaohazd2ltajlnq
CREATE MIGRATION m1cpt5buyevyky24nrcoyjzfl67idj3uculwgo47zpxjnkb442knjq
ONTO initial
{
CREATE MODULE tests IF NOT EXISTS;
CREATE GLOBAL default::abc -> tuple<std::str, std::int64>;
CREATE GLOBAL default::current_user_id -> std::uuid;
CREATE ABSTRACT TYPE default::AbstractThing {
CREATE REQUIRED PROPERTY name: std::str {
CREATE CONSTRAINT std::exclusive;
};
};
CREATE TYPE default::OtherThing EXTENDING default::AbstractThing {
CREATE REQUIRED PROPERTY attribute: std::str;
};
CREATE TYPE default::Thing EXTENDING default::AbstractThing {
CREATE REQUIRED PROPERTY description: std::str;
};
CREATE TYPE default::Person {
CREATE PROPERTY email -> std::str;
CREATE PROPERTY name -> std::str;
CREATE LINK best_friend: default::Person;
CREATE MULTI LINK friends: default::Person;
CREATE REQUIRED PROPERTY email: std::str {
CREATE CONSTRAINT std::exclusive;
};
CREATE REQUIRED PROPERTY name: std::str;
};
CREATE TYPE default::Movie {
CREATE REQUIRED MULTI LINK actors: default::Person;
CREATE REQUIRED LINK director: default::Person;
CREATE REQUIRED PROPERTY title: std::str {
CREATE CONSTRAINT std::exclusive;
};
CREATE REQUIRED PROPERTY year: std::int32;
};
CREATE SCALAR TYPE default::State EXTENDING enum<NotStarted, InProgress, Complete>;
CREATE TYPE default::TODO {
CREATE REQUIRED PROPERTY date_created: std::datetime {
SET default := (std::datetime_current());
};
CREATE REQUIRED PROPERTY description: std::str;
CREATE REQUIRED PROPERTY state: default::State;
CREATE REQUIRED PROPERTY title: std::str;
};
CREATE TYPE default::UserWithSnowflakeId {
CREATE REQUIRED PROPERTY user_id: std::str {
CREATE CONSTRAINT std::exclusive;
};
CREATE REQUIRED PROPERTY username: std::str;
};
CREATE TYPE tests::Person {
CREATE LINK best_friend: tests::Person;
CREATE MULTI LINK friends: tests::Person;
CREATE PROPERTY age: std::int32;
CREATE PROPERTY email: std::str;
CREATE PROPERTY name: std::str;
};
CREATE TYPE tests::Club {
CREATE MULTI LINK admins: tests::Person;
CREATE MULTI LINK members: tests::Person;
CREATE PROPERTY name: std::str;
};
CREATE TYPE tests::ScalarContainer {
CREATE PROPERTY a: std::int16;
CREATE PROPERTY b: std::int32;
CREATE PROPERTY c: std::int64;
CREATE PROPERTY d: std::str;
CREATE PROPERTY e: std::bool;
CREATE PROPERTY f: std::float32;
CREATE PROPERTY g: std::float64;
CREATE PROPERTY h: std::bigint;
CREATE PROPERTY i: std::decimal;
CREATE PROPERTY j: std::uuid;
CREATE PROPERTY k: std::json;
CREATE PROPERTY l: std::datetime;
CREATE PROPERTY m: cal::local_datetime;
CREATE PROPERTY n: cal::local_date;
CREATE PROPERTY o: cal::local_time;
CREATE PROPERTY p: std::duration;
CREATE PROPERTY q: cal::relative_duration;
CREATE PROPERTY r: cal::date_duration;
CREATE PROPERTY s: std::bytes;
};
};
9 changes: 0 additions & 9 deletions dbschema/migrations/00002.edgeql

This file was deleted.

20 changes: 0 additions & 20 deletions dbschema/migrations/00003.edgeql

This file was deleted.

9 changes: 0 additions & 9 deletions dbschema/migrations/00004.edgeql

This file was deleted.

11 changes: 0 additions & 11 deletions dbschema/migrations/00005.edgeql

This file was deleted.

9 changes: 0 additions & 9 deletions dbschema/migrations/00006.edgeql

This file was deleted.

13 changes: 0 additions & 13 deletions dbschema/migrations/00007.edgeql

This file was deleted.

9 changes: 0 additions & 9 deletions dbschema/migrations/00008.edgeql

This file was deleted.

5 changes: 0 additions & 5 deletions dbschema/migrations/00009.edgeql

This file was deleted.

8 changes: 0 additions & 8 deletions dbschema/migrations/00010.edgeql

This file was deleted.

9 changes: 0 additions & 9 deletions dbschema/migrations/00011.edgeql

This file was deleted.

5 changes: 0 additions & 5 deletions dbschema/migrations/00012.edgeql

This file was deleted.

26 changes: 0 additions & 26 deletions dbschema/migrations/00013.edgeql

This file was deleted.

14 changes: 14 additions & 0 deletions dbschema/tests.esdl
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,18 @@ module tests {
r: cal::date_duration;
s: bytes;
}

type Person {
name: str;
age: int32;
email: str;
best_friend: Person;
multi friends: Person;
}

type Club {
name: str;
multi members: Person;
multi admins: Person;
}
}
Loading
Loading