<commit_before>var Tiny = require('../');

var t = new Tiny({
   connection_string: "postgres://postgres@localhost:5432/mydb",
   root_dir: __dirname + '/sql_files',
   snake: true
});

Tiny.pgDefaults({
   poolSize: 1
});

t.sql.fetch_user_by_name({ name: 'Joe' })
.then(function () { })
.catch(function () { });

t.query('SELECT * FROM users where name = :name', {
   name: 'Joe'
})
.then(function () { })
.catch(function () { });

t.getClient().then(function (ctx) {
   console.log('Closing connection');
   ctx.client.end();
});
<commit_msg>improve tests for naming root level files.<commit_after>const TinyPg = require('../').TinyPg

const db = new TinyPg({
   connection_string: 'postgres://postgres@localhost:5432/mydb',
   root_dir: __dirname + '/sql_files'
})

db.sql('fetch_user_by_name', {
   name: 'Joe',
})
.then(res => {
   console.log(res)
})
.catch(error => {
   console.log(error)
})

db.query('SELECT * FROM users where name = :name', {
   name: 'Joe'
})
.then(res => {
   console.log(res)
})
.catch(error => {
   console.log(error)
})

{'fraction_non_alphanumeric': 0.2049335863377609, 'fraction_numerical': 0.008538899430740038, 'mean_word_length': 3.9530516431924885, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 7, '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': '869722', 'n_tokens_mistral': 405, 'n_tokens_neox': 388, 'n_words': 74}