Skip to content

Commit fae4ef7

Browse files
linq2dbotAzure Pipelines Bot
andauthored
Baselines for linq2db/linq2db#5122 (#1537)
* [Windows / SQLite (specialized tests)] baselines * [Windows / SQLite (specialized tests)] baselines * [Windows / SQLite (both providers)] baselines --------- Co-authored-by: Azure Pipelines Bot <[email protected]>
1 parent 107a06c commit fae4ef7

File tree

166 files changed

+7327
-103
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

166 files changed

+7327
-103
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,140 @@
1+
BeforeExecute
2+
-- Northwind.SQLite.MS SQLite.MS SQLite
3+
4+
5+
SELECT
6+
t.schema || '..' || t.name AS TableID,
7+
'' AS CatalogName,
8+
t.schema AS SchemaName,
9+
t.name AS TableName,
10+
t.schema = 'main' AS IsDefaultSchema,
11+
t.type = 'view' AS IsView
12+
FROM pragma_table_list() t
13+
WHERE t.type IN ('table', 'view') AND t.name NOT IN ('sqlite_sequence', 'sqlite_schema') AND t.schema = 'main'
14+
15+
16+
BeforeExecute
17+
-- Northwind.SQLite.MS SQLite.MS SQLite
18+
19+
20+
SELECT
21+
t.schema || '..' || t.name AS TableID,
22+
i.name AS PrimaryKeyName,
23+
c.name AS ColumnName,
24+
c.pk - 1 AS Ordinal
25+
FROM pragma_table_list() t
26+
LEFT OUTER JOIN pragma_table_info(t.name) c
27+
LEFT OUTER JOIN pragma_index_list(t.name) i ON i.origin = 'pk'
28+
WHERE t.type IN ('table', 'view') AND c.pk != 0 AND t.name NOT IN ('sqlite_sequence', 'sqlite_schema') AND t.schema = 'main'
29+
30+
31+
BeforeExecute
32+
-- Northwind.SQLite.MS SQLite.MS SQLite
33+
34+
35+
WITH pk_counts AS (
36+
SELECT
37+
t.name AS table_name,
38+
COUNT(*) AS pk_count
39+
FROM pragma_table_list() t
40+
JOIN pragma_table_info(t.name) c
41+
WHERE c.pk > 0
42+
GROUP BY t.name
43+
)
44+
SELECT
45+
t.schema || '..' || t.name AS TableID,
46+
c.name AS Name,
47+
c.[notnull] = 0 AS IsNullable,
48+
c.cid AS Ordinal,
49+
c.type AS DataType,
50+
(pk.pk_count = 1
51+
AND c.pk = 1
52+
AND UPPER(c.type) = 'INTEGER'
53+
AND m.sql NOT LIKE '%PRIMARY KEY DESC%'
54+
AND (m.sql LIKE '%AUTOINCREMENT%' OR m.sql NOT LIKE '%WITHOUT ROWID%')) AS [IsIdentity]
55+
FROM pragma_table_list() t
56+
LEFT OUTER JOIN pragma_table_info(t.name) c
57+
INNER JOIN sqlite_master m ON m.tbl_name = t.name AND m.type IN ('table', 'view')
58+
LEFT JOIN pk_counts pk ON pk.table_name = t.name
59+
WHERE t.type IN ('table', 'view') AND t.name NOT IN ('sqlite_sequence', 'sqlite_schema') AND t.schema = 'main'
60+
61+
62+
BeforeExecute
63+
-- Northwind.SQLite.MS SQLite.MS SQLite
64+
65+
66+
SELECT
67+
t.schema AS SchemaName,
68+
t.name AS TableName
69+
FROM pragma_table_list() t
70+
WHERE t.type IN ('view') AND t.name NOT IN ('sqlite_sequence', 'sqlite_schema') AND t.schema = 'main'
71+
72+
73+
BeforeExecute
74+
-- Northwind.SQLite.MS SQLite.MS SQLite
75+
76+
SELECT * FROM [Products by Category]
77+
78+
BeforeExecute
79+
-- Northwind.SQLite.MS SQLite.MS SQLite
80+
81+
SELECT * FROM [Summary of Sales by Year]
82+
83+
BeforeExecute
84+
-- Northwind.SQLite.MS SQLite.MS SQLite
85+
86+
SELECT * FROM [Summary of Sales by Quarter]
87+
88+
BeforeExecute
89+
-- Northwind.SQLite.MS SQLite.MS SQLite
90+
91+
SELECT * FROM [Order Subtotals]
92+
93+
BeforeExecute
94+
-- Northwind.SQLite.MS SQLite.MS SQLite
95+
96+
SELECT * FROM [Alphabetical list of products]
97+
98+
BeforeExecute
99+
-- Northwind.SQLite.MS SQLite.MS SQLite
100+
101+
SELECT * FROM [Products Above Average Price]
102+
103+
BeforeExecute
104+
-- Northwind.SQLite.MS SQLite.MS SQLite
105+
106+
SELECT * FROM [Orders Qry]
107+
108+
BeforeExecute
109+
-- Northwind.SQLite.MS SQLite.MS SQLite
110+
111+
SELECT * FROM [Order Details Extended]
112+
113+
BeforeExecute
114+
-- Northwind.SQLite.MS SQLite.MS SQLite
115+
116+
SELECT * FROM [Customer and Suppliers by City]
117+
118+
BeforeExecute
119+
-- Northwind.SQLite.MS SQLite.MS SQLite
120+
121+
SELECT * FROM [Current Product List]
122+
123+
BeforeExecute
124+
-- Northwind.SQLite.MS SQLite.MS SQLite
125+
126+
127+
SELECT
128+
'FK_' || tThis.name || '_' || f.id AS Name,
129+
tThis.schema || '..' || tThis.name AS ThisTableID,
130+
f.[from] AS ThisColumn,
131+
tOther.schema || '..' || tOther.name AS OtherTableID,
132+
coalesce(f.[to], cOther.name) AS OtherColumn,
133+
f.seq AS Ordinal
134+
FROM pragma_table_list() tThis
135+
LEFT OUTER JOIN pragma_foreign_key_list(tThis.name) f
136+
INNER JOIN pragma_table_list() tOther ON f.[table] = tOther.name
137+
LEFT JOIN pragma_table_info(tOther.name) cOther ON (cOther.pk -1) == f.seq
138+
WHERE tThis.type IN ('table', 'view') AND tThis.name NOT IN ('sqlite_sequence', 'sqlite_schema') AND tThis.schema = 'main'
139+
140+
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,140 @@
1+
BeforeExecute
2+
-- Northwind.SQLite SQLite.Classic SQLite
3+
4+
5+
SELECT
6+
t.schema || '..' || t.name AS TableID,
7+
'' AS CatalogName,
8+
t.schema AS SchemaName,
9+
t.name AS TableName,
10+
t.schema = 'main' AS IsDefaultSchema,
11+
t.type = 'view' AS IsView
12+
FROM pragma_table_list() t
13+
WHERE t.type IN ('table', 'view') AND t.name NOT IN ('sqlite_sequence', 'sqlite_schema') AND t.schema = 'main'
14+
15+
16+
BeforeExecute
17+
-- Northwind.SQLite SQLite.Classic SQLite
18+
19+
20+
SELECT
21+
t.schema || '..' || t.name AS TableID,
22+
i.name AS PrimaryKeyName,
23+
c.name AS ColumnName,
24+
c.pk - 1 AS Ordinal
25+
FROM pragma_table_list() t
26+
LEFT OUTER JOIN pragma_table_info(t.name) c
27+
LEFT OUTER JOIN pragma_index_list(t.name) i ON i.origin = 'pk'
28+
WHERE t.type IN ('table', 'view') AND c.pk != 0 AND t.name NOT IN ('sqlite_sequence', 'sqlite_schema') AND t.schema = 'main'
29+
30+
31+
BeforeExecute
32+
-- Northwind.SQLite SQLite.Classic SQLite
33+
34+
35+
WITH pk_counts AS (
36+
SELECT
37+
t.name AS table_name,
38+
COUNT(*) AS pk_count
39+
FROM pragma_table_list() t
40+
JOIN pragma_table_info(t.name) c
41+
WHERE c.pk > 0
42+
GROUP BY t.name
43+
)
44+
SELECT
45+
t.schema || '..' || t.name AS TableID,
46+
c.name AS Name,
47+
c.[notnull] = 0 AS IsNullable,
48+
c.cid AS Ordinal,
49+
c.type AS DataType,
50+
(pk.pk_count = 1
51+
AND c.pk = 1
52+
AND UPPER(c.type) = 'INTEGER'
53+
AND m.sql NOT LIKE '%PRIMARY KEY DESC%'
54+
AND (m.sql LIKE '%AUTOINCREMENT%' OR m.sql NOT LIKE '%WITHOUT ROWID%')) AS [IsIdentity]
55+
FROM pragma_table_list() t
56+
LEFT OUTER JOIN pragma_table_info(t.name) c
57+
INNER JOIN sqlite_master m ON m.tbl_name = t.name AND m.type IN ('table', 'view')
58+
LEFT JOIN pk_counts pk ON pk.table_name = t.name
59+
WHERE t.type IN ('table', 'view') AND t.name NOT IN ('sqlite_sequence', 'sqlite_schema') AND t.schema = 'main'
60+
61+
62+
BeforeExecute
63+
-- Northwind.SQLite SQLite.Classic SQLite
64+
65+
66+
SELECT
67+
t.schema AS SchemaName,
68+
t.name AS TableName
69+
FROM pragma_table_list() t
70+
WHERE t.type IN ('view') AND t.name NOT IN ('sqlite_sequence', 'sqlite_schema') AND t.schema = 'main'
71+
72+
73+
BeforeExecute
74+
-- Northwind.SQLite SQLite.Classic SQLite
75+
76+
SELECT * FROM [Products by Category]
77+
78+
BeforeExecute
79+
-- Northwind.SQLite SQLite.Classic SQLite
80+
81+
SELECT * FROM [Summary of Sales by Year]
82+
83+
BeforeExecute
84+
-- Northwind.SQLite SQLite.Classic SQLite
85+
86+
SELECT * FROM [Summary of Sales by Quarter]
87+
88+
BeforeExecute
89+
-- Northwind.SQLite SQLite.Classic SQLite
90+
91+
SELECT * FROM [Order Subtotals]
92+
93+
BeforeExecute
94+
-- Northwind.SQLite SQLite.Classic SQLite
95+
96+
SELECT * FROM [Alphabetical list of products]
97+
98+
BeforeExecute
99+
-- Northwind.SQLite SQLite.Classic SQLite
100+
101+
SELECT * FROM [Products Above Average Price]
102+
103+
BeforeExecute
104+
-- Northwind.SQLite SQLite.Classic SQLite
105+
106+
SELECT * FROM [Orders Qry]
107+
108+
BeforeExecute
109+
-- Northwind.SQLite SQLite.Classic SQLite
110+
111+
SELECT * FROM [Order Details Extended]
112+
113+
BeforeExecute
114+
-- Northwind.SQLite SQLite.Classic SQLite
115+
116+
SELECT * FROM [Customer and Suppliers by City]
117+
118+
BeforeExecute
119+
-- Northwind.SQLite SQLite.Classic SQLite
120+
121+
SELECT * FROM [Current Product List]
122+
123+
BeforeExecute
124+
-- Northwind.SQLite SQLite.Classic SQLite
125+
126+
127+
SELECT
128+
'FK_' || tThis.name || '_' || f.id AS Name,
129+
tThis.schema || '..' || tThis.name AS ThisTableID,
130+
f.[from] AS ThisColumn,
131+
tOther.schema || '..' || tOther.name AS OtherTableID,
132+
coalesce(f.[to], cOther.name) AS OtherColumn,
133+
f.seq AS Ordinal
134+
FROM pragma_table_list() tThis
135+
LEFT OUTER JOIN pragma_foreign_key_list(tThis.name) f
136+
INNER JOIN pragma_table_list() tOther ON f.[table] = tOther.name
137+
LEFT JOIN pragma_table_info(tOther.name) cOther ON (cOther.pk -1) == f.seq
138+
WHERE tThis.type IN ('table', 'view') AND tThis.name NOT IN ('sqlite_sequence', 'sqlite_schema') AND tThis.schema = 'main'
139+
140+
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
BeforeExecute
2+
-- SQLite.Classic SQLite
3+
4+
INSERT INTO [Issue2099Table] DEFAULT VALUES
5+
6+
BeforeExecute
7+
-- SQLite.Classic SQLite
8+
9+
SELECT
10+
[t1].[Id]
11+
FROM
12+
[Issue2099Table] [t1]
13+
LIMIT 2
14+

SQLite.Classic.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.AverageAsyncLong(SQLite.Classic.LinqService).sql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ DECLARE @p -- Int32
44
SET @p = 5
55

66
SELECT
7-
AVG(CAST([c_1].[Id] AS BigInt))
7+
AVG(CAST([c_1].[Id] AS INTEGER))
88
FROM
99
[AsyncDataTable] [c_1]
1010
WHERE

SQLite.Classic.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncLong(SQLite.Classic.LinqService).sql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ DECLARE @p -- Int32
44
SET @p = 5
55

66
SELECT
7-
SUM(CAST([c_1].[Id] AS BigInt))
7+
SUM(CAST([c_1].[Id] AS INTEGER))
88
FROM
99
[AsyncDataTable] [c_1]
1010
WHERE

SQLite.Classic.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncLongN(SQLite.Classic.LinqService).sql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ DECLARE @p -- Int32
44
SET @p = 5
55

66
SELECT
7-
SUM(CAST([c_1].[Id] AS BigInt))
7+
SUM(CAST([c_1].[Id] AS INTEGER))
88
FROM
99
[AsyncDataTable] [c_1]
1010
WHERE

SQLite.Classic.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncSelectorLong(SQLite.Classic.LinqService).sql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ DECLARE @p -- Int32
44
SET @p = 5
55

66
SELECT
7-
SUM(CAST([c_1].[Id] AS BigInt))
7+
SUM(CAST([c_1].[Id] AS INTEGER))
88
FROM
99
[AsyncDataTable] [c_1]
1010
WHERE

SQLite.Classic.LinqService/Tests/Linq/CompileTestsAsync/Tests.Linq.CompileTestsAsync.SumAsyncSelectorLongN(SQLite.Classic.LinqService).sql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ DECLARE @p -- Int32
44
SET @p = 5
55

66
SELECT
7-
SUM(CAST([c_1].[Id] AS BigInt))
7+
SUM(CAST([c_1].[Id] AS INTEGER))
88
FROM
99
[AsyncDataTable] [c_1]
1010
WHERE

SQLite.Classic.LinqService/Tests/Linq/ConvertTests/Tests.Linq.ConvertTests.ConvertToInt64(SQLite.Classic.LinqService).sql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ FROM
1010
WHEN [t].[MoneyValue] - FLOOR([t].[MoneyValue]) = 0.5 AND (FLOOR([t].[MoneyValue]) % 2) = 0
1111
THEN FLOOR([t].[MoneyValue])
1212
ELSE ROUND([t].[MoneyValue], 0)
13-
END AS BigInt) as [c1]
13+
END AS INTEGER) as [c1]
1414
FROM
1515
[LinqDataTypes] [t]
1616
) [p]

SQLite.Classic.LinqService/Tests/Linq/ConvertTests/Tests.Linq.ConvertTests.ToBigInt(SQLite.Classic.LinqService).sql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
-- SQLite.Classic SQLite
33

44
SELECT
5-
CAST([t].[MoneyValue] AS BigInt)
5+
CAST([t].[MoneyValue] AS INTEGER)
66
FROM
77
[LinqDataTypes] [t]
88

0 commit comments

Comments
 (0)