Quick Start
Type Mappings
| OmniQL | MongoDB |
|---|---|
AUTO | ObjectId |
BIGAUTO | ObjectId |
STRING | String |
TEXT | String |
CHAR | String |
INT | Int32 |
BIGINT | Int64 |
SMALLINT | Int32 |
DECIMAL | Decimal128 |
NUMERIC | Decimal128 |
FLOAT | Double |
REAL | Double |
BOOLEAN | Boolean |
BOOL | Boolean |
TIMESTAMP | Date |
DATETIME | Date |
DATE | Date |
TIME | String |
JSON | Object |
JSONB | Object |
UUID | UUID |
BINARY | BinData |
BLOB | BinData |
Entity Naming
OmniQL entities become collection names (lowercase):| OmniQL | MongoDB |
|---|---|
User | users |
Order | orders |
OrderItem | orderitems |
Translation Examples
CRUD Operations
GET (find)Filtering (Operators)
| OmniQL | MongoDB |
|---|---|
= | $eq |
!= | $ne |
> | $gt |
>= | $gte |
< | $lt |
<= | $lte |
IN | $in |
NOT IN | $nin |
LIKE | $regex |
IS NULL | $eq: null |
IS NOT NULL | $ne: null |
AND | implicit / $and |
OR | $or |
Pagination
Aggregation
COUNTJoins ($lookup)
OmniQL joins translate to MongoDB’s$lookup aggregation:
Window Functions (MongoDB 5.0+)
- ROW NUMBER →
$documentNumber - RANK →
$rank - DENSE RANK →
$denseRank - LAG/LEAD →
$shift
Set Operations (MongoDB 4.4+)
CASE Expressions
Transactions (Replica Set Required)
Permissions
CREATE USER:Supported Operations
| Category | Operations | Support |
|---|---|---|
| CRUD | GET, CREATE, UPDATE, DELETE, UPSERT, BULK INSERT, REPLACE | Full |
| Filtering | All operators (=, !=, IN, BETWEEN, LIKE, IS NULL, etc.) | Full |
| Aggregation | COUNT, SUM, AVG, MIN, MAX | Full |
| Grouping | GROUP BY, HAVING | Full |
| Sorting | ORDER BY, LIMIT, OFFSET | Full |
| Joins | INNER, LEFT, RIGHT, FULL | Via $lookup |
| Window Functions | ROW NUMBER, RANK, DENSE RANK, LAG, LEAD | MongoDB 5.0+ |
| Set Operations | UNION, UNION ALL | MongoDB 4.4+ |
| Expressions | Arithmetic (+, -, *, /, %), CASE WHEN | Full |
| Functions | UPPER, LOWER, CONCAT, LENGTH, ABS, ROUND | Full |
| Transactions | BEGIN, COMMIT, ROLLBACK | Replica set only |
| DDL | CREATE/DROP COLLECTION, RENAME, CREATE VIEW | Full |
| DCL | CREATE/DROP USER, CREATE/DROP ROLE, GRANT, REVOKE | Full |
Limitations
| Feature | Status | Notes |
|---|---|---|
| SAVEPOINT | Not supported | MongoDB has no savepoint concept |
| ROLLBACK TO | Not supported | No partial rollback |
| RELEASE SAVEPOINT | Not supported | No savepoints |
| INTERSECT | Not supported | Use aggregation workarounds |
| EXCEPT | Not supported | Use aggregation workarounds |
| CTEs | Not supported | Use aggregation pipelines instead |
| Single-node transactions | Not supported | Requires replica set |
Version Requirements
| Feature | Minimum MongoDB Version |
|---|---|
| Basic CRUD | 3.6+ |
| Transactions | 4.0+ (replica set) |
| $unionWith | 4.4+ |
| $setWindowFields | 5.0+ |

