Skip to content

Commit

Permalink
Add test to ddl test framework
Browse files Browse the repository at this point in the history
  • Loading branch information
Ashish Prasad committed Oct 6, 2023
1 parent bd858c8 commit 3b935ed
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 6 deletions.
10 changes: 9 additions & 1 deletion test/python/expected/pyodbc/ddl_UDDT_UDTT.out
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
SET ANSI_NULLS ON
SET QUOTED_IDENTIFIER ON
CREATE TABLE [dbo].[t_udd](
[a] [shc_test].[test3] NULL
) ON [PRIMARY]

GO

CREATE TYPE [dbo].[test1] FROM [varchar](11) NOT NULL
GO

Expand All @@ -7,7 +15,7 @@ GO
CREATE TYPE [dbo].[test4] FROM [numeric](15, 4) NULL
GO

CREATE TYPE [shc_test].[test3] FROM [varchar](11) NOT NULL
CREATE TYPE [shc_test].[test3] FROM [int] NOT NULL
GO

CREATE TYPE [dbo].[inventoryitem] AS TABLE(
Expand Down
18 changes: 13 additions & 5 deletions test/python/input/ddl_UDDT_UDTT.sql
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@ DROP TYPE IF EXISTS test1
GO
DROP TYPE IF EXISTS test2
GO
DROP TYPE IF EXISTS shc_test.test3
GO
DROP TYPE IF EXISTS test4
GO
DROP TYPE IF EXISTS LocationTableType
Expand All @@ -12,6 +10,10 @@ DROP TYPE IF EXISTS InventoryItem
GO
DROP TYPE IF EXISTS shc_test.LocationTableType
GO
DROP TABLE IF EXISTS t_udd
GO
DROP TYPE IF EXISTS shc_test.test3
GO
DROP SCHEMA IF EXISTS shc_test
GO

Expand All @@ -24,12 +26,15 @@ GO
CREATE SCHEMA shc_test
GO

Create type shc_test.test3 FROM varchar(11) NOT NULL ;
Create type shc_test.test3 FROM int NOT NULL ;
GO

Create type test4 from numeric(15,4)
GO

create table t_udd( a shc_test.test3);
go

CREATE TYPE LocationTableType AS TABLE
( LocationName VARCHAR(50)
, CostRate INT );
Expand All @@ -56,8 +61,6 @@ DROP TYPE IF EXISTS test1
GO
DROP TYPE IF EXISTS test2
GO
DROP TYPE IF EXISTS shc_test.test3
GO
DROP TYPE IF EXISTS test4
GO
DROP TYPE IF EXISTS LocationTableType
Expand All @@ -66,5 +69,10 @@ DROP TYPE IF EXISTS InventoryItem
GO
DROP TYPE IF EXISTS shc_test.LocationTableType
GO
DROP TABLE IF EXISTS t_udd
GO
DROP TYPE IF EXISTS shc_test.test3
GO
DROP SCHEMA IF EXISTS shc_test
GO

0 comments on commit 3b935ed

Please sign in to comment.