3+ results for 'lang:go db.SetMaxOpenConns(1) sqlite' (143 ms)
60 dialect = gorp.PostgresDialect{} 61 case "sqlite3": 62 db, err = sql.Open("sqlite3", u.Host) 66 if u.Host == ":memory:" { 67 // NOTE(ericchiang): sqlite3 coordinates concurrent clients through file locks. 68 // In memory databases do not support concurrent calls. Limit the number of 70 // 71 // See: https://www.sqlite.org/faq.html#q5 72 db.SetMaxOpenConns(1) 73 } 74 dialect = gorp.SqliteDialect{} 75 default: 99 100// NewMemDB creates a new in memory sqlite3 database. 101func NewMemDB() *gorp.DbMap {sqlite.go https://bitbucket.org/depechebot/pyjamabot.git | Go | 289 lines
1package sqlite 2 30 // slowing this model down cause of this bug: 31 // https://github.com/mattn/go-sqlite3/issues/274 32 m.db.SetMaxOpenConns(1)sql.go https://gitlab.com/kidaa/kythe | Go | 295 lines
35 36 _ "github.com/mattn/go-sqlite3" // register the "sqlite3" driver 37) 38 39// SQLite3 is the standard database/sql driver name for sqlite3. 40const SQLite3 = "sqlite3" 42func init() { 43 gsutil.Register(SQLite3, func(spec string) (graphstore.Service, error) { return Open(SQLite3, spec) }) 44} 141 } 142 db.SetMaxOpenConns(1) // TODO(schroederc): Without this, concurrent writers will get a "database 143 // is locked" error from sqlite3. Unfortunately, writing