systemprompt-database 0.6.1

PostgreSQL infrastructure for systemprompt.io AI governance. SQLx-backed pool, generic repository traits, and compile-time query verification. Part of the systemprompt.io AI governance pipeline.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
//! Data models exchanged across the database boundary.
//!
//! Typed identifiers, [`DbValue`] and [`JsonRow`] are re-exported from
//! `systemprompt-identifiers` and `systemprompt-traits` so that downstream
//! crates only depend on `systemprompt-database` for the database surface.

pub mod info;
pub mod query;
pub mod transaction;

pub use info::{ColumnInfo, DatabaseInfo, IndexInfo, TableInfo};
pub use query::{DatabaseQuery, FromDatabaseRow, QueryResult, QueryRow, QuerySelector};
pub use systemprompt_identifiers::{
    ArtifactId, ClientId, ContentId, ContextId, ExecutionStepId, FileId, LogId, SessionId, SkillId,
    TaskId, TokenId, TraceId, UserId,
};
pub use systemprompt_traits::{DbValue, FromDbValue, JsonRow, ToDbValue, parse_database_datetime};
pub use transaction::DatabaseTransaction;