feat: PostgreSQL driver support
This commit is contained in:
1 parent
eb9bfabed5
commit
dc5d12348c
24 files changed
+1585
-75
No files matched your search
@@ -16,12 +16,13 @@ type DumpBackup struct {
|
||||
open func() (DumpSource, error)
|
||||
directory string
|
||||
now func() time.Time
|
||||
dialect dumpDialect
|
||||
}
|
||||
|
||||
var _ domain.DatabaseBackup = &DumpBackup{}
|
||||
|
||||
func NewDumpBackup(open func() (DumpSource, error), directory string, now func() time.Time) *DumpBackup {
|
||||
return &DumpBackup{open: open, directory: directory, now: now}
|
||||
return &DumpBackup{open: open, directory: directory, now: now, dialect: mysqlDumpDialect}
|
||||
}
|
||||
|
||||
func (b *DumpBackup) Backup() (string, error) {
|
||||
@@ -63,7 +64,7 @@ func (b *DumpBackup) writePartial(partial string) error {
|
||||
return err
|
||||
}
|
||||
buffered := bufio.NewWriter(file)
|
||||
if err := WriteDump(buffered, source); err != nil {
|
||||
if err := writeDump(buffered, source, b.dialect); err != nil {
|
||||
_ = file.Close()
|
||||
return err
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user