Skip to content

Commit 9ebde2d

Browse files
committed
Merge branch 'main' into feature/cli
2 parents f0d2e2d + 0138f53 commit 9ebde2d

File tree

2 files changed

+10
-11
lines changed

2 files changed

+10
-11
lines changed

src/DbSyncKit.MySQL.csproj

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@
66
<Nullable>enable</Nullable>
77
<GenerateDocumentationFile>True</GenerateDocumentationFile>
88
<GeneratePackageOnBuild>True</GeneratePackageOnBuild>
9-
<AssemblyVersion>1.2.0.0</AssemblyVersion>
10-
<FileVersion>1.2.0.0</FileVersion>
11-
<Version>1.2.0.0</Version>
9+
<AssemblyVersion>1.4.0.0</AssemblyVersion>
10+
<FileVersion>1.4.0.0</FileVersion>
11+
<Version>1.4.0.0</Version>
1212
<PackageProjectUrl>https://dbsynckit.rohit-mahajan.in/t</PackageProjectUrl>
1313
<RepositoryUrl>https://github.com/RohitM-IN/DbSyncKit</RepositoryUrl>
1414
<PackageLicenseFile>LICENSE.txt</PackageLicenseFile>

src/QueryGenerator.cs

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
1-
using System.Collections.Generic;
2-
using System.Reflection;
1+
using System.Reflection;
32
using System.Text;
43
using DbSyncKit.DB.Helper;
5-
using DbSyncKit.DB.Interface;
4+
using DbSyncKit.Templates.Interface;
65
using DbSyncKit.Templates.MySql;
76
using Fluid;
87

@@ -81,7 +80,7 @@ public string GenerateComment(string comment)
8180
/// <param name="entity">The entity object.</param>
8281
/// <param name="keyColumns">The list of key columns for deletion.</param>
8382
/// <returns>The generated SQL delete query.</returns>
84-
public string GenerateDeleteQuery<T>(T entity, List<string> keyColumns) where T : IDataContract
83+
public string GenerateDeleteQuery<T>(T entity, List<string> keyColumns)
8584
{
8685

8786
string tableName = GetTableName<T>();
@@ -103,7 +102,7 @@ public string GenerateDeleteQuery<T>(T entity, List<string> keyColumns) where T
103102
/// <param name="keyColumns">The list of key columns for insertion.</param>
104103
/// <param name="excludedColumns">The list of columns to exclude from insertion.</param>
105104
/// <returns>The generated SQL insert query.</returns>
106-
public string GenerateInsertQuery<T>(T entity, List<string> keyColumns, List<string> excludedColumns) where T : IDataContract
105+
public string GenerateInsertQuery<T>(T entity, List<string> keyColumns, List<string> excludedColumns)
107106
{
108107
string tableName = GetTableName<T>();
109108
string schemaName = GetTableSchema<T>() ?? DEFAULT_SCHEMA_NAME;
@@ -137,7 +136,7 @@ public string GenerateInsertQuery<T>(T entity, List<string> keyColumns, List<str
137136
/// <param name="ListOfColumns">The list of columns to select.</param>
138137
/// <param name="schemaName">The schema name (if applicable).</param>
139138
/// <returns>The generated SQL select query.</returns>
140-
public string GenerateSelectQuery<T>(string tableName, List<string> ListOfColumns, string schemaName) where T : IDataContract
139+
public string GenerateSelectQuery<T>(string tableName, List<string> ListOfColumns, string schemaName)
141140
{
142141
if (string.IsNullOrEmpty(tableName) || ListOfColumns == null || ListOfColumns.Count == 0)
143142
{
@@ -166,7 +165,7 @@ public string GenerateSelectQuery<T>(string tableName, List<string> ListOfColumn
166165
/// <param name="excludedColumns">The list of columns to exclude from update.</param>
167166
/// <param name="editedProperties">The dictionary containing edited properties.</param>
168167
/// <returns>The generated SQL update query.</returns>
169-
public string GenerateUpdateQuery<T>(T DataContract, List<string> keyColumns, List<string> excludedColumns, (string propName, object propValue)[] editedProperties) where T : IDataContract
168+
public string GenerateUpdateQuery<T>(T DataContract, List<string> keyColumns, List<string> excludedColumns, (string propName, object propValue)[] editedProperties)
170169
{
171170
string tableName = GetTableName<T>();
172171

@@ -188,7 +187,7 @@ public string GenerateUpdateQuery<T>(T DataContract, List<string> keyColumns, Li
188187
/// <param name="entity">The entity object.</param>
189188
/// <param name="keyColumns">The list of key columns for the condition.</param>
190189
/// <returns>The generated SQL condition.</returns>
191-
public List<string> GetCondition<T>(T entity, List<string> keyColumns) where T : IDataContract
190+
public List<string> GetCondition<T>(T entity, List<string> keyColumns)
192191
{
193192
Type entityType = typeof(T);
194193
PropertyInfo[] keyProperties = GetKeyProperties<T>();

0 commit comments

Comments
 (0)