Compatibility
Compatibility Specification
Detailed feature support matrix for d4m. All items reflect current trunk (v0.1.0-beta).
Wire Protocol
| Feature | Status |
|---|---|
| OP_MSG (commands) | โ Supported |
| OP_QUERY (legacy) | โ Supported |
| OP_GET_MORE | โ Supported |
| OP_KILL_CURSORS | โ Supported |
| TLS (--tls flag) | โ Supported |
| Checksum flag (0x10000) parse | โ Supported |
| Checksum flag (0x10000) write | โ Not implemented |
| maxWireVersion | โ 21 (MongoDB 8.0+) |
CRUD Operations
| Operation | Status |
|---|---|
insertOne / insertMany | โ Supported |
find with filter, projection, sort, skip, limit | โ Supported |
findOne | โ Supported |
updateOne / updateMany | โ Supported |
deleteOne / deleteMany | โ Supported |
findAndModify (update, remove, upsert, returnNew, sort, fields) | โ Supported |
count | โ Supported |
distinct | โ Supported |
getMore (batched cursor) | โ Supported |
killCursors | โ Supported |
| Bulk writes (document sequences) | โ Supported |
Aggregation Pipeline
| Stage | Status |
|---|---|
$match (pushdown + in-memory) | โ Supported |
$sort (multi-field) | โ Supported |
$skip | โ Supported |
$limit | โ Supported |
$project (inclusion/exclusion, _id handling) | โ Supported |
$group โ $sum, $avg, $min, $max, $first, $last, $push, $addToSet, $stdDevPop, $stdDevSamp, $mergeObjects | โ Supported |
$count | โ Supported |
$unwind (string + document syntax) | โ Supported |
$addFields / $set | โ Supported |
$sample | โ Supported |
$replaceRoot | โ Supported |
$sortByCount | โ Supported |
$lookup (equality + pipeline syntax) | โ Supported |
$out | โ Supported |
$facet | โ Supported |
$unset | โ Supported |
$replaceWith | โ Supported |
| Expression operators ($gt, $gte, $lt, $lte, $eq, $ne, $and, $or, $not, $add, $subtract, $multiply, $divide, $mod, $concat, $cond, $ifNull, $literal, $size) | โ Supported |
| String operators ($toLower, $toUpper, $substrCP, $strLenCP, $trim, $ltrim, $rtrim, $regexMatch) | โ Supported |
| Array operators ($arrayElemAt, $reverseArray, $slice, $in, $size) | โ Supported |
| Math operators ($abs, $ceil, $floor, $round, $trunc, $sqrt, $cmp) | โ Supported |
| Type operators ($type, $toDouble, $toInt, $toLong, $toString, $convert) | โ Supported |
| Date operators ($year, $month, $dayOfMonth, $dayOfWeek, $dayOfYear, $hour, $minute, $second, $millisecond, $week) | โ Supported |
$bucket, $bucketAuto | โ Not implemented |
$graphLookup, $geoNear | โ Not implemented |
$merge | โ Not implemented |
Index Management
| Operation | Status |
|---|---|
createIndexes (single, compound, unique) | โ Supported |
listIndexes | โ Supported |
dropIndexes | โ Supported |
| Index-backed queries | โ Supported |
| TTL / text / geospatial indexes | โ Not implemented |
Authentication & Authorization
| Feature | Status |
|---|---|
| SCRAM-SHA-256 | โ Supported |
| SCRAM-SHA-1 | โ Supported |
--no-auth flag | โ Supported |
| Client proof verification | โ Supported |
| Role-based authorization | โ Supported |
Roles: root, readWrite, read, userAdmin | โ Supported |
createUser / updateUser / dropUser | โ Supported |
usersInfo | โ Supported |
| User persistence (SQLite) | โ Supported |
Database & Collection Management
| Operation | Status |
|---|---|
createCollection | โ Supported |
drop collection | โ Supported |
dropDatabase | โ Supported |
listDatabases | โ Supported |
listCollections | โ Supported |
collStats / dbStats | โ Supported |
Tool Compatibility
| Tool | Status |
|---|---|
| mongosh | โ Verified |
| mongodump | โ Verified |
| mongorestore | โ Verified |
| pymongo 4.x | โ ๏ธ See note |
| MongoDB drivers (OP_MSG) | โ Verified |
โ ๏ธ pymongo 4.17+ C-level BSON encoder strips $-prefixed keys from documents nested inside arrays, which breaks aggregate pipeline stages sent via coll.aggregate(). Use mongosh or raw BSON for aggregate commands. All other operations work correctly with pymongo.
Type Sensitivity
| Behavior | Detail |
|---|---|
Bson::as_i64() / as_f64() / as_str() | โ Match exact types only โ Int32(5).as_i64() returns None |
bson_to_i64() / bson_to_f64() | โ Used throughout โ handle Int32, Int64, Double correctly |
$regex with RegularExpression | โ
Both string and /pattern/ syntax supported |
| Int32/Int64/Double in arithmetic | โ All operators preserve correct types โ $add returns Int64 when all inputs are integer |