-
Notifications
You must be signed in to change notification settings - Fork 45
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Test case copied from edgedb-go Co-Authored-By: fmoor <[email protected]>
- Loading branch information
Showing
30 changed files
with
1,499 additions
and
0 deletions.
There are no files selected for viewing
Empty file.
16 changes: 16 additions & 0 deletions
16
tests/codegen/test-project1/generated_async_edgeql.py.assert
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,16 @@ | ||
# AUTOGENERATED FROM 'select_scalar.edgeql' WITH: | ||
# $ edgedb-py --target async --file | ||
|
||
|
||
from __future__ import annotations | ||
import edgedb | ||
|
||
|
||
async def select_scalar( | ||
client: edgedb.AsyncIOClient, | ||
) -> int: | ||
return await client.query_single( | ||
"""\ | ||
select 1;\ | ||
""", | ||
) |
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 @@ | ||
select 1; |
25 changes: 25 additions & 0 deletions
25
tests/codegen/test-project1/select_scalar_async_edgeql.py.assert
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,25 @@ | ||
# AUTOGENERATED FROM 'select_scalar.edgeql' WITH: | ||
# $ edgedb-py | ||
|
||
|
||
from __future__ import annotations | ||
import edgedb | ||
|
||
|
||
class NoPydanticValidation: | ||
@classmethod | ||
def __get_validators__(cls): | ||
from pydantic.dataclasses import dataclass as pydantic_dataclass | ||
pydantic_dataclass(cls) | ||
cls.__pydantic_model__.__get_validators__ = lambda: [] | ||
return [] | ||
|
||
|
||
async def select_scalar( | ||
client: edgedb.AsyncIOClient, | ||
) -> int: | ||
return await client.query_single( | ||
"""\ | ||
select 1;\ | ||
""", | ||
) |
16 changes: 16 additions & 0 deletions
16
tests/codegen/test-project1/select_scalar_edgeql.py.assert
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,16 @@ | ||
# AUTOGENERATED FROM 'select_scalar.edgeql' WITH: | ||
# $ edgedb-py --target blocking | ||
|
||
|
||
from __future__ import annotations | ||
import edgedb | ||
|
||
|
||
def select_scalar( | ||
client: edgedb.Client, | ||
) -> int: | ||
return client.query_single( | ||
"""\ | ||
select 1;\ | ||
""", | ||
) |
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 @@ | ||
select <int64>$arg_name_with_underscores |
28 changes: 28 additions & 0 deletions
28
tests/codegen/test-project2/argnames/query_one_async_edgeql.py.assert
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,28 @@ | ||
# AUTOGENERATED FROM 'argnames/query_one.edgeql' WITH: | ||
# $ edgedb-py | ||
|
||
|
||
from __future__ import annotations | ||
import edgedb | ||
|
||
|
||
class NoPydanticValidation: | ||
@classmethod | ||
def __get_validators__(cls): | ||
from pydantic.dataclasses import dataclass as pydantic_dataclass | ||
pydantic_dataclass(cls) | ||
cls.__pydantic_model__.__get_validators__ = lambda: [] | ||
return [] | ||
|
||
|
||
async def query_one( | ||
client: edgedb.AsyncIOClient, | ||
*, | ||
arg_name_with_underscores: int, | ||
) -> int: | ||
return await client.query_single( | ||
"""\ | ||
select <int64>$arg_name_with_underscores\ | ||
""", | ||
arg_name_with_underscores=arg_name_with_underscores, | ||
) |
19 changes: 19 additions & 0 deletions
19
tests/codegen/test-project2/argnames/query_one_edgeql.py.assert
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,19 @@ | ||
# AUTOGENERATED FROM 'argnames/query_one.edgeql' WITH: | ||
# $ edgedb-py --target blocking | ||
|
||
|
||
from __future__ import annotations | ||
import edgedb | ||
|
||
|
||
def query_one( | ||
client: edgedb.Client, | ||
*, | ||
arg_name_with_underscores: int, | ||
) -> int: | ||
return client.query_single( | ||
"""\ | ||
select <int64>$arg_name_with_underscores\ | ||
""", | ||
arg_name_with_underscores=arg_name_with_underscores, | ||
) |
12 changes: 12 additions & 0 deletions
12
tests/codegen/test-project2/dbschema/migrations/00001.edgeqll
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,12 @@ | ||
CREATE MIGRATION m1fqtauhtvc2w56wh2676x5g26aye22ghx7b7mtnbfekxpmxmnjx2a | ||
ONTO initial | ||
{ | ||
CREATE TYPE default::Person { | ||
CREATE MULTI LINK friends -> default::Person { | ||
CREATE PROPERTY strength -> std::float64; | ||
}; | ||
CREATE REQUIRED PROPERTY name -> std::str { | ||
CREATE CONSTRAINT std::exclusive; | ||
}; | ||
}; | ||
}; |
Empty file.
Oops, something went wrong.