From 447b83515ae498f46e9d959e7c07f733647fdf06 Mon Sep 17 00:00:00 2001
From: linwei <872216696@qq.com>
Date: Mon, 09 Feb 2026 10:00:24 +0800
Subject: [PATCH] init

---
 src/main/java/cn/net/communion/dbdatasync/dbhelper/Factory.java |   18 ++++++++++++++++++
 1 files changed, 18 insertions(+), 0 deletions(-)

diff --git a/src/main/java/cn/net/communion/dbdatasync/dbhelper/Factory.java b/src/main/java/cn/net/communion/dbdatasync/dbhelper/Factory.java
new file mode 100644
index 0000000..fbe95e7
--- /dev/null
+++ b/src/main/java/cn/net/communion/dbdatasync/dbhelper/Factory.java
@@ -0,0 +1,18 @@
+package cn.net.communion.dbdatasync.dbhelper;
+
+import cn.net.communion.dbdatasync.dbhelper.impl.MySql;
+import cn.net.communion.dbdatasync.dbhelper.impl.PostgreSql;
+import cn.net.communion.dbdatasync.dbhelper.impl.SqlServer;
+
+public class Factory {
+    public static DbHelper create(String dbType) {
+        switch (dbType.toLowerCase()) {
+            case "mysql":
+                return new MySql();
+            case "postgresql":
+                return new PostgreSql();
+            default:
+                throw new IllegalArgumentException("Unsupported database type: " + dbType);
+        }
+    }
+}

--
Gitblit v1.9.3