MySqlDb class Null safety


MySqlDb({required String dbName, required String dbUser, required String dbCode, String dbHost = 'localhost', int dbPort = 3306, int traceDataLength = 80, String sqlTracePrefix = '', int timeout = 30, required BaseLogger logger})
MySqlDb.fromConfiguration(BaseConfiguration configuration, BaseLogger logger, {String section = 'db'})
Constructor. Builds the instance from the configuration data.


currentScriptName String
read / write
dbCode String?
read / write
dbHost String?
read / write
dbName String?
read / write
dbPort int?
read / write
dbUser String?
read / write
hasConnection bool
read / write
hashCode int
The hash code for this object. [...]
read-only, inherited
runtimeType Type
A representation of the runtime type of the object.
read-only, inherited
throwOnError bool
read / write
timeout int
read / write


close() → void
connect({bool? throwOnError}) Future<bool>
deleteRaw(String sql, {List? params, bool? throwOnError}) Future<int>
execute(String sql, {List? params, bool? throwOnError}) Future<int>
executeScript(List<String> lines) Future<String>
executeScriptFile(String filename) Future<String>
hasColumn(String table, String column, {bool forceUpdate = false}) Future<bool>
hasTable(String name, {bool forceUpdate = false}) Future<bool>
insertOne(String sql, {List? params, bool? throwOnError}) Future<int>
insertRaw(String sql, {List? params, bool? throwOnError}) Future
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed. [...]
readAll(String sql, {List? params, bool? throwOnError}) Future
readAllAsLists(String sql, {List? params, bool? throwOnError}) Future<List?>
readAndExecute(String sql, List params, dynamic onSingleRow) Future<bool>
readOneAsMap(String sql, {List? params, bool? throwOnError}) Future<Map<String, dynamic>?>
readOneInt(String sql, {List? params, dynamic nullAllowed = false, bool? throwOnError}) Future<int?>
readOneString(String sql, {List? params, dynamic nullAllowed = false, bool? throwOnError}) Future<String?>
toString() String
A string representation of this object. [...]
updateOne(String sql, {List? params, bool? throwOnError}) Future<bool>
updateRaw(String sql, {List? params, bool? throwOnError}) Future<int?>


operator ==(Object other) bool
The equality operator. [...]

Static Methods

convertNamedParams({required String sql, required Map<String, dynamic> mapParams, required BaseLogger logger, bool ignoreError = false}) → dynamic