Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

azureleveldown

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

azureleveldown

An implementation of LevelDown for Windows Azure Table Storage

  • 0.0.3
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

azureleveldown

A drop-in replacement for LevelDOWN which persists data in Windows Azure Table Storage. Can be used as a back-end for LevelUP rather than an actual LevelDB store.

As of version 0.7, LevelUP allows you to pass a 'db' option when you create a new instance. This will override the default LevelDOWN store with a LevelDOWN API compatible object.

Installation

npm install azureleveldown levelup

Example

var connection = 'DefaultEndpointsProtocol=https;AccountName=xxx;AccountKey=yyy'

var levelup = require('levelup');
var LevelAzureDown = require('azureleveldown');

var db = levelup(connection, {
  // the 'db' option replaces LevelDOWN
  db: function (connection) { 
    return new LevelAzureDown(connection) 
  }
})

// An azureleveldown db works within a single table and partition. 
// These can be controlled by passing some settings into the contsuctor 


var db = levelup(connection, {
  db: function (connection) { 
    return new LevelAzureDown(connection,  {table:"table1", partitionKey: "partition1"}) 
  }
})

// reading & writing data is done using the normal 'level' way:

db.put('my_key', 'my value', function(err){ ... });

db.get('my_key', function(err, data){ 
	console.log(data.key + " = " + data.value);
});

db.del('another_key', function(err){ ... });

db.readStream()
  .on('data', console.log)
  .on('close', function () { console.log('the end') })

Known Limitiations

  • reverse read streams are not currently supported
  • Only text (utf8) keys and values are supported
  • The table storage limits for key and value sizes (1KB / 64KB respectively)

Licence

MIT

Keywords

FAQs

Package last updated on 06 Feb 2014

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc