function
Open
Open the PostgreSQL store with bounded default pool settings.
Example
backend, err := postgres.Open(ctx, os.Getenv("DATABASE_URL"))
if err != nil {
return err
}
defer backend.Close()Arguments
| Argument | Type | Description |
|---|---|---|
ctx | context.Context | Connection context. |
databaseURL | string | PostgreSQL connection URL. |
Returns
The store or a configuration/connection error.
(*Store, error)Full signature
Related types
StoreA PostgreSQL implementation of Ridu’s document, snapshot, auth, preference, task, job, lock, upload-reference, and migration store contracts.