-
Notifications
You must be signed in to change notification settings - Fork 2.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
update custom column names on renaming/dropping columns (#2933)
- Loading branch information
Showing
5 changed files
with
99 additions
and
13 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
47 changes: 47 additions & 0 deletions
47
server/tests-py/queries/v1/set_table_custom_fields/alter_column.yaml
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,47 @@ | ||
- description: Set custom column names | ||
url: /v1/query | ||
status: 200 | ||
response: | ||
message: success | ||
query: | ||
type: set_table_custom_fields | ||
version: 2 | ||
args: | ||
table: author | ||
custom_root_fields: | ||
select: Authors | ||
custom_column_names: | ||
id: AuthorId | ||
name: AuthorName | ||
|
||
- description: "Rename column 'id' and drop column 'name'" | ||
url: /v1/query | ||
status: 200 | ||
response: | ||
result_type: CommandOk | ||
result: null | ||
query: | ||
type: run_sql | ||
args: | ||
sql: | | ||
ALTER TABLE author DROP COLUMN name; | ||
ALTER TABLE author RENAME COLUMN id to author_id; | ||
- description: Test if custom column names are updated | ||
url: /v1/graphql | ||
status: 200 | ||
response: | ||
data: | ||
Authors: | ||
- AuthorId: 1 | ||
age: 23 | ||
- AuthorId: 2 | ||
age: null | ||
query: | ||
query: | | ||
query { | ||
Authors{ | ||
AuthorId | ||
age | ||
} | ||
} |
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