in Lifecycle Reducers on connected example uses insert instead of try_insert:
ctx.db.sessions().insert(Session {
connection_id: conn_id,
identity: ctx.sender,
connected_at: ctx.timestamp,
})?;
the problem are ? which expect Result while insert returns the inserted row.
One more question:
session are created when client connected, and session removed when client disconnected.
what will happen if the server for any reason closed between this two events? session will get removed?
also what the schema of Session in the example? did identity or connection_id is the primary key?