## Release Notes: SeaORM 2.0.0-rc.37

*(since 2.0.0-rc.36)*

### New Features

**ER Diagram Generation** (`sea-orm-cli generate entity --er-diagram`)

`sea-orm-cli` can now generate a [Mermaid](https://mermaid.js.org/) ER diagram alongside the entity files. Pass `--er-diagram` to write `entities.mermaid` into the output directory:

```sh
sea-orm-cli generate entity -u postgres://... -o src/entity --er-diagram
```

The diagram annotates columns with `PK`, `FK`, and `UK` markers and renders all relations — including many-to-many via junction tables — as Mermaid `erDiagram` syntax. Example output:

```
erDiagram
    user {
        int id PK
        varchar name
        varchar email UK
        int parent_id FK
    }
    post {
        int id PK
        text title
        int user_id FK
    }
    user }o--|| user : "parent_id"
    post }o--|| user : "user_id"
    post }o--o{ tag : "[post_tag]"
```

**PostgreSQL Statement Timeout** (`ConnectOptions::statement_timeout`)

`ConnectOptions` now accepts a `statement_timeout` for PostgreSQL connections. The timeout is set via the connection options at connect time (no extra round-trip) and causes the server to abort any statement that exceeds the duration:

```rust
ConnectOptions::new(DATABASE_URL)
    .statement_timeout(Duration::from_secs(30))
    .to_owned()
```

Has no effect on MySQL or SQLite connections.

**SQLite `?mode=` URL Parameter Support** (#2987)

The rusqlite driver now parses the `?mode=` query parameter from SQLite connection URLs, matching the behaviour of the sqlx SQLite driver:

| Mode | Behaviour |
|---|---|
| `rwc` (default) | Read-write, create if not exists |
| `rw` | Read-write, must exist |
| `ro` | Read-only |
| `memory` | In-memory database |

```rust
// Open an existing database read-only
let db = Database::connect("sqlite:./data.db?mode=ro").await?;
```

Unsupported parameters or unknown mode values return a `DbErr::Conn` error.

### Bug Fixes

**`no-default-features` compile errors with `mac_address` and `proxy`** (#2992)

- `with-mac_address` feature: added missing `TryGetable` impls, `try_from_u64` impl, postgres array support, and `with-json` serde flag
- `proxy` feature: removed an accidental hard dependency on `serde_json` (now only activated via `with-json`)
- Fixed `cfg` guards on JSON/JSONB proxy row handling to require `with-json`
