Documentation
¶
Index ¶
- func CreateDatabase(db *sqlx.DB, dbName string) error
- func CreateOracleUser(db *sqlx.DB, userName string, password string) error
- func DropDatabase(db *sqlx.DB, dbName string) (err error)
- func DropOracleUser(db *sqlx.DB, userName string) (err error)
- func FormatIdentifier(identifier string, driverName string) string
- func KillConnections(db *sqlx.DB, dbName string) (err error)
- func PrepareArrayArgs(keyValues map[string]any, driverName string) (fieldNames string, fieldValues string, fieldArgs []any)
- func ValidateDatabaseName(dbName string) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateOracleUser ¶
CreateOracleUser provisions an Oracle schema USER — Oracle's equivalent of "create database": one schema == one user inside the shared service/PDB, so there is no CREATE DATABASE. The name is emitted UNQUOTED and Oracle folds it to UPPERCASE, matching the quoted-UPPERCASE identifiers models.CreateDDL emits. Grants cover the object types the model DDL creates, plus quota. Requires an admin connection (e.g. SYSTEM) on the same service.
func DropOracleUser ¶
DropOracleUser drops an Oracle schema user and every object it owns (the Oracle equivalent of DROP DATABASE). Sessions held by the user are killed first — DROP USER fails with ORA-01940 while the user is connected.
func FormatIdentifier ¶
func PrepareArrayArgs ¶
func ValidateDatabaseName ¶
ValidateDatabaseName reports whether a name may be embedded in the provisioning statements in this file. Callers that build their own DDL from a configured name should use it too.
Types ¶
This section is empty.