mysql_abs

0.0.2 • Public • Published

node-mysql-abs

An abstraction layer for mysql from nodejs

This is still pre-alpha. It only has select and insert capabilities.

Wait a little.

Installation

npm install mysql_abs

Usage

var connection = {
	user : 'root',
	password : 'root'
};

var db_name = "test";

var client = require('mysql-abs').connect(connection, db_name);

var select_options = {
	where : {
		'user' : 'bvaldivielso'
	},
	order_by : [
		["created_at", "DESC"],
		["id" , "DESC"]
	]
};

client.select("comments", select_options, function(err, data){
	console.log(data);
});

Or maybe

...
var insert_data = [
	{"content" : "Hello world", user : "bvaldivielso"},
	{"content" : "Good bye world", user : "troll", hide : "1"}
];
client.insert("comments", insert_data);

Readme

Keywords

none

Package Sidebar

Install

npm i mysql_abs

Weekly Downloads

0

Version

0.0.2

License

none

Last publish

Collaborators

  • bvaldivielso