Expand description
JSON and document operations support.
This module provides types for working with JSON columns and document operations across different database backends.
§Supported Features
| Feature | PostgreSQL | MySQL | SQLite | MSSQL | MongoDB |
|---|---|---|---|---|---|
| JSON column type | ✅ JSONB | ✅ JSON | ✅ JSON | ✅ | ✅ Native |
| JSON path queries | ✅ @>, -> | ✅ ->, ->> | ✅ ->, ->> | ✅ JSON_VALUE | ✅ Dot |
| JSON indexing | ✅ GIN | ✅ Gen cols | ❌ | ✅ | ✅ Native |
| JSON aggregation | ✅ | ✅ | ✅ | ✅ | ✅ |
| Array operations | ✅ | ✅ | ❌ | ✅ | ✅ Native |
§Example Usage
ⓘ
use prax_query::json::{JsonPath, JsonOp, JsonFilter};
// Path query
let filter = JsonPath::new("metadata")
.field("role")
.equals("admin");
// JSON mutation
let update = JsonOp::set("metadata", JsonPath::new("$.settings.theme"), "dark");Modules§
- mongodb
- MongoDB document operations.
Structs§
- Json
Index - JSON index definition.
- Json
Index Builder - Builder for JSON indexes.
- Json
Path - A JSON path expression for navigating JSON documents.
Enums§
- JsonAgg
- JSON aggregation operations.
- Json
Filter - A JSON filter operation.
- JsonOp
- JSON mutation operations.
- Path
Segment - A segment in a JSON path.