You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Since we have first pool API implemented in #88 we can have some plan for 0.1 which is nowhere near feature-complete, but can be used to play with API a little bit.
The plan is:
Experiment with executor trait. Notes:
We can't make current query<Arg, Res>-like methods on dynamic value, because they aren't object-safe. The idea is to make less ergonomic methods (e.g. generic_query(dyn Arguments) -> dyn ResultDecoder) on the trait Executor itself and then ergonomic methods on dyn Executor. Or make some wrapper type. Not sure it will be ergonomic enough. If it will not work we can proceed with either non-object safe Executor trait or with API tied to a Pool object and this stage.
We probably want &mut self on trait methods (they are &self on Pool). So that Transaction object can implement the trait too. This means actual pool object needs to be cloned for parallel tasks. Clones are cheap. And this will probably be the case anyway (to put pool object to the task state). And transaction will do the borrow, which is a good idea too.
Hide all fine-grained CLI API under unstable flag
Make sure that everything needed from underlying crates are re-exported from the edgedb_client.
Make sure that generated docs cover all essential use cases and all public things (warn(missing_docs))
Rename Pool -> Client
The limitations of this release are:
async-std-only
No transactions
No retries
No manually acquired connections, so CONFIG SET and START TRANSACTION and similar aren't possible too
Maybe some limitations on supported argument and result types
Since we have first pool API implemented in #88 we can have some plan for 0.1 which is nowhere near feature-complete, but can be used to play with API a little bit.
The plan is:
query<Arg, Res>
-like methods on dynamic value, because they aren't object-safe. The idea is to make less ergonomic methods (e.g.generic_query(dyn Arguments) -> dyn ResultDecoder
) on the traitExecutor
itself and then ergonomic methods ondyn Executor
. Or make some wrapper type. Not sure it will be ergonomic enough. If it will not work we can proceed with either non-object safeExecutor
trait or with API tied to a Pool object and this stage.&mut self
on trait methods (they are&self
on Pool). So thatTransaction
object can implement the trait too. This means actual pool object needs to be cloned for parallel tasks. Clones are cheap. And this will probably be the case anyway (to put pool object to the task state). And transaction will do the borrow, which is a good idea too.unstable
flagedgedb_client
.warn(missing_docs)
)Pool
->Client
The limitations of this release are:
async-std
-onlyCONFIG SET
andSTART TRANSACTION
and similar aren't possible tooPrevious discussion on #32
The text was updated successfully, but these errors were encountered: