GithubHelp home page GithubHelp logo

node-mysql's Introduction

node-mysql

node-mysql is pure Javascript MySQL network driver for node.js

Want to help

It's for testing stage. Now It can use for this driver developer only.

I have a lot of tasks to make stable driver. I want your help.

Tests

I need your help in testing this driver. It will be great if you use it for testing or prototyping. It's testing stage, It's not for real project If you find bugs, strange thing and unknown things, please send them to @masuidrive_en or github issues If you write test code (test folder), It's awesome!!

Documentation

Sorry, This driver's documentation is less. My English skill is horrible. :-(

This drivers is came from Ruby's mysql driver. Almost API is same as mysql.rb. maybe this document is useful reference.

Pool mananager

Currently, this driver supported single connection only. We need multi mysql driver pool manager for multi connections. And connection pool require transaction support.

Example

var sys = require('sys');
var mysql = require('./lib/mysql');

/*
> mysql -u root
CREATE DATABASE nodejs_mysql;
GRANT ALL ON nodejs_mysql.* TO nodejs_mysql@localhost IDENTIFIED BY "nodejs_mysql";
*/
var conn = new mysql.Connection('localhost','nodejs_mysql', 'nodejs_mysql', 'nodejs_mysql');
conn.connect();
conn.query("CREATE TEMPORARY TABLE test1(intval INTEGER, strval TEXT, timestampval TIMESTAMP, boolval BOOLEAN);");
conn.query("INSERT INTO test1 VALUES(1,'a',now(),true);");
conn.query("SELECT * FROM test1;",
    function(result) {
        for(var i=0; i<result.records.length; ++i) {
            sys.puts("Result: "+sys.inspect(result.toHash(result.records[i])));
        };
    },
    function(error) {
        sys.puts("Error: "+sys.inspect(error));
    });

And see exmaples folder.

Requirements

Optional:

License

MIT License. See LICENSE file.

Who?

Code by Yuichiro MASUI(masuidrive) and awesome contributers. please see AUTHORS

Related licenses

MySQL protocol encode/decode from tmtm's ruby-mysql.

Promise library

  • http://nodejs.org/
  • Copyright 2009, 2010 Ryan Lienhart Dahl. All rights reserved.
  • License: MIT

SHA1 library from Takanori Ishikawa.

pack/unpack from php.js

node-mysql's People

Contributors

masuidrive avatar sannis avatar spytheman avatar peters avatar

Stargazers

Sumit Kataria avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.