MsSqlConnection class
Main class for managing MS SQL Server connections
Constructors
Properties
- database → String
-
final
- encrypt → bool
-
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- isConnected → bool
-
Check if connected
no setter
- password → String?
-
final
- port → int
-
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- server → String
-
final
- trustedConnection → bool
-
final
- username → String?
-
final
Methods
-
connect(
) → Future< bool> - Connect to the database
-
disconnect(
) → Future< void> - Disconnect from the database
-
dispose(
) → Future< void> - Close connection on dispose
-
execute(
String sql, [List? parameters]) → Future< int> - Execute INSERT, UPDATE, DELETE commands
-
executeStoredProcedure(
String procedureName, Map< String, dynamic> parameters) → Future<QueryResult> - Execute a stored procedure
-
getChangeTrackingVersion(
) → Future< int?> - Get current change tracking version for the database Returns null if change tracking is not enabled
-
getMinValidVersion(
{required String tableName}) → Future< int?> - Get minimum valid change tracking version for a table Useful to check if your stored version is still valid Returns null if change tracking is not enabled on the table
-
getTableChanges(
{required String tableName, required int lastVersion, String primaryKeyColumn = 'Id'}) → Future< List< Map< >String, dynamic> > - Get detailed change information for a table Returns a list of changes with operation type and primary key
-
hasTableChanges(
{required String tableName, required int lastVersion}) → Future< bool> - Check if a specific table has changes since last version Returns true if changes detected, false otherwise
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
query(
String sql, [List? parameters]) → Future< QueryResult> - Execute a SELECT query
-
testConnection(
) → Future< bool> - Test the connection
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited