dbx/crates
Hiep Le 78019c44e2
fix(mongo): support ISODate() and new Date() in MongoDB queries
* fix(mongo): hỗ trợ ISODate() và new Date() trong query MongoDB

Parser shell MongoDB ở frontend chỉ chuyển ObjectId(...) sang extended JSON,
nên filter chứa ISODate("...")/new Date("...") không parse được: câu lệnh rơi
xuống SQL executor và báo lỗi "Use MongoDB-specific commands".

Bổ sung rewrite ISODate(x)/new Date(x) -> {"$date":x} trong normalizeJsonArgument,
khớp với json_value_to_bson của backend (đã hiểu $date/$oid). Thêm test cho
filter dùng ISODate và new Date.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* fix(mongo): decode $date extended JSON trong filter query

json_filter_value_to_bson chỉ chuyển {"$oid":...} nên filter chứa {"$date":...}
bị gửi thẳng lên server: { field: {"$date":...} } lỗi "unknown operator: $date",
còn { field: {"$gte": {"$date":...}} } so sánh với sub-document nên không khớp gì
(trả về rỗng).

Thêm nhánh parse_extended_json_date vào json_filter_value_to_bson, đồng bộ với
json_value_to_bson (vốn đã hiểu $date/$oid). Thêm test cho cả equality và $gte.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-06 18:21:15 +08:00
..
dbx-core fix(mongo): support ISODate() and new Date() in MongoDB queries 2026-07-06 18:21:15 +08:00
dbx-web feat(mongodb): improve GridFS manager filtering and sorting 2026-07-06 17:17:33 +08:00
README.md docs(repo): add directory readmes 2026-05-18 02:50:50 +08:00

README.md

Crates

Rust crates for DBX live here.

Directories

  • dbx-core/ - shared database core, drivers, schema/query logic, import/export, transfer, and plugin support.
  • dbx-web/ - the Docker/web backend service binary published as dbx-web.

The workspace root is defined in the repository-level Cargo.toml.