mirror of
https://github.com/pgadmin-org/pgadmin4.git
synced 2025-02-25 18:55:31 -06:00
Add Reverse Engineered SQL tests for FTS Dictionaries. Fixes #4460
This commit is contained in:
@@ -0,0 +1,10 @@
|
||||
-- Text Search Dictionary: public."Test Dictionary Edit#1"
|
||||
|
||||
-- DROP TEXT SEARCH DICTIONARY public."Test Dictionary Edit#1";
|
||||
|
||||
CREATE TEXT SEARCH DICTIONARY public."Test Dictionary Edit#1" (
|
||||
TEMPLATE = simple
|
||||
);
|
||||
|
||||
COMMENT ON TEXT SEARCH DICTIONARY public."Test Dictionary Edit#1"
|
||||
IS 'Test Description';
|
@@ -0,0 +1,11 @@
|
||||
-- Text Search Dictionary: public."Test Dictionary Edit#1"
|
||||
|
||||
-- DROP TEXT SEARCH DICTIONARY public."Test Dictionary Edit#1";
|
||||
|
||||
CREATE TEXT SEARCH DICTIONARY public."Test Dictionary Edit#1" (
|
||||
TEMPLATE = simple,
|
||||
stopwords = english
|
||||
);
|
||||
|
||||
COMMENT ON TEXT SEARCH DICTIONARY public."Test Dictionary Edit#1"
|
||||
IS 'Test Description';
|
@@ -0,0 +1,7 @@
|
||||
-- Text Search Dictionary: public."Dictionary1_$%{}[]()&*^!@""'`\/#"
|
||||
|
||||
-- DROP TEXT SEARCH DICTIONARY public."Dictionary1_$%{}[]()&*^!@""'`\/#";
|
||||
|
||||
CREATE TEXT SEARCH DICTIONARY public."Dictionary1_$%{}[]()&*^!@""'`\/#" (
|
||||
TEMPLATE = simple
|
||||
);
|
@@ -0,0 +1,62 @@
|
||||
{
|
||||
"scenarios": [
|
||||
{
|
||||
"type": "create",
|
||||
"name": "Create FTS Dictionary",
|
||||
"endpoint": "NODE-fts_dictionary.obj",
|
||||
"sql_endpoint": "NODE-fts_dictionary.sql_id",
|
||||
"data": {
|
||||
"name": "Dictionary1_$%{}[]()&*^!@\"'`\\/#",
|
||||
"template": "simple",
|
||||
"options": [],
|
||||
"schema": "public",
|
||||
"schema_id": "<SCHEMA_ID>",
|
||||
"owner": "postgres"
|
||||
},
|
||||
"expected_sql_file": "create_fts_dictionary.sql"
|
||||
},
|
||||
{
|
||||
"type": "alter",
|
||||
"name": "Alter FTS Dictionary",
|
||||
"endpoint": "NODE-fts_dictionary.obj_id",
|
||||
"sql_endpoint": "NODE-fts_dictionary.sql_id",
|
||||
"data": {
|
||||
"name": "Test Dictionary Edit#1",
|
||||
"description": "Test Description",
|
||||
"options": {
|
||||
"added": [
|
||||
{
|
||||
"value": "english",
|
||||
"option": "stopwords"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"expected_sql_file": "alter_fts_dictionary_options.sql"
|
||||
},
|
||||
{
|
||||
"type": "alter",
|
||||
"name": "Alter FTS Dictionary | Delete Options",
|
||||
"endpoint": "NODE-fts_dictionary.obj_id",
|
||||
"sql_endpoint": "NODE-fts_dictionary.sql_id",
|
||||
"data": {
|
||||
"options": {
|
||||
"deleted": [
|
||||
{
|
||||
"value": "english",
|
||||
"option": "stopwords"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"expected_sql_file": "alter_fts_dictionary_delete_options.sql"
|
||||
},
|
||||
{
|
||||
"type": "delete",
|
||||
"name": "Drop FTS Dictionary",
|
||||
"endpoint": "NODE-fts_dictionary.obj_id",
|
||||
"sql_endpoint": "NODE-fts_dictionary.sql_id",
|
||||
"data": {}
|
||||
}
|
||||
]
|
||||
}
|
Reference in New Issue
Block a user