Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateRandomTestingSchemaName ¶
CreateRandomTestingSchemaName creates a random schema name string.
func NeedsRetry ¶
NeedsRetry checks if the error code means a retry is needed, borrowed from code in crdb.
func OpenUnique ¶
func OpenUnique(ctx context.Context, connStr string, schemaPrefix string) (db *dbutil.TempDatabase, err error)
OpenUnique opens a temporary unique CockroachDB database that will be cleaned up when closed. It is expected that this should normally be used by way of "storj.io/storj/shared/dbutil/tempdb".OpenUnique() instead of calling it directly.
Types ¶
type Driver ¶
type Driver struct {
// contains filtered or unexported fields
}
Driver is the type for the "cockroach" sql/database driver. It uses github.com/jackc/pgx/v5/stdlib under the covers because of Cockroach's PostgreSQL compatibility, but allows differentiation between pg and crdb connections.
Click to show internal directories.
Click to hide internal directories.