Functions23 public, 2 private

publicvoidcreateDatabase
requiredstringdatasource
requiredstringdatabase
stringcharacterSetUTF-8
stringcollationGENERAL
Clones the specified table.
publicvoidcloneTable
requiredstringdatasource
requiredstringtableSrc
requiredstringtableDst
publicvoidcopyTable
requiredstring, struct{ host: string, user: string, password: string }datasource
requiredstring, string[]tableSrc
requiredstring, string[]tableDst
publicvoiddeleteDatabase
requiredstringdatasource
requiredstringdatabase
Drop the specified table(s) using the provided datasource. Returns if the statement was executed.
publicbooleandeleteTable
requiredstringdatasource
requiredstring, string[]table
Hashes the structure of each table in the specified database.
publicstringgetDatabaseHash
requiredstringdatasource
requiredstringdatabase
structOPTIONS{}
optionregular expressionfilters.ignore
Generates SQL statements for the provided query result.
publicarraysqlBuildStatementsFromQueryResult
requiredqueryqueryResult
requiredstringdatabase
requiredstringtable
structOPTIONS{}
optionin bytes, here: 500 KBsplitStatementSize524288
how to insert new records
option"INSERT", "INSERT IGNORE", "REPLACE"modeINSERT
Escapes the provided string for usage within SQL queries. WARNING: Use this function to escape trusted input only.
publicstringsqlEscape
requiredstringvalue
structreplace{}
Escapes the provided string for usage within SQL queries. WARNING: Use this function to escape trusted input only.
publicstringsqlEscapeQueryParam
requiredstringvalue
structreplace{}
Executes the provided SQL statements using the native MySQL driver. Returns the executed statement or the location of the output file.
publicarraysqlExecuteStatement
Credentials or connection string.
requiredanycredentials
Statement(s) to execute.
requiredstring, string[]statement
structOPTIONS{}
optionbooleanautoCommittrue
merge multiple statements to a single statement
optionbooleanmergeStatementstrue
write executed statement to the specified file
optionstringoutputFile
Returns the statement of the provided query result.
publicstringsqlStatementFromQueryResult
requiredanyresult
Returns all tables found in the specified database.
publicarraygetTablesFromDatabase
requiredstringdatasource
requiredstringdatabase
structOPTIONS{}
optionstringfilter
optionnumericlimit0
Hashes the structure the specified table.
publicstringgetTableHash
requiredstringdatasource
requiredstringtable
publicstructgetTableInfo
requiredstringdatasource
requiredstringdatabase
requiredstringtable
publicanynormalizeColumn
requiredstring, string[]column
publicanynormalizeDatabase
requiredstring, string[]database
publicanynormalizeTable
requiredstring, string[]table
Replaces all special characters evaluated in the MySQL MATCH AGAINST (BOOLEAN MODE) expression.
publicstringprepareMatchAgainst
requiredstringexpression
structOPTIONS{}
optionstringreplaceString
characters that will not be excluded
optionstringexclude
publicstructprepareSearchExpression
requiredstringterm
numericminWordLength1
Returns if the provided table exists.
publicbooleantableExists
requiredstringdatasource
requiredstringtable
Converts the provided operator to the corresponding representation in SQL.
publicstringtoSqlOperator
requiredstringoperator
Truncates all tables in the specified database(s) using the provided datasource. Returns if the statement was executed.
publicbooleantruncateDatabase
requiredstringdatasource
requiredstring, string[]database
Truncates the specified table(s) using the provided datasource. Returns if the statement was executed.
publicbooleantruncateTable
requiredstringdatasource
requiredstring, string[]table