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

佛山网站关键词优化公司做网站文案用哪个软件

佛山网站关键词优化公司,做网站文案用哪个软件,北京网站建设套餐,贷款crm客户管理系统where介绍 在uniCloud中#xff0c;WHERE是一个用于指定查询条件的关键字。它允许用户根据特定的条件来筛选和查询云数据库中的数据。WHERE语句的基本语法格式是WHERE condition#xff0c;其中condition表示查询条件#xff0c;可以是一个或多个逻辑表达式组成的条件。 在…where介绍 在uniCloud中WHERE是一个用于指定查询条件的关键字。它允许用户根据特定的条件来筛选和查询云数据库中的数据。WHERE语句的基本语法格式是WHERE condition其中condition表示查询条件可以是一个或多个逻辑表达式组成的条件。 在uniCloud的查询操作中WHERE子句的使用非常灵活可以支持多种查询条件包括等于、不等于、大于、小于、范围查询等。同时它还可以支持多个条件的组合查询通过逻辑运算符如AND、OR将多个条件连接起来实现更复杂的查询需求。 此外WHERE子句还支持正则表达式查询可以使用正则表达式来匹配和筛选符合特定模式的数据。这使得在处理文本数据时能够更加精确地定位到所需的信息。 WHERE在uniCloud中是一个强大的查询工具能够帮助用户快速、准确地获取所需的数据。无论是简单的条件查询还是复杂的组合查询都可以通过WHERE子句来实现。 要查看本文章,请先阅读unicloud 集合 Collection 详解及其使用示例 示例教程如下 where 简单使用(查询对象) 使用where查询时如果传入的参数是一个对象将按照字段的值进行相等匹配包含字段顺序。 如查看users表内年龄是38岁的人 示例代码如下 云函数代码 use strict; exports.main async (event, context) {const result await uniCloud.database().collection(users).where({age:38}).get()//返回数据给客户端return result }; 页面引用代码 const where async _{const result await uniCloud.callFunction({name:where})console.log(result) }输出结果如下 可以看到,将age为38的都查询出来了 where 高级使用(查询指令) 查询指令以dbCmd.开头包括等于、不等于、大于、大于等于、小于、小于等于、in、nin、and、or。 tips: 以下指令挂载在 db.command 下 指令图表如下 指令描述说明eq等于name:dbCmd.eq(‘qayrup’)neq不等于删除字段gt大于加一个数值原子自增gte大于等于乘一个数值原子自乘it小于数组类型字段追加尾元素支持数组ite小于等于数组类型字段删除尾元素支持数组in在数组中数组类型字段删除头元素支持数组nin不再数组中数组类型字段追加头元素支持数组and且数组类型字段追加头元素支持数组or或数组类型字段追加头元素支持数组 eq 等于 表示字段等于某个值。eq 指令接受一个字面量 (literal)可以是 number, boolean, string, object, array。 事实上在uniCloud的数据库中等于有两种写法。 比如筛选名字为qayrup的 第一种写法使用对象 云函数示例代码 use strict; exports.main async (event, context) {const result await uniCloud.database().collection(users).where({name:qayrup}).get()//返回数据给客户端return result }; 输出结果 第二种写法使用eq指令 云函数代码如下 use strict; exports.main async (event, context) {// 查询字段等于某个值 第一种写法// const result await uniCloud.database().collection(users).where({name:qayrup}).get()// 查询字段等于某个值 第二个写法 使用eqconst result await uniCloud.database().collection().where({name:uniCloud.database().command.eq(qayrup)})return result }; 输出结果如下 neq 不等于 字段不等于。neq 指令接受一个字面量 (literal)可以是 number, boolean, string, object, array。 例如筛选出age不为38的数据 示例代码如下 use strict; const db uniCloud.database() const dbCmd db.command exports.main async (event, context) {// 查询字段等于某个值 第一种写法// const result await uniCloud.database().collection(users).where({name:qayrup}).get()// 查询字段等于某个值 第二个写法 使用eq// const result await uniCloud.database().collection(users).where({// name:uniCloud.database().command.eq(qayrup)// }).get()// 查询 age 不等于38的const result await db.collection(users).where({age:dbCmd.neq(38)}).get()return result }; 输出结果如下 gt 大于 字段大于指定值。 如筛选年龄大于20的 示例代码如下 use strict; const db uniCloud.database() const dbCmd db.command exports.main async (event, context) {// 查询字段等于某个值 第一种写法// const result await uniCloud.database().collection(users).where({name:qayrup}).get()// 查询字段等于某个值 第二个写法 使用eq// const result await uniCloud.database().collection(users).where({// name:uniCloud.database().command.eq(qayrup)// }).get()// 查询 age 不等于38的// const result await db.collection(users).where({// age:dbCmd.neq(38)// }).get()const result await db.collection(users).where({age:dbCmd.gt(20)}).get()return result }; 输出结果如下 gte 大于等于 字段大于或等于指定值。 筛选年龄大于等于18的 示例代码如下 use strict; const db uniCloud.database() const dbCmd db.command exports.main async (event, context) {// 查询字段等于某个值 第一种写法// const result await uniCloud.database().collection(users).where({name:qayrup}).get()// 查询字段等于某个值 第二个写法 使用eq// const result await uniCloud.database().collection(users).where({// name:uniCloud.database().command.eq(qayrup)// }).get()// 查询 age 不等于38的// const result await db.collection(users).where({// age:dbCmd.neq(38)// }).get()// 筛选年龄大于20的// const result await db.collection(users).where({// age:dbCmd.gt(20)// }).get()// 筛选年龄大于等于18的const result await db.collection(users).where({age:dbCmd.gte(18)}).get()return result }; 输出结果如下 lt 小于 字段小于指定值。 筛选年龄小于20的 示例代码如下 use strict; const db uniCloud.database() const dbCmd db.command exports.main async (event, context) {// 查询字段等于某个值 第一种写法// const result await uniCloud.database().collection(users).where({name:qayrup}).get()// 查询字段等于某个值 第二个写法 使用eq// const result await uniCloud.database().collection(users).where({// name:uniCloud.database().command.eq(qayrup)// }).get()// 查询 age 不等于38的// const result await db.collection(users).where({// age:dbCmd.neq(38)// }).get()// 筛选年龄大于20的// const result await db.collection(users).where({// age:dbCmd.gt(20)// }).get()// 筛选年龄大于等于18的// const result await db.collection(users).where({// age:dbCmd.gte(18)// }).get()// 筛选年龄小于20的const result await db.collection(users).where({age:dbCmd.lt(20)}).get()return result }; 输出结果如下 lte 小于等于 字段小于或等于指定值。 筛选小于等于18的 示例代码如下 use strict; const db uniCloud.database() const dbCmd db.command exports.main async (event, context) {// 查询字段等于某个值 第一种写法// const result await uniCloud.database().collection(users).where({name:qayrup}).get()// 查询字段等于某个值 第二个写法 使用eq// const result await uniCloud.database().collection(users).where({// name:uniCloud.database().command.eq(qayrup)// }).get()// 查询 age 不等于38的// const result await db.collection(users).where({// age:dbCmd.neq(38)// }).get()// 筛选年龄大于20的// const result await db.collection(users).where({// age:dbCmd.gt(20)// }).get()// 筛选年龄大于等于18的// const result await db.collection(users).where({// age:dbCmd.gte(18)// }).get()// 筛选年龄小于20的// const result await db.collection(users).where({// age:dbCmd.lt(20)// }).get()// 筛选年龄小于等于十八的const result await db.collection(users).where({age:dbCmd.lte(18)}).get()return result }; 输出结果如下 in 在数组中 字段值在给定的数组中。 use strict;const { setUncaughtExceptionCaptureCallback } require(process);const db uniCloud.database() const dbCmd db.command exports.main async (event, context) {// 查询字段等于某个值 第一种写法// const result await uniCloud.database().collection(users).where({name:qayrup}).get()// 查询字段等于某个值 第二个写法 使用eq// const result await uniCloud.database().collection(users).where({// name:uniCloud.database().command.eq(qayrup)// }).get()// 查询 age 不等于38的// const result await db.collection(users).where({// age:dbCmd.neq(38)// }).get()// 筛选年龄大于20的// const result await db.collection(users).where({// age:dbCmd.gt(20)// }).get()// 筛选年龄大于等于18的// const result await db.collection(users).where({// age:dbCmd.gte(18)// }).get()// 筛选年龄小于20的// const result await db.collection(users).where({// age:dbCmd.lt(20)// }).get()// 筛选年龄小于等于十八的// const result await db.collection(users).where({// age:dbCmd.lte(18)// }).get()// return result// 名字在[qayrup,张三,ggbond] 内const result await db.collection(users).where({name:dbCmd.in([qayrup,张三,ggbond] )}).get()return result }; 输出结果如下 nin 不在数组中 字段值不在给定的数组中。 名字不在[‘qayrup’,‘张三’,‘ggbond’] 内 示例代码如下 use strict;const { setUncaughtExceptionCaptureCallback } require(process);const db uniCloud.database() const dbCmd db.command exports.main async (event, context) {// 查询字段等于某个值 第一种写法// const result await uniCloud.database().collection(users).where({name:qayrup}).get()// 查询字段等于某个值 第二个写法 使用eq// const result await uniCloud.database().collection(users).where({// name:uniCloud.database().command.eq(qayrup)// }).get()// 查询 age 不等于38的// const result await db.collection(users).where({// age:dbCmd.neq(38)// }).get()// 筛选年龄大于20的// const result await db.collection(users).where({// age:dbCmd.gt(20)// }).get()// 筛选年龄大于等于18的// const result await db.collection(users).where({// age:dbCmd.gte(18)// }).get()// 筛选年龄小于20的// const result await db.collection(users).where({// age:dbCmd.lt(20)// }).get()// 筛选年龄小于等于十八的// const result await db.collection(users).where({// age:dbCmd.lte(18)// }).get()// return result// 名字在[qayrup,张三,ggbond] 内// const result await db.collection(users).where({// name:dbCmd.in([qayrup,张三,ggbond] )// }).get()// 名字不在[qayrup,张三,ggbond] 内const result await db.collection(users).where({name:dbCmd.nin([qayrup,张三,ggbond] )}).get()return result }; 输出结果如下 and 且 表示需同时满足指定的两个或以上的条件。 筛选出 年龄大于20且小于50的 示例代码如下 use strict;const { setUncaughtExceptionCaptureCallback } require(process);const db uniCloud.database() const dbCmd db.command exports.main async (event, context) {// 查询字段等于某个值 第一种写法// const result await uniCloud.database().collection(users).where({name:qayrup}).get()// 查询字段等于某个值 第二个写法 使用eq// const result await uniCloud.database().collection(users).where({// name:uniCloud.database().command.eq(qayrup)// }).get()// 查询 age 不等于38的// const result await db.collection(users).where({// age:dbCmd.neq(38)// }).get()// 筛选年龄大于20的// const result await db.collection(users).where({// age:dbCmd.gt(20)// }).get()// 筛选年龄大于等于18的// const result await db.collection(users).where({// age:dbCmd.gte(18)// }).get()// 筛选年龄小于20的// const result await db.collection(users).where({// age:dbCmd.lt(20)// }).get()// 筛选年龄小于等于十八的// const result await db.collection(users).where({// age:dbCmd.lte(18)// }).get()// return result// 名字在[qayrup,张三,ggbond] 内// const result await db.collection(users).where({// name:dbCmd.in([qayrup,张三,ggbond] )// }).get()// 名字不在[qayrup,张三,ggbond] 内// const result await db.collection(users).where({// name:dbCmd.nin([qayrup,张三,ggbond] )// }).get()// 筛选出 年龄大于20且小于50的const result await db.collection(users).where({age:dbCmd.gt(20).and(dbCmd.lt(50))}).get()return result }; 结果如下 or 或 表示需满足所有指定条件中的至少一个。 筛选 年龄等于18或年龄等38的 示例代码如下 use strict;const { setUncaughtExceptionCaptureCallback } require(process);const db uniCloud.database() const dbCmd db.command exports.main async (event, context) {// 查询字段等于某个值 第一种写法// const result await uniCloud.database().collection(users).where({name:qayrup}).get()// 查询字段等于某个值 第二个写法 使用eq// const result await uniCloud.database().collection(users).where({// name:uniCloud.database().command.eq(qayrup)// }).get()// 查询 age 不等于38的// const result await db.collection(users).where({// age:dbCmd.neq(38)// }).get()// 筛选年龄大于20的// const result await db.collection(users).where({// age:dbCmd.gt(20)// }).get()// 筛选年龄大于等于18的// const result await db.collection(users).where({// age:dbCmd.gte(18)// }).get()// 筛选年龄小于20的// const result await db.collection(users).where({// age:dbCmd.lt(20)// }).get()// 筛选年龄小于等于十八的// const result await db.collection(users).where({// age:dbCmd.lte(18)// }).get()// return result// 名字在[qayrup,张三,ggbond] 内// const result await db.collection(users).where({// name:dbCmd.in([qayrup,张三,ggbond] )// }).get()// 名字不在[qayrup,张三,ggbond] 内// const result await db.collection(users).where({// name:dbCmd.nin([qayrup,张三,ggbond] )// }).get()// 筛选出 年龄大于20且小于50的// const result await db.collection(users).where({// age:dbCmd.gt(20).and(dbCmd.lt(50))// }).get()// 筛选 年龄等于18或年龄等38的const result await db.collection(users).where({age:dbCmd.eq(18).or(dbCmd.eq(38))}).get()return result }; 输出结果如下 正则表达式查询 db.RegExp 根据正则表达式进行筛选 正则表达式忘得差不多了,这里就不做示例了 以上指令所示例的数据集 [{_id:65ea848410def2d7fe8efb6a,age:18,email:qayrupaliyun.com,intro:长得像吴彦祖,name:qayrup}, {_id:65eaa7175e058d32ec579fe7,age:38,email:zhangshanemail.com,intro:一个普普通通的律师,name:张三,uniIdToken:eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1aWQiOiI2NTg4M2Y3MTZlNWQyZDcxODc5MDAxYjEiLCJyb2xlIjpbXSwicGVybWlzc2lvbiI6W10sInVuaUlkVmVyc2lvbiI6IjEuMC4xNiIsImlhdCI6MTcwMzQyNzk0NCwiZXhwIjoxNzAzNDM1MTQ0fQ.hy40ZsKGvtnm4IDA0HpOFYwhE-5x69OZXQcZ57EoTO8}, {_id:65eaa82b358ba96e9f0fe233,age:38,email:ggbondemail.com,intro:一只猪,name:ggbond}, {_id:65eaa82b358ba96e9f0fe234,age:38,email:zhubajieemail.com,intro:一直吃素的猪,name:猪八戒}, {_id:65eaa82b358ba96e9f0fe235,age:38,email:peiqiemail.com,intro:一只吹风机,name:佩奇}]
http://www.pierceye.com/news/331368/

相关文章:

  • 阐述企业搭建网站的重要性免费做效果图的网站有哪些
  • 快速网站搭建南宁广告公司网站建设
  • 做数学题网站专业做网站建设 昆山
  • 建筑网站上海网页设计图片素材网
  • 延边网站开发depawo做汽车网站销售怎么入手
  • 商城网站开发技术南京好的网站制作公司
  • 嘉兴网站建设嘉兴网站推广网站网络营销方案
  • 镇江建工建设集团网站建设银行网站怎么基本转个人
  • 自己建的网站打开的特别慢盐城网站建设效果
  • 专业建站报价wordpress这软件怎么搜索
  • 德国网站建设电工培训内容
  • 织梦手机wap网站标签调用外贸网站建设公司如何
  • 在那里能找到网站泰安公司网站开发
  • 大兴区企业网站建设我们网站的优势
  • 呼伦贝尔市建设局网站关键词如何排名在首页
  • 网站带后台模板网站的建设宗旨
  • 深圳网站建设php专门查企业的网站
  • 做问卷调查的网站有啥世界比分榜
  • 网站301定向深圳电梯广告制作公司网站
  • 个人网站做推广系统开发师
  • 智能建站的优势和不足app注册推广拉人
  • 做网站用软件网站制作怎么创业
  • 解放碑电子商务网站建设网站建设英文如何表达
  • 长春好的做网站公司有哪些网站建设标准
  • 公司网站首页大图怎么做台州网站制作定制
  • 网站建设公司软件开发浅谈网站建设开发
  • 松江网站开发培训课程海外域名注册商
  • 智慧景区网站服务建设线下课程seo
  • 做3个网站需要多大的服务器做地铁建设的公司网站
  • 深圳app网站建设哪家好广西桂林