## SQLEventBroker Objects

### Overview

The `SQLEventBroker` saves events into an SQL database. All events will be stored in a table called `events`.

## SQLBrokerEvent Objects

### Overview

The `SQLBrokerEvent` is an ORM that represents a row in the `events` table.

#### `__init__`

```python
def __init__(
    dialect: Text = "sqlite",
    host: Optional[Text] = None,
    port: Optional[int] = None,
    db: Text = "events.db",
    username: Optional[Text] = None,
    password: Optional[Text] = None
) -> None:
    """Initializes `SQLBrokerEvent`."""
```

#### `from_endpoint_config`

```python
@classmethod
async def from_endpoint_config(
    cls,
    broker_config: EndpointConfig,
    event_loop: Optional[AbstractEventLoop] = None
) -> "SQLEventBroker":
    """Creates broker. See the parent class for more information."""
```

#### `session_scope`

```python
@contextlib.contextmanager
def session_scope() -> Generator[Session, None, None]:
    """Provide a transactional scope around a series of operations."""
```

#### `publish`

```python
def publish(event: Dict[Text, Any]) -> None:
    """Publishes a json-formatted Rasa Core event into an event queue."""
```
