C# 클래스 MongoUtility.Command.DataBaseCommand

DataBase Command
파일 보기 프로젝트 열기: magicdict/MongoCola 1 사용 예제들

공개 프로퍼티들

프로퍼티 타입 설명
CompactCommand MongoCommand
RepairDatabaseCommand MongoCommand
ReplSetGetStatusCommand MongoCommand
ServerStatusCommand MongoCommand

공개 메소드들

메소드 설명
AddShardToZone ( MongoServer routeSvr, string shardName, string zone ) : CommandResult

AddShardToZone

AddSharding ( MongoServer routeSvr, string replicaSetName, List lstAddress, string name, decimal maxSize ) : CommandResult

增加数据分片

注意:有个命令可能只能用在mongos上面

Aggregate ( BsonArray aggregateDoc, string collectionName ) : CommandResult

执行聚合

Aggregate ( BsonArray aggregateDoc, string databaseName, string collectionName ) : CommandResult

执行聚合(指定路劲)

Count ( BsonDocument QueryDoc, string databaseName, string collectionName ) : CommandResult

执行Count(指定路劲)

EnableSharding ( MongoServer routeSvr, string shardingDb ) : CommandResult

数据库分片

InitReplicaSet ( ) : CommandResult

初始化副本(Mongo Shell)

InitReplicaSet ( string replicaSetName, string hostList, MongoConnectionConfig>.Dictionary configs ) : CommandResult

初始化副本(数据库版本 - 废止)

ReconfigReplsetServer ( MongoServer primarySvr, BsonDocument config, System.Boolean force = false ) : CommandResult

重新启动

这个命令C#无法正确执行

RemoveSharding ( MongoServer routeSvr, string shardName ) : CommandResult

移除Shard

ShardCollection ( MongoServer routeSvr, string sharingCollection, BsonDocument shardingKey ) : CommandResult

数据集分片

convertToCapped ( string collectionName, long size, MongoDatabase db ) : CommandResult

convertToCapped

createRole ( MongoDatabase mongoDb, Role role ) : CommandResult

添加自定义角色

createUser ( MongoUserEx user, MongoDatabase db ) : CommandResult

新建用户

updateUser ( MongoUserEx user, MongoDatabase db ) : CommandResult

修改用户(完全替换)

updateZoneKeyRange ( MongoServer routeSvr, string nameSpace, string FieldName, BsonValue min, BsonValue max, string zone ) : CommandResult

AddTagRange

메소드 상세

AddShardToZone() 공개 정적인 메소드

AddShardToZone
public static AddShardToZone ( MongoServer routeSvr, string shardName, string zone ) : CommandResult
routeSvr MongoServer 服务器
shardName string Shard名称
zone string
리턴 MongoDB.Driver.CommandResult

AddSharding() 공개 정적인 메소드

增加数据分片
注意:有个命令可能只能用在mongos上面
public static AddSharding ( MongoServer routeSvr, string replicaSetName, List lstAddress, string name, decimal maxSize ) : CommandResult
routeSvr MongoServer
replicaSetName string
lstAddress List
name string
maxSize decimal
리턴 MongoDB.Driver.CommandResult

Aggregate() 공개 정적인 메소드

执行聚合
public static Aggregate ( BsonArray aggregateDoc, string collectionName ) : CommandResult
aggregateDoc BsonArray
collectionName string
리턴 MongoDB.Driver.CommandResult

Aggregate() 공개 정적인 메소드

执行聚合(指定路劲)
public static Aggregate ( BsonArray aggregateDoc, string databaseName, string collectionName ) : CommandResult
aggregateDoc BsonArray
databaseName string
collectionName string
리턴 MongoDB.Driver.CommandResult

Count() 공개 정적인 메소드

执行Count(指定路劲)
public static Count ( BsonDocument QueryDoc, string databaseName, string collectionName ) : CommandResult
QueryDoc BsonDocument
databaseName string
collectionName string
리턴 MongoDB.Driver.CommandResult

EnableSharding() 공개 정적인 메소드

数据库分片
public static EnableSharding ( MongoServer routeSvr, string shardingDb ) : CommandResult
routeSvr MongoServer
shardingDb string
리턴 MongoDB.Driver.CommandResult

InitReplicaSet() 공개 정적인 메소드

初始化副本(Mongo Shell)
public static InitReplicaSet ( ) : CommandResult
리턴 MongoDB.Driver.CommandResult

InitReplicaSet() 공개 정적인 메소드

初始化副本(数据库版本 - 废止)
public static InitReplicaSet ( string replicaSetName, string hostList, MongoConnectionConfig>.Dictionary configs ) : CommandResult
replicaSetName string 副本名称
hostList string 从属服务器列表
configs MongoConnectionConfig>.Dictionary
리턴 MongoDB.Driver.CommandResult

ReconfigReplsetServer() 공개 정적인 메소드

重新启动
这个命令C#无法正确执行
public static ReconfigReplsetServer ( MongoServer primarySvr, BsonDocument config, System.Boolean force = false ) : CommandResult
primarySvr MongoServer 副本组主服务器
config BsonDocument 服务器信息
force System.Boolean
리턴 MongoDB.Driver.CommandResult

RemoveSharding() 공개 정적인 메소드

移除Shard
public static RemoveSharding ( MongoServer routeSvr, string shardName ) : CommandResult
routeSvr MongoServer
shardName string Shard名称
리턴 MongoDB.Driver.CommandResult

ShardCollection() 공개 정적인 메소드

数据集分片
public static ShardCollection ( MongoServer routeSvr, string sharingCollection, BsonDocument shardingKey ) : CommandResult
routeSvr MongoServer
sharingCollection string
shardingKey BsonDocument
리턴 MongoDB.Driver.CommandResult

convertToCapped() 공개 정적인 메소드

convertToCapped
public static convertToCapped ( string collectionName, long size, MongoDatabase db ) : CommandResult
collectionName string
size long
db MongoDatabase
리턴 MongoDB.Driver.CommandResult

createRole() 공개 정적인 메소드

添加自定义角色
public static createRole ( MongoDatabase mongoDb, Role role ) : CommandResult
mongoDb MongoDatabase
role MongoUtility.Security.Role
리턴 MongoDB.Driver.CommandResult

createUser() 공개 정적인 메소드

新建用户
public static createUser ( MongoUserEx user, MongoDatabase db ) : CommandResult
user MongoUserEx
db MongoDatabase
리턴 CommandResult

updateUser() 공개 정적인 메소드

修改用户(完全替换)
public static updateUser ( MongoUserEx user, MongoDatabase db ) : CommandResult
user MongoUserEx
db MongoDatabase
리턴 CommandResult

updateZoneKeyRange() 공개 정적인 메소드

AddTagRange
public static updateZoneKeyRange ( MongoServer routeSvr, string nameSpace, string FieldName, BsonValue min, BsonValue max, string zone ) : CommandResult
routeSvr MongoServer 路由服务器
nameSpace string 名字空间
FieldName string
min BsonValue 最小值
max BsonValue 最大值
zone string
리턴 CommandResult

프로퍼티 상세

CompactCommand 공개적으로 정적으로 프로퍼티

Compact
public static MongoCommand CompactCommand
리턴 MongoCommand

RepairDatabaseCommand 공개적으로 정적으로 프로퍼티

修复数据库
public static MongoCommand RepairDatabaseCommand
리턴 MongoCommand

ReplSetGetStatusCommand 공개적으로 정적으로 프로퍼티

副本状态 http://www.mongodb.org/display/DOCS/Replica+Set+Commands
public static MongoCommand ReplSetGetStatusCommand
리턴 MongoCommand

ServerStatusCommand 공개적으로 정적으로 프로퍼티

服务器状态 [OLD]http://www.mongodb.org/display/DOCS/serverStatus+Command [NEW]https://docs.mongodb.com/manual/reference/command/serverStatus/
public static MongoCommand ServerStatusCommand
리턴 MongoCommand