[Refactoring] Move DbConn out PlumeRocket #797
레이블
레이블 없음
A: API
A: Backend
A: Federation
A: Front-End
A: I18N
A: Meta
A: Security
Build
C: Bug
C: Discussion
C: Enhancement
C: Feature
Compatibility
Dependency
Design
Documentation
Good first issue
Help welcome
Mobile
Rendering
S: Blocked
S: Duplicate
S: Incomplete
S: Instance specific
S: Invalid
S: Needs Voting/Discussion
S: Ready for review
Suggestion
S: Voted on Loomio
S: Wontfix
마일스톤 없음
프로젝트 없음
담당자 없음
참가자 2명
알림
마감일
마감일이 설정되지 않았습니다.
전제조건
전제조건이 설정되지 않았습니다.
Reference: Plume/Plume#797
불러오는 중…
테이블 추가
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Currently, we pass the
struct
PlumeRocket
to most routes:The reason for refactoring (#462) was clippy warning us about too many arguments to our route functions.
so we collected all the data that clumped together in the parameter lists, into a single Object.
This is presenting problems, when trying to migrate to async rocket.
I think we should extract DbConn again.
This should (could?) allow us to use
#[database]
guard, making ourasync
migration slightly less pain-freer.What do we need to do?
DbConn
with#[database]
rockets.conn
, anddbconn
, replacing itDbConn
fromPlumeRockets
Benefits? Drawbacks? Alternatives?
Discuss!
What I can tell out of my head is:
#[database]
attribute that generates some code for us, I guess.sqlx
with the#[database]
attribute, I don't know what types SQLx supports, and if they are compatible with Rocket's attribute.Clippy shouldn't be unhappy either, it is just one parameter, so I'm all for it!
kiwii referenced this issue2020-07-15 10:48:31 +00:00
KitaitiMakoto referenced this issue2021-01-30 14:28:46 +00:00