Comments (5)
Type Alias is a neat trick! Hadn't thought of it. Will be in the next release.
Regarding pre-packing, I'm aware of the implications. I agree with you on principle.
The reason why it is implemented in this way is that all bin values are preceded by a header indicating their size. I haven't been able to come up with a clean solution that would not require an intermediate buffer. What this implies is that the buffer that returns the packed array cannot be the same as the final buffer, since we need the result first to write the header.
I also do not want to call the packer twice, once for size estimation, and once to write the result to the buffer.
Thoughts?
from aerospike-client-go.
What I can think of is to write the header with 0 as size first (if the size field is in fixed length), then pack the value and get the length, and then go back to change the size field in the header. Not very clean but may work.
from aerospike-client-go.
The Value
optimizations are in. Thanks for the tip.
I'll try to come up with a better solution for complex data types.
from aerospike-client-go.
Thanks for the improvements!
For NullValue, may want to avoid allocation (and avoid pointer) as well:
type NullValue struct{}
var nullValue NullValue
func NewNullValue() NullValue {
return nullValue
}
from aerospike-client-go.
Done.
from aerospike-client-go.
Related Issues (20)
- Is there a way to get items in list for a PK? HOT 2
- BatchGet with secondary index HOT 3
- command execution timed out in go-client when Docker container is restarted HOT 2
- Is there any way to mock client for UT? HOT 3
- Why is ClientPolicy.Timeout used to create new connections during reads instead of basePolicy.connectTimeout HOT 11
- Type consts are hidden in `internal/particle_type` HOT 7
- How to get show distribution time_to_live HOT 1
- invalid go.mod on master HOT 2
- Could you clarify timeouts for the Query? HOT 10
- [6.14.0] Proto registration conflict caused by `kv.proto` HOT 13
- Support more integer sizes in the Expressions API. HOT 1
- Getting record keys when using QueryObjects
- Is it possible to index and filter keys in map?
- 6.4 upgrade from 5.7 HOT 3
- Massive amount of memory occupied by `newPartitionStatus` and `newNodePartitions` HOT 5
- How to use aerospike.GetObject with a [][]byte value HOT 2
- Not retry when receive error: Partition not available (code 11) HOT 2
- Export BatchWrite, Expressions and Operation fields HOT 2
- Scan Partition/Pagination HOT 2
- ExecuteTask.OnComplete function look weird without any comment for reason. 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 aerospike-client-go.