Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

waveto/node-tyrant

Open more actions menu

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

node-tyrant
===========

This is an implementation of the Tokyo Tyrant network protocol for the Node javascript/v8 language.

Update: v0.2
updated to move from promises to function(err, value) callbacks in node.js

Update: v0.1.3
updated to use the updated module structure of node.

Update: v0.1.1
node-tyrant has been updated to use the new binary stream representation, and now uses promises for callbacks.

Install Tokyo Cabinet / Tokyo Tyrant, and set up either a b-tree or table database:

For a table database:
ttserver casket.tdb

For a b-tree (key/value) database:
ttserver casket.tcb


Quick Example
------------


var tyrant = require("./tyrant");
var sys = require('sys');

var c = tyrant.connect();

c.addListener("connect", function (){
  c.genuid(function(err, v) {sys.puts(v);});
  c.put('0', 'town', 'Bangor € 1');
  c.get('0', function(err, values) {
    var r=tyrant.dict(values);
    sys.puts(r.town);
    c.quit();
  });
});





About

A node.js module for the Tokyo Tyrant database

Resources

License

Stars

Watchers

Forks

Packages

No packages published
Morty Proxy This is a proxified and sanitized view of the page, visit original site.