<commit_before>'use strict';


var kraken = require('kraken-js'),
    app = {},
    db = require("sqlite3");


app.configure = function configure(nconf, next) {
    // Async method run on startup.
    next(null);
};


app.requestStart = function requestStart(server) {
    var sqlite3 = require('sqlite3').verbose();
    var db = new sqlite3.Database('Database.sqlite3');

    db.serialize(function() {
        // db.run("CREATE TABLE lorem (info TEXT)");

        // var stmt = db.prepare("INSERT INTO lorem VALUES (?)");
        // for (var i = 0; i < 10; i++) {
        //     stmt.run("Ipsum " + i);
        // }
        // stmt.finalize();

        db.each("SELECT rowid AS id, info FROM lorem", function(err, row) {
            console.log(row.id + ": " + row.info);
        });
    });

    db.close();
};

<commit_msg>Trying to create table, only if doesn't exists<commit_after>'use strict';


var kraken = require('kraken-js'),
    app = {},
    db = require("sqlite3");


app.configure = function configure(nconf, next) {
    // Async method run on startup.
    next(null);
};


app.requestStart = function requestStart(server) {
    var sqlite3 = require('sqlite3').verbose();
    var db = new sqlite3.Database('Database.sqlite3');

    db.serialize(function() {
        // db.run("DROP TABLE IF EXISTS lorem");
        // db.run("CREATE TABLE lorem (info TEXT)");
        db.run("CREATE TABLE IF NOT EXISTS lorem (info TEXT)");

        var stmt = db.prepare("INSERT INTO lorem VALUES (?)");
        for (var i = 0; i < 3; i++) {
            stmt.run("Ipsum " + i);
        }
        stmt.finalize();

        db.all("SELECT rowid AS id, info FROM lorem", function(err, rows) {
            console.log(rows);
        });
    });

    db.close();
};


{'fraction_non_alphanumeric': 0.1685584562996595, 'fraction_numerical': 0.00851305334846765, 'mean_word_length': 2.3264150943396227, 'pattern_counts': {'":': 1, '<': 5, '<?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': '3445121', 'n_tokens_mistral': 584, 'n_tokens_neox': 556, 'n_words': 143}