aboutsummaryrefslogtreecommitdiffstats
path: root/internal/storage/adapter.go
diff options
context:
space:
mode:
Diffstat (limited to 'internal/storage/adapter.go')
-rw-r--r--internal/storage/adapter.go10
1 files changed, 10 insertions, 0 deletions
diff --git a/internal/storage/adapter.go b/internal/storage/adapter.go
new file mode 100644
index 0000000..ce01989
--- /dev/null
+++ b/internal/storage/adapter.go
@@ -0,0 +1,10 @@
+package storage
+
+import "github.com/eugenetriguba/bolt/internal/configloader"
+
+type DBAdapter interface {
+ ConvertGenericPlaceholders(query string, argsCount int) string
+ TableExists(executor sqlExecutor, tableName string) (bool, error)
+ DatabaseName(executor sqlExecutor) (string, error)
+ CreateDSN(cfg configloader.ConnectionConfig) string
+}