Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/PingCAP-QE/go-sqlsmith
/ functions
Functions
215 in github.com/PingCAP-QE/go-sqlsmith
⨍
Functions
215
◇
Types & classes
17
↓ 38 callers
Function
Rd
Rd same to rand.Intn
util/rand.go:25
↓ 16 callers
Method
SetDB
SetDB set current database
sqlsmith.go:60
↓ 15 callers
Function
RdRange
RdRange rand int in range
util/rand.go:30
↓ 14 callers
Method
LoadSchema
LoadSchema init schemas, tables and columns record[0] dbname record[1] table name record[2] table type record[3] column name record[4] column type
schema.go:31
↓ 14 callers
Method
MustExec
(query string, args ...interface{})
tests/connect.go:24
↓ 13 callers
Function
new
()
sqlsmith.go:47
↓ 9 callers
Function
GenerateDataItem
GenerateDataItem rand data interface with given type
util/generate_data_item.go:69
↓ 9 callers
Method
Walk
Walk will walk the tree and fillin tables and columns data
sqlsmith.go:100
↓ 9 callers
Function
log
(l string, args ...interface{})
tests/main.go:24
↓ 9 callers
Method
walkExprNode
(node ast.ExprNode, table *types.Table, column *types.Column)
stateflow/walker.go:207
↓ 8 callers
Function
logError
(l string, args ...interface{})
tests/main.go:28
↓ 8 callers
Method
rd
(n int)
rand.go:21
↓ 6 callers
Method
InsertStmt
InsertStmt implement insert statement from AST
dml_sql.go:45
↓ 6 callers
Function
ifDaylightTime
(t time.Time)
util/generate_data_item.go:137
↓ 5 callers
Method
GetDB
GetDB get current database without nil
sqlsmith.go:70
↓ 5 callers
Method
Next
Next returns data batch
data_generator.go:44
↓ 5 callers
Method
RandColumn
RandColumn rand column from table
types/table.go:85
↓ 5 callers
Function
TimeMustParse
TimeMustParse wrap time.Parse and panic when error
util/util.go:36
↓ 5 callers
Method
walkTableName
(node *ast.TableName, fn bool, online bool)
stateflow/walker.go:165
↓ 4 callers
Method
AddToInnerTables
AddToInnerTables Do NOT set InnerTableList directly
types/table.go:120
↓ 4 callers
Method
Clone
Clone copy table struct
types/table.go:66
↓ 4 callers
Method
CreateTableStmt
CreateTableStmt create table
ddl_sql.go:17
↓ 4 callers
Method
DeleteStmt
DeleteStmt implement delete statement from AST
dml_sql.go:51
↓ 4 callers
Method
Exec
(query string, args ...interface{})
cmd/executor.go:17
↓ 4 callers
Function
New
New create SQLSmith instance
sqlsmith.go:43
↓ 4 callers
Function
RdDate
RdDate rand date
util/rand.go:46
↓ 4 callers
Function
RdStringChar
RdStringChar rand string with given length, letter chars only
util/rand.go:82
↓ 4 callers
Method
SelectStmt
SelectStmt make random select statement SQL
dml_sql.go:27
↓ 4 callers
Method
UpdateStmt
UpdateStmt make random update statement SQL
dml_sql.go:39
↓ 4 callers
Method
binaryOperationExpr
(depth, complex int)
dml_ast.go:164
↓ 4 callers
Method
selectStmt
(depth int)
dml_ast.go:23
↓ 3 callers
Method
AlterTableStmt
AlterTableStmt alter table
ddl_sql.go:24
↓ 3 callers
Function
GenerateStringItem
GenerateStringItem generate string item
util/generate_data_item.go:87
↓ 3 callers
Function
GenerateTimestampItem
GenerateTimestampItem generate timestamp item
util/generate_data_item.go:111
↓ 3 callers
Method
GetColumns
GetColumns get ordered columns
types/table.go:102
↓ 3 callers
Method
MustExec
(query string, args ...interface{})
cmd/connect.go:77
↓ 3 callers
Function
RdFloat64
RdFloat64 rand float64
util/rand.go:41
↓ 3 callers
Method
SelectForUpdateStmt
SelectForUpdateStmt make random select statement SQL with for update lock
dml_sql.go:33
↓ 3 callers
Method
getSubTableName
()
stateflow/util.go:21
↓ 3 callers
Function
log
(l string, args ...interface{})
cmd/main.go:29
↓ 3 callers
Function
logError
(l string, args ...interface{})
cmd/main.go:33
↓ 3 callers
Method
randColumns
(table *types.Table)
stateflow/schema.go:124
↓ 3 callers
Method
randTable
(newName bool, fn bool, online bool)
stateflow/schema.go:76
↓ 3 callers
Method
tableHintsExpr
()
dml_ast.go:109
↓ 3 callers
Method
walkHintList
(hintLength int, table *types.Table)
stateflow/walker.go:223
↓ 3 callers
Method
walkResultSetNode
(node ast.ResultSetNode)
stateflow/walker.go:147
↓ 3 callers
Method
walkSelectStmt
(node *ast.SelectStmt)
stateflow/walker.go:64
↓ 3 callers
Method
walkSubqueryExpr
(node *ast.SubqueryExpr)
stateflow/walker.go:405
↓ 2 callers
Method
AddOption
AddOption add option for column
types/column.go:49
↓ 2 callers
Method
BatchData
BatchData generate testing data by schema in given batch return SQLs with insert statement
data_gen.go:27
↓ 2 callers
Function
BufferOut
BufferOut parser ast node to SQL string
util/util.go:26
↓ 2 callers
Method
CreateIndexStmt
CreateIndexStmt create index
ddl_sql.go:33
↓ 2 callers
Function
GenerateFloatItem
GenerateFloatItem generate float item
util/generate_data_item.go:97
↓ 2 callers
Function
GenerateFuncCallExpr
GenerateFuncCallExpr generate random builtin chain
builtin/function.go:24
↓ 2 callers
Function
GenerateIntItem
GenerateIntItem generate int item
util/generate_data_item.go:92
↓ 2 callers
Method
GetCurrDBName
GetCurrDBName returns current selected dbname
sqlsmith.go:65
↓ 2 callers
Function
MinInt
MinInt ...
util/util.go:45
↓ 2 callers
Function
RdTimestamp
RdTimestamp return same format as RdDate except rand range TIMESTAMP has a range of '1970-01-01 00:00:01' UTC to '2038-01-19 03:14:07'
util/rand.go:57
↓ 2 callers
Method
ReConnect
(dsn string)
cmd/connect.go:58
↓ 2 callers
Method
ReConnect
(dsn string)
tests/connect.go:32
↓ 2 callers
Method
ReloadSchema
()
cmd/connect.go:85
↓ 2 callers
Method
exprNode
(cons bool)
dml_ast.go:238
↓ 2 callers
Method
freeOnlineOtherTables
freeOnlineOtherTables clear online tables obtain by other instances
schema.go:117
↓ 2 callers
Method
generateStringItem
()
data_gen.go:105
↓ 2 callers
Method
makeColumnOptions
(column *types.Column, options []ast.ColumnOptionType)
stateflow/walker_ddl.go:111
↓ 2 callers
Method
makeConstraintPrimaryKey
makeConstraintPromaryKey is for convenience
stateflow/walker_ddl.go:132
↓ 2 callers
Method
makeFieldType
(t string, l int)
stateflow/walker_ddl.go:105
↓ 2 callers
Function
makeSQL
(table *types.Table, columns []*types.Column, lines [][]string)
data_gen.go:68
↓ 2 callers
Method
randNewColumn
TIMESTAMP with CURRENT_TIMESTAMP in ALTER TABLE will make difference by design in binlog test
stateflow/schema.go:236
↓ 2 callers
Method
rdFloat64
()
rand.go:32
↓ 2 callers
Method
setOnlineOtherTables
setOnlineOtherTables is for avoiding online DDL
schema.go:104
↓ 2 callers
Method
subqueryExpr
()
dml_ast.go:231
↓ 2 callers
Method
tableRefsClause
(depth int)
dml_ast.go:132
↓ 2 callers
Method
walkSelectStmtColumns
(node *ast.SelectStmt, table *types.Table, join bool)
stateflow/walker.go:172
↓ 2 callers
Method
walkValueExpr
(node *driver.ValueExpr, table *types.Table, column *types.Column)
stateflow/walker.go:248
↓ 1 callers
Method
Begin
()
cmd/executor.go:20
↓ 1 callers
Method
Commit
()
cmd/executor.go:34
↓ 1 callers
Method
Exec
Exec runs query and return result TODO: read result rows
cmd/connect.go:108
↓ 1 callers
Method
FetchColumns
FetchColumns get columns for given table
cmd/connect.go:156
↓ 1 callers
Method
FetchIndexes
FetchIndexes get indexes for given table
cmd/connect.go:174
↓ 1 callers
Method
FetchSchema
(db string)
cmd/connect.go:116
↓ 1 callers
Method
GenData
GenData returns data generator
data_generator.go:27
↓ 1 callers
Function
GenerateDataItemString
GenerateDataItemString rand data with given type
util/generate_data_item.go:51
↓ 1 callers
Function
GenerateDateItem
GenerateDateItem generate date item
util/generate_data_item.go:102
↓ 1 callers
Function
GenerateHintExpr
GenerateHintExpr ...
builtin/hint.go:86
↓ 1 callers
Function
GenerateRandDataItem
GenerateRandDataItem rand data item with rand type
util/generate_data_item.go:32
↓ 1 callers
Function
GenerateTiDBDateItem
GenerateTiDBDateItem generate date item
util/generate_data_item.go:129
↓ 1 callers
Function
GenerateTimestampFuncCallExpr
GenerateTimestampFuncCallExpr generate builtin func which will return date type
builtin/genetate.go:34
↓ 1 callers
Method
GetExec
()
cmd/executor.go:58
↓ 1 callers
Method
GetField
(field string)
cmd/config.go:76
↓ 1 callers
Function
GetUUID
GetUUID return uuid
util/generate_data_item.go:27
↓ 1 callers
Method
HasOption
HasOption return is has the given option
types/column.go:59
↓ 1 callers
Method
Hint
Hint ...
sqlsmith.go:90
↓ 1 callers
Method
Init
(dsn string)
cmd/connect.go:68
↓ 1 callers
Method
Init
(dsn string)
tests/connect.go:42
↓ 1 callers
Method
InitSmithRates
()
cmd/connect.go:345
↓ 1 callers
Method
InitTables
()
cmd/connect.go:228
↓ 1 callers
Method
Load
(path string)
cmd/config.go:71
↓ 1 callers
Function
New
New Create StateFlow
stateflow/stateflow.go:33
↓ 1 callers
Function
NewConnect
(dsn string, dbname string, config *SQLSmithConfig)
cmd/connect.go:35
next →
1–100 of 215, ranked by callers