chore: remove unused flags for sqlite (#997)

pull/998/head
boojack 2 years ago committed by GitHub
parent 1bdb0d465c
commit 4a7b764ab3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -45,7 +45,7 @@ func run() error {
println(greetingBanner)
fmt.Printf("Version %s has started at :%d\n", profile.Version, profile.Port)
return serverInstance.Run(ctx)
return serverInstance.Start(ctx)
}
func main() {

@ -117,7 +117,7 @@ func NewServer(ctx context.Context, profile *profile.Profile) (*Server, error) {
return s, nil
}
func (s *Server) Run(ctx context.Context) error {
func (s *Server) Start(ctx context.Context) error {
if err := s.createServerStartActivity(ctx); err != nil {
return errors.Wrap(err, "failed to create activity")
}

@ -43,7 +43,7 @@ func (db *DB) Open(ctx context.Context) (err error) {
}
// Connect to the database without foreign_key.
sqliteDB, err := sql.Open("sqlite3", db.profile.DSN+"?cache=shared&_foreign_keys=0&_journal_mode=WAL")
sqliteDB, err := sql.Open("sqlite3", db.profile.DSN+"?_foreign_keys=0")
if err != nil {
return fmt.Errorf("failed to open db with dsn: %s, err: %w", db.profile.DSN, err)
}

Loading…
Cancel
Save