<commit_before>/**
 * Configuration is dodo-objection configuration.
 *
 * @param config Dodo-objection configuration.
 * @return {DatabaseManager}
 */
module.exports = {
  databaseManagerFactory: function databaseManagerFactory(config) {

    // Prevent people from invoking this as a constructor.
    if (this instanceof databaseManagerFactory) {
      throw new Error('this is not a constructor');
    }

    switch (config.knex.client) {
      case 'postgres': {
        var PostgresDatabaseManager = require('./PostgresDatabaseManager').default;
        return new PostgresDatabaseManager(config);
      }
      case 'mysql': {
        var MySqlDatabaseManager = require('./MySqlDatabaseManager').default;
        return new MySqlDatabaseManager(config);
      }
      case 'sqlite': {
        var SqliteDatabaseManager = require('./SqliteDatabaseManager').default;
        return new SqliteDatabaseManager(config);
      }
      default:
        throw new Error(config.knex.client + ' is not supported. Supported clients currently: postgres, mysql and sqlite');
    }
  }
};
<commit_msg>Dialect aliases<commit_after>/**
 * Configuration is dodo-objection configuration.
 *
 * @param config Dodo-objection configuration.
 * @return {DatabaseManager}
 */
module.exports = {
  databaseManagerFactory: function databaseManagerFactory(config) {

    // Prevent people from invoking this as a constructor.
    if (this instanceof databaseManagerFactory) {
      throw new Error('this is not a constructor');
    }

    switch (config.knex.client) {
      case 'pg':
      case 'postgresql':
      case 'postgres': {
        var PostgresDatabaseManager = require('./PostgresDatabaseManager').default;
        return new PostgresDatabaseManager(config);
      }
      case 'maria':
      case 'mariadb':
      case 'mariasql':
      case 'mysql': {
        var MySqlDatabaseManager = require('./MySqlDatabaseManager').default;
        return new MySqlDatabaseManager(config);
      
      }
      case 'sqlite3':
      case 'sqlite': {
        var SqliteDatabaseManager = require('./SqliteDatabaseManager').default;
        return new SqliteDatabaseManager(config);
      }
      default:
        throw new Error(config.knex.client + ' is not supported. Supported clients currently: postgres, mysql and sqlite');
    }
  }
};

{'fraction_non_alphanumeric': 0.10327022375215146, 'fraction_numerical': 0.0004302925989672978, 'mean_word_length': 3.0434782608695654, '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': '3892271', 'n_tokens_mistral': 610, 'n_tokens_neox': 598, 'n_words': 161}