DatabaseSessionDriver class

Database-based session storage implementation. Stores session data in a database table for persistence and scalability.

Implemented types

Constructors

DatabaseSessionDriver(DatabaseConnection _connection, {String tableName = 'sessions'})

Properties

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

Methods

cleanup(Duration maxAge) Future<void>
Clean up expired sessions
override
createTable() Future<void>
Create the sessions table if it doesn't exist Note: This uses raw SQL for simplicity. In the future, this could be updated to use the SchemaBuilder for better database abstraction.
delete(String sessionId) Future<void>
Delete session data
override
isConnected() Future<bool>
Check if driver is connected/ready
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
read(String sessionId) Future<Map<String, dynamic>?>
Retrieve session data
override
toString() String
A string representation of this object.
inherited
write(String sessionId, Map<String, dynamic> data) Future<void>
Store session data
override

Operators

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