随笔分类 -  [Web] SQLAlchemy / MySQL / Redis

摘要:新建表:create database [name] 查询表的所有字段:show full columns from [table name] 阅读全文
posted @ 2020-04-06 16:50 remly 阅读(149) 评论(0) 推荐(0)
摘要:参考: https://www.jianshu.com/p/2c6c76f94b88 https://madmalls.com/blog/post/followers-and-followeds/ 实现粉丝机制 1.用户拥有自己的粉丝列表,可以查看自己的粉丝 2.用户拥有自己的关注列表,可以查看自己 阅读全文
posted @ 2019-12-25 15:41 remly 阅读(967) 评论(0) 推荐(0)
摘要:1.filter 和 filter_by [ 共同点 ]:查询后,用于过滤数据 [ 不同点 ]: 1.filter:过滤查询后的数据,用SQL表达式 也可以查询多个条件 2.filter_by:过滤查询后的数据,用关键词表达式 也可以查询多个条件 2.back_populates 和 backref 阅读全文
posted @ 2019-12-24 10:44 remly 阅读(335) 评论(0) 推荐(0)
摘要:参考: https://www.jianshu.com/p/0d234e14b5d3 1.Connecting 我们通过 create_engine() 来链接数据库,假设我们我们采用SQLite。 [文档片段]: create_engine() 的返回值是 Engine 的一个实例,Engine是 阅读全文
posted @ 2019-12-23 10:04 remly 阅读(352) 评论(0) 推荐(0)
摘要:1.关于relationship的讲解 https://www.jianshu.com/p/db5292df6b8d https://segmentfault.com/a/1190000018006031 阅读全文
posted @ 2019-12-22 11:14 remly 阅读(113) 评论(0) 推荐(0)