este je tu moznost ze z db to vytahujes spravne no k orezaniu dojde pri dalsom spracovani napr v objekte "modelVyzivoveTabulky"
EDIT:
skusil som to testnut a komunikacia s SQLite bola bez zaokruhlovania
Kód:
import java.sql.*;
public class skuska {
public static void main(String[] args) throws Exception {
Class.forName("org.sqlite.JDBC");
Connection conn =
DriverManager.getConnection("jdbc:sqlite:test.db");
Statement stat = conn.createStatement();
stat.executeUpdate("drop table if exists test;");
stat.executeUpdate("create table test (col1 float, col2 double);");
PreparedStatement prep = conn.prepareStatement(
"insert into test values (?, ?);");
prep.setFloat(1, 1.227788f);
prep.setFloat(2, 2.445577f);
prep.execute();
conn.setAutoCommit(true);
ResultSet rs = stat.executeQuery("select * from test;");
while (rs.next()) {
System.out.println("col1 = " + rs.getFloat("col1"));
System.out.println("col2 = " + rs.getFloat("col2"));
}
rs.close();
conn.close();
}
}