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

org.boon.slumberdb.mysql.SimpleStringKeyValueStoreMySQL Maven / Gradle / Ivy

There is a newer version: 0.34
Show newest version
package org.boon.slumberdb.mysql;

import org.boon.slumberdb.StringKeyValueStore;

import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.SQLException;

public class SimpleStringKeyValueStoreMySQL extends BaseMySQLSupport implements StringKeyValueStore {


    public SimpleStringKeyValueStoreMySQL(String url, String userName, String password, String table, int batchSize) {
        super(password, userName, url, table, "TEXT", batchSize);


    }

    @Override
    protected String getValueColumn(int index, ResultSet resultSet) throws SQLException {
        String value;
        value = resultSet.getString(index);
        return value;
    }

    @Override
    protected void setValueColumnQueryParam(int index, PreparedStatement p, String value) throws SQLException {
        p.setString(index, value);
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy