logo
YourData+
玉东数据
首页应用解决方案协作MUI-Remix博客
登录

YourData's blog

Mongodb

Mongodb

query

where

query.$where(function () {
  return this.comments.length === 10 || this.name.length === 5;
})

all

MyModel.find().all('pets', ['dog', 'cat', 'ferret']);

and

query.and([{ color: 'green' }, { status: 'ok' }])```

box

query.box({ ll : lowerLeft, ur : upperRight })

centerSphere

const area = { center: [50, 50], radius: 10 };
query.where('loc').within().centerSphere(area);

circle

const area = { center: [50, 50], radius: 10, unique: true }
query.where('loc').within().circle(area)

countDocuments

const countQuery = model.where({ 'color': 'black' }).countDocuments();

elemMatch

query.where('comment').elemMatch({ author: 'autobot', votes: {$gte: 5}})

equals

User.where('age').equals(49);

exists

Thing.where('name').exists(false);
Thing.find().exists('name', false);

find

findOne

findOneAndDelete

findOneAndRemove

findOneAndReplace

findOneAndUpdate

geometry

const polyA = [[[ 10, 20 ], [ 10, 40 ], [ 30, 40 ], [ 30, 20 ]]]
query.where('loc').within().geometry({ type: 'Polygon', coordinates: polyA })

get

getFilter

getOptions

getPopulatedPaths

getQuery

getUpdate

gt

gte

hint

in

intersects

limit

lt

lte

map

maxDistance

maxScan

maxTimeMS

maxscan

merge

mod

mod

mongooseOptions

ne

near

nearSphere

nin

nor

or

orFail

polygon

populate

post

pre

projection

read

readConcern

regex

replaceOne

select

selected

selectedExclusively

selectedInclusively

session

set

setOptions

setQuery

setUpdate

size

skip

slaveOk

slice

snapshot

sort

tailable

then

toConstructor

update

updateMany

updateOne

use$geoWith

w

where

within

writeConcern

wtimeout

孙玉微信号: sunly-

玉东数据是一家专注于互联网应用开发的企业,由从业多年的技术专家组成,在应用开发、网络运维等方面有广泛的经验和实力。

技术涵盖最新的 Web、小程序、Flutter、Android、iOS等多个领域的前沿技术。

商务合作,请微信扫码联系我:

18919890888微信同号
陇ICP备2021001826号