{"size": 915, "ext": "js", "max_stars_repo_path": "src/90websql.js", "max_stars_repo_name": "jacqt/alasql", "max_stars_repo_stars_event_min_datetime": "2020-05-30T04:44:39.000Z", "max_stars_repo_stars_event_max_datetime": "2022-02-03T01:04:07.000Z", "max_issues_repo_path": "src/90websql.js", "max_issues_repo_name": "zichongkao/alasql", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "src/90websql.js", "max_forks_repo_name": "zichongkao/alasql", "max_forks_repo_forks_event_min_datetime": "2020-04-13T10:04:47.000Z", "max_forks_repo_forks_event_max_datetime": "2022-02-06T14:47:49.000Z"}
{"max_stars_count": 10, "max_issues_count": null, "max_forks_count": 9, "avg_line_length": 24.7297297297, "max_line_length": 91, "alphanum_fraction": 0.6612021858}
//
// 91websql.js
// WebSQL database support
// (c) 2014, Andrey Gershun
//

var WEBSQL = (alasql.engines.WEBSQL = function() {});

WEBSQL.createDatabase = function(wdbid, args, dbid, cb) {
	var res = 1;
	var wdb = openDatabase(wdbid, args[0], args[1], args[2]);
	if (this.dbid) {
		var db = alasql.createDatabase(this.dbid);
		db.engineid = 'WEBSQL';
		db.wdbid = wdbid;
		sb.wdb = db;
	}
	if (!wdb) {
		throw new Error('Cannot create WebSQL database "' + databaseid + '"');
	}
	if (cb) cb(res);
	return res;
};

WEBSQL.dropDatabase = function(databaseid) {
	throw new Error('This is impossible to drop WebSQL database.');
};

WEBSQL.attachDatabase = function(databaseid, dbid, args, params, cb) {
	var res = 1;
	if (alasql.databases[dbid]) {
		throw new Error('Unable to attach database as "' + dbid + '" because it already exists');
	}
	alasqlopenDatabase(databaseid, args[0], args[1], args[2]);
	return res;
};
