<commit_before>const mysql = require('mysql')
const qBuilder = require('./QueryBuilder')

let query = ''
let params = []

module.exports = (dbSetting) => {
  let connection = mysql.createConnection({
    host: dbSetting.hostname,
    user: dbSetting.username,
    password: <PASSWORD>,
    database: dbSetting.database
  })

  connection.connect()

  return {
    makeQuery: () => {
      return qBuilder
    },
    prepare: () => {
      query = qBuilder.prepare()
    },
    setParameters: (params) => {
      qBuilder.setParameters(params)
    },
    getParameters: () => {
      params = qBuilder.getParameters()
    },
    execute: () => {
      // connection.query(query)
    },
    get: () => {
<commit_msg>Add few functions and connect to query builder<commit_after>const mysql = require('mysql')
const qBuilder = require('./QueryBuilder')

let _query = ''
let _params = []

module.exports = (dbSetting) => {
  let connection = mysql.createConnection({
    host: dbSetting.hostname,
    user: dbSetting.username,
    password: <PASSWORD>,
    database: dbSetting.database
  })

  return {
    makeQuery: () => {
      return qBuilder
    },
    prepare: () => {
      _query = qBuilder.prepare()
    },
    setParameters: (params) => {
      _params = params
      qBuilder.setParameters(params)
    },
    getParameters: () => {
      _params = qBuilder.getParameters()
    },
    execute: () => {
      // connection.query(_query)
    },
    get: () => {

    },
    connectToDatabase: () => {
      connection.connect()
    },
    endConnection: () => {
      connection.end()
{'fraction_non_alphanumeric': 0.15374921235034655, 'fraction_numerical': 0.0, 'mean_word_length': 2.609090909090909, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 21, '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': '5029553', 'n_tokens_mistral': 472, 'n_tokens_neox': 469, 'n_words': 92}