oxide
oxide copied to clipboard
Teach your PostgreSQL database how to speak MongoDB Wire Protocol
Most of the command is supported, but this is one of the options missing.
Operations like `$multiply` are confined to the stage it's coded on (`$group` in this case). We should extract all operations and allow them to be called from many different places,...
- [x] Include Exising Fields - https://www.mongodb.com/docs/manual/reference/operator/aggregation/project/#include-existing-fields - [x] Exclude Fields - https://www.mongodb.com/docs/manual/reference/operator/aggregation/project/#exclude-fields - [ ] Exclude fields conditionally - [x] Suppress the `_id` field - https://www.mongodb.com/docs/manual/reference/operator/aggregation/project/#suppress-the-_id-field - [x] Add...
Right now we only support upsert for replacement documents. Research and implement it for other operations, like `$set` or `$inc`.
Our implementation only deletes all records that match the query. We need to add proper support for `deleteOne` and `ordered`: https://www.mongodb.com/docs/manual/reference/method/db.collection.deleteOne/ ```rust [Document({"delete": String("test_16deae6e-2afa-42a6-b129-ceef7d46c19b"), "deletes": Array([Document({"q": Document({"a": Int32(1)}), "limit": Int32(0)})]),...
When you send an `update` command with multiple clauses, it should be atomic and if one of the updates don't work, all updates should be rolled back.
We only support `$set`, `$unset` and `$inc` from the list below. https://www.mongodb.com/docs/manual/reference/operator/update/#std-label-update-operators
We get the following query: ```sql UPDATE "db_test"."test_collection_1657995566780048000" SET _jsonb = _jsonb || json_build_object('v', COALESCE(_jsonb->'v')::numeric + 10)::jsonb || json_build_object('z', COALESCE(_jsonb->'z')::numeric + -2)::jsonb WHERE (CASE WHEN (_jsonb->'one' ? '$f') THEN (_jsonb->'one'->>'$f')::numeric...
https://www.mongodb.com/docs/manual/reference/operator/query/nor/