MCPcopy Create free account
hub / github.com/cairoeth/preconfirmations / NewPostgresStore

Function NewPostgresStore

rpc/database/postgres_store.go:19–27  ·  view source on GitHub ↗
(dsn string)

Source from the content-addressed store, hash-verified

17}
18
19func NewPostgresStore(dsn string) *postgresStore {
20 db := sqlx.MustConnect("postgres", dsn)
21 db.DB.SetMaxOpenConns(50)
22 db.DB.SetMaxIdleConns(10)
23 db.DB.SetConnMaxIdleTime(0)
24 return &postgresStore{
25 DB: db,
26 }
27}
28
29func (d *postgresStore) Close() {
30 d.DB.Close()

Callers 1

mainFunction · 0.92

Calls

no outgoing calls

Tested by

no test coverage detected