Comments (6)
Currently digest based APIs are not supported. In the next release, we are planning to release the digest based APIs.
from aerospike-client-nodejs.
Hi,
With the latest release 1.0.26, you can retrieve the digest of a key when you do a client.get(key, callback)
. Please use the API and give us your feedback.
Thanks.
from aerospike-client-nodejs.
thank you :) I try it asap.
from aerospike-client-nodejs.
I've already try it. but there is some problem I get digest from put and I try to get the record using only digest
var aerospike = require("aerospike");
var client = aerospike.client(
{
hosts: [
{
addr: "127.0.0.1",
port: 3000
}]
}).connect(function(err)
{
if (err.code !== 0) console.log(err);
});
client.put(aerospike.key('test', 'test', '1'),{1: 1}, function(err, key)
{
var digest = key.digest;
console.log(digest);
client.get(
{
ns: 'test',
set: 'test',
digest: digest
}, function()
{
console.log(arguments);
});
});
I got this error:
<Buffer 97 bd 2d 33 c6 2f e4 1c c8 39 b2 dd 98 0b d7 2d 12 b6 85 14>
Jan 13 2015 08:27:40 GMT: ERROR(30420) [get.cc:103] [prepare] - Parsing of key (C structure) from key object failed
{ '0':
{ code: -2,
message: 'AEROSPIKE_ERR_PARAM',
func: null,
file: '../src/main/client/get.cc',
line: 104 },
'1': null,
'2': null,
'3': null }
from aerospike-client-nodejs.
Hi,
You can retrieve a digest, but you cannot do any operations based on the digest.
- The key object is a dictionary with entries,
ns
,set
andkey
. So the entry digest is an invalid entry in the sample code above. - For any given key digest is calculated internally using the
set
value and thekey
value in the key object. - As we do not expose any digest based APIs, you cannot retrieve using the digest of the key.
If you need digest based APIs for your use case, please let us know, we will prioritize accordingly. And also, if you can explain your use case, we might be able to help you to design it our current API.
from aerospike-client-nodejs.
Digest based APIs might help me a lot. Right now I have a problem that I have to update Aerospike data using Unique ID.
Example:
When receive uid, look into DB find Aerospike key and update that record.
uid, aerospike key
id1, aerospike.key('ns','set','A1,B1,C1')
id2, aerospike.key('ns','set','A1,B1,C1')
id3, aerospike.key('ns','set','A1,B2,C1')
id4, aerospike.key('ns','set','A1,B2,C4')
id3, aerospike.key('ns','set','A1,B2,C3')
if no digest based API I need to store
id1, (A1,B1,C1)
id2, (A1,B1,C1)
....
in order to update target aerospike records
if there are digest based API,
id1, hash1
id2, hash1
which is more space saving because for me (A1,B1,C1) is a very long string
from aerospike-client-nodejs.
Related Issues (20)
- error TS2304: Cannot find name 'Class' HOT 12
- Does aerospike-client-nodejs need python on runtime as well? HOT 1
- I cant install on windows 10 HOT 2
- Issue with using client.operate with policy exists: AS.policy.exists.CREATE HOT 1
- Serialized and blocking connection
- Unable to install aerospike with nexus3 HOT 16
- Unable to install v5.9.0 with yarn, published version requires "npm-run-all" HOT 3
- System's openssl version since static linking in v5.6.0 HOT 4
- Missing 'bool/AS_EXP_TYPE_BOOL' in exp bin type HOT 2
- Unable to use pnpm package manager because of preinstall script of the package HOT 2
- Client.close(true) does not release underlying event loop HOT 2
- Segmentation fault with secondary index query HOT 12
- Typescript build fails HOT 1
- Segmentation fault crash core dump with 5.11.0 HOT 3
- Can't install with node 22 HOT 2
- --build-from-source is broken on Rocky 9, node 20
- Unable to get a record by filter 'contains' if bin array includes > 1 element
- Unable to find record by regexp pattern
- Aerospike.maps.returnType.KEY_VALUE is missing
- client.exist(key) is missing metadata
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-nodejs.