Skip to content

gosquared/tql

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

TQL

It's like SQL, but for tests. Pronounced as tickle.

Installation

$ npm install --save tql

Usage

var fs = require('fs');
var TQL = require('tql');

var tql = new TQL({}, fs.readFileSync(__dirname+'/schema.sql').toString());

tql.create(function(err) {
  // the schema has now been created!

  // now, lets insert some data
  tql.insert(
  	'users', // table name (that you've just created)
  	['name','email'], // field list
  	[['Simon Tabor', 'me@simontabor.com'], ['GoSquared', 'support@gosquared.com']],
  	function(err) {
  		// all done
  	}
  );
});

Check out the tests for more examples etc etc

Tests

Simple...

$ make test

License

MIT. See LICENSE.

About

Node.js module to create mock MySQL databases based on your schema and makes it easy to insert test data

Resources

License

Stars

Watchers

Forks

Packages

No packages published