aryas_orm.py 文件源码

python
阅读 20 收藏 0 点赞 0 评论 0

项目:aryas 作者: lattkkthxbbye 项目源码 文件源码
def __init__(self, bot):
        self.bot = bot  # type: commands.Bot
        self.config = self.bot.cogs['Config']  # type: Config
        # Uses the database proxy object for our db as we don't know which database provider to use until runtime.
        self.db, self.models = models.get_models(self.config)
        self.query = Query(self.models)

        # Is there a nice way to scope all models within AryaORM? Still want them defined in a separate file.
        # Have I got a surprise for you, my dear Tom
        self.User = self.models.User
        self.Message = self.models.Message
        self.Channel = self.models.Channel
        self.Server = self.models.Server
        self.LoveTransaction = self.models.LoveTransaction

        self.make_tables()
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号