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

# DB Adapter • Rust AI Agent SDK

> DbAdapter: Database adapter trait

# DbAdapter

> Defined in the [**extras**](../modules/extras) module.

<Badge color="orange">Rust AI Agent SDK</Badge>

Database adapter trait

## Methods

### `store`

```rust theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
fn store(&self, key: &str, value: &serde_json::Value) -> crate::error::Result<()>
```

Store a value

**Parameters:**

| Name    | Type                 |
| ------- | -------------------- |
| `key`   | `&str`               |
| `value` | `&serde_json::Value` |

### `get`

```rust theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
fn get(&self, key: &str) -> crate::error::Result<Option<serde_json::Value>>
```

Retrieve a value

**Parameters:**

| Name  | Type   |
| ----- | ------ |
| `key` | `&str` |

### `delete`

```rust theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
fn delete(&self, key: &str) -> crate::error::Result<()>
```

Delete a value

**Parameters:**

| Name  | Type   |
| ----- | ------ |
| `key` | `&str` |

## Source

<Card title="View on GitHub" icon="github" href="https://github.com/MervinPraison/PraisonAI/blob/main/src/praisonai-rust/praisonai/src/parity/extras.rs">
  `praisonai/src/parity/extras.rs` at line 0
</Card>

***

## Related Documentation

<CardGroup cols={2}>
  <Card title="Rust Database" icon="database" href="/docs/rust/database" />
</CardGroup>
