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

 

MonoDB 之Template使用

上一篇:PostgreSQL 数据库错误状态编号解释[附带列表


下一篇:Linux平台QT数据库编程(来自网络)