Comments (4)
Same would be nice for #103
from bonsaidb.
The initial idea is good and easy, will be pushed shortly.
Same would be nice for #103
Unfortunately, this isn't the same case. With this API, the update function may never be called if the insert function is used instead. Since the insert function already has a return type, we'd have to make the actual result be wrapped in an option, and I'm not sure I like that very much.
from bonsaidb.
yeah, makes sense, but my usage actually is the upsert, but I can just keep my workaround of trying to insert the default value first.
I'd be fine with having the Option though, it'd be the same as calling insert
on, e.g., a HashMap
.
from bonsaidb.
it'd be the same as calling insert on, e.g., a HashMap
The NamedCollection::entry
API is inspired by HashMap::entry()
, which operates the way it does based on how HashMap's and_modify
works.
from bonsaidb.
Related Issues (20)
- Prevent errors on case-insensitive filesystems HOT 2
- Create `#[derive(Views)]` macro for collections
- Clean up feature flags
- Do the Schema types need Debug?
- CollectionDocument should have helpers for Transactions
- List of imperfections HOT 4
- Client should have configurable timeout options
- CollectionDocument should support borrowing
- Split Backend trait into types and functions
- Would you consider linktime registration of collections HOT 1
- wasm client issues on main
- Client crate shouldn't require js-sys
- Add field attribute for Key derive to delegate encoding/decoding HOT 2
- Build issues on windows with outdated sysinfo/ntapi HOT 2
- Derive macros should error if field attributes are used, but not supported
- Entry API shouldn't require NamedCollection
- Custom key implementation confusion HOT 7
- get_multiple doesn't document result order HOT 2
- Improve `Collection::push` documentation
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 bonsaidb.