0.2.5 • Published 8 years ago

festinate v0.2.5

Weekly downloads
1
License
MIT
Repository
github
Last release
8 years ago

Build Status Dependency Status

festinate

import Festinate from 'festinate';

let options = {
  username: 'letMeIn',
  password: 'SuperSecr3t',
  server: 'host.hosted.com',
  database: 'pandora',

  // optional
  domain: '',
  encrypt: true // azure
};

let connection = new Festinate(options);

let person = {
  name: {
    value: "Schrödinger's cat",
    type: 'varchar'
  },
  age: {
    value: 9,
    type: 'number'
  },
  deceased: {
    value: '?',
    type: 'nvarchar'
  }
};

connection
  .executeSproc('create_person', person)
  .then((rows) => {
    /*
      rows = [{ name: "Schrödinger's cat", age: 9, deceased: '?'}]
    */
  })
  .catch((err) => {
    console.error(err);
  });

connection
  .executeSproc('get_people')
  .then((rows) => {
    // if successful [{ name: '' ... }]
  })
  .catch((err) => {

  });
0.2.5

8 years ago

0.2.4

9 years ago

0.2.3

9 years ago

0.2.2

9 years ago

0.2.1

9 years ago

0.2.0

9 years ago

0.1.0

9 years ago