Skip to content

Instantly share code, notes, and snippets.

@wrouesnel
Created April 17, 2025 11:26
Show Gist options
  • Save wrouesnel/b9e7403eeb4f112f11d8f91e4a647903 to your computer and use it in GitHub Desktop.
Save wrouesnel/b9e7403eeb4f112f11d8f91e4a647903 to your computer and use it in GitHub Desktop.
Open a sqlitedb using the pure Golang modernc recompilation in readonly mode
db, err := sqlx.Open("sqlite", fmt.Sprintf("file:%s?mode=ro", tempDb.Name()))
if err != nil {
return errors.Join(&ErrCommand{}, err)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment