Skip to content

数据库存档 #16

@summer506hai

Description

@summer506hai

mongo 查询语句

  • 查找 某个 字段(summary) 字符串长度大于10的数据
    ({"summary":{"$regex":/^.{10,}$/}})

  • 查找 某个 字段(summary) 字符串长度等于10的数据
    ({"summary":{"$regex":/^.{10}$/}})

  • 查找 某个 字段(summary) 字符串长度大于10,小于20的数据
    ({"summary":{"$regex":/^.{10,20}$/}})

  • 查找 title比summary长的文档
    ({ $expr: { $gt: [{ $strLenCP: "$title" }, { $strLenCP: "$summary" }] }})

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions