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
feat: support set_id #7
Conversation
fix: test dependencies error with replace _ to -
Thank you for the PR, what is the reason for the changes to the cargo.toml files as well as the renaming of the test file? Using I'd also like to explain what is a label as it seems you have it confused. The With that in mind a function |
|
Thank for explain. But I just still think it is need a api(as orm type) to make Model get data with its id. By the way, I use specific instead of label in my earlier draft code. But this pr generated a String, it is not a good way for me. Because I was actually thinking in an orm way |
Well that doesn't change the fact your notion of "label" is the inverse of what a label actually is. I cannot accept the PR unless the new functions have names that match their behaviour. In The old If you wish to have a function that adds a label to a string then i'd suggest a name like EDIT: Since you are also adding new functions, i'd suggest to write to unit tests rather than remove the tests of other functions to replace them with yours. |
chor: 2. add a test for set_id refactor: 3. rename with_label to set_id
I refactor it. |
Can you please describe what is your end goal? You have completely rewritten the PR three time over the course of 24h. let v = account
.set_node()
.set_id("fda")
.managed_projects()
.set_id("fda")
.origin()
.to_string();
assert_eq!("Account:fda->manage->Project:fda", v);
Do you wish to be able to build queries like: let query = account
.with_id("fda")
.with(account.managed_projects.with_id("fda"));
assert_eq(query, "Account:fda->manage->Project:fda"); This is possible because the default implementation for the I am asking this question because i noticed you added two new functions to the generated code by the |
Close it because I work on the #8. |
fix: test dependencies error with replace _ to -