<commit_before>import { IMssqlConnectionOption } from "./IMssqlConnectionOption";
import { IDriver } from "../IDriver";
import { MssqlConnection } from "./MssqlConnection";

export class MssqlDriver implements IDriver<"mssql"> {
    public dbType: "mssql" = "mssql";
    public allowPooling = true;
    public get database() {
        return this.connectionOptions.database;
    }
    private driverConnectionOption: any;
    protected getConnectionOptions() {
        const config = Object.assign({}, this.connectionOptions) as any;
        const host = this.connectionOptions.host.split("\\");
        config.userName = this.connectionOptions.user;
        config.options = {
            database: this.connectionOptions.database
        };
        config.server = host[0];
        if (!config.options)
            config.options = { appName: "lc-framework" };
        else if (!config.options.appName)
            config.options.appName = "lc-framework";
        config.options.instanceName = host[1];
        config.options.useUTC = false;
        return config;
    }
    constructor(protected connectionOptions: IMssqlConnectionOption) {
        this.driverConnectionOption = this.getConnectionOptions();
    }
    public async getConnection(): Promise<MssqlConnection> {
        return new MssqlConnection(this.driverConnectionOption);
    }
}
<commit_msg>* MssqlDriver: default encrypt to false.<commit_after>import { IMssqlConnectionOption } from "./IMssqlConnectionOption";
import { IDriver } from "../IDriver";
import { MssqlConnection } from "./MssqlConnection";

export class MssqlDriver implements IDriver<"mssql"> {
    public dbType: "mssql" = "mssql";
    public allowPooling = true;
    public get database() {
        return this.connectionOptions.database;
    }
    private driverConnectionOption: any;
    protected getConnectionOptions() {
        const config = Object.assign({}, this.connectionOptions) as any;
        const host = this.connectionOptions.host.split("\\");
        config.userName = this.connectionOptions.user;
        config.options = {
            database: this.connectionOptions.database
        };
        config.server = host[0];
        if (!config.options)
            config.options = { appName: "lc-framework" };
        else if (!config.options.appName)
            config.options.appName = "lc-framework";
        if (typeof config.options.encrypt === "boolean")
            config.options.encrypt = false;

        config.options.instanceName = host[1];
        config.options.useUTC = false;
        return config;
    }
    constructor(protected connectionOptions: IMssqlConnectionOption) {
        this.driverConnectionOption = this.getConnectionOptions();
    }
    public async getConnection(): Promise<MssqlConnection> {
        return new MssqlConnection(this.driverConnectionOption);
    }
}

{'fraction_non_alphanumeric': 0.10998248686514886, 'fraction_numerical': 0.0014010507880910684, 'mean_word_length': 2.955678670360111, 'pattern_counts': {'":': 0, '<': 7, '<?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': '4988391', 'n_tokens_mistral': 756, 'n_tokens_neox': 753, 'n_words': 167}