You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/SqlObject.cs
+3-2Lines changed: 3 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -36,8 +36,9 @@ internal class SqlObject
36
36
/// </summary>
37
37
publicreadonlystringFullName;
38
38
/// <summary>
39
-
/// The full name of the object in the format 'SCHEMA.NAME' (or just 'NAME' if there is no specified schema), quoted and escaped with single quotes
39
+
/// The full name of the object in the format '[SCHEMA].[NAME]' (or just '[NAME]' if there is no specified schema), quoted and escaped with single quotes
40
40
/// </summary>
41
+
/// <remarks>The schema and name are also bracket quoted to avoid issues when there are .'s in the object names</remarks>
41
42
publicreadonlystringQuotedFullName;
42
43
43
44
/// <summary>
@@ -73,8 +74,8 @@ public SqlObject(string fullName)
Copy file name to clipboardExpand all lines: test/Unit/SqlOutputBindingTests.cs
+7-7Lines changed: 7 additions & 7 deletions
Original file line number
Diff line number
Diff line change
@@ -42,13 +42,13 @@ public async Task TestAddAsync()
42
42
}
43
43
44
44
[Theory]
45
-
[InlineData("dbo.Products","dbo","'dbo'","Products","'Products'","dbo.Products","'dbo.Products'","[dbo].[Products]")]// Simple full name
46
-
[InlineData("Products","SCHEMA_NAME()","SCHEMA_NAME()","Products","'Products'","Products","'Products'","[Products]")]// Simple no schema
47
-
[InlineData("[dbo].[Products]","dbo","'dbo'","Products","'Products'","dbo.Products","'dbo.Products'","[dbo].[Products]")]// Simple full name bracket quoted
48
-
[InlineData("[dbo].Products","dbo","'dbo'","Products","'Products'","dbo.Products","'dbo.Products'","[dbo].[Products]")]// Simple full name only schema bracket quoted
49
-
[InlineData("dbo.[Products]","dbo","'dbo'","Products","'Products'","dbo.Products","'dbo.Products'","[dbo].[Products]")]// Simple full name only name bracket quoted
50
-
[InlineData("[My'Schema].[Prod'ucts]","My'Schema","'My''Schema'","Prod'ucts","'Prod''ucts'","My'Schema.Prod'ucts","'My''Schema.Prod''ucts'","[My'Schema].[Prod'ucts]")]// Full name with single quotes in schema and name
51
-
[InlineData("[My]]Schema].[My]]Object]","My]Schema","'My]Schema'","My]Object","'My]Object'","My]Schema.My]Object","'My]Schema.My]Object'","[My]]Schema].[My]]Object]")]// Full name with brackets in schema and name
45
+
[InlineData("dbo.Products","dbo","'dbo'","Products","'Products'","dbo.Products","'[dbo].[Products]'","[dbo].[Products]")]// Simple full name
46
+
[InlineData("Products","SCHEMA_NAME()","SCHEMA_NAME()","Products","'Products'","Products","'[Products]'","[Products]")]// Simple no schema
47
+
[InlineData("[dbo].[Products]","dbo","'dbo'","Products","'Products'","dbo.Products","'[dbo].[Products]'","[dbo].[Products]")]// Simple full name bracket quoted
48
+
[InlineData("[dbo].Products","dbo","'dbo'","Products","'Products'","dbo.Products","'[dbo].[Products]'","[dbo].[Products]")]// Simple full name only schema bracket quoted
49
+
[InlineData("dbo.[Products]","dbo","'dbo'","Products","'Products'","dbo.Products","'[dbo].[Products]'","[dbo].[Products]")]// Simple full name only name bracket quoted
50
+
[InlineData("[My'Schema].[Prod'ucts]","My'Schema","'My''Schema'","Prod'ucts","'Prod''ucts'","My'Schema.Prod'ucts","'[My''Schema].[Prod''ucts]'","[My'Schema].[Prod'ucts]")]// Full name with single quotes in schema and name
51
+
[InlineData("[My]]Schema].[My]]Object]","My]Schema","'My]Schema'","My]Object","'My]Object'","My]Schema.My]Object","'[My]]Schema].[My]]Object]'","[My]]Schema].[My]]Object]")]// Full name with brackets in schema and name
0 commit comments