0.0.1 • Published 11 years ago

mysql-query-statements v0.0.1

Weekly downloads
2
License
ISC
Repository
github
Last release
11 years ago

mysql-query-statements

Build SQL statements with a convenient easy-to-use interface

Install

Introduction

This is a node.js query builder for mysql. It is written in JavaScript, does not require compiling, and is 100% MIT licensed.

Here is an example on how to use it:

Example

MysqlQueryStatement = require('mysql-query-statement');
statement = new MysqlQueryStatement();
statement.database.ping.sql //outputs: SELECT 1;
statement.database.create.sql //outputs: CREATE DATABASE IF NOT EXISTS ??;
statement.database.drop.sql //outputs: DROP DATABASE IF EXISTS ??;

Running tests

Setup:

$ npm install

The test suite is split into two parts: unit tests and integration tests. The unit tests run on any machine while the integration tests require a MySQL server instance to be setup.

Running unit tests

$ grunt test

Todo

  • Prepared statements