コード例 #1
0
void DatabaseManager::stopDatabases(ScriptExecutionContext& context, DatabaseTaskSynchronizer* synchronizer)
{
    auto databaseContext = context.databaseContext();
    if (!databaseContext || !databaseContext->stopDatabases(synchronizer)) {
        if (synchronizer)
            synchronizer->taskCompleted();
    }
}
コード例 #2
0
Ref<DatabaseContext> DatabaseManager::databaseContext(ScriptExecutionContext& context)
{
    if (auto databaseContext = context.databaseContext())
        return *databaseContext;
    return adoptRef(*new DatabaseContext(context));
}
コード例 #3
0
bool DatabaseManager::hasOpenDatabases(ScriptExecutionContext& context)
{
    auto databaseContext = context.databaseContext();
    return databaseContext && databaseContext->hasOpenDatabases();
}