-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add ArangoDB to rocket_contrib databases #1433
Conversation
379a96d
to
4243c1c
Compare
@Weasy666 wouldn't make sense to integrate using |
I went with |
@Weasy666 Oh, that makes sense I guess. Well, I will wait what happens on that end. If required, I will upgrade r2d2-arangors to allow serving async driver connections. |
The database pooling support implemented in To be usable with the current (synchronous) implementation of One concern I have with this approach is that it could make it difficult to add an integration with the async version of |
@jebrosen couldn't both be integrated using features? Sync would be using |
@inzanez Feature flags for dependencies are combined, so |
@jebrosen I see. That makes totally sense. Maybe it would be better to wait for version |
@inzanez thanks for the offer. I'm already working with my fork and i think will continue doing that until one of the different options finds its way inside @jebrosen That is a really annoying "feature" of cargo, with which i fought a few time in the past. I can understand your concerns about this problem, but doesn't this also already apply to the currently integrated databases? Or is |
@Weasy666 This situation is unique to I personally don't have any huge issues with integrating |
Ok, that makes sense...then i will try and ask the |
7c70a94
to
6fcf365
Compare
Indeed, it looks like the |
contrib/lib/src/databases.rs
Outdated
|
||
fn pool(db_name: &str, rocket: &rocket::Rocket) -> PoolResult<Self> { | ||
#[derive(Deserialize, Debug)] | ||
struct ArangoConfig { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Where are these configuration options documented? We'll need them somewhere, otherwise it'll be impossible for someone to properly configure this database and thus use it at all.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's right, i will write something about that. Is it ok to add it here, right above the ## Extended
?
https://github.com/SergioBenitez/Rocket/blob/77faddfc8b458f5b23135f86fa857573cc18d81c/contrib/lib/src/databases.rs#L352-L353
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've added docs at that position. Feel free to move them around if that is the wrong place 😅
ac5f69b
to
2763ad3
Compare
Marking as a draft until we have upstream movement. |
a802de1
to
1580d44
Compare
I am closing this given that there is no progress possible until upstream resolves this issue. Furthermore, we will start advocating for using the |
@SergioBenitez @jebrosen |
I think that would be a better, if imperfect, compromise. |
This PR adds support for ArangoDB by implementing
Poolable
for arangors::Connection in conjunction with r2d2_arangors.arangors
expects a url, username and password for itsConnection::establish_...()
functions, so i had to make it mandatory, to include them into the Rocket.toml file. I hope that is ok, if not...another idea could be to use ahttp://root:root@localhost:8529
url and extract the user and password from it.