-
Notifications
You must be signed in to change notification settings - Fork 77
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add support for Oracle as backend database
- Loading branch information
Showing
10 changed files
with
100 additions
and
30 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
70 changes: 70 additions & 0 deletions
70
gateway-ha/src/main/resources/gateway-ha-persistence-oracle.sql
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,70 @@ | ||
CREATE TABLE gateway_backend ( | ||
name VARCHAR(256) PRIMARY KEY, | ||
routing_group VARCHAR (256), | ||
backend_url VARCHAR (256), | ||
external_url VARCHAR (256), | ||
active NUMBER(1) | ||
); | ||
|
||
CREATE TABLE query_history ( | ||
query_id VARCHAR(256) PRIMARY KEY, | ||
query_text VARCHAR (256), | ||
created NUMBER, | ||
backend_url VARCHAR (256), | ||
user_name VARCHAR(256), | ||
source VARCHAR(256) | ||
); | ||
CREATE INDEX query_history_created_idx ON query_history(created); | ||
|
||
CREATE TABLE resource_groups ( | ||
resource_group_id NUMBER GENERATED ALWAYS as IDENTITY(START with 1 INCREMENT by 1), | ||
name VARCHAR(250) NOT NULL, | ||
-- OPTIONAL POLICY CONTROLS | ||
parent NUMBER, | ||
jmx_export CHAR(1), | ||
scheduling_policy VARCHAR(128), | ||
scheduling_weight NUMBER, | ||
-- REQUIRED QUOTAS | ||
soft_memory_limit VARCHAR(128) NOT NULL, | ||
max_queued INT NOT NULL, | ||
hard_concurrency_limit NUMBER NOT NULL, | ||
-- OPTIONAL QUOTAS | ||
soft_concurrency_limit NUMBER, | ||
soft_cpu_limit VARCHAR(128), | ||
hard_cpu_limit VARCHAR(128), | ||
environment VARCHAR(128), | ||
PRIMARY KEY(resource_group_id), | ||
FOREIGN KEY (parent) REFERENCES resource_groups (resource_group_id) ON DELETE CASCADE | ||
); | ||
|
||
CREATE TABLE selectors ( | ||
resource_group_id NUMBER NOT NULL, | ||
priority NUMBER NOT NULL, | ||
-- Regex fields -- these will be used as a regular expression pattern to | ||
-- match against the field of the same name on queries | ||
user_regex VARCHAR(512), | ||
source_regex VARCHAR(512), | ||
-- Selector fields -- these must match exactly. | ||
query_type VARCHAR(512), | ||
client_tags VARCHAR(512), | ||
selector_resource_estimate VARCHAR(1024), | ||
FOREIGN KEY (resource_group_id) REFERENCES resource_groups (resource_group_id) ON DELETE CASCADE | ||
); | ||
|
||
CREATE TABLE resource_groups_global_properties ( | ||
name VARCHAR(128) NOT NULL PRIMARY KEY, | ||
value VARCHAR(512) NULL, | ||
CHECK (name in ('cpu_quota_period')) | ||
); | ||
|
||
CREATE TABLE exact_match_source_selectors( | ||
environment VARCHAR(256), | ||
update_time TIMESTAMP NOT NULL, | ||
-- Selector fields which must exactly match a query | ||
source VARCHAR(512) NOT NULL, | ||
query_type VARCHAR(512), | ||
resource_group_id VARCHAR(256) NOT NULL, | ||
PRIMARY KEY (environment, source, resource_group_id), | ||
UNIQUE (source, environment, query_type, resource_group_id) | ||
); | ||
|
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