| 3 | |
| 4 | #[async_trait::async_trait] |
| 5 | pub trait Storage: Send + Sync { |
| 6 | async fn create_table(&self, schema: &Schema) -> Result<()>; |
| 7 | |
| 8 | /// Execute UPDATE or DELETE query with access control enforcement |
| 9 | async fn update_or_delete(&self, query: Query, auth_context: &AuthContext) -> Result<usize>; |
| 10 | |
| 11 | /// Execute INSERT query with access control enforcement, returning the inserted ID |
| 12 | async fn insert(&self, query: Query, auth_context: &AuthContext) -> Result<i64>; |
| 13 | |
| 14 | /// Execute SELECT query, returning a single row. |
| 15 | async fn select_one<T>(&self, query: Query) -> Result<Option<T>> |
| 16 | where |
| 17 | T: for<'de> Deserialize<'de>; |
| 18 | |
| 19 | /// Execute SELECT query, returning multiple rows. |
| 20 | async fn select_all<T>(&self, query: Query) -> Result<Vec<T>> |
| 21 | where |
| 22 | T: for<'de> Deserialize<'de>; |
| 23 | } |
nothing calls this directly
no outgoing calls
no test coverage detected