-
Notifications
You must be signed in to change notification settings - Fork 26
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
Published client To Do #32
Comments
The query functions taking a single arbitrary |
Well, it has to be either a tuple (i.e. a sequence) or a named tuple (i.e. a mapping) of variables. So accepting only a vector or only a mapping wouldn't work. Also a We can probably have a trait. But that trait is probably going to be just alias to |
If it's a tuple, how does the query access it? Something like |
Yes. You can either write:
Or:
Smaller enum might work. But what individual elements are? Still |
I'd prefer something more trait based, so it works with static typing and not just Something along the lines of:
(Just a very rough idea, I'm sure that there are a bunch of details that don't make sense) |
I don't see how that's going to work. You can hide the message related parts. But edgedb-protocol also defines all the edgedb database types and the traits abstracting over them.
I agree. |
Well, yes Will comment on the proposal of |
So the whole proposal looks sensible. Except few minor things:
|
One problem with abstracting over Though there are some potential ambiguities even for |
Not sure I understand the exact problem you're trying to explain. With #[derive(Queryable)]
#[edgedb(NamedTuple)] // or Tuple
struct Struct {...} Default is a shape (subset of the fields in an Object) because this is how we expect users to use edgeql. Similar thing for encoding as
|
That's one way to resolve is ambiguity.
This comes down to how you view the relationship between code and the database.
In my experience the second approach worked very well with document databases and avoided the need for having a separate domain model. But I'm not certain how well it'd work with edgedb.
The problem with that is that both sets and arrays should be represented as containers in code, so there is still some ambiguity here. Fortunately arrays and sets have the same binary representation, so it's be possible to ignore this distinction. There is one minor problem with that: Currently invalid headers produce different
That problem still needs to be solved. Perhaps |
We should add it, I don't think we omitted it deliberately.
I'd prefer the driver to not chose anything on its own. Ideally types should be mapped 1 to 1. |
While all of the things in the checklist here are worthwile and should be considered before an 1.0 release, I'm not convinced they should really be stoppers for a 0.1 (or 0.0.1) push to crates.io. Even while explicitly not promising api stability, it might be a good idea to make it easy for people to test the things as they are, and, if nothing else, to reserve the name. |
I'll consider reserving name. But why publishing release that breaks every now and then is better than using |
Mainly I just think a series of rough prereleases would be nicer to work with than using the code straight from git. I'm not in a hurry, but it seems to me that actually fixing everything in the checklist will require years of development, and I think it would be nice to have something at crates.io earlier than that. But that might just be me overestimating, so never mind. Reserving the name might still be a good thing, though. |
Yes I agree. But they have associated cost and we need a plan for having a set of coherent releases that are better than arbitrary git commits. Currently we're busy getting Beta version of the database itself. Let's see if we can prioritize Rust bindings afterwards... |
@kaj is right; I believe there's an answer that satisfies both the community and the core developers: cargo features. Alternatively, we can look to Debian; they use an interesting philosophy that might work here. Their package manager's "unstable" repository dissuades the masses from consuming non-perfected libraries. Who knows, maybe an Eventually, this package should get phased out in favor of the |
In support of geldata/gel-rust#32, I think it could be beneficial to have an optional edgedb-rust runtime with cooperative fibers that is language-agnostic.
Published 0.2.0 as the first step with no guarantees and a bunch of not implemented functionality. |
Before publishing client crate on crates.io we need:
anyhow::Error
. If even if we leaveanyhow
, we should ensure that it's easy to find out if error is recoverable, if it's network error, etc.unstable
featurewhoami
should be moved under a feature gateSequence
under a feature gate (e.g.unstable
)QueryArgs
traitQueryArg
traitQueryArg
implementation for all basic typesQueryArgs
implementation for tuple and container typesderive(QueryArgs)
These tasks can be postponed:
edgedb-protocol
, so that we can make breaking changes in latter without disturbing usersQueryable
traitsnafu
for errors (used only internally)Previous discussion in geldata/gel-cli#112, #30
In the meantime, anyone can use git version at their own risk (API will probably break every now and then)
The text was updated successfully, but these errors were encountered: