0.2.3 • Published 10 years ago

xml2ddl v0.2.3

Weekly downloads
-
License
MIT
Repository
github
Last release
10 years ago

xml2ddl

xml2ddl converts an xml schema to a sql data description language. It supports mysql syntax and both primary key and foreign key constraints.

Installation

Install using npm with npm install xml2ddl.

Usage

xml2ddl exports a single function that takes a filename to read xml from and calls a callback with an array of sql commands.

var xml2ddl = require('xml2ddl');

xml2ddl(filename, [syntax = 'mysql',] callback);

Example

var xml2ddl = require('xml2ddl');

xml2ddl('myschema.xml', 'mysql', function(err, data) {
    if(err) {
        console.log(err);
    } else {
        data.forEach(function(command) {
            console.log(command);
        });
    }
});
0.2.3

10 years ago

0.2.2

10 years ago

0.2.1

10 years ago

0.2.0

10 years ago

0.1.1

10 years ago

0.1.0

10 years ago