Skip to content

Commit 85d79f3

Browse files
committed
Added PostgreSQL
1 parent a923c0c commit 85d79f3

2 files changed

Lines changed: 5 additions & 2 deletions

File tree

Factory/QueryGeneratorFactory.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,9 @@ public static IQueryGenerator GetQueryGenerator(DatabaseProvider provider)
3333
case DatabaseProvider.MySQL:
3434
namespacePrefix = "DbSyncKit.MySQL";
3535
break;
36+
case DatabaseProvider.PostgreSQL:
37+
namespacePrefix = "DbSyncKit.PostgreSQL";
38+
break;
3639
// Add cases for other providers as needed
3740
default:
3841
throw new ArgumentException("Unsupported database provider", nameof(provider));

Manager/CacheManager.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,7 @@ public static string GetTableName(Type type)
178178
/// </summary>
179179
/// <param name="type">The type for which to retrieve the table schema.</param>
180180
/// <returns>The schema of the database table associated with the specified type.</returns>
181-
public static string GetTableSchema(Type type)
181+
public static string? GetTableSchema(Type type)
182182
{
183183
var typeCaches = GetOrCreateDictionary(type);
184184

@@ -192,7 +192,7 @@ public static string GetTableSchema(Type type)
192192
if (tableSchemaAttribute != null)
193193
TableSchema = tableSchemaAttribute.SchemaName;
194194
else
195-
TableSchema = string.Empty;
195+
TableSchema = null;
196196

197197
typeCaches.Add(nameof(CachePropertyType.TableSchema), TableSchema);
198198

0 commit comments

Comments
 (0)