Functions23 public, 2 private
public | void | createDatabase | |
required | string | datasource | |
required | string | database | |
string | characterSet | UTF-8 | |
string | collation | GENERAL | |
Clones the specified table. | |||
public | void | cloneTable | |
required | string | datasource | |
required | string | tableSrc | |
required | string | tableDst | |
public | void | copyTable | |
required | string, struct{ host: string, user: string, password: string } | datasource | |
required | string, string[] | tableSrc | |
required | string, string[] | tableDst | |
public | void | deleteDatabase | |
required | string | datasource | |
required | string | database | |
Drop the specified table(s) using the provided datasource. Returns if the statement was executed. | |||
public | boolean | deleteTable | |
required | string | datasource | |
required | string, string[] | table | |
Hashes the structure of each table in the specified database. | |||
public | string | getDatabaseHash | |
required | string | datasource | |
required | string | database | |
struct | OPTIONS | {} | |
option | regular expression | filters.ignore | |
Generates SQL statements for the provided query result. | |||
public | array | sqlBuildStatementsFromQueryResult | |
required | query | queryResult | |
required | string | database | |
required | string | table | |
struct | OPTIONS | {} | |
option | in bytes, here: 500 KB | splitStatementSize | 524288 |
how to insert new records | |||
option | "INSERT", "INSERT IGNORE", "REPLACE" | mode | INSERT |
Escapes the provided string for usage within SQL queries. WARNING: Use this function to escape trusted input only. | |||
public | string | sqlEscape | |
required | string | value | |
struct | replace | {} | |
Escapes the provided string for usage within SQL queries. WARNING: Use this function to escape trusted input only. | |||
public | string | sqlEscapeQueryParam | |
required | string | value | |
struct | replace | {} | |
Executes the provided SQL statements using the native MySQL driver. Returns the executed statement or the location of the output file. | |||
public | array | sqlExecuteStatement | |
Credentials or connection string. | |||
required | any | credentials | |
Statement(s) to execute. | |||
required | string, string[] | statement | |
struct | OPTIONS | {} | |
option | boolean | autoCommit | true |
merge multiple statements to a single statement | |||
option | boolean | mergeStatements | true |
write executed statement to the specified file | |||
option | string | outputFile | |
Returns the statement of the provided query result. | |||
public | string | sqlStatementFromQueryResult | |
required | any | result | |
Returns all tables found in the specified database. | |||
public | array | getTablesFromDatabase | |
required | string | datasource | |
required | string | database | |
struct | OPTIONS | {} | |
option | string | filter | |
option | numeric | limit | 0 |
Hashes the structure the specified table. | |||
public | string | getTableHash | |
required | string | datasource | |
required | string | table | |
public | struct | getTableInfo | |
required | string | datasource | |
required | string | database | |
required | string | table | |
public | any | normalizeColumn | |
required | string, string[] | column | |
public | any | normalizeDatabase | |
required | string, string[] | database | |
public | any | normalizeTable | |
required | string, string[] | table | |
Replaces all special characters evaluated in the MySQL MATCH AGAINST (BOOLEAN MODE) expression. | |||
public | string | prepareMatchAgainst | |
required | string | expression | |
struct | OPTIONS | {} | |
option | string | replaceString | |
characters that will not be excluded | |||
option | string | exclude | |
public | struct | prepareSearchExpression | |
required | string | term | |
numeric | minWordLength | 1 | |
Returns if the provided table exists. | |||
public | boolean | tableExists | |
required | string | datasource | |
required | string | table | |
Converts the provided operator to the corresponding representation in SQL. | |||
public | string | toSqlOperator | |
required | string | operator | |
Truncates all tables in the specified database(s) using the provided datasource. Returns if the statement was executed. | |||
public | boolean | truncateDatabase | |
required | string | datasource | |
required | string, string[] | database | |
Truncates the specified table(s) using the provided datasource. Returns if the statement was executed. | |||
public | boolean | truncateTable | |
required | string | datasource | |
required | string, string[] | table |