03 2022 档案

摘要:增加 增加一条数据,方法可以是 db.集合名.insertOne({}) 或者直接是db.集合名.inset({}) db.stundent.insertOne({name:'zhangsan',age:18,height:170}) db.stundent.insert({name:'lisi', 阅读全文
posted @ 2022-03-30 20:52 弩哥++ 阅读(44) 评论(0) 推荐(0) 编辑
摘要:client = pymongo.MongoClient('mongodb://用户名:密码@主机IP:端口号', directConnection=True, serverSelectionTimeoutMS=2000) col = client['数据库']['集合名'] print(col.f 阅读全文
posted @ 2022-03-28 17:26 弩哥++ 阅读(248) 评论(0) 推荐(0) 编辑
摘要:./mongo mongodb://用户名:密码@ip地址:端口号 阅读全文
posted @ 2022-03-24 16:59 弩哥++ 阅读(19) 评论(0) 推荐(0) 编辑
摘要:# ContentId:1 ->显示ContentId字段 # _id:0 ->不显示_id字段 # db.XX.find({Name:"接口测试"},{ContentId:1,_id:0}).sort({_id:-1}).limit(1) 阅读全文
posted @ 2022-03-24 16:52 弩哥++ 阅读(61) 评论(0) 推荐(0) 编辑
摘要:CREATE FUNCTION fun1() RETURNS INT BEGIN DECLARE num INT ; DECLARE i INT ; set num = 10000; set i = 2; WHILE i<=10000 DO INSERT INTO student(`name`) V 阅读全文
posted @ 2022-03-09 23:58 弩哥++ 阅读(137) 评论(0) 推荐(0) 编辑
摘要:创建用户 # create user 用户名 identified by 密码 create user test_user identified by '123456' 修改当前登录用户密码 set password=password('111111') 修改其他用户密码 set password 阅读全文
posted @ 2022-03-09 23:16 弩哥++ 阅读(20) 评论(0) 推荐(0) 编辑
摘要:之前Pytest运行的参数都是写在pytest.ini中的,今天练习的时候为了节省时间,就把main函数写在的测试用例的模块上,如 import pytest class TestDemo: def test_fun1(self): print('我是方法1') def test_fun2(self 阅读全文
posted @ 2022-03-07 20:34 弩哥++ 阅读(131) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示