Connection class
Represents an active ODBC database connection.
Contains connection metadata including the unique id, the original connectionString, creation timestamp createdAt, and active status.
Example:
final conn = Connection(
id: '1',
connectionString: 'DSN=MyDB',
createdAt: DateTime.now(),
isActive: true,
);
Constructors
- Connection({required String id, required String connectionString, required DateTime createdAt, bool isActive = false})
-
Creates a new Connection instance.
const
Properties
- connectionString → String
-
Original ODBC connection string used to establish this connection.
final
- createdAt → DateTime
-
Timestamp when this connection was created.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- id → String
-
Unique connection identifier assigned by the engine.
final
- isActive → bool
-
Whether this connection is currently active and ready for queries.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
copyWith(
{String? id, String? connectionString, DateTime? createdAt, bool? isActive}) → Connection - Creates a copy of this connection with the given fields replaced.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited