/** * Add delete query to list of queries */ public override void RegisterDeleted(string collectionName, FilterDefinition <BsonDocument> filterDefinition) { IMongoCollection <BsonDocument> collection = DataSource.GetCollection(collectionName); DeleteMongoDbQuery deleteQuery = new DeleteMongoDbQuery(collection, filterDefinition); LoggingMongoDbQuery query = new LoggingMongoDbQuery(deleteQuery); Queries.Add(query); }
/** * Add creation query to list of queries */ public override void RegisterNew(string collectionName, BsonDocument document) { IMongoCollection <BsonDocument> collection = DataSource.GetCollection(collectionName); CreateMongoDbQuery createQuery = new CreateMongoDbQuery(collection, document); LoggingMongoDbQuery query = new LoggingMongoDbQuery(createQuery); Queries.Add(query); }
public override void RegisterDirty(string collectionName, FilterDefinition <BsonDocument> filterDefinition, BsonDocument document) { IMongoCollection <BsonDocument> collection = DataSource.GetCollection(collectionName); ReplaceMongoDbQuery replaceQuery = new ReplaceMongoDbQuery(collection, filterDefinition, document); LoggingMongoDbQuery query = new LoggingMongoDbQuery(replaceQuery); Queries.Add(query); }
/** * Add update query to list of queries */ public override void RegisterDirty(string collectionName, FilterDefinition <BsonDocument> filterDefinition, UpdateDefinition <BsonDocument> updateDefinition) { IMongoCollection <BsonDocument> collection = DataSource.GetCollection(collectionName); UpdateMongoDbQuery updateQuery = new UpdateMongoDbQuery(collection, filterDefinition, updateDefinition); LoggingMongoDbQuery query = new LoggingMongoDbQuery(updateQuery); Queries.Add(query); }