Index
schema
¶
Unified schema management for Marianne's SQLite databases.
Provides serialization utilities for converting Python values to/from SQLite-compatible types. The registry module exists but is not yet wired into production code paths — the state layer uses hand-written SQL.
Functions¶
deserialize_field
¶
Convert a SQLite value back to the expected Python type.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
value
|
Any
|
The raw value from SQLite. |
required |
annotation
|
Any
|
The type annotation for the target field. |
required |
Returns:
| Type | Description |
|---|---|
Any
|
The reconstructed Python value. |
Source code in src/marianne/schema/converters.py
serialize_field
¶
Convert a Python value to a SQLite-compatible parameter.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
value
|
Any
|
The Python value to serialize. |
required |
annotation
|
Any
|
The type annotation for the field. |
required |
Returns:
| Type | Description |
|---|---|
SQLParam
|
A value suitable for sqlite3 execute() binding. |