Skip to content

Commit 001c59e

Browse files
committed
Remove DefaultCollation
1 parent 11c2ab2 commit 001c59e

File tree

10 files changed

+0
-111
lines changed

10 files changed

+0
-111
lines changed

EntityFramework.Reverse.POCO.Generator/EF.Reverse.POCO.v3.ttinclude

Lines changed: 0 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -204,7 +204,6 @@
204204
// abc.hello will be Abc_Hello.
205205
public static bool PrependSchemaName = true; // Control if the schema name is prepended to the table name
206206
public static string DefaultSchema = null; // Set via DatabaseReader.DefaultSchema()
207-
public static string DefaultCollation = null; // Set via DatabaseReader.DefaultCollation()
208207

209208
// Table Suffix ***********************************************************************************************************************
210209
// Appends the suffix to the generated classes names
@@ -12183,7 +12182,6 @@ and limitations under the License.
1218312182

1218412183
// Database specific
1218512184
protected abstract string DefaultSchema(DbConnection conn);
12186-
protected abstract string DefaultCollation(DbConnection conn);
1218712185
protected abstract string SpecialQueryFlags();
1218812186
protected abstract bool HasTemporalTableSupport();
1218912187

@@ -12262,7 +12260,6 @@ and limitations under the License.
1226212260
}
1226312261

1226412262
Settings.DefaultSchema = DefaultSchema(conn);
12265-
Settings.DefaultCollation = DefaultCollation(conn);
1226612263
}
1226712264
}
1226812265

@@ -13379,11 +13376,6 @@ and limitations under the License.
1337913376
return "mydb";
1338013377
}
1338113378

13382-
protected override string DefaultCollation(DbConnection conn)
13383-
{
13384-
return null;
13385-
}
13386-
1338713379
protected override string SpecialQueryFlags()
1338813380
{
1338913381
return string.Empty;
@@ -13514,11 +13506,6 @@ and limitations under the License.
1351413506
return "system";
1351513507
}
1351613508

13517-
protected override string DefaultCollation(DbConnection conn)
13518-
{
13519-
return null;
13520-
}
13521-
1352213509
protected override string SpecialQueryFlags()
1352313510
{
1352413511
return string.Empty;
@@ -13643,11 +13630,6 @@ and limitations under the License.
1364313630
return "dbo";
1364413631
}
1364513632

13646-
protected override string DefaultCollation(DbConnection conn)
13647-
{
13648-
return null;
13649-
}
13650-
1365113633
protected override string SpecialQueryFlags()
1365213634
{
1365313635
return string.Empty;
@@ -13895,11 +13877,6 @@ ORDER BY R.specific_schema, R.routine_name, R.routine_type;";
1389513877
return "public";
1389613878
}
1389713879

13898-
protected override string DefaultCollation(DbConnection conn)
13899-
{
13900-
return null;
13901-
}
13902-
1390313880
protected override string SpecialQueryFlags()
1390413881
{
1390513882
return string.Empty;
@@ -14444,11 +14421,6 @@ SELECT * FROM MultiContext.ForeignKey;";
1444414421
return "dbo";
1444514422
}
1444614423

14447-
protected override string DefaultCollation(DbConnection conn)
14448-
{
14449-
return null;
14450-
}
14451-
1445214424
protected override string SpecialQueryFlags()
1445314425
{
1445414426
return string.Empty;
@@ -15483,31 +15455,6 @@ SELECT SPECIFIC_SCHEMA, SPECIFIC_NAME, ROUTINE_TYPE, RETURN_DATA_TYPE, ORDINAL_P
1548315455
return "dbo";
1548415456
}
1548515457

15486-
protected override string DefaultCollation(DbConnection conn)
15487-
{
15488-
try
15489-
{
15490-
var cmd = GetCmd(conn);
15491-
if (cmd != null)
15492-
{
15493-
cmd.CommandText = string.Format("SELECT collation_name FROM sys.databases WHERE name = '{0}'", conn.Database);
15494-
using (var rdr = cmd.ExecuteReader())
15495-
{
15496-
if (rdr.Read())
15497-
{
15498-
return rdr[0].ToString();
15499-
}
15500-
}
15501-
}
15502-
}
15503-
catch
15504-
{
15505-
// Ignored
15506-
}
15507-
15508-
return null;
15509-
}
15510-
1551115458
protected override string SpecialQueryFlags()
1551215459
{
1551315460
if (Settings.IncludeQueryTraceOn9481Flag)

Generator.Tests.Unit/FakeDatabaseReader.cs

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -102,11 +102,6 @@ protected override string DefaultSchema(DbConnection conn)
102102
return string.Empty;
103103
}
104104

105-
protected override string DefaultCollation(DbConnection conn)
106-
{
107-
return string.Empty;
108-
}
109-
110105
protected override string SpecialQueryFlags()
111106
{
112107
return string.Empty;

Generator/Readers/DatabaseReader.cs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,6 @@ public abstract class DatabaseReader
5252

5353
// Database specific
5454
protected abstract string DefaultSchema(DbConnection conn);
55-
protected abstract string DefaultCollation(DbConnection conn);
5655
protected abstract string SpecialQueryFlags();
5756
protected abstract bool HasTemporalTableSupport();
5857

@@ -131,7 +130,6 @@ public virtual void Init()
131130
}
132131

133132
Settings.DefaultSchema = DefaultSchema(conn);
134-
Settings.DefaultCollation = DefaultCollation(conn);
135133
}
136134
}
137135

Generator/Readers/MySqlDatabaseReader.cs

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -101,11 +101,6 @@ protected override string DefaultSchema(DbConnection conn)
101101
return "mydb";
102102
}
103103

104-
protected override string DefaultCollation(DbConnection conn)
105-
{
106-
return null;
107-
}
108-
109104
protected override string SpecialQueryFlags()
110105
{
111106
return string.Empty;

Generator/Readers/OracleDatabaseReader.cs

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -113,11 +113,6 @@ protected override string DefaultSchema(DbConnection conn)
113113
return "system";
114114
}
115115

116-
protected override string DefaultCollation(DbConnection conn)
117-
{
118-
return null;
119-
}
120-
121116
protected override string SpecialQueryFlags()
122117
{
123118
return string.Empty;

Generator/Readers/PluginDatabaseReader.cs

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -106,11 +106,6 @@ protected override string DefaultSchema(DbConnection conn)
106106
return "dbo";
107107
}
108108

109-
protected override string DefaultCollation(DbConnection conn)
110-
{
111-
return null;
112-
}
113-
114109
protected override string SpecialQueryFlags()
115110
{
116111
return string.Empty;

Generator/Readers/PostgreSqlDatabaseReader.cs

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -236,11 +236,6 @@ protected override string DefaultSchema(DbConnection conn)
236236
return "public";
237237
}
238238

239-
protected override string DefaultCollation(DbConnection conn)
240-
{
241-
return null;
242-
}
243-
244239
protected override string SpecialQueryFlags()
245240
{
246241
return string.Empty;

Generator/Readers/SqlServerCeDatabaseReader.cs

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -222,11 +222,6 @@ protected override string DefaultSchema(DbConnection conn)
222222
return "dbo";
223223
}
224224

225-
protected override string DefaultCollation(DbConnection conn)
226-
{
227-
return null;
228-
}
229-
230225
protected override string SpecialQueryFlags()
231226
{
232227
return string.Empty;

Generator/Readers/SqlServerDatabaseReader.cs

Lines changed: 0 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1020,31 +1020,6 @@ protected override string DefaultSchema(DbConnection conn)
10201020
return "dbo";
10211021
}
10221022

1023-
protected override string DefaultCollation(DbConnection conn)
1024-
{
1025-
try
1026-
{
1027-
var cmd = GetCmd(conn);
1028-
if (cmd != null)
1029-
{
1030-
cmd.CommandText = string.Format("SELECT collation_name FROM sys.databases WHERE name = '{0}'", conn.Database);
1031-
using (var rdr = cmd.ExecuteReader())
1032-
{
1033-
if (rdr.Read())
1034-
{
1035-
return rdr[0].ToString();
1036-
}
1037-
}
1038-
}
1039-
}
1040-
catch
1041-
{
1042-
// Ignored
1043-
}
1044-
1045-
return null;
1046-
}
1047-
10481023
protected override string SpecialQueryFlags()
10491024
{
10501025
if (Settings.IncludeQueryTraceOn9481Flag)

Generator/Settings.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,6 @@ public static class Settings
177177
// abc.hello will be Abc_Hello.
178178
public static bool PrependSchemaName = true; // Control if the schema name is prepended to the table name
179179
public static string DefaultSchema = null; // Set via DatabaseReader.DefaultSchema()
180-
public static string DefaultCollation = null; // Set via DatabaseReader.DefaultCollation()
181180

182181
// Table Suffix ***********************************************************************************************************************
183182
// Appends the suffix to the generated classes names

0 commit comments

Comments
 (0)