# bookclerk_library::entities::patron_scope_keys

SeaORM entity for the `patron_scope_keys` table: the include and exclude
values of a patron scope as rows, so the Library filter joins them
instead of binding one parameter per rule.

| Item | Kind | Summary |
| --- | --- | --- |
| [`Model`](#model) | struct | One value of one scope. Rows are keyed by the content id of the whole value set (`crate::store::library_index::WorkScope::key_set_id`), so a set's rows never change once written and any scope with the same values shares them. |
| [`ColumnIter`](#columniter) | struct | An iterator over the variants of [Column] |
| [`Entity`](#entity) | struct | Generated by sea-orm-macros |
| [`PrimaryKeyIter`](#primarykeyiter) | struct | An iterator over the variants of [PrimaryKey] |
| [`ActiveModel`](#activemodel) | struct | Generated by sea-orm-macros |
| [`RelationIter`](#relationiter) | struct | An iterator over the variants of [Relation] |
| [`Column`](#column) | enum | Generated by sea-orm-macros |
| [`PrimaryKey`](#primarykey) | enum | Generated by sea-orm-macros |
| [`Relation`](#relation) | enum | Declared SeaORM relations (none). |

## Structs

### Model

```rust
pub struct Model {
    pub scope_hash: String,
    pub effect: String,
    pub facet: String,
    pub key: String,
}
```

One value of one scope. Rows are keyed by the content id of the whole
value set (`crate::store::library_index::WorkScope::key_set_id`), so a
set's rows never change once written and any scope with the same values
shares them.

**Fields**

- `scope_hash`: Content id of the value set: lowercase hex SHA-256.
- `effect`: `include` or `exclude`.
- `facet`: The page index facet (`library_work_facets.facet`).
- `key`: The facet key (`library_work_facets.key`).

#### Model::into_ex

```rust
pub fn into_ex(self) -> Self
```

Generated by sea-orm-macros

Implements: `Clone`, `Debug`, `Eq`, `From<Model>`, `FromQueryResult`, `IntoActiveModel<ActiveModel>`, `ModelTrait`, `PartialEq`, `TryFrom<ActiveModel>`, `TryIntoModel<Model>`

### ColumnIter

```rust
pub struct ColumnIter {
    /* private fields */
}
```

An iterator over the variants of [Column](#column)

Implements: `Clone`, `Debug`, `DoubleEndedIterator`, `ExactSizeIterator`, `FusedIterator`, `Iterator`

### Entity

```rust
pub struct Entity;
```

Generated by sea-orm-macros

Implements: `Clone`, `Copy`, `Debug`, `Default`, `EntityName`, `EntityTrait`, `Iden`, `IdenStatic`

### PrimaryKeyIter

```rust
pub struct PrimaryKeyIter {
    /* private fields */
}
```

An iterator over the variants of [PrimaryKey](#primarykey)

Implements: `Clone`, `Debug`, `DoubleEndedIterator`, `ExactSizeIterator`, `FusedIterator`, `Iterator`

### ActiveModel

```rust
pub struct ActiveModel {
    pub scope_hash: ActiveValue<String>,
    pub effect: ActiveValue<String>,
    pub facet: ActiveValue<String>,
    pub key: ActiveValue<String>,
}
```

Generated by sea-orm-macros

**Fields**

- `scope_hash`: Generated by sea-orm-macros
- `effect`: Generated by sea-orm-macros
- `facet`: Generated by sea-orm-macros
- `key`: Generated by sea-orm-macros

Implements: `ActiveModelBehavior`, `ActiveModelTrait`, `Clone`, `Debug`, `Default`, `From<Model>`, `IntoActiveModel<ActiveModel>`, `PartialEq`, `TryFrom<ActiveModel>`, `TryIntoModel<Model>`

### RelationIter

```rust
pub struct RelationIter {
    /* private fields */
}
```

An iterator over the variants of [Relation](#relation)

Implements: `Clone`, `Debug`, `DoubleEndedIterator`, `ExactSizeIterator`, `FusedIterator`, `Iterator`

## Enums

### Column

```rust
pub enum Column {
    ScopeHash,
    Effect,
    Facet,
    Key,
}
```

Generated by sea-orm-macros

**Variants**

- `ScopeHash`: Generated by sea-orm-macros
- `Effect`: Generated by sea-orm-macros
- `Facet`: Generated by sea-orm-macros
- `Key`: Generated by sea-orm-macros

Implements: `Clone`, `ColumnTrait`, `Copy`, `Debug`, `FromStr`, `Iden`, `IdenStatic`, `IntoEnumIterator`

### PrimaryKey

```rust
pub enum PrimaryKey {
    ScopeHash,
    Effect,
    Facet,
    Key,
}
```

Generated by sea-orm-macros

**Variants**

- `ScopeHash`: Generated by sea-orm-macros
- `Effect`: Generated by sea-orm-macros
- `Facet`: Generated by sea-orm-macros
- `Key`: Generated by sea-orm-macros

Implements: `Clone`, `Copy`, `Debug`, `Iden`, `IdenStatic`, `IntoEnumIterator`, `PrimaryKeyToColumn`, `PrimaryKeyTrait`

### Relation

```rust
pub enum Relation {}
```

Declared SeaORM relations (none).

Implements: `Clone`, `Copy`, `Debug`, `IntoEnumIterator`, `RelationTrait`
