async def bulk_insert(self):
    query = 'INSERT INTO commands (guild_id, channel_id, author_id, used, prefix, command, failed)\n                   SELECT x.guild, x.channel, x.author, x.used, x.prefix, x.command, x.failed\n                   FROM jsonb_to_recordset($1::jsonb) AS\n                   x(guild BIGINT, channel BIGINT, author BIGINT, used TIMESTAMP, prefix TEXT, command TEXT, failed BOOLEAN)\n                '
    if self._data_batch:
        (await self.bot.pool.execute(query, self._data_batch))
        total = len(self._data_batch)
        if (total > 1):
            log.info('Registered %s commands to the database.', total)
        self._data_batch.clear()
async def bulk_insert(self):
    query = 'INSERT INTO commands (guild_id, channel_id, author_id, used, prefix, command, failed)\n                   SELECT x.guild, x.channel, x.author, x.used, x.prefix, x.command, x.failed\n                   FROM jsonb_to_recordset($1::jsonb) AS\n                   x(guild BIGINT, channel BIGINT, author BIGINT, used TIMESTAMP, prefix TEXT, command TEXT, failed BOOLEAN)\n                '
    if self._data_batch:
        (await self.bot.pool.execute(query, self._data_batch))
        total = len(self._data_batch)
        if (total > 1):
            log.info('Registered %s commands to the database.', total)
        self._data_batch.clear()