---
title: "MongoDB Compatibility Matrix"
---

# MongoDB Compatibility Matrix

:::caution[What the listener serves today]
HeliosDB Full opens a MongoDB listener that accepts and authenticates
connections (SCRAM-SHA-256 only); reading and writing HeliosDB tables through it is
planned, so queries return no documents and writes are not stored today. The
coverage tables on this page describe the design target. GridFS and capped
collections are not supported; both are planned.
:::

Comprehensive compatibility reference for HeliosDB's MongoDB wire protocol implementation.

## Overall Compatibility

| Category | Design coverage | Availability |
|----------|----------|--------|
| Wire Protocol (OP_MSG) | 100% | Available: connect and authenticate |
| BSON Types | 100% | Available in the protocol layer |
| CRUD Operations | 100% | Planned |
| Aggregation Pipeline | 100% | Planned (MongoDB 8.0) |
| Transactions | 100% | Planned |
| Change Streams | 100% | Planned |

## Wire Protocol

### Message Types

| Message | Result | Notes |
|---------|--------|-------|
| OP_MSG | Supported | Modern protocol |
| OP_QUERY | Supported | Legacy, converted to OP_MSG |
| OP_INSERT | Supported | Legacy |
| OP_UPDATE | Supported | Legacy |
| OP_DELETE | Supported | Legacy |
| OP_GET_MORE | Supported | Cursor continuation |
| OP_KILL_CURSORS | Supported | Cursor cleanup |

### OP_MSG Sections

| Section | Result | Notes |
|---------|--------|-------|
| Kind 0 (Body) | Supported | Single document |
| Kind 1 (Sequence) | Supported | Document sequence |
| Checksum | Supported | CRC32C |

## BSON Types

| Type | Code | Result | Notes |
|------|------|--------|-------|
| Double | 0x01 | Supported | Full precision |
| String | 0x02 | Supported | UTF-8 encoded |
| Document | 0x03 | Supported | Nested documents |
| Array | 0x04 | Supported | BSON arrays |
| Binary | 0x05 | Supported | All subtypes |
| Undefined | 0x06 | Supported | Deprecated |
| ObjectId | 0x07 | Supported | 12-byte identifier |
| Boolean | 0x08 | Supported | true/false |
| DateTime | 0x09 | Supported | UTC milliseconds |
| Null | 0x0A | Supported | null value |
| Regex | 0x0B | Supported | Patterns + options |
| DBPointer | 0x0C | Supported | Deprecated |
| JavaScript | 0x0D | Supported | Code string |
| Symbol | 0x0E | Supported | Deprecated |
| JavaScript w/scope | 0x0F | Supported | Code with scope |
| Int32 | 0x10 | Supported | 32-bit integer |
| Timestamp | 0x11 | Supported | MongoDB timestamp |
| Int64 | 0x12 | Supported | 64-bit integer |
| Decimal128 | 0x13 | Supported | High-precision |
| MinKey | 0xFF | Supported | Comparison |
| MaxKey | 0x7F | Supported | Comparison |

## CRUD Operations

### Insert

| Operation | Result | Notes |
|-----------|--------|-------|
| insertOne | Supported | Single document |
| insertMany | Supported | Batch insert |
| ordered | Supported | Stop on error |
| unordered | Supported | Continue on error |
| writeConcern | Supported | All options |

### Find

| Operation | Result | Notes |
|-----------|--------|-------|
| find | Supported | Query documents |
| findOne | Supported | Single document |
| projection | Supported | Field selection |
| sort | Supported | Multi-field sort |
| skip | Supported | Pagination |
| limit | Supported | Result limit |
| hint | Supported | Index hint |
| explain | Supported | Query explain |
| allowDiskUse | Supported | Large sorts |

### Update

| Operation | Result | Notes |
|-----------|--------|-------|
| updateOne | Supported | Single document |
| updateMany | Supported | Multiple documents |
| replaceOne | Supported | Document replacement |
| upsert | Supported | Insert if not exists |
| arrayFilters | Supported | Array updates |

### Delete

| Operation | Result | Notes |
|-----------|--------|-------|
| deleteOne | Supported | Single document |
| deleteMany | Supported | Multiple documents |
| writeConcern | Supported | All options |

## Query Operators

### Comparison

| Operator | Result | Description |
|----------|--------|-------------|
| $eq | Supported | Equal |
| $ne | Supported | Not equal |
| $gt | Supported | Greater than |
| $gte | Supported | Greater or equal |
| $lt | Supported | Less than |
| $lte | Supported | Less or equal |
| $in | Supported | In array |
| $nin | Supported | Not in array |

### Logical

| Operator | Result | Description |
|----------|--------|-------------|
| $and | Supported | Logical AND |
| $or | Supported | Logical OR |
| $not | Supported | Logical NOT |
| $nor | Supported | Logical NOR |

### Element

| Operator | Result | Description |
|----------|--------|-------------|
| $exists | Supported | Field exists |
| $type | Supported | BSON type check |

### Evaluation

| Operator | Result | Description |
|----------|--------|-------------|
| $regex | Supported | Regular expression |
| $text | Supported | Text search |
| $where | Supported | JavaScript expression |
| $expr | Supported | Aggregation expression |
| $mod | Supported | Modulo |
| $jsonSchema | Supported | JSON schema validation |

### Array

| Operator | Result | Description |
|----------|--------|-------------|
| $all | Supported | Contains all |
| $elemMatch | Supported | Element matches |
| $size | Supported | Array size |

### Bitwise

| Operator | Result | Description |
|----------|--------|-------------|
| $bitsAllClear | Supported | All bits clear |
| $bitsAllSet | Supported | All bits set |
| $bitsAnyClear | Supported | Any bit clear |
| $bitsAnySet | Supported | Any bit set |

### Geospatial

| Operator | Result | Description |
|----------|--------|-------------|
| $geoWithin | Supported | Within geometry |
| $geoIntersects | Supported | Intersects geometry |
| $near | Supported | Near point |
| $nearSphere | Supported | Near point (sphere) |

## Update Operators

### Field

| Operator | Result | Description |
|----------|--------|-------------|
| $set | Supported | Set field value |
| $setOnInsert | Supported | Set on insert only |
| $unset | Supported | Remove field |
| $rename | Supported | Rename field |
| $inc | Supported | Increment |
| $mul | Supported | Multiply |
| $min | Supported | Update if less |
| $max | Supported | Update if greater |
| $currentDate | Supported | Set current date |

### Array

| Operator | Result | Description |
|----------|--------|-------------|
| $push | Supported | Add to array |
| $addToSet | Supported | Add unique |
| $pop | Supported | Remove first/last |
| $pull | Supported | Remove matching |
| $pullAll | Supported | Remove all matching |
| $ | Supported | Positional update |
| $[] | Supported | All elements |
| $[<identifier>] | Supported | Filtered positional |
| $each | Supported | Multiple values |
| $position | Supported | Insert position |
| $slice | Supported | Limit array size |
| $sort | Supported | Sort array |

### Bitwise

| Operator | Result | Description |
|----------|--------|-------------|
| $bit | Supported | Bitwise operations |

## Aggregation Pipeline

### Basic Stages

| Stage | Result | Description |
|-------|--------|-------------|
| $match | Supported | Filter documents |
| $project | Supported | Reshape documents |
| $addFields | Supported | Add fields |
| $set | Supported | Alias for $addFields |
| $unset | Supported | Remove fields |
| $group | Supported | Group and aggregate |
| $sort | Supported | Sort documents |
| $limit | Supported | Limit results |
| $skip | Supported | Skip documents |
| $count | Supported | Count documents |
| $out | Supported | Write to collection |
| $merge | Supported | Merge results |

### Advanced Stages

| Stage | Result | Description |
|-------|--------|-------------|
| $lookup | Supported | Left outer join |
| $graphLookup | Supported | Recursive lookup |
| $unwind | Supported | Deconstruct arrays |
| $facet | Supported | Multi-faceted aggregation |
| $bucket | Supported | Bucket by boundaries |
| $bucketAuto | Supported | Auto-bucket |
| $sortByCount | Supported | Group and count |
| $sample | Supported | Random sample |
| $redact | Supported | Field-level redaction |
| $replaceRoot | Supported | Replace document |
| $replaceWith | Supported | Alias for $replaceRoot |

### Window Stages (MongoDB 5.0+)

| Stage | Result | Description |
|-------|--------|-------------|
| $setWindowFields | Supported | Window functions |
| $densify | Supported | Fill gaps |
| $fill | Supported | Fill nulls |

### Union Stages

| Stage | Result | Description |
|-------|--------|-------------|
| $unionWith | Supported | Union collections |

### Accumulator Operators

| Operator | Result | Description |
|----------|--------|-------------|
| $sum | Supported | Sum values |
| $avg | Supported | Average |
| $min | Supported | Minimum |
| $max | Supported | Maximum |
| $first | Supported | First value |
| $last | Supported | Last value |
| $push | Supported | Array of values |
| $addToSet | Supported | Unique values |
| $stdDevPop | Supported | Population std dev |
| $stdDevSamp | Supported | Sample std dev |
| $count | Supported | Count |

## Transactions

| Feature | Result | Notes |
|---------|--------|-------|
| startSession | Supported | Session management |
| startTransaction | Supported | Begin transaction |
| commitTransaction | Supported | Commit changes |
| abortTransaction | Supported | Rollback changes |
| Read Concern | Supported | local, majority, snapshot |
| Write Concern | Supported | All levels |
| Isolation | Supported | SERIALIZABLE |

## Change Streams

| Feature | Result | Notes |
|---------|--------|-------|
| watch() | Supported | Collection/database/cluster |
| Pipeline filter | Supported | Aggregation stages |
| Resume token | Supported | Resume after disconnect |
| Full document | Supported | Include full document |
| Update description | Supported | Changed fields |

### Operation Types

| Type | Result |
|------|--------|
| insert | Supported |
| update | Supported |
| replace | Supported |
| delete | Supported |
| drop | Supported |
| rename | Supported |
| dropDatabase | Supported |
| invalidate | Supported |

## Indexes

| Type | Result | Notes |
|------|--------|-------|
| Single field | Supported | Standard index |
| Compound | Supported | Multiple fields |
| Unique | Supported | Enforce uniqueness |
| Sparse | Supported | Skip null values |
| TTL | Supported | Expiring documents |
| Text | Supported | Full-text search |
| 2dsphere | Supported | Geospatial |
| 2d | Supported | Planar geometry |
| Hashed | Supported | Hash-based |
| Wildcard | Supported | Dynamic fields |

## Authentication

| Method | Result | Notes |
|--------|--------|-------|
| SCRAM-SHA-1 | Not supported | Set `authMechanism=SCRAM-SHA-256` |
| SCRAM-SHA-256 | Supported | The only accepted method |
| MONGODB-CR | Not supported | Rejected |
| MONGODB-X509 | Not supported | |
| MONGODB-AWS | Not supported | |
| PLAIN | Not supported | |

The MongoDB listener accepts SCRAM-SHA-256 only.

## Known Limitations

### Not Supported

| Feature | Reason |
|---------|--------|
| GridFS | Use blob storage |
| Capped collections | Use TTL indexes |
| Server-side JavaScript | Security concern |
| Map-reduce | Use aggregation |

### Behavioral Differences

1. **Storage**: Documents stored as JSONB internally
2. **Indexes**: Translated to HeliosDB index types
3. **Sharding**: Uses HeliosDB's sharding

---

**Related**: [README.md](https://www.heliosdb.com/docs/full/reference/protocols/mongodb/readme/) | [CONFIGURATION.md](https://www.heliosdb.com/docs/full/reference/protocols/mongodb/configuration/) | [EXAMPLES.md](https://www.heliosdb.com/docs/full/reference/protocols/mongodb/examples/)
