node-skizze are Node.js bindings for the Skizze database.
NOTE node-skizze
is alpha software and still in heavy development.
$ npm install --save skizze
var skizze = require('skizze');
var client = skizze.createClient("127.0.0.1:3596", { insecure: true });
client.createDomain("mydomain", function(err) {
client.addToDomain("mydomain", ['alvin', 'simon', 'theodore'], function(err) {
client.getCardinality("mydomain", function(err, card) {
console.log(err, card);
});
});
});
- sketchType :
enum
Enum for Sketch type values.
- snapshotState :
enum
Enum for Snapshot state values.
- createClient(address, options) ⇒
SkizzeClient
Creates and returns a new client connection to Skizze
Kind: global class
- SkizzeClient
- new SkizzeClient()
- .createSnapshot(callback)
- .getSnapshot(callback)
- .listSketches(type, callback)
- .listDomains(callback)
- .listAll(callback)
- .createDomain(name, callback)
- .createDomainWithProperties(name, sketches, callback)
- .deleteDomain(name, callback)
- .getDomain(name, callback)
- .createSketch(name, callback)
- .deleteSketch(name, callback)
- .getSketch(name, callback)
- .addToDomain(name, values, callback)
- .addToSketch(name, values, callback)
- .getMembership(name, values, callback)
- .getMultiMembership(names, values, callback)
- .getFrequency(name, values, callback)
- .getMultiFrequency(names, values, callback)
- .getRankings(name, callback)
- .getMultiRankings(names, callback)
- .getCardinality(name, callback)
- .getMultiCardinality(names, callback)
Represents a connection to the Skizze database.
Request a snapshot to be taken.
Kind: instance method of SkizzeClient
Param | Type | Description |
---|---|---|
callback | function |
A callback to call when a reply is received. |
Get details of the current or last snapshot.
Kind: instance method of SkizzeClient
Param | Type | Description |
---|---|---|
callback | function |
A callback to call with the details of the snapshot. |
List Sketches of a specific type.
Kind: instance method of SkizzeClient
Param | Type | Description |
---|---|---|
type | number |
The type of sketch to list. |
callback | function |
A callback to call with the list of Sketches. |
List all domains.
Kind: instance method of SkizzeClient
Param | Type | Description |
---|---|---|
callback | function |
A callback to call with the list of Domains. |
List all Sketches.
Kind: instance method of SkizzeClient
Param | Type | Description |
---|---|---|
callback | function |
A callback to call with the list of Sketches. |
Create a new domain with default settings for it's Sketches.
Kind: instance method of SkizzeClient
Param | Type | Description |
---|---|---|
name | string |
The name of the new domain. |
callback | function |
A callback to call with the newly created domain. |
Create a new domain with customized settings.
Kind: instance method of SkizzeClient
Param | Type | Description |
---|---|---|
name | string |
The name of the new domain. |
sketches | Object |
Configuration for each sketch type. |
callback | function |
A callback to call with the newly created domain. |
Delete a domain.
Kind: instance method of SkizzeClient
Param | Type | Description |
---|---|---|
name | string |
The name of the domain to delete. |
callback | function |
A callback to call when the operation is complete. |
Get details of an existing domain.
Kind: instance method of SkizzeClient
Param | Type | Description |
---|---|---|
name | string |
The name of the domain to get. |
callback | function |
A callback to call with the domain details. |
Create a new Sketch.
Kind: instance method of SkizzeClient
Param | Type | Description |
---|---|---|
name | string |
The name of the Sketch to create. |
callback | function |
A callback to call with the new Sketch. |
Delete a Sketch.
Kind: instance method of SkizzeClient
Param | Type | Description |
---|---|---|
name | string |
The name of the sketch to delete. |
callback | function |
A callback to call when the operation is complete. |
Get details of an existing sketch.
Kind: instance method of SkizzeClient
Param | Type | Description |
---|---|---|
name | string |
The name of the sketch to get. |
callback | function |
A callback to call with the sketch details. |
Add values to a domain.
Kind: instance method of SkizzeClient
Param | Type | Description |
---|---|---|
name | string |
The name of the domain. |
values | Array(string) |
The values to add to the domain. |
callback | function |
A callback to call when the operation is complete. |
Add values to a sketch.
Kind: instance method of SkizzeClient
Param | Type | Description |
---|---|---|
name | string |
The name of the sketch. |
values | Array(string) |
The values to add to the sketch. |
callback | function |
A callback to call when the operation is complete. |
Query the sketch for membership (true/false) for the provided values.
Kind: instance method of SkizzeClient
Param | Type | Description |
---|---|---|
name | string |
The name of the sketch. |
values | Array(string) |
The values to query the membership of. |
callback | function |
A callback to call with the results. |
Query the sketches for membership (true/false) for the provided values.
Kind: instance method of SkizzeClient
Param | Type | Description |
---|---|---|
names | Array(string) |
The names of the sketches to check. |
values | Array(string) |
The values to query the membership of. |
callback | function |
A callback to call with the results. |
Query the sketch for frequency of the provided values.
Kind: instance method of SkizzeClient
Param | Type | Description |
---|---|---|
name | string |
The name of the sketch. |
values | Array(string) |
The values to query the frequency of. |
callback | function |
A callback to call with the results. |
Query the sketches for frequency of the provided values.
Kind: instance method of SkizzeClient
Param | Type | Description |
---|---|---|
names | Array(string) |
The names of the sketches to check. |
values | Array(string) |
The values to query the frequency of. |
callback | function |
A callback to call with the results. |
Query the sketch for top rankings.
Kind: instance method of SkizzeClient
Param | Type | Description |
---|---|---|
name | string |
The name of the sketch. |
callback | function |
A callback to call with the results. |
Query the sketches top rankings.
Kind: instance method of SkizzeClient
Param | Type | Description |
---|---|---|
names | Array(string) |
The names of the sketches to check. |
callback | function |
A callback to call with the results. |
Query the sketch for cardinality.
Kind: instance method of SkizzeClient
Param | Type | Description |
---|---|---|
name | string |
The name of the sketch. |
callback | function |
A callback to call with the results. |
Query the sketches for cardinality.
Kind: instance method of SkizzeClient
Param | Type | Description |
---|---|---|
names | Array(string) |
The names of the sketches to check. |
callback | function |
A callback to call with the results. |
Enum for Sketch type values.
Kind: global enum
Read only: true
Properties
Name | Type | Default |
---|---|---|
MEMBERSHIP | number |
MEMBERSHIP |
FREQUENCY | number |
FREQUENCY |
RANKINGS | number |
RANKINGS |
CARDINALITY | number |
CARDINALITY |
Enum for Snapshot state values.
Kind: global enum
Read only: true
Properties
Name | Type | Default |
---|---|---|
PENDING | number |
PENDING |
IN_PROGRESS | number |
IN_PROGRESS |
SUCCESSFUL | number |
SUCCESSFUL |
FAILED | number |
FAILED |
createClient(address, options) ⇒ SkizzeClient
Creates and returns a new client connection to Skizze
Kind: global function
Returns: SkizzeClient
- - A SkizzeClient.
Param | Type | Description |
---|---|---|
address | string |
The address of the Skizze server e.g. "127.0.0.1:3596" |
options | Object |
Options for configuring the client connection. |
options.insecure | boolean |
Whether to create an insecure connection with the server. |
- Merge in testing
- Hook up to Travis
- Example
- Versioning
- npm
node-skizze is available under the Apache License, Version 2.0.