Documentation ¶
Index ¶
- Constants
- func AddSQLFlags(fs *flag.FlagSet, driver, source, sourceAdmin, dbName *string)
- func CleanupSQLDatastore(t TLogger, driver, source string)
- func CreateSQLDatabase(driver, sourceAdmin, source, dbName string) error
- func DeleteSQLDatabase(driver, sourceAdmin, dbName string) error
- func MustExecuteSQL(t TLogger, db *sql.DB, query string, args ...interface{}) sql.Result
- func ProcessSQLFlags(fs *flag.FlagSet, defaults map[string][]string) error
- func StackFatalf(t TLogger, f string, args ...interface{})
- type TLogger
Constants ¶
View Source
const ( DriverMySQL = "mysql" DriverPostgres = "postgres" )
Driver names.
Variables ¶
This section is empty.
Functions ¶
func AddSQLFlags ¶ added in v0.7.0
AddSQLFlags adds some SQL options to the given flag set.
func CleanupSQLDatastore ¶ added in v0.7.0
CleanupSQLDatastore empties the tables from the NATS Streaming database.
func CreateSQLDatabase ¶ added in v0.7.0
CreateSQLDatabase initializes a SQL Database for NATS Streaming testing.
func DeleteSQLDatabase ¶ added in v0.7.0
DeleteSQLDatabase drops the given database.
func MustExecuteSQL ¶ added in v0.7.0
MustExecuteSQL excutes the given SQL query and is not expecting an error. If it does, it calls t.Fatalf().
func ProcessSQLFlags ¶ added in v0.7.0
ProcessSQLFlags allows to just specify the driver on the command line and use corresponding driver defaults, while still allowing full customization of each param.
func StackFatalf ¶ added in v0.7.0
StackFatalf produces a stack trace and passes it to t.Fatalf()
Types ¶
Click to show internal directories.
Click to hide internal directories.