> ## Documentation Index
> Fetch the complete documentation index at: https://warden.buildlab.in/llms.txt
> Use this file to discover all available pages before exploring further.

# In-memory engine

> The reference implementation of the connector contract — for demos, tests, and writing new connectors.

The `memory` engine is a complete connector with no database behind it. It exists for three jobs:

1. **Demos and tests** that need a governed connection in one command, with no server to install.
2. **The worked example** a new connector is written against.
3. **A home for the certification corpus**: 124 cases, strict, including around eighty adversarial ones.

It is not for production. It holds data in process memory, and loses it on exit.

## Configuring one

```yaml theme={null}
connections:
  - name: staging
    engine: memory
    policy: ./policies/staging.yaml
    seed:
      resources:
        - kind: collection
          path: [shop, orders]
          fields:
            - { name: id, type: string, identifying: true }
            - { name: tenant_id, type: string }
            - { name: status, type: enum, enum_values: [paid, refunded, cancelled] }
          rows:
            - { id: ord_1, tenant_id: acme, status: paid }
            - { id: ord_2, tenant_id: globex, status: paid }
```

A connection with no seed holds nothing, and the gateway warns rather than leaving you wondering why every query is empty.

## The command grammar

This engine is command-shaped rather than string-shaped, which is the point: it proves the IR is not secretly SQL-flavoured.

```json theme={null}
{
  "verb": "update",
  "resource": "orders",
  "filter": { "id": "$0" },
  "set": { "status": "refunded" }
}
```

Verbs: `find`, `insert`, `update`, `delete`, `create`, `drop`, `eval`. Filters take scalars or one operator each (`eq`, `in`, `ne`, `gt`, `gte`, `lt`, `lte`, `exists`). `"$0"` references a bound parameter.

The parser refuses rather than guesses:

* **A key the verb does not use** — a `find` carrying `set` — is refused, not ignored. Ignoring it is how a write gets reviewed as a harmless read.
* **A filter on a field the resource does not have** is refused, because it would otherwise read as a precise lookup while matching nothing.
* **A malformed parameter token** (`$x`, `$-1`) is refused rather than treated as a literal string.
* **An operator it cannot normalise** becomes an unknown predicate carrying a hazard, which makes the operation unbounded — the honest representation of "well-formed, and I cannot reason about it".

## What it certifies

`go run ./cmd/wardencert -engine memory -strict` runs every category against it: contract, parse, classification, adversarial, scope, governance, limits, dry run, and fence. It is the suite that runs on every commit in CI, and the corpus a new connector inherits.

> [!NOTE]
>
> Guarantees are labelled honestly here too. The engine has no transactions, so a DDL preview reports `static` fidelity rather than pretending to be exact — the same rule that governs every other connector.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.