<commit_before>var sqlite3  = require('sqlite3');
var db = new sqlite3.Database('./Northwind.sl3');

db.each('SELECT * FROM Categories', function (err, row) {
  console.log(row);
});

db.close();<commit_msg>added some more queries<commit_after>var sqlite3  = require('sqlite3');
var db = new sqlite3.Database('./Northwind.sl3');

getCategories(getProducts);

function getCategories(cb) {
  console.log('/=========\\');
  console.log('|Catgories|');
  console.log('\\=========/');

  db.each('SELECT * FROM Categories', function (err, row) {
    console.log(row.Description.toString());
  }, cb);
}

function getProducts() {
  console.log('/========\\');
  console.log('|Products|');
  console.log('\\========/');

  db.each('SELECT * FROM Products ' +
    'INNER JOIN Categories ' +
    'ON Products.CategoryID = Categories.CategoryID ' +
    'LIMIT 10', function (err, row) {
      console.log(row.ProductName + ' is a ' + row.CategoryName);
    }, getEmployeeSupers);
}

function getEmployeeSupers() {
  console.log('/====================\\');
  console.log('|Employee Supervisors|');
  console.log('\\====================/');

  db.each('SELECT F.LastName AS "Employee", S.LastName AS "Supervisor" ' +
    'FROM Employees F ' +
    'INNER JOIN Employees S ' +
    'ON F.ReportsTo = S.EmployeeID', function (err, row) {
      console.log(row.Employee + "'s supervisor is " + row.Supervisor);
    });
}

db.close();
{'fraction_non_alphanumeric': 0.2330508474576271, 'fraction_numerical': 0.007062146892655367, 'mean_word_length': 4.04270462633452, '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': '1096466', 'n_tokens_mistral': 484, 'n_tokens_neox': 452, 'n_words': 94}