Esempio n. 1
0
 async def commit(self):
     async with aioconnect(self.path) as db:
         await db.commit()
Esempio n. 2
0
    async def column(self, commands, *values):
        async with aioconnect(self.path) as db:
            items = await db.execute(commands, tuple(values))

            return [item[0] for item in await items.fetchall()]
Esempio n. 3
0
    async def field(self, commands, *values):
        async with aioconnect(self.path) as db:
            items = await db.execute(commands, tuple(values))

            if (fetch := await items.fetchone()) is not None:
                return fetch[0]
Esempio n. 4
0
 async def autoexecute(self, commands, *values):
     async with aioconnect(self.path) as db:
         await db.execute(commands, tuple(values))
         await db.commit()
Esempio n. 5
0
    async def recordall(self, commands, *values):
        async with aioconnect(self.path) as db:
            items = await db.execute(commands, tuple(values))

            return await items.fetchall()