Initialize the MySQLDataContext instance with a MySQLTransactionManager.
A MySQLTransactionManager instance used to begin, commit, and rollback transactions.
Manages the connection pool.
Used for escaping queries.
Used for executing queries.
Call transFunc with this MySQLTransactionalDataContext instance, beginning the transaction if it's not in the "STARTED" state. For transaction states other than "READY" and "STARTED" the returned promise shall be rejected with an error. See MySQLTransactionManager for more details about transaction support.
transFunc shall be resolved with type R, and this function will proxy the return when transFunc completes.
Not implemented. The connection is assumed to be in a connected state.
Create a new DeleteModel instance that can be used to delete a model by ID. For complex delete operations, use the DataContext.from method to obtain a FromAdapter instance, and then call FromAdapter.delete on that instance.
The type of model to delete, which is the constructor of a Table-decorated class.
An Entity instance to delete, which must have the primary key set.
A DeleteModel instance that can be executed using DeleteModel.execute.
Not implemented. The connection is assumed to be in a connected state.
Create a new MySQLFromAdapter instance, which can then be used to select, update, or delete.
A Table-decorated entity which is the constructor of the FROM table.
Alias for the FROM table, used in conditions, joins, and column selection. Optional: defaults to the name of the table.
A MySQLFromAdapter that implements MySQLFromAdapter.select, MySQLFromAdapter.update, and MySQLFromAdapter.delete.
Get a MySQLEscaper instance for escaping column and table names.
Get a MySQLExecuter instance that can be used to execute queries.
Create and return a new Insert instance.
The type of model to insert, which is the constructor of a Table-decorated class.
An Entity instance to insert.
An Insert instance that can be executed using Insert.execute.
Rollback the transaction. See MySQLTransactionManager.rollback.
Create a new MySQLUpdateModel instance that can be used to update a model by ID. For complex update operations, use the MySQLDataContext.from method to obtain a MySQLFromAdapter instance, and then call MySQLFromAdapter.update on that instance.
The type of model to update, which is the constructor of a Table-decorated class.
An Entity instance to update, which must have the primary key set.
An MySQLUpdateModel instance that can be executed using MySQLUpdateModel.execute.
Generated using TypeDoc
A specialized MySQLDataContext implementation for transactions.