Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Plug-and-play relational data store for Node applications

branch: master

Fetching latest commit…

Octocat-spinner-32-eaf2f5

Cannot retrieve the latest commit at this time

Octocat-spinner-32 lib
Octocat-spinner-32 README.md
Octocat-spinner-32 node-springbase.iml
Octocat-spinner-32 package.json
README.md

Springbase Driver for NodeJS

Plug-and-play relational data store for Node applications

Homepage

Quick and easy relational data for your NodeJS apps.

Installation

npm install springbase

Quick example

var springbase = require('springbase');
var conn = new springbase.data.Connection({ 
  application: "1GmTdS2ayPts", 
  username: "<email-address>", 
  password: "<password>" 
});
var query = conn.getQuery("qryStoresByZipCode");
query.on("ready", function() {
  var reader = query.execute({ zipCode: 94611 });
  reader.on("row", function(row) {
    console.log("Found store:", row);
  });
});

Insert into a table:

var table = conn.getTable("Stores");
table.on("ready", function() {
  table.insertRow({
    number: 115,
    zipCode: 94105,
    hours: "8 AM - 11 PM"
  });
});

Update table rows:

// Change store hours for store with id 30
table.updateRow(30, {
  hours: "8 AM - 11 PM"
});// Change store hours for store with id 30

Delete table rows:

table.deleteRows(30);

Read all rows from a table:

var reader = table.openReader();
reader.on("ready", function() {
  console.log("All stores:", reader.readAll());
});
Something went wrong with that request. Please try again.