Skip to content

scarney81/pg-hstore

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

74 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Build Status

pg-hstore

A node package for serializing and deserializing JSON data to hstore format

Install pg-hstore

$ npm install pg-hstore

Usage

stringify

var hstore = require('pg-hstore')();
var source = { foo: "oof", bar: "rab", baz: "zab" };
hstore.stringify(source, function(result) {
  ...
  // result = '"foo"=>"oof", "bar"=>"rab", "baz"=>"zab"'
  ...
});

parse

var hstore = require('pg-hstore')();
var source = '"foo"=>"oof", "bar"=>"rab", "baz"=>"zab"';
hstore.parse(source, function(result) {
  ...
  // result = { foo: "oof", bar: "rab", baz: "zab" } 
  ...
});

About

A node package for serializing and deserializing JSON data to hstore format

Resources

License

Stars

Watchers

Forks

Packages

No packages published