-
Notifications
You must be signed in to change notification settings - Fork 75
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make Dialect.GetTransformationProvider strongly typed
- Loading branch information
1 parent
26e42b5
commit 6638149
Showing
8 changed files
with
40 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
10 changes: 6 additions & 4 deletions
10
src/Migrator.Providers/Impl/SqlServer/SqlServer2005Dialect.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,21 @@ | ||
using System; | ||
using System.Data; | ||
using Migrator.Framework; | ||
|
||
namespace Migrator.Providers.SqlServer | ||
{ | ||
public class SqlServer2005Dialect : SqlServerDialect | ||
{ | ||
public SqlServer2005Dialect() :base() | ||
public SqlServer2005Dialect() | ||
{ | ||
RegisterColumnType(DbType.AnsiString, 2147483647, "VARCHAR(MAX)"); | ||
RegisterColumnType(DbType.Binary, 2147483647, "VARBINARY(MAX)"); | ||
RegisterColumnType(DbType.String, 1073741823, "NVARCHAR(MAX)"); | ||
RegisterColumnType(DbType.Xml, "XML"); | ||
} | ||
|
||
public override Type TransformationProvider { get { return typeof (SqlServerTransformationProvider); } } | ||
|
||
public override ITransformationProvider GetTransformationProvider(Dialect dialect, string connectionString) | ||
{ | ||
return new SqlServerTransformationProvider(dialect, connectionString); | ||
} | ||
} | ||
} |
17 changes: 10 additions & 7 deletions
17
src/Migrator.Providers/Impl/SqlServer/SqlServerCeDialect.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,23 @@ | ||
using System; | ||
using System.Data; | ||
using Migrator.Framework; | ||
|
||
namespace Migrator.Providers.SqlServer | ||
{ | ||
public class SqlServerCeDialect : SqlServerDialect | ||
{ | ||
public class SqlServerCeDialect : SqlServerDialect | ||
{ | ||
public SqlServerCeDialect() | ||
{ | ||
{ | ||
RegisterColumnType(DbType.AnsiStringFixedLength, "NCHAR(255)"); | ||
RegisterColumnType(DbType.AnsiStringFixedLength, 4000, "NCHAR($l)"); | ||
RegisterColumnType(DbType.AnsiString, "NVARCHAR(255)"); | ||
RegisterColumnType(DbType.AnsiString, 4000, "NVARCHAR($l)"); | ||
RegisterColumnType(DbType.AnsiString, 1073741823, "TEXT"); | ||
} | ||
} | ||
|
||
public override Type TransformationProvider { get { return typeof (SqlServerCeTransformationProvider); } } | ||
public override ITransformationProvider GetTransformationProvider(Dialect dialect, string connectionString) | ||
{ | ||
return new SqlServerCeTransformationProvider(dialect, connectionString); | ||
} | ||
|
||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters