<commit_before>var config = require('./config.json'),
	util = require('util'),
	debuglog = util.debuglog('main'),
	argv = require('minimist')(process.argv.slice(2)),
	//mongoLib = require('mongodb').MongoClient,
	schemaParser = require('./lib/m2sql-schema.js'),
	dataParser = require('./lib/m2sql-data.js'),
	mongoConn;

var debug = function(obj){
	debuglog(util.inspect(obj, {depth: 3, colors: true}));
};
debug(config);

/*mongoLib.connect(config.connection.host, function(err, db){
	if(err){ return console.log('Could not connect to Mongo'); }
	mongoConn = db;
	run();
});*/

function run(){
	switch(argv['_'][0]){
		case 'data':
			return convertData();
		case 'schema':
			return createSchema();
		default:
			return new Error("Must use argument 'data' or 'schema'");
	}
}

function convertData(){

}

function createSchema(){
	var schema = {
		'tables':{
			'test': {
				'id': {
					'primaryKey': true,
					'type': 'int'
				},
				'col1':{
					'type': 'int',
					'sparse': true,
					'default': 17
				},
				'col2': {
					'type': 'bool',
					notNull: true
				}
			}
		}
	};

	var schemaMaker = schemaParser({schema: schema, syntax: config.schema.syntax});
	schemaMaker.construct();

	var sqlSchema = schemaMaker.generateSQL();

}

run();<commit_msg>More sample data for the test<commit_after>var config = require('./config.json'),
	util = require('util'),
	debuglog = util.debuglog('main'),
	argv = require('minimist')(process.argv.slice(2)),
	//mongoLib = require('mongodb').MongoClient,
	schemaParser = require('./lib/m2sql-schema.js'),
	dataParser = require('./lib/m2sql-data.js'),
	mongoConn;

var debug = function(obj){
	debuglog(util.inspect(obj, {depth: 3, colors: true}));
};
debug(config);

/*mongoLib.connect(config.connection.host, function(err, db){
	if(err){ return console.log('Could not connect to Mongo'); }
	mongoConn = db;
	run();
});*/

function run(){
	switch(argv['_'][0]){
		case 'data':
			return convertData();
		case 'schema':
			return createSchema();
		default:
			return new Error("Must use argument 'data' or 'schema'");
	}
}

function convertData(){

}

function createSchema(){
	var schema = {
		'tables':{
			'test': {
				'id': {
					'primaryKey': true,
					'type': 'int'
				},
				'col1':{
					'type': 'int',
					'sparse': true,
					'default': 17
				},
				'col2': {
					'type': 'bool',
					notNull: true
				}
			},
			'test2': {
				'id_pk': {
					'primaryKey': true,
					'type': 'int',
					'notNull': true
				},
				'col3':{
					'type': 'int',
					'sparse': true,
					'default': 18
				},
				'col4': {
					'type': 'text',
					'notNull': true
				}
			}
		}
	};

	var schemaMaker = schemaParser({schema: schema, syntax: config.schema.syntax});
	schemaMaker.construct();

	var sqlSchema = schemaMaker.generateSQL();

}

run();
{'fraction_non_alphanumeric': 0.19814020028612303, 'fraction_numerical': 0.008226037195994278, 'mean_word_length': 3.4326465927099843, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4051810', 'n_tokens_mistral': 1187, 'n_tokens_neox': 994, 'n_words': 212}