# SQLStore

> **Class** in `langchain_community`

📖 [View in docs](https://reference.langchain.com/python/langchain-community/storage/sql/SQLStore)

BaseStore interface that works on an SQL database.

## Signature

```python
SQLStore(
    self,
    *,
    namespace: str,
    db_url: Optional[Union[str, Path]] = None,
    engine: Optional[Union[Engine, AsyncEngine]] = None,
    engine_kwargs: Optional[Dict[str, Any]] = None,
    async_mode: Optional[bool] = None,
)
```

## Extends

- `BaseStore[str, bytes]`

## Constructors

```python
__init__(
    self,
    *,
    namespace: str,
    db_url: Optional[Union[str, Path]] = None,
    engine: Optional[Union[Engine, AsyncEngine]] = None,
    engine_kwargs: Optional[Dict[str, Any]] = None,
    async_mode: Optional[bool] = None,
)
```

| Name | Type |
|------|------|
| `namespace` | `str` |
| `db_url` | `Optional[Union[str, Path]]` |
| `engine` | `Optional[Union[Engine, AsyncEngine]]` |
| `engine_kwargs` | `Optional[Dict[str, Any]]` |
| `async_mode` | `Optional[bool]` |


## Properties

- `async_mode`
- `engine`
- `dialect`
- `session_maker`
- `namespace`

## Methods

- [`create_schema()`](https://reference.langchain.com/python/langchain-community/storage/sql/SQLStore/create_schema)
- [`acreate_schema()`](https://reference.langchain.com/python/langchain-community/storage/sql/SQLStore/acreate_schema)
- [`drop()`](https://reference.langchain.com/python/langchain-community/storage/sql/SQLStore/drop)
- [`amget()`](https://reference.langchain.com/python/langchain-community/storage/sql/SQLStore/amget)
- [`mget()`](https://reference.langchain.com/python/langchain-community/storage/sql/SQLStore/mget)
- [`amset()`](https://reference.langchain.com/python/langchain-community/storage/sql/SQLStore/amset)
- [`mset()`](https://reference.langchain.com/python/langchain-community/storage/sql/SQLStore/mset)
- [`mdelete()`](https://reference.langchain.com/python/langchain-community/storage/sql/SQLStore/mdelete)
- [`amdelete()`](https://reference.langchain.com/python/langchain-community/storage/sql/SQLStore/amdelete)
- [`yield_keys()`](https://reference.langchain.com/python/langchain-community/storage/sql/SQLStore/yield_keys)
- [`ayield_keys()`](https://reference.langchain.com/python/langchain-community/storage/sql/SQLStore/ayield_keys)

---

[View source on GitHub](https://github.com/langchain-ai/langchain-community/blob/4b280287bd55b99b44db2dd849f02d66c89534d5/libs/community/langchain_community/storage/sql.py#L90)