Documentation ¶
Index ¶
- Variables
- func GetCouchdbConnection(ctx context.Context, url string) (*couchdbAdapter, error)
- func GetMongoConnection(ctx context.Context, url string) (*mongoAdapter, error)
- func GetMssqlConnection(ctx context.Context, url string) (*mssqlAdapter, error)
- func GetMysqlConnection(ctx context.Context, dsn string) (*mysqlAdapter, error)
- func GetPostgresConnection(ctx context.Context, url string) (*postgresAdapter, error)
- func IsValidIdentifier(txt string) error
- func QuoteLiteral(txt string) string
- type DatabaseAdapter
Constants ¶
This section is empty.
Variables ¶
View Source
var IdentifierRegex = regexp.MustCompile(`^[a-zA-Z0-9]+?[a-zA-Z0-9_-]*?$`)
Functions ¶
func GetCouchdbConnection ¶
func GetMongoConnection ¶
func GetMssqlConnection ¶
func GetMysqlConnection ¶
func GetPostgresConnection ¶
func IsValidIdentifier ¶
func QuoteLiteral ¶
Types ¶
type DatabaseAdapter ¶
type DatabaseAdapter interface { HasDatabase(ctx context.Context, database string) (bool, error) CreateDatabase(ctx context.Context, database string) error DeleteDatabase(ctx context.Context, database string) error HasDatabaseUserWithAccess(ctx context.Context, database string, username string) (bool, error) CreateDatabaseUser(ctx context.Context, database string, username string, password string) error DeleteDatabaseUser(ctx context.Context, database string, username string) error Close(ctx context.Context) error }
Click to show internal directories.
Click to hide internal directories.