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

betajs-sql

Package Overview
Dependencies
Maintainers
2
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

betajs-sql

BetaJS-SQL is a sql wrapper for BetaJS.

  • 1.0.4
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
1
decreased by-88.89%
Maintainers
2
Weekly downloads
 
Created
Source

betajs-sql 1.0.3

Code Climate NPM

BetaJS-SQL is a sql wrapper for BetaJS.

Getting Started

You can use the library in your NodeJS project and compile it as well.

NodeJS
	var BetaJS = require('betajs');
	require('betajs-data');
	require('betajs-sql');
Compile
	git clone https://github.com/betajs/betajs-sql.git
	npm install
	grunt

Basic Usage

The module contains the following subsystems:

  • Database Access and Database Store with Support for Postgres SQL.
	var sqldb = new BetaJS.Data.Databases.SqlDatabase({
    	user: "user",
    	database: "db",
    	password: "pass",
    	port: "5432",
    	host: "localhost"
    });
    var store = new BetaJS.Data.Stores.SqlDatabaseStore(sqldb, "table");
    store.insert({"x" : 1}).mapSuccess(function (res) {
    	store.query({"x" : 1}, {"orderBy" : "id DESC"}).mapSuccess(function (res) {
    		var r = res.next();
    		store.update({"x" : "1"}, {"x" : 3}).mapSuccess(function (res) {
    			store.remove({"x": 3}).mapSuccess(function (res) {
    				var r = res;
    				console.log(res.next());
    			}, this).mapError(function (err) {
    				var e = err;
    				console.log(err);
    			}, this);
    		}, this).mapError(function (err) {
    			var e = err;
    			console.log(err);
    		}, this);
    	}, this).mapError(function (err) {
    		var e = err;
    		console.log(err);
    	}, this);
    }, this).mapError(function (err) {
    	var e = err;
    	console.log(err);
    }, this);
ResourceURL
Homepagehttp://betajs.com
Gitgit://github.com/betajs/betajs-sql.git
Repositoryhttps://github.com/betajs/betajs-sql
Bloghttp://blog.betajs.com
Twitterhttp://twitter.com/thebetajs

Compatability

TargetVersions
NodeJS0.10 - Latest

CDN

ResourceURL
betajs-sql.jshttp://cdn.rawgit.com/betajs/betajs-sql/master/dist/betajs-sql.js
betajs-sql.min.jshttp://cdn.rawgit.com/betajs/betajs-sql/master/dist/betajs-sql.min.js
betajs-sql-noscoped.jshttp://cdn.rawgit.com/betajs/betajs-sql/master/dist/betajs-sql-noscoped.js
betajs-sql-noscoped.min.jshttp://cdn.rawgit.com/betajs/betajs-sql/master/dist/betajs-sql-noscoped.min.js

Dependencies

NameURL
betajsOpen
betajs-dataOpen

Weak Dependencies

NameURL
betajs-scopedOpen

Main Contributors

  • Pablo Iglesias

License

Apache-2.0

FAQs

Package last updated on 01 Aug 2017

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