<commit_before>﻿using System;
using System.Collections.Generic;
using System.Text;

using Poco.Evolved.Core.Database;

using Poco.Evolved.SQL.Transactions;

namespace Poco.Evolved.SQL.Database
{
    /// <summary>
    /// Factory for creating a <see cref="IDatabaseHelper<SQLUnitOfWork>" /> with a SQL dialect for a specific database.
    /// </summary>
    public abstract class DatabaseHelperFactory
    {
        /// <summary>
        /// Creates a new <see cref="IDatabaseHelper<SQLUnitOfWork>" /> for a specified database.
        /// </summary>
        /// <param name="databaseType">The database type for the <see cref="IDatabaseHelper<SQLUnitOfWork>" /></param>
        /// <param name="installedVersionsTableName">Optional name of the table for saving the information about installed versions</param>
        /// <returns></returns>
        public IDatabaseHelper<SQLUnitOfWork> CreateDatabaseHelper(DatabaseType databaseType = DatabaseType.Generic, string installedVersionsTableName = null)
        {
            switch (databaseType)
            {
                case DatabaseType.Firebird:
                    return new FirebirdDatabaseHelper(installedVersionsTableName);

                case DatabaseType.SQLite:
                    return new SQLiteDatabaseHelper(installedVersionsTableName);<commit_msg>static method to create a database helper in DatabaseHelperFactory<commit_after>﻿using System;
using System.Collections.Generic;
using System.Text;

using Poco.Evolved.Core.Database;

using Poco.Evolved.SQL.Transactions;

namespace Poco.Evolved.SQL.Database
{
    /// <summary>
    /// Factory for creating a <see cref="IDatabaseHelper<SQLUnitOfWork>" /> with a SQL dialect for a specific database.
    /// </summary>
    public abstract class DatabaseHelperFactory
    {
        /// <summary>
        /// Creates a new <see cref="IDatabaseHelper<SQLUnitOfWork>" /> for a specified database.
        /// </summary>
        /// <param name="databaseType">The database type for the <see cref="IDatabaseHelper<SQLUnitOfWork>" /></param>
        /// <param name="installedVersionsTableName">Optional name of the table for saving the information about installed versions</param>
        /// <returns></returns>
        public static IDatabaseHelper<SQLUnitOfWork> CreateDatabaseHelper(DatabaseType databaseType = DatabaseType.Generic, string installedVersionsTableName = null)
        {
            switch (databaseType)
            {
                case DatabaseType.Firebird:
                    return new FirebirdDatabaseHelper(installedVersionsTableName);

                case DatabaseType.SQLite:
                    return new SQLiteDatabaseHelper(installedVersionsTableName);
{'fraction_non_alphanumeric': 0.09555555555555556, 'fraction_numerical': 0.0, 'mean_word_length': 2.93731778425656, 'pattern_counts': {'":': 0, '<': 37, '<?xml version=': 0, '>': 37, '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': '5557133', 'n_tokens_mistral': 684, 'n_tokens_neox': 659, 'n_words': 180}