|
2 | 2 |
|
3 | 3 | All notable changes to TypeBridge will be documented in this file. |
4 | 4 |
|
| 5 | +## [Unreleased] |
| 6 | + |
| 7 | +### New Features |
| 8 | + |
| 9 | +#### Put (Upsert) Clause — `type-bridge-core-lib` |
| 10 | +- **Added `Clause::Put(Vec<Statement>)` variant** for idempotent insert (upsert) operations |
| 11 | + - Parser: `parse_put_clause` with keyword lookahead in both `parse_patterns` and `parse_statements` |
| 12 | + - Compiler: Generates `put\n<statements>;` TypeQL output |
| 13 | + - Validation: Reuses Insert validation rules (`Clause::Insert | Clause::Put`) |
| 14 | + - Full roundtrip support (parse → AST → compile → parse) |
| 15 | + |
| 16 | +### Refactoring |
| 17 | + |
| 18 | +#### Server API Simplification — `type-bridge-server` |
| 19 | +- **Removed CRUD convenience endpoints** (`/entities/*`, `/relations/*`) — the `/query` endpoint handles all AST-based queries |
| 20 | +- **Removed `/query/raw` endpoint** — raw TypeQL bypasses AST interception, defeating the middleware purpose |
| 21 | +- **Removed `CrudInfo` and `CrudInterceptor`** — built exclusively for CRUD handlers, dead weight without them |
| 22 | +- **Removed `execute_raw()` and `RawQueryInput`** from pipeline |
| 23 | +- **Removed `RawQueryRequest`** from transport types |
| 24 | +- **Removed `crud_builder` benchmark** and `criterion` dev-dependency |
| 25 | +- **Server now has 4 endpoints**: `POST /query`, `POST /query/validate`, `GET /health`, `GET /schema` |
| 26 | + |
5 | 27 | ## [1.4.0] - 2026-02-20 |
6 | 28 |
|
| 29 | +### Highlights |
| 30 | + |
| 31 | +- 5 new Rust crates: `core-lib`, `orm`, `orm-derive`, `server`, and `python` (PyO3 bindings) |
| 32 | +- Up to **40x faster validation** and **2.5x faster query compilation** via the Rust backend |
| 33 | +- Async Rust ORM with derive macros, chainable queries, and batch operations |
| 34 | +- Query-intercepting proxy server with REST endpoints |
| 35 | +- MkDocs Material documentation site |
| 36 | + |
7 | 37 | ### New Features |
8 | 38 |
|
9 | | -#### Rust Core Integration (PRs #95, #101–#107) |
| 39 | +#### Rust Core — `type-bridge-core-lib` (PRs #95, #101-#108) |
10 | 40 | - **TypeQL schema parser** with inheritance resolution and PyO3 bindings |
11 | 41 | - **TypeQL query parser** with bidirectional AST roundtrip |
12 | | -- **Schema-aware query validation** with PyO3 bindings |
| 42 | +- **Schema-aware query validation** with statement and pattern validators |
13 | 43 | - **Rust-backed value coercion** and `format_value` |
14 | 44 | - **Custom validation rules** with portable JSON DSL |
15 | 45 | - **Wired Rust core into Python** compiler and validation pipeline |
16 | 46 |
|
17 | | -#### Rust ORM — `type-bridge-orm` (PR #114) |
18 | | -- **Async Rust ORM** with entity CRUD and mock-testable session layer |
19 | | -- **Derive macros** — `TypeBridgeEntity`, `TypeBridgeAttribute`, `TypeBridgeRelation` |
20 | | -- **Relation support** with update/put operations |
| 47 | +#### Async Rust ORM — `type-bridge-orm` (PR #114) |
| 48 | +- **Async ORM** with entity CRUD and mock-testable session layer |
| 49 | +- **Derive macros** — `#[derive(TypeBridgeEntity)]`, `#[derive(TypeBridgeRelation)]`, `#[derive(TypeBridgeAttribute)]` |
21 | 50 | - **Chainable query builders** with expression filtering and aggregation |
22 | 51 | - **Schema management** — registration, generation, diff, and sync |
23 | | -- **Abstract types, inheritance, and code generator** |
| 52 | +- **Abstract types** with inheritance and code generation |
24 | 53 | - **Batch operations** — `insert_many`, `delete_many`, `update_many` |
25 | 54 | - **`FieldRef<A>`** for type-safe query field references |
26 | | -- **`include_schema!` proc-macro** for compile-time TQL codegen |
| 55 | +- **`include_schema!`** proc-macro for compile-time TQL codegen |
27 | 56 | - **Schema introspection** from live TypeDB database |
28 | 57 | - **Group-by queries** with `GroupByResult` |
29 | 58 | - **Role player field access** for relation query filtering |
30 | | -- **Expression helpers** — `in_range`, `startswith`, `endswith` |
31 | | -- **Connection pooling** with `Database::into_shared` |
| 59 | +- **Expression helpers** — `in_range()`, `startswith()`, `endswith()` |
| 60 | +- **Connection pooling** with `Database::into_shared()` |
32 | 61 | - **Serde support** on all ORM model types |
33 | | -- **Structured tracing spans** on all public methods |
| 62 | +- **Structured tracing** spans on all public methods |
34 | 63 |
|
35 | | -#### Query Intercept Proxy Server — `type-bridge-server` (PR #109) |
| 64 | +#### Query Intercept Proxy — `type-bridge-server` (PR #109) |
36 | 65 | - **REST CRUD endpoints** with schema-aware query building |
37 | | -- **`CrudQueryBuilder` PyO3 class** for TypeQL generation |
38 | | -- **Extensible library/framework architecture** |
39 | | -- **207 tests** with 100% MC/DC coverage and CI codecov integration |
| 66 | +- **`CrudQueryBuilder` PyO3 class** for TypeQL generation from Python |
| 67 | +- **Extensible library/framework** — pluggable `QueryExecutor`, `Interceptor`, `SchemaSource` |
| 68 | +- **207 tests** with 100% MC/DC coverage |
40 | 69 |
|
41 | | -### Improvements |
| 70 | +### Performance: Python vs Rust |
| 71 | + |
| 72 | +#### Validation |
| 73 | + |
| 74 | +| Operation | Python | Rust | Speedup | |
| 75 | +|-----------|--------|------|---------| |
| 76 | +| Single type name | 1.89 us | 354.75 ns | **5.3x** | |
| 77 | +| Long name (100+ chars) | 24.90 us | 620.52 ns | **40.1x** | |
| 78 | +| Batch 1,000 names | 5.32 ms | 266.80 us | **19.9x** | |
| 79 | +| Batch 5,000 names | 28.02 ms | 1.33 ms | **21.1x** | |
| 80 | + |
| 81 | +#### Query Compilation (via serde bridge) |
| 82 | + |
| 83 | +| Operation | Python | Rust | Speedup | |
| 84 | +|-----------|--------|------|---------| |
| 85 | +| Standalone update | 93.28 us | 37.82 us | **2.5x** | |
| 86 | +| Large batch (200 clauses) | 2.26 ms | 1.07 ms | **2.1x** | |
| 87 | +| Heavy insert (100x6) | 1.71 ms | 896.19 us | **1.9x** | |
| 88 | + |
| 89 | +### Documentation & CI |
42 | 90 |
|
43 | | -#### Documentation & CI |
44 | 91 | - **MkDocs + Material** documentation site with auto-generated API reference (PR #98) |
45 | | -- **Rust crate CI** and multi-platform wheel builds (PR #95) |
46 | | -- **Comprehensive benchmark suite** with TOML storage and diff support (PR #103) |
47 | | -- Full documentation and metadata polish for Rust core |
| 92 | +- **Rust crate CI** with multi-platform wheel builds — Linux (x86_64, aarch64), macOS (x86_64, aarch64), Windows (x86_64) (PR #95) |
| 93 | +- **Comprehensive benchmark suite** with TOML storage, comparison reports, and markdown generation (PR #103) |
| 94 | +- **Codecov integration** for Rust coverage tracking (PR #109) |
48 | 95 |
|
49 | 96 | ### Bug Fixes |
50 | 97 |
|
51 | 98 | - Resolve Rust 1.93.0 clippy lint errors |
52 | 99 | - Pin Python 3.13 for Rust CI jobs and fix coverage script |
| 100 | +- Add version specifiers to inter-crate path dependencies for crates.io publishing |
| 101 | +- Make release workflow idempotent (skip already-published packages) |
53 | 102 |
|
54 | 103 | ## [1.3.0] - 2026-02-09 |
55 | 104 |
|
|
0 commit comments