当前位置: 首页 > news >正文

mongDB的相关查询插入操作

db.getCollection(“ProductBuriedPointPo”).find();–查询
db.getCollection(“ProductBuriedPointPo”).remove({“_id”: ObjectId(“61e8f4c3bdc4381042acd296”)})–删除

db.getCollection(“ProductBuriedPointPo”).insert( {
_id: ObjectId(“61e8f4c3bdc4381042acd299”),
userId: “userId1”,
token: “token”,
stopTime: “1”,
refererPageID: “1”,
refererPageName: “精品推荐”,
currentPageID: “4”,
currentPageName: “产品详情”,
coreVersion: “火狐”,
os: “操作系统”,
clickCount: “2”,
type: “1”,
typeName: “广告监测”,
eventId: “1-精选推荐-顶部轮播广告位”,
eventName: “精选推荐-顶部轮播广告位”,
productCode: “产品编码”,
advertId: “广告id”,
brandId: “品牌id”,
companyId: “企业id”,
createdDate: “2022-01-20 13:36:02”,
_class: “com.guoke.m.etl.pojo.po.mongo.ProductBuriedPointPo”} );–插入

db.getCollection(“ProductBuriedPointPo”).update( { _id: ObjectId(“61e8f4c3bdc4381042acd295”) }, {
_id: ObjectId(“61e8f4c3bdc4381042acd295”),
userId: “userId1”,
token: “token”,
stopTime: “1”,
refererPageID: “1”,
refererPageName: “精品推荐”,
currentPageID: “4”,
currentPageName: “产品详情”,
coreVersion: “火狐”,
os: “操作系统”,
clickCount: “2”,
type: “1”,
typeName: “广告监测”,
eventId: “1-精选推荐-顶部轮播广告位”,
eventName: “精选推荐-顶部轮播广告位”,
productCode: “产品编码”,
advertId: “广告id”,
brandId: “品牌id”,
companyId: “企业id”,
createdDate: “2022-01-20 13:36:02”,
_class: “com.guoke.m.etl.pojo.po.mongo.ProductBuriedPointPo”
} );–更新

ConvertOperators.ToDate
Convert.toInt()//MongoDB代码中是字符串与数据库中int类型对比

http://www.lryc.cn/news/61448.html

相关文章:

  • 【C++初阶】C++入门(二):引用内联函数auto关键字范围for循环(C++11)指针空值nullptr
  • 地下污水厂智能照明控制应用
  • IS220UCSAH1A利用电子和空穴两种载流子导电的,所以叫做双极型电路
  • 干货|英国专利申请
  • springboot文件上传
  • 天龙八部手游服务端架设搭建教程
  • Windows 服务监控工具
  • 零基础抽象轻松MYSQL
  • 区块链赛项样题解析
  • 基于Java+SpringBoot+vue+element疫情药品采购出入库系统设计实现
  • 【C++】5. 引用
  • 初识C++(二)
  • 编译时报Clang SA is not enabled问题解决
  • 【论文阅读】You Are What You Do:通过数据来源分析寻找隐蔽的恶意软件
  • c#期末复习题重点难点题
  • Sass @mixin 与 @include
  • ROS——Teb算法的优化
  • java+ssm 社区超市网上商城果蔬(水果蔬菜)管理系统
  • igh主站搭建过程(e1000e 网卡/ generic网卡)
  • K8S第一讲 Kubernetes之Secret详解
  • 每周一算法:高精度减法
  • Session使用和原理分析图与实现原理-- 代码演示说明 Session 的生命周期和读取的机制代码分析
  • 在win10系统中安装anaconda
  • 【菜鸡读论文】Cross-domain Named Entity Recognition via Graph Matching
  • 代码随想录算法训练营第三十五天|860.柠檬水找零、406.根据身高重建队列、452. 用最少数量的箭引爆气球
  • 爬虫为什么需要多线程
  • 下一代智能座舱风口下,“超级”Tier 1强势崛起
  • 第 三 章 UML 类图
  • java版工程项目管理系统 Spring Cloud+Spring Boot+Mybatis+Vue+ElementUI+前后端分离 功能清单
  • 内网穿透实现在外远程连接RabbitMQ服务