MonoDB 之Template使用

  1. MongoTemplate:(主要是集合和文档的增删改查)
    • 方法:     
getCollectionNames
getCollection
collectionExists
collectionExists
dropCollection
dropCollection
indexOps
indexOps
scriptOps
bulkOps
bulkOps
bulkOps
findAll
findAll
group
group
aggregate
aggregate
aggregate
aggregate
aggregateStream
aggregateStream
aggregateStream
aggregateStream
mapReduce
mapReduce
mapReduce
mapReduce
geoNear
geoNear
findOne
findOne
exists
exists
exists
find
find
findById
findById
findDistinct
findDistinct
findDistinct
findDistinct
findAndModify
findAndModify
findAndModify
findAndModify
findAndReplace
findAndReplace
findAndReplace
findAndReplace
findAndReplace
findAndReplace
findAndReplace
findAndRemove
findAndRemove
count
count
count
insert
insert
insert
insert
insertAll
save
save
upsert
upsert
upsert
updateFirst
updateFirst
updateFirst
updateMulti
updateMulti
updateMulti
remove
remove
remove
remove
remove
findAllAndRemove
findAllAndRemove
findAllAndRemove
getConverter

 

  1. Query:(分页和高级查询条件)
    • 方法:
Query
Query
Query
query
addCriteria
fields
skip
limit
withHint
withHint
with
with
getRestrictedTypes
restrict
getQueryObject
getFieldsObject
getSortObject
isSorted
getSkip
getLimit
getHint
maxTimeMsec
maxTime
maxTime
maxScan
comment
useSnapshot
cursorBatchSize
noCursorTimeout
exhaust
slaveOk
partialResults
getMeta
setMeta
collation
getCollation
getCriteria
of
toString
equals
querySettingsEquals
hashCode
isRestrictedTypeKey
RESTRICTED_TYPES_KEY
restrictedTypes
criteria
fieldSpec
sort
skip
limit
hint
meta
collation

 

  1. Criteria:
    • 方法:

      

Criteria
Criteria
Criteria
where
byExample
byExample
matchingDocumentStructure
and
is
lastOperatorWasNot
ne
lt
lte
gt
gte
in
in
nin
nin
mod
all
all
size
exists
type
type
not
not
regex
regex
regex
regex
toPattern
withinSphere
within
near
nearSphere
intersects
maxDistance
minDistance
elemMatch
alike
andDocumentStructureMatches
bits
orOperator
norOperator
andOperator
registerCriteriaChainElement
getKey
getCriteriaObject
getSingleCriteriaObject
createCriteriaList
setValue
createNearCriteriaForCommand
equals
simpleCriteriaEquals
isEqual
hashCode
requiresGeoJsonFormat
regexFlags
regexFlag
NOT_SET
FLAG_LOOKUP
key
criteriaChain
criteria
isValue

 

posted @ 2020-06-14 21:31  围观的小妖  阅读(570)  评论(0编辑  收藏  举报