1.0.9 • Published 7 years ago

lambdadb v1.0.9

Weekly downloads
-
License
ISC
Repository
-
Last release
7 years ago

LambdaDB Client

This package is a client for the LambdaDB server.

Secret Token

Get your secret token by running lambdadb info in your terminal:

secretToken

Examples

Insert into a table

var lambdaDB = require('lambdadb')({
    host: 'localhost',
    secretToken: 'my secret token',
    database: 'databasename'
})

lambdaDB.table('users').insert({
    username: 'user',
    password: 'pass'
}).then(function(response) {
    console.log(response.data) // => logging the trace of the SQL query 
})

Raw SQL queries

var lambdaDB = require('lambdadb')({
    host: 'localhost',
    secretToken: 'my secret token',
    database: 'databasename'
})

lambdaDB.raw('SELECT * FROM users').then(function(response) {
    console.log(response.data) // => logging the rows
})

Describe a table

var lambdaDB = require('lambdadb')({
    host: 'localhost',
    secretToken: 'my secret token',
    database: 'databasename'
})

lambdaDB.table('users').describe().then(function(response) {
    console.log(response.data) // => logging the structure of the database
})
1.0.9

7 years ago

1.0.8

7 years ago

1.0.7

7 years ago

1.0.6

7 years ago

1.0.5

7 years ago

1.0.4

7 years ago

1.0.3

7 years ago

1.0.2

7 years ago

1.0.1

7 years ago

1.0.0

7 years ago