@@ -121,20 +121,56 @@ Results are returned in Extended JSON (Relaxed) format:
121121| BinData() | ` BinData(subtype, base64) ` | |
122122| RegExp() | ` RegExp("pattern", "flags") ` , ` /pattern/flags ` | |
123123
124- ### Milestone 2: Write Operations (Planned)
124+ ### Milestone 2: Write Operations (Current)
125+
126+ #### Insert Commands
127+
128+ | Command | Syntax | Status |
129+ | ---------| --------| --------|
130+ | db.collection.insertOne() | ` insertOne(document, options) ` | Supported |
131+ | db.collection.insertMany() | ` insertMany(documents, options) ` | Supported |
132+
133+ #### Update Commands
134+
135+ | Command | Syntax | Status |
136+ | ---------| --------| --------|
137+ | db.collection.updateOne() | ` updateOne(filter, update, options) ` | Supported |
138+ | db.collection.updateMany() | ` updateMany(filter, update, options) ` | Supported |
139+ | db.collection.replaceOne() | ` replaceOne(filter, replacement, options) ` | Supported |
140+
141+ #### Delete Commands
142+
143+ | Command | Syntax | Status |
144+ | ---------| --------| --------|
145+ | db.collection.deleteOne() | ` deleteOne(filter, options) ` | Supported |
146+ | db.collection.deleteMany() | ` deleteMany(filter, options) ` | Supported |
147+
148+ #### Atomic Find-and-Modify Commands
125149
126150| Command | Syntax | Status |
127151| ---------| --------| --------|
128- | db.collection.insertOne() | ` insertOne(document) ` | Not yet supported |
129- | db.collection.insertMany() | ` insertMany(documents) ` | Not yet supported |
130- | db.collection.updateOne() | ` updateOne(filter, update) ` | Not yet supported |
131- | db.collection.updateMany() | ` updateMany(filter, update) ` | Not yet supported |
132- | db.collection.deleteOne() | ` deleteOne(filter) ` | Not yet supported |
133- | db.collection.deleteMany() | ` deleteMany(filter) ` | Not yet supported |
134- | db.collection.replaceOne() | ` replaceOne(filter, replacement) ` | Not yet supported |
135- | db.collection.findOneAndUpdate() | ` findOneAndUpdate(filter, update) ` | Not yet supported |
136- | db.collection.findOneAndReplace() | ` findOneAndReplace(filter, replacement) ` | Not yet supported |
137- | db.collection.findOneAndDelete() | ` findOneAndDelete(filter) ` | Not yet supported |
152+ | db.collection.findOneAndUpdate() | ` findOneAndUpdate(filter, update, options) ` | Supported |
153+ | db.collection.findOneAndReplace() | ` findOneAndReplace(filter, replacement, options) ` | Supported |
154+ | db.collection.findOneAndDelete() | ` findOneAndDelete(filter, options) ` | Supported |
155+
156+ #### Write Operation Options
157+
158+ | Option | Applies To | Description |
159+ | --------| -----------| -------------|
160+ | ` writeConcern ` | All write ops | Write concern settings (` w ` , ` j ` , ` wtimeout ` * ) |
161+ | ` bypassDocumentValidation ` | Insert, Update, Replace, FindOneAndUpdate/Replace | Skip schema validation |
162+ | ` comment ` | All write ops | Comment for server logs |
163+ | ` ordered ` | insertMany | Execute inserts sequentially (default: true) |
164+ | ` upsert ` | Update, Replace, FindOneAndUpdate/Replace | Insert if no match found |
165+ | ` hint ` | Update, Replace, Delete, FindOneAnd* | Force index usage |
166+ | ` collation ` | Update, Replace, Delete, FindOneAnd* | String comparison rules |
167+ | ` arrayFilters ` | updateOne, updateMany, findOneAndUpdate | Array element filtering |
168+ | ` let ` | Update, Replace, Delete, FindOneAnd* | Variables for expressions |
169+ | ` sort ` | updateOne, replaceOne, FindOneAnd* | Document selection order |
170+ | ` projection ` | FindOneAnd* | Fields to return |
171+ | ` returnDocument ` | FindOneAndUpdate/Replace | Return "before" or "after" |
172+
173+ * Note: ` wtimeout ` is parsed but ignored as it's not supported in MongoDB Go driver v2.
138174
139175### Milestone 3: Administrative Operations (Planned)
140176
0 commit comments