-
Notifications
You must be signed in to change notification settings - Fork 27
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 collection modifying #18
Add collection modifying #18
Conversation
I just have seen that I did not use |
Yes. You should use |
Okay ! Thank you for your feedback ! |
I updated with collection type :) |
57c3d90
to
9fa665b
Compare
src/collection.rs
Outdated
pub async fn load(&self) { | ||
unimplemented!() | ||
pub async fn load(&self, count: bool) -> Result<CollectionLoad, ClientError> { | ||
let url = self.base_url.join(&format!("load")).unwrap(); |
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.
Here Url::join
accepts a &str
, and "load"
is already a &str
. So we don't need to allocate memory to store "load" as a String
and convert it to &str
.
The following code suffices:
let url = self.base_url.join("load").unwrap();
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.
Ho yes ! True ! Thank you, I' ll make the update.
Quite good I think. |
Ok, cool ! The json stuff from serde is just awesome ! |
1- There are differences between ArangoDB 3.6 and 3.7 for update properties. Should I implement the schema validation used in 3.7 ? 2 - I did not implemented the journalSize because the official documentation states the following :
|
1 - The rename seems ok I think, but I feel some of structures to be redundant. Do you think it is fine to have structs that are pretty similar ? I know it is good in the way that the type is not a giant mess of Option used everywhere but several small structures. But in the other side, we do repeat a lot of code. 2 - It seems the Recalculate count of a collection has not been written in collection.rs. |
|
|
Hey :) Thank you for your messages ! 1 - Yes ! Nice to find abstraction. I am just not sure yet on how to do it. We can discuss it later on how to do it. 4 - Nice ! Let's say that the core focus now is on the main functionalities and we can work out details later on :) |
I will make later a PR for feature gate for versions switch and code improvement in collection. |
Actually, I forgot to implement Rotate journal This functionalities is not documented on 3.7 and is for the MMFiles engine |
OMG, I just have understood how feature gate stuff works. It allows conditional compilation. That is freaking awesome and ergonomic. Rust rocks so hard lol. We need somebody to try on mmfiles. |
Fine, I will do the migration works myself. Thank you for your great works!!! |
That's why I use docker to set up ArangoDB in e2e test. With docker, we can quick setup an ArangoDB server with any verison and any configuration. It's fine to just wait for someone to point out that this code errs. But if we want to make for sure before anyone jumps out, we can allocate a new job in CI and setup ArangoDB to Maybe I should consider giving up docker compose, and use plain docker command instead. |
I have set up a job in github workflow using ArangoDB server with |
Nice ! I used to play with Docker some time ago, so not sure . Need to try it out again before I can help with it.
|
Yes, I am working on this. |
It seem that collection details in mmfiles and rocksdb are quite different. I have fixed the error. Now it work like a charm (see workflow). In the latest |
Thank you ! I should have paid attention to it. Now i know how feature stuff works, I will be more careful to the differences between both storage engines. |
Hello ! Let's implement from the Arangodb documentation -> Modifying a Collection
NB : In this todo list, the unit test goes together with the implementation. So an implementation is considered done only if the unit test is also done :).
Let's go !