Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions cmd/gbase8s-ipc-driver/main.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
package main

import (
"fmt"
"os"

"navop-db-ipc-drivers/internal/drivers/gbase8s"
"navop-db-ipc-drivers/internal/runner"
)

func main() {
if err := runner.Run(gbase8s.Spec()); err != nil {
fmt.Fprintln(os.Stderr, err)
os.Exit(1)
}
}
24 changes: 24 additions & 0 deletions internal/drivers/gbase8s/export.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
package gbase8s

// buildPumpArgs assembles mysqlpump arguments that match the official GBase 8s
// dump utility so exported structures carry comments and use the expected
// time literals.
func buildPumpArgs(host, port, user, password, database, schema string) []string {
args := []string{
"--set-charset",
"--routines",
"--events",
"--databases", database,
}
// Preserve table/column comments and avoid rewriting timestamps into
// numeric literals, which the official tool keeps as quoted strings.
args = append(args,
"--skip-optimize-timezone",
"--comments",
"--add-drop-table",
)
if schema != "" {
args = append(args, "--tables", schema)
}
return args
}