def _extract_from_node(node): return node.partition('.') def _get_class_name(obj): # Thanks discord.py return obj.__class__.__name__.replace('Text', '') def _walk_parents(command): """Walks up a command's parent chain.""" return iter(iterate(operator.attrgetter('parent'), command).__next__, None) _Table = asyncqlio.table_base() class CommandPermissions(_Table, table_name='permissions'): id = asyncqlio.Column(asyncqlio.Serial, primary_key=True) guild_id = asyncqlio.Column(asyncqlio.BigInt, index=True) permissions_guild_id_idx = asyncqlio.Index(guild_id) snowflake = asyncqlio.Column(asyncqlio.BigInt, nullable=True) name = asyncqlio.Column(asyncqlio.String) whitelist = asyncqlio.Column(asyncqlio.Boolean) class Plonks(_Table): guild_id = asyncqlio.Column(asyncqlio.BigInt, index=True, primary_key=True)
import asyncqlio TableBase = asyncqlio.table_base()