public void save(Map<String, Object> row) throws Exception {
        Tuple2<List<String>, String> data = sqlFromRow(row);
        PreparedStatement statement = conn.prepareStatement(data._2());
        int i = 1;
        for(String columnName:data._1()) {
            statement.setObject(i, row.get(columnName));
            i++;
        }
        statement.executeUpdate();
    }
public void save ( Map < String , Object > row ) throws Exception { Tuple2 < List < String > , String > data = sqlFromRow ( row ) ; PreparedStatement statement = conn . prepareStatement ( data . _2 ( ) ) ; int i = 1 ; for ( String columnName : data . _1 ( ) ) { statement . setObject ( i , row . get ( columnName ) ) ; i ++ ; } statement . executeUpdate ( ) ; }
Saves data.
@param row Data structure representing a row as a Map of column_name:column_value
@throws SQLException