-
Notifications
You must be signed in to change notification settings - Fork 44
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix codegen due to internal API change (#509)
- Loading branch information
Showing
27 changed files
with
1,169 additions
and
46 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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
generated_async_edgeql.py.assert5 |
59 changes: 59 additions & 0 deletions
59
tests/codegen/test-project1/generated_async_edgeql.py.assert5
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 |
---|---|---|
@@ -0,0 +1,59 @@ | ||
# AUTOGENERATED FROM: | ||
# 'select_optional_json.edgeql' | ||
# 'select_scalar.edgeql' | ||
# 'linked/test_linked.edgeql' | ||
# WITH: | ||
# $ edgedb-py --target async --file --no-skip-pydantic-validation | ||
|
||
|
||
from __future__ import annotations | ||
import dataclasses | ||
import edgedb | ||
import uuid | ||
|
||
|
||
@dataclasses.dataclass | ||
class SelectOptionalJsonResultItem: | ||
id: uuid.UUID | ||
snake_case: SelectOptionalJsonResultItemSnakeCase | None | ||
|
||
|
||
@dataclasses.dataclass | ||
class SelectOptionalJsonResultItemSnakeCase: | ||
id: uuid.UUID | ||
|
||
|
||
async def select_optional_json( | ||
executor: edgedb.AsyncIOExecutor, | ||
arg0: str | None, | ||
) -> list[tuple[str, SelectOptionalJsonResultItem]]: | ||
return await executor.query( | ||
"""\ | ||
create type TestCase { | ||
create link snake_case -> TestCase; | ||
}; | ||
|
||
select (<optional json>$0, TestCase {snake_case});\ | ||
""", | ||
arg0, | ||
) | ||
|
||
|
||
async def select_scalar( | ||
executor: edgedb.AsyncIOExecutor, | ||
) -> int: | ||
return await executor.query_single( | ||
"""\ | ||
select 1;\ | ||
""", | ||
) | ||
|
||
|
||
async def test_linked( | ||
executor: edgedb.AsyncIOExecutor, | ||
) -> int: | ||
return await executor.query_single( | ||
"""\ | ||
select 42\ | ||
""", | ||
) |
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.