示例#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();
}