Comments (2)
New API idea:
- Rename
.with_connection
to.pipeline
to change the semantics by naming - Implement the required
diesel-async
traits for the pool which internally just borrow a connection and execute it on the connection (traits beingAsyncConnection
,SimpleAsyncConnection
, andUpdateAndFetchResults
)
This would allow pipelining the same way as before:
pool.pipeline(|conn| async move {
[query]
}
.scoped()
).await?;
and would simplify single queries that can't be pipelined:
users::table.find(user_id).load(&mut pool).await?
from kitsune.
One of the tradeoffs here is one more layer of boxing futures. Since diesel-async
uses async-trait
for various traits, we would have to box again meaning we poll a boxed future inside a boxed future, missing some inline opportunities.
Won't break the world and we will still be faster by multiple magnitudes than other implementations, just something to keep in mind for now.
from kitsune.
Related Issues (20)
- Switch from `deadpool-redis` to a home-grown alternative
- Migrate from Askama to Ramhorns HOT 2
- More robust JSON-LD deserialisation HOT 3
- RUSTSEC-2023-0081: safemem is unmaintained HOT 4
- Switch to `sonic-rs`
- RUSTSEC-2020-0168: mach is unmaintained HOT 2
- Revamp internal error representation
- Remove Redis dependence HOT 2
- Cannot find module './locales/en-cyberpunk.ftl'
- RUSTSEC-2024-0320: yaml-rust is unmaintained. HOT 4
- Add extensive coverage for `mrf-tool` HOT 1
- Store compiled WASM modules for the MRF inside a cache HOT 1
- Replace `std::sync::Arc` with `triomphe::Arc` where possible
- Replace `redis-rs` with `fred`
- Iroh & Willow interop HOT 1
- `mimalloc` fails to compile with some GCC versions HOT 1
- Refactor thread fetching into an iterative operation
- [DISCUSSION] Do we need OpenAPI docs for the Mastodon API?
- Cannot display the following and followed / "Error: Unexpected token ..." HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from kitsune.