Skip to content

Commit 58f83e7

Browse files
committed
Add Oracle test tables
1 parent 06c2c0c commit 58f83e7

17 files changed

+480
-6
lines changed
Lines changed: 23 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,35 @@
11
<?xml version="1.0" encoding="utf-8" ?>
22
<configuration>
3+
<configSections>
4+
<section name="oracle.manageddataaccess.client" type="OracleInternal.Common.ODPMSectionHandler, Oracle.ManagedDataAccess" />
5+
</configSections>
36
<connectionStrings>
4-
<add name="T4SQLDB" providerName="System.Data.SqlClient" connectionString="Data Source=.\SQLEXPRESS;Initial Catalog=T4SQLDB;Integrated Security=True"/>
7+
<!--<add name="T4SQLDB" providerName="System.Data.SqlClient" connectionString="Data Source=.\SQLEXPRESS;Initial Catalog=T4SQLDB;Integrated Security=True"/>-->
8+
<add name="T4SQLDB" providerName="Oracle.ManagedDataAccess.Client" connectionString="Data Source=ORCL;User Id=T4SQL;Password=T4SQL#Pwd" />
59
</connectionStrings>
610
<appSettings>
7-
<add key="Engine_Package" value="T4SQL.ENGINE_" />
11+
<!--<add key="Engine_Package" value="T4SQL.ENGINE_" />-->
12+
<add key="Engine_Package" value="T4SQL.ENGINE." />
813
</appSettings>
914
<runtime>
1015
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
1116
<probing privatePath="Templates"/>
1217
</assemblyBinding>
1318
</runtime>
19+
<system.data>
20+
<DbProviderFactories>
21+
<!-- Remove in case this is already defined in machine.config -->
22+
<remove invariant="Oracle.ManagedDataAccess.Client" />
23+
<add name="ODP.NET, Managed Driver" invariant="Oracle.ManagedDataAccess.Client" description="Oracle Data Provider for .NET, Managed Driver" type="Oracle.ManagedDataAccess.Client.OracleClientFactory, Oracle.ManagedDataAccess" />
24+
</DbProviderFactories>
25+
</system.data>
26+
<oracle.manageddataaccess.client>
27+
<version number="*">
28+
<settings>
29+
<!-- Set this path if you are using TNS aliases as connection strings -->
30+
<!-- Instead you can use "SERVER_NAME:PORT/SERVICE_NAME" as your data source -->
31+
<setting name="TNS_ADMIN" value="C:\oracle\product\11.2.0\client_1\network\admin" />
32+
</settings>
33+
</version>
34+
</oracle.manageddataaccess.client>
1435
</configuration>

T4SQLTemplateLibrary/Databases/Oracle/T4SQLDB/Scripts/1-Tables/05-TEMPLATE_SPEC.sql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
(
33
CLASS_NAME VARCHAR2(128) NOT NULL,
44
PROPERTY_NAME NVARCHAR2(64) NOT NULL,
5-
DEFAULT_VALUE NVARCHAR2(2000),
5+
DEFAULT_VALUE VARCHAR2(4000),
66
LINK_STATE NVARCHAR2(256),
77
PROPERTY_DESCRIPTION NVARCHAR2(1024),
88
PROPERTY_ORDER NUMBER(5),

T4SQLTemplateLibrary/Databases/Oracle/T4SQLDB/Scripts/1-Tables/08-SEED_PROPERTY.sql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
(
33
WORKITEM_NAME NVARCHAR2(32) NOT NULL,
44
PROPERTY_NAME NVARCHAR2(64) NOT NULL,
5-
STRING_VALUE NVARCHAR2(2000) NOT NULL,
5+
STRING_VALUE VARCHAR2(4000) NOT NULL,
66
LINK_STATE NVARCHAR2(256),
77

88
CONSTRAINT PK_SEED_PROPERTY PRIMARY KEY (WORKITEM_NAME, PROPERTY_NAME),

T4SQLTemplateLibrary/Databases/Oracle/T4SQLDB/Scripts/4-Packages/01-META.pck

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -250,7 +250,7 @@ PROCEDURE GET_TABLE_IN_TRIGGER
250250
outTab_Schema OUT VARCHAR2,
251251
outTab_Name OUT VARCHAR2
252252
) AS
253-
tTrigger VARCHAR2(64) := RTRIM(REGEXP_SUBSTR(inCall_Stack, '[^[:space:]]+[:space:]*$'), CHR(10));
253+
tTrigger VARCHAR2(64) := REGEXP_SUBSTR(inCall_Stack, '^\s*\d+\s+\d+\s+(\w+\.TRG_\w+)\s*$', modifier => 'm', subexpression => 1);
254254
tTrg_Schema VARCHAR2(30) := REGEXP_SUBSTR(tTrigger, '^[^.]+');
255255
tTrg_Name VARCHAR2(30) := REGEXP_SUBSTR(tTrigger, '[^.]+$');
256256
BEGIN
@@ -427,7 +427,7 @@ BEGIN
427427
(
428428
WORKITEM_NAME NVARCHAR2(32) NOT NULL,
429429
PROPERTY_NAME NVARCHAR2(64) NOT NULL,
430-
STRING_VALUE NVARCHAR2(2000) NOT NULL,
430+
STRING_VALUE VARCHAR2(4000) NOT NULL,
431431
LINK_STATE NVARCHAR2(256),
432432

433433
CONSTRAINT PK_' || tProperty_Table || ' PRIMARY KEY (WORKITEM_NAME, PROPERTY_NAME),
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
create table test.date_time_points
2+
(
3+
date_ date not null,
4+
catalog_id number(5) not null,
5+
position_id number(9) not null,
6+
value_ number(16, 2) not null,
7+
other_col nvarchar2(50),
8+
9+
constraint pk_date_time_points primary key (date_, catalog_id, position_id)
10+
);
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
create table test.date_time_ranges
2+
(
3+
catalog_id NUMBER(5) not null,
4+
position_id NUMBER(9) not null,
5+
value_ NUMBER(16, 2) not null,
6+
other_col NVARCHAR2(50),
7+
start_date date not null,
8+
end_date date,
9+
10+
constraint pk_date_time_ranges primary key (catalog_id, position_id, start_date)
11+
);
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
create table test.sim_type
2+
(
3+
sim_type_id number(4) not null primary key,
4+
sim_type_desc nvarchar2(64) not null
5+
);
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
create table test.simulation
2+
(
3+
id_ number(8) not null primary key,
4+
sim_desc nvarchar2(64) not null,
5+
sim_type number(4) not null,
6+
created_time date default sysdate not null,
7+
creator nvarchar2(64),
8+
9+
CONSTRAINT FK_simulation_sim_type FOREIGN KEY (sim_type) REFERENCES test.sim_type(sim_type_id)
10+
);
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
create table test.prod_type
2+
(
3+
prod_code nvarchar2(16) not null primary key,
4+
prod_name nvarchar2(64)
5+
);
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
create table test.grp3_class
2+
(
3+
grp3_class NVARCHAR2(12) not null primary key,
4+
description_ NVARCHAR2(100)
5+
);

0 commit comments

Comments
 (0)