Documentation ¶
Index ¶
- Variables
- func ApplyPgAppName(dbUrl string) string
- func DefaultDbUrl() string
- func GetDefaultDbName() string
- func MigrateUp(ctx context.Context, migrateVia interface{}, migrationsFS fs.FS) error
- func MigrateUpEnt(ctx context.Context, clientSchema ent.EntClientSchema) error
- func Open(driverName, dialectName, dsn string) (db *sql.DB, err error)
- func OpenDefault() (db *sql.DB, driverName, dialectName string, err error)
- func OpenSqlForEnt() (*entsql.Driver, error)
- func ParseDefault() (driverName, dialectName, dsn string, err error)
- func PostgreSQLDSN(suffix string) string
- func SQLiteDSN(filename string, fileScheme, memory bool) string
- func SetDefaultDbName(name string)
- func TryCreateDB(ctx context.Context, driverName, dialect, dsn, createVia string) error
- func Up(ctx context.Context, migrateVia interface{}, migrator *migrate.Migrator) error
- func WaitForDB(ctx context.Context) error
- type SQLError
Constants ¶
This section is empty.
Variables ¶
View Source
var ( PostgresDialect = "postgres" SqliteDialect = "sqlite3" )
Functions ¶
func ApplyPgAppName ¶ added in v0.3.35
func DefaultDbUrl ¶
func DefaultDbUrl() string
func GetDefaultDbName ¶
func GetDefaultDbName() string
func MigrateUpEnt ¶
func MigrateUpEnt( ctx context.Context, clientSchema ent.EntClientSchema, ) error
func OpenSqlForEnt ¶
func ParseDefault ¶
func PostgreSQLDSN ¶
func SetDefaultDbName ¶
func SetDefaultDbName(name string)
func TryCreateDB ¶
Types ¶
Click to show internal directories.
Click to hide internal directories.