MssqlConnection class

Constructors

MssqlConnection.getInstance()
factory

Properties

hashCode int
The hash code for this object.
no setterinherited
isConnected bool
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

beginTransaction() Future<void>
bulkInsert(String tableName, List<Map<String, dynamic>> rows, {List<String>? columns, int batchSize = 1000}) Future<int>
commit() Future<void>
connect({required String ip, required String port, required String databaseName, required String username, required String password, int timeoutInSeconds = 15, bool? encrypt, bool trustServerCertificate = false, String? tdsVersion}) Future<bool>
disconnect() Future<bool>
getData(String query) Future<String>
getDataAsMap(String query) Future<Map<String, dynamic>>
Get data and return already-parsed JSON (Map) instead of a raw String. Avoids the caller needing to jsonDecode the result.
getDataWithParams(String query, Map<String, dynamic> params) Future<String>
getRows(String query) Future<List<Map<String, dynamic>>>
Get only the rows list from a query, skipping metadata parsing.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
rollback() Future<void>
toString() String
A string representation of this object.
inherited
writeBatch(List<String> queries) Future<List<String>>
Execute a batch of write statements in a single network round-trip wrapped in a transaction for atomicity.
writeBatchWithParams(List<(String, Map<String, dynamic>)> statements) Future<List<String>>
Execute a batch of parameterized write statements inside a transaction.
writeData(String query) Future<String>
writeDataWithParams(String query, Map<String, dynamic> params) Future<String>

Operators

operator ==(Object other) bool
The equality operator.
inherited