Skip to content

Commit

Permalink
Port DDL export framework to Dotnet
Browse files Browse the repository at this point in the history
  • Loading branch information
Nirmit Shah committed Jan 1, 2025
1 parent 8931d86 commit fd262b6
Show file tree
Hide file tree
Showing 22 changed files with 3,118 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,6 @@ runs:
babel_databaseName=master \
babel_user=jdbc_user \
babel_password=12345678 \
testName="all---TestUDD.txt;TestChar.txt;TestSqlVariant.txt;TestVarChar.txt;TestAuthentication.txt;TestText.txt" \
testName="all---TestUDD.txt;TestChar.txt;TestSqlVariant.txt;TestVarChar.txt;TestAuthentication.txt;TestText.txt;ddl_func_proc.sql;ddl_partitions.sql" \
dotnet test
shell: bash
112 changes: 112 additions & 0 deletions test/dotnet/ExpectedOutput/ddl_UDDT_UDTT.out
Original file line number Diff line number Diff line change
@@ -0,0 +1,112 @@
#Q#DROP TYPE IF EXISTS test1

#Q#DROP TYPE IF EXISTS test2

#Q#DROP TYPE IF EXISTS test4

#Q#DROP TYPE IF EXISTS LocationTableType

#Q#DROP TYPE IF EXISTS InventoryItem

#Q#DROP TYPE IF EXISTS shc_test.LocationTableType

#Q#DROP TABLE IF EXISTS t_udd

#Q#DROP TYPE IF EXISTS shc_test.test3

#Q#DROP SCHEMA IF EXISTS shc_test

#Q#
CREATE TYPE test1 FROM varchar(11) NOT NULL ;

#Q#
CREATE TYPE test2 FROM int NULL ;

#Q#
CREATE SCHEMA shc_test

#Q#
Create type shc_test.test3 FROM int NOT NULL ;

#Q#
Create type test4 from numeric(15,4)

#Q#
create table t_udd( a shc_test.test3);

#Q#
CREATE TYPE LocationTableType AS TABLE
( LocationName VARCHAR(50)
, CostRate INT );

#Q#
CREATE TYPE InventoryItem AS TABLE
(
[Name] NVARCHAR(50) NOT NULL,
SupplierId BIGINT NOT NULL,
Price DECIMAL (18, 4) NULL,
PRIMARY KEY (
Name
)
)

#Q#
CREATE TYPE shc_test.LocationTableType AS TABLE
( LocationName VARCHAR(50)
, CostRate INT );

SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[t_udd](
[a] [shc_test].[test3] NULL
) ON [PRIMARY]

GO
CREATE TYPE [dbo].[test1] FROM [varchar](11) NOT NULL
GO
CREATE TYPE [dbo].[test2] FROM [int] NULL
GO
CREATE TYPE [dbo].[test4] FROM [numeric](15, 4) NULL
GO
CREATE TYPE [shc_test].[test3] FROM [int] NOT NULL
GO
CREATE TYPE [dbo].[inventoryitem] AS TABLE(
[name] [nvarchar](50) NOT NULL,
[supplierid] [bigint] NOT NULL,
[price] [decimal](18, 4) NULL,
PRIMARY KEY NONCLUSTERED
(
[name] ASC
)WITH (IGNORE_DUP_KEY = OFF)
)
GO
CREATE TYPE [dbo].[locationtabletype] AS TABLE(
[locationname] [varchar](50) NULL,
[costrate] [int] NULL
)
GO
CREATE TYPE [shc_test].[locationtabletype] AS TABLE(
[locationname] [varchar](50) NULL,
[costrate] [int] NULL
)
GO
#Q#DROP TYPE IF EXISTS test1

#Q#DROP TYPE IF EXISTS test2

#Q#DROP TYPE IF EXISTS test4

#Q#DROP TYPE IF EXISTS LocationTableType

#Q#DROP TYPE IF EXISTS InventoryItem

#Q#DROP TYPE IF EXISTS shc_test.LocationTableType

#Q#DROP TABLE IF EXISTS t_udd

#Q#DROP TYPE IF EXISTS shc_test.test3

#Q#DROP SCHEMA IF EXISTS shc_test

Loading

0 comments on commit fd262b6

Please sign in to comment.