UniqueIDBDatabaseConnection::UniqueIDBDatabaseConnection(UniqueIDBDatabase& database, IDBConnectionToClient& connection)
    : m_identifier(nextDatabaseConnectionIdentifier())
    , m_database(database)
    , m_connectionToClient(connection)
{
    m_database.server().registerDatabaseConnection(*this);
}
UniqueIDBDatabaseConnection::UniqueIDBDatabaseConnection(UniqueIDBDatabase& database, ServerOpenDBRequest& request)
    : m_identifier(nextDatabaseConnectionIdentifier())
    , m_database(database)
    , m_connectionToClient(request.connection())
    , m_openRequestIdentifier(request.requestData().requestIdentifier())
{
    m_database.server().registerDatabaseConnection(*this);
    m_connectionToClient.registerDatabaseConnection(*this);
}