-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
7ecc3bc
commit 843f481
Showing
22 changed files
with
187 additions
and
335 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,6 +16,7 @@ public enum DbObjectType | |
TableContraint, | ||
Column, | ||
EnableTrigger, | ||
UseDatabase, | ||
Other | ||
} | ||
} |
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 |
---|---|---|
@@ -0,0 +1,7 @@ | ||
namespace SqlSchemaCompare.Core.DbStructures | ||
{ | ||
public class UseDbObject : DbObject | ||
{ | ||
public override DbObjectType DbObjectType => DbObjectType.UseDatabase; | ||
} | ||
} |
15 changes: 15 additions & 0 deletions
15
SqlSchemaCompare.Core/TSql/Factory/TSqlSimpleDbObjectFactory.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 |
---|---|---|
@@ -0,0 +1,15 @@ | ||
using Antlr4.Runtime; | ||
using Antlr4.Runtime.Misc; | ||
using SqlSchemaCompare.Core.Common; | ||
using SqlSchemaCompare.Core.DbStructures; | ||
|
||
namespace SqlSchemaCompare.Core.TSql.Factory | ||
{ | ||
public class TSqlSimpleDbObjectFactory : FactoryBase, IFactory | ||
{ | ||
public DbObject Create(ParserRuleContext context, ICharStream stream) | ||
{ | ||
return new SimpleDbObject { Sql = context.Start.InputStream.GetText(new Interval(context.start.StartIndex, context.stop.StopIndex))}; | ||
} | ||
} | ||
} |
15 changes: 15 additions & 0 deletions
15
SqlSchemaCompare.Core/TSql/Factory/TSqlUseDatabaseFactory.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 |
---|---|---|
@@ -0,0 +1,15 @@ | ||
using Antlr4.Runtime; | ||
using Antlr4.Runtime.Misc; | ||
using SqlSchemaCompare.Core.Common; | ||
using SqlSchemaCompare.Core.DbStructures; | ||
|
||
namespace SqlSchemaCompare.Core.TSql.Factory | ||
{ | ||
public class TSqlUseDatabaseFactory : FactoryBase, IFactory | ||
{ | ||
public DbObject Create(ParserRuleContext context, ICharStream stream) | ||
{ | ||
return new UseDbObject { Sql = context.Start.InputStream.GetText(new Interval(context.start.StartIndex, context.stop.StopIndex)) }; | ||
} | ||
} | ||
} |
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
Oops, something went wrong.