feat: support pg storage (#2935)

* refactor: using tokio-postgres

* chore: update

* chore: update env

* chore: update

* chore: upgrade supabase and add logout button

* refactor: update

* chore: update

* refactor: using message queue to handle the pg connection

* refactor: move test

* refactor: update sql

* chore: create pg database when user login

* chore: update scheme

* chore: generic user service

* chore: update

* chore: create statistics

* chore: create snapshot

* chore: add test

* chore: add database cloud service

* chore: add document cloud service

* chore: update interface

* test: add document test

* refactor: document interface

* chore: fix test

* chore: update

* chore: update test

* test: add test

* test: add test

* test: add test

* chore: update collab rev

* fix: flutter analyzer

* chore: update

* chore: update

* chore: update

* fix: tests

* chore: update

* chore: update collab rev

* ci: rust fmt

---------

Co-authored-by: Lucas.Xu <lucas.xu@appflowy.io>
This commit is contained in:
Nathan.fooo
2023-07-05 20:57:09 +08:00
committed by GitHub
parent e0ad364fa3
commit edc7933c66
157 changed files with 5385 additions and 1338 deletions

View File

@ -1,3 +1,8 @@
use std::fmt::{Debug, Formatter};
use std::ops;
use bytes::Bytes;
use crate::{
byte_trait::*,
errors::{DispatchError, InternalError},
@ -5,8 +10,6 @@ use crate::{
response::{AFPluginEventResponse, AFPluginResponder, ResponseBuilder},
util::ready::{ready, Ready},
};
use bytes::Bytes;
use std::ops;
pub struct AFPluginData<T>(pub T);
@ -126,3 +129,12 @@ impl ToBytes for AFPluginData<String> {
Ok(Bytes::from(self.0))
}
}
impl<T> Debug for AFPluginData<T>
where
T: Debug,
{
fn fmt(&self, f: &mut Formatter<'_>) -> std::fmt::Result {
self.0.fmt(f)
}
}