Db, add atproto error support
This commit is contained in:
parent
1d1f8ae60f
commit
df1da0905d
2 changed files with 5 additions and 3 deletions
|
|
@ -19,7 +19,7 @@ CREATE TABLE session (
|
||||||
label VARCHAR,
|
label VARCHAR,
|
||||||
-- Participants in participant
|
-- Participants in participant
|
||||||
|
|
||||||
created_at VARCHAR NOT NULL,
|
created_at VARCHAR,
|
||||||
indexed_at VARCHAR NOT NULL,
|
indexed_at VARCHAR NOT NULL,
|
||||||
sort_at VARCHAR GENERATED ALWAYS AS (LEAST(created_at,indexed_at)) STORED NOT NULL
|
sort_at VARCHAR GENERATED ALWAYS AS (LEAST(created_at,indexed_at)) STORED NOT NULL
|
||||||
);
|
);
|
||||||
|
|
@ -33,13 +33,13 @@ CREATE TABLE activity (
|
||||||
-- Progress in progress
|
-- Progress in progress
|
||||||
|
|
||||||
performed_at VARCHAR,
|
performed_at VARCHAR,
|
||||||
created_at VARCHAR NOT NULL,
|
created_at VARCHAR,
|
||||||
indexed_at VARCHAR NOT NULL,
|
indexed_at VARCHAR NOT NULL,
|
||||||
sort_at VARCHAR GENERATED ALWAYS AS (LEAST(created_at,indexed_at)) STORED NOT NULL
|
sort_at VARCHAR GENERATED ALWAYS AS (LEAST(created_at,indexed_at)) STORED NOT NULL
|
||||||
);
|
);
|
||||||
|
|
||||||
CREATE TABLE participant (
|
CREATE TABLE participant (
|
||||||
participantdid VARCHAR NOT NULL,
|
participantdid VARCHAR NOT NULL,
|
||||||
session VARCHAR NOT NULL,
|
sessionuri VARCHAR NOT NULL,
|
||||||
role VARCHAR NOT NULL
|
role VARCHAR NOT NULL
|
||||||
);
|
);
|
||||||
|
|
|
||||||
|
|
@ -3,6 +3,8 @@
|
||||||
pub enum Error {
|
pub enum Error {
|
||||||
#[error("Database Implementation Error: {0}")]
|
#[error("Database Implementation Error: {0}")]
|
||||||
Backend(#[from] sqlx::Error),
|
Backend(#[from] sqlx::Error),
|
||||||
|
#[error("AT Protocol Implementation Error: {0}")]
|
||||||
|
Atproto(#[from] atproto::error::Error),
|
||||||
}
|
}
|
||||||
|
|
||||||
pub type Result<T> = std::result::Result<T, Error>;
|
pub type Result<T> = std::result::Result<T, Error>;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue