# orca.ui.datasets

> A module of morca's API.

`/datasets`, the datasets and the graph of pipelines and datasets; `/datasets/<name>`, a dataset's writers, readers, snapshots and what a rebuild of it runs; `/datasets/<name>/snapshots/<id>`, a snapshot's lineage (`orca.lineage`); `/rebuilds/<id>`, a rebuild's runs by level.

## Functions

### `dataset_href`

```mojo
def dataset_href(name: String) -> String
```

### `snapshot_href`

```mojo
def snapshot_href(at: SnapshotRef) -> String
```

### `datasets_page`

```mojo
def datasets_page(mut db: State) -> Page
```

### `dataset_page`

```mojo
def dataset_page(mut db: State, name: String, keys: String = "", preview: Bool = False, url: String = "") -> Page
```

A dataset's page; with `preview` and `keys`, what a rebuild over them would queue (`?preview=1&partitions=...`). Its snapshots are paged newest first by `url`'s `?before=` or `?after=` (`SnapshotCursor`).

### `rebuild_page`

```mojo
def rebuild_page(mut db: State, id: Int) -> Page
```

### `snapshot_page`

```mojo
def snapshot_page(mut db: State, name: String, id: Int64) -> Page
```
