-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
More questionable work on the query builder
- Loading branch information
Showing
12 changed files
with
310 additions
and
159 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -42,7 +42,7 @@ public async Task ExecuteAsync(EdgeDBClient client) | |
|
||
private static async Task QueryBuilderDemo(EdgeDBClient client) | ||
{ | ||
var test = QueryBuilder.SelectExp(() => EdgeQL.Range<int>(5, 10, true, false, false)); | ||
var test = QueryBuilder.SelectExpression(() => EdgeQL.Range<int>(5, 10, true, false, false)); | ||
|
||
var result = test.Build(); | ||
|
||
|
@@ -66,12 +66,12 @@ private static async Task QueryBuilderDemo(EdgeDBClient client) | |
).Build().Prettify(); | ||
|
||
// selecting things that are not types | ||
query = QueryBuilder.SelectExp(() => | ||
query = QueryBuilder.SelectExpression(() => | ||
EdgeQL.Count(QueryBuilder.Select<Person>()) | ||
).Build().Prettify(); | ||
|
||
// selecting 'free objects' | ||
query = QueryBuilder.SelectExp(ctx => new | ||
query = QueryBuilder.SelectExpression(ctx => new | ||
{ | ||
MyString = "This is a string", | ||
MyNumber = 42, | ||
|
@@ -94,7 +94,7 @@ private static async Task QueryBuilderDemo(EdgeDBClient client) | |
// With object variables | ||
query = QueryBuilder | ||
.With(new { Args = EdgeQL.AsJson(new { Name = "Example", Email = "[email protected]" }) }) | ||
.SelectExp(ctx => new | ||
.SelectExpression(ctx => new | ||
{ | ||
PassedName = ctx.Variables.Args.Value.Name, PassedEmail = ctx.Variables.Args.Value.Email | ||
}).Build().Prettify(); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.