Giter Site home page Giter Site logo

ddlbuilder's Introduction

#DDL Builder

Build Status

##About

This code uses JavaScript to parse plain text, tabular data and transform it into valid DDL and DML scripts, usable for immediate insertion into a database.

The plain text can be formatted in any number of different ways. The only assumptions are that the first row contains the header names, and that there is a consistent delimiter between each "cell". See ddl_builder/qunit/fixture.html for examples of the variety of formats supported.

The code will determine the proper column type based on the data provided, including field length (based on the longest value).

Right now, the database products supported are MySQL, Oracle, PostgreSQL, SQLite, and MS SQL Server (2008+).

This was originally developed as a utility for SQL Fiddle, to aid in the rapid construction of mock databases based on the text provided by people when they ask questions on sites like StackOverflow.

##Running the example

I've provided an extremely simple plain HTML UI that makes uses of this library. If you download this project into any web-accessible folder and browse to /index.html, you will have the option to add input text and transform it into the expected DDL/DML.

This should provide sufficient clarity as to how the whole thing works. If you are a bit lost, I suggest looking at /main.js; this contains the dependency loading, instantiation, UI bindings and execution calls that are used to make the library do useful things. You'll need to do something quite similar to make it work in your project.

You can move around some of the paths of things fairly easily; you'll just need to make sure that wherever you move them, you update the paths in your main call to requirejs.config().

You can also run the QUnit tests by browsing to /qunit.html

##Technologies used

##License

Copyright Jake Feasel, 2012

Released under the terms of the MIT License.

ddlbuilder's People

Contributors

jakefeasel avatar

Stargazers

Paul avatar

Watchers

Dinesh Kr. Choudhary avatar Paul avatar  avatar

Forkers

websiteuno

ddlbuilder's Issues

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.