nalgeon / redka

Redis re-implemented with SQLite
BSD 3-Clause "New" or "Revised" License
3.53k stars 101 forks source link

feat: read-only mode (#30) #31

Closed nalgeon closed 4 months ago

nalgeon commented 4 months ago

Functions to open the database in read-only mode to work with read replicas:

// OpenRead opens an existing database at the given path in read-only mode.
func OpenRead(path string, opts *Options) (*DB, error)

// OpenReadDB connects to an existing SQL database in read-only mode.
func OpenReadDB(db *sql.DB, opts *Options) (*DB, error)