mongo-rust-driver icon indicating copy to clipboard operation
mongo-rust-driver copied to clipboard

RUST-1800: Modularize unified_runner/operation.rs

Open jadalilleboe opened this issue 1 year ago • 0 comments

This PR modularizes unified_runner/operation.rs by splitting it out into submodules of related groups of operations.

I split the operations by intuition and based on the name, please let me know if you think any of the operations should be grouped differently:

collection_operations.rs- AssertCollectionExists, AssertCollectionNotExists, CreateCollection, DropCollection, RenameCollection

command_operations.rs- RunCommand, RunCursorCommand, CreateCommandCursor

connection_operations.rs- Close, AssertNumberConnectionsCheckedOut

count_operations.rs- Aggregate, Distinct, CountDocuments, EstimatedDocumentCount, AssertEventCount

delete_operations.rs- DeleteMany, DeleteOne

failpoint_operations.rs- FailPointCommand, TargetedFailPoint

find_operations.rs - Find, CreateFindCursor, FindOne, FindOneAndUpdate, FindOneAndReplace, FindOneAndDelete

index_operations.rs- CreateIndex, ListIndexes, ListIndexNames, AssertIndexExists, AssertIndexNotExists, DropIndex

insert_operations.rs- InsertOne, InsertMany

iteration_operations.rs- IterateUntilDocumentOrError, IterateOnce

list_operations.rs- ListDatabases, ListDatabaseNames, ListCollections, ListCollectionNames

session_operations.rs- EndSession, AssertSessionTransactionState, AssertSessionPinned, AssertSessionUnpinned, AssertDifferentLsidOnLastTwoCommands, AssertSameLsidOnLastTwoCommands, AssertSessionDirty, AssertSessionNotDirty

thread_operations.rs- RunOnThread, WaitForThread

topology_operations.rs- RecordTopologyDescription, AssertTopologyType

transaction_operations.rs- StartTransaction, CommitTransaction, AbortTransaction, WithTransaction

update_operations.rs- UpdateMany, UpdateOne, ReplaceOne

upload_download_operations.rs- Download, DownloadByName, Delete, Upload

wait_operations.rs- WaitForEvent, WaitForPrimaryChange, Wait

Also there were a few in unified_runner/operation.rs that didn't seem to fit into any so I left it in that file: CreateChangeStream, Loop, CreateEntities, UnimplementedOperation

jadalilleboe avatar Oct 24 '24 18:10 jadalilleboe