Statement stm = this.db.getConnection().createStatement();
String query = "SELECT * FROM posts";
ResultSet rs = stm.executeQuery(query);
while (rs.next()) {
posts.add(new Post(rs.getInt("id"), rs.getString("texto")));
}
} catch (SQLException ex) {
System.out.println("error SQL");
}