コード例 #1
0
async def objects_filter(**kwargs):
    async with get_collection(COLLECTION_NAME) as collection:
        return await collection.find()
コード例 #2
0
async def objects_replace(item):
    async with get_collection(COLLECTION_NAME) as collection:
        await collection.remove({'_id': item.get('_id')})
        return await collection.insert(item)
コード例 #3
0
ファイル: games.py プロジェクト: wyld/vassal_online
async def objects_filter(**kwargs):
    async with get_collection(COLLECTION_NAME) as collection:
        return await collection.find()
コード例 #4
0
ファイル: modules.py プロジェクト: wyld/vassal_online
async def objects_replace(item):
    async with get_collection(COLLECTION_NAME) as collection:
        await collection.remove({'_id': item.get('_id')})
        return await collection.insert(item)