All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.jsimpledb.kv.mysql.MySQLKVImplementation Maven / Gradle / Ivy

There is a newer version: 3.6.1
Show newest version

/*
 * Copyright (C) 2015 Archie L. Cobbs. All rights reserved.
 */

package org.jsimpledb.kv.mysql;

import java.util.ArrayDeque;

import org.jsimpledb.kv.sql.SQLDriverKVImplementation;

public class MySQLKVImplementation extends SQLDriverKVImplementation {

    public static final String MYSQL_DRIVER_CLASS_NAME = "com.mysql.cj.jdbc.Driver";

    /**
     * Default constructor.
     */
    public MySQLKVImplementation() {
        this(MYSQL_DRIVER_CLASS_NAME);
    }

    /**
     * Constructor allowing alternative driver.
     *
     * @param driverClassName MySQL {@link java.sql.Driver} implementation class name
     */
    public MySQLKVImplementation(String driverClassName) {
        super(driverClassName);
    }

    @Override
    public String[][] getCommandLineOptions() {
        return new String[][] {
            { "--mysql URL", "Use MySQL key/value store with the given JDBC URL" },
        };
    }

    @Override
    public String parseCommandLineOptions(ArrayDeque options) {
        return this.parseCommandLineOption(options, "--mysql");
    }

    @Override
    public String getDescription(Object configuration) {
        return "MySQL";
    }

    @Override
    protected MySQLKVDatabase createSQLKVDatabase(Object configuration) {
        return new MySQLKVDatabase();
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy