Skip to content

uen/katjs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

69 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

KatJS

A lightweight NodeJS MySQL wrapper

Usage

Put the katjs folder in your node_modules folder

var kat = require('katjs');

A typical set-up might look something like this

var kat = require('katjs');

kat.connect('host','username','password','database', function(){
    console.log('Successfully connected to database');
});

// Query a single value
kat.queryValue("SELECT count(*) FROM users", function(data){
  // Callback here
});

// Query a single row
kat.queryRow("SELECT id,name FROM users WHERE id = :id", {id:1}, function(data){
  // Callback here
});

//Query a whole table
kat.query("SELECT id FROM users WHERE name = :name, shoesize = :size",{name:'Manolis',size:11}, function(data){
  // Callback here
});

About

A lightweight NodeJS MySQL wrapper

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •