Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Duration ¶
Duration wrapper
func (*Duration) UnmarshalText ¶
UnmarshalText implement time.ParseDuration function for Duration
type Generator ¶
type Generator interface { // ReloadSchema function read raw scheme // For each record // record[0] dbname // record[1] table name // record[2] table type // record[3] column name // record[4] column type ReloadSchema([][5]string) error // SetDB set operation database // the generated SQLs after this will be under this database SetDB(db string) // SetStable is a trigger for whether generate random or some database-basicinfo-dependent data // eg. SetStable(true) will disable both rand() and user() functions since they both make unstable result in different database SetStable(stable bool) // SetHint can control if hints would be generated or not SetHint(hint bool) // SelectStmt generate select SQL SelectStmt() string // InsertStmt generate insert SQL InsertStmt() string // UpdateStmt generate update SQL UpdateStmt() string // CreateTableStmt generate create table SQL CreateTableStmt() string }
Generator interface to unify the usage of sqlsmith and sqlspider
type SQL ¶
type SQL struct { SQLType SQLType SQLStmt string SQLTable string // ExecTime is for avoid lock watched interference before time out // useful for sleep statement ExecTime int }
SQL struct
type SQLType ¶
type SQLType int
SQLType enums for SQL types
const ( SQLTypeUnknown SQLType = iota SQLTypeReloadSchema SQLTypeDMLSelect SQLTypeDMLSelectForUpdate SQLTypeDMLUpdate SQLTypeDMLInsert SQLTypeDMLDelete SQLTypeDDLCreateTable SQLTypeDDLAlterTable SQLTypeDDLCreateIndex SQLTypeTxnBegin SQLTypeTxnCommit SQLTypeTxnRollback SQLTypeExec SQLTypeExit SQLTypeSleep SQLTypeCreateDatabase SQLTypeDropDatabase )
SQLTypeDMLSelect
Click to show internal directories.
Click to hide internal directories.