NumConns int
// Forces WAL, disables shared caching.
ConcurrentBlobReads bool
+ DontInitSchema bool
}
// There's some overlap here with NewPoolOpts, and I haven't decided what needs to be done. For now,
if err != nil {
return
}
+ if !opts.DontInitSchema {
+ conn := conns.Get(context.TODO())
+ defer conns.Put(conn)
+ err = initSchema(conn)
+ if err != nil {
+ return
+ }
+ }
return conns, ProviderOpts{
NumConns: opts.NumConns,
ConcurrentBlobRead: opts.ConcurrentBlobReads,
if err != nil {
return
}
- conn := pool.Get(context.TODO())
- defer pool.Put(conn)
- err = initSchema(conn)
- if err != nil {
- return
- }
writes := make(chan writeRequest)
prov := &provider{pool: pool, writes: writes, opts: opts}
runtime.SetFinalizer(prov, func(p *provider) {