feat: Add MySQL ent-based storage driver
Signed-off-by: m.nabokikh <maksim.nabokikh@flant.com>
This commit is contained in:
@@ -33,12 +33,10 @@ func (s *SQLite3) Open(logger log.Logger) (storage.Storage, error) {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
// always allow only one connection to sqlite3, any other thread/go-routine
|
||||
// attempting concurrent access will have to wait
|
||||
pool := drv.DB()
|
||||
if s.File == ":memory:" {
|
||||
// sqlite3 uses file locks to coordinate concurrent access. In memory
|
||||
// doesn't support this, so limit the number of connections to 1.
|
||||
pool.SetMaxOpenConns(1)
|
||||
}
|
||||
pool.SetMaxOpenConns(1)
|
||||
|
||||
databaseClient := client.NewDatabase(
|
||||
client.WithClient(db.NewClient(db.Driver(drv))),
|
||||
|
||||
Reference in New Issue
Block a user