MySqlTable extension

Extension for MTable that provides MySQL-specific database operations.

This extension adds functionality for table management, data manipulation, and form validation specifically for MySQL databases. It includes methods for creating, dropping, and querying tables, as well as handling foreign key constraints and form validation.

on

Methods

createForeignKeys(MySQLConnection conn) Future<MySqlResult?>

Available on MTable, provided by the MySqlTable extension

Creates foreign key constraints for the table.
createTable(MySQLConnection conn) Future<MySqlResult>

Available on MTable, provided by the MySqlTable extension

Creates the table in the MySQL database.
delete(MySQLConnection conn, Sqler query) Future<MySqlResult>

Available on MTable, provided by the MySqlTable extension

Executes a DELETE query on the table.
dropTable(MySQLConnection conn) Future<MySqlResult>

Available on MTable, provided by the MySqlTable extension

Drops the table from the MySQL database.
execute(MySQLConnection conn, String sql) Future<MySqlResult>

Available on MTable, provided by the MySqlTable extension

Executes a SQL query against the MySQL database connection.
existsTable(MySQLConnection conn) Future<bool>

Available on MTable, provided by the MySqlTable extension

Checks if the table exists in the MySQL database.
formValidateUI(Map<String, Object?> data) Future<FormResult>

Available on MTable, provided by the MySqlTable extension

Validates form data against the table's field definitions.
getFieldsAs(String from, String as) List<QSelectField>

Available on MTable, provided by the MySqlTable extension

Gets table fields as select fields with optional table prefixes and aliases.
insert(MySQLConnection conn, Map<String, QVar> data) Future<MySqlResult>

Available on MTable, provided by the MySqlTable extension

Inserts a single record into the table.
insertMany(MySQLConnection conn, List<Map<String, QVar>> data) Future<MySqlResult>

Available on MTable, provided by the MySqlTable extension

Inserts multiple records into the table.
select(MySQLConnection conn, Sqler query) Future<MySqlResult>

Available on MTable, provided by the MySqlTable extension

Executes a SELECT query on the table.