我有两个集合,文章和评论,评论中的文章是文章中_id的外键. db.collection('article').aggregate( [ { $lookup: { from: "comments", localField: "_id", foreignField: "articleId", as: ...
分类:
数据库 时间:
2021-06-07 20:35:52
阅读次数:
0
SqlSugar 学习 记录 1. 多表查询 三表查询 int total = 0; var list = db.Queryable<SYS_User_UserGroup, SYS_User, SYS_UserGroup>((a, b, c) => new object[] { JoinType.L ...
分类:
数据库 时间:
2021-06-07 20:34:16
阅读次数:
0
set pages 50000 set lines 800 col grp format a5 ...
分类:
数据库 时间:
2021-06-07 20:22:56
阅读次数:
0
db = pymysql.connect(host="localhost", port=3306, user="root", passwd="xxx", db="stu_info")cursor = db.cursor(cursor=pymysql.cursors.DictCursor)cursor ...
分类:
数据库 时间:
2021-06-07 20:09:12
阅读次数:
0
import redisr = redis.Redis(host = "118.xx.x.xx",password="xxxxxx*",port=xxxx,db=4)r = redis.Redis(host = "118.xx.x.xx",password="xxxxxx*",port=xxxx,d ...
分类:
编程语言 时间:
2021-06-06 19:33:19
阅读次数:
0
模型类 from app.extensions import db??# 商品: 商品属于分类# 分类 分类反向查询商品class Cate(db.Model): __tablename__ = 'tb_cate' id = db.Column(db.Integer, primary_key=Tru ...
分类:
其他好文 时间:
2021-06-06 19:22:13
阅读次数:
0
###Oracle Instant Client下载 下载地址: https://www.oracle.com/cn/database/technology/instant-client.html 根据需要选择对应的版本,下载所需的软件包 以我为例,我选择的是适用于 Linux x86-64(64 ...
分类:
系统相关 时间:
2021-06-06 19:21:46
阅读次数:
0
Django实现MySQL读写分离 1. 增加slave数据库的配置 DATABASES = { 'default': { # 写(主机) 'ENGINE': 'django.db.backends.mysql', # 数据库引擎 'HOST': '192.168.103.158', # 数据库主机 ...
分类:
数据库 时间:
2021-06-06 19:02:54
阅读次数:
0
class Term(models.Model): class Meta: db_table = 'term' tid = models.BigAutoField(primary_key=True, null=False, help_text='终端唯一ID') ...
分类:
其他好文 时间:
2021-06-05 18:37:35
阅读次数:
0
0.注意 任何一条sql语句都是以 ”;“分号结尾 sql语句不区分大小写 1.插入数据 insert into 表名 (列名1, 列名2, 列名3, ······) values (值1, 值2, 值3, ······); insert into 表名 values (值1, 值2, 值3, ·· ...
分类:
数据库 时间:
2021-06-05 18:37:04
阅读次数:
0