Created
June 25, 2022 16:16
-
-
Save garystafford/a5b5b7df8dbffb260c8f95d22db98091 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
List<Row> rows; | |
DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss.S"); | |
for (GetQueryResultsResponse result : getQueryResultsResults) { | |
rows = result.resultSet().rows(); | |
for (Row myRow : rows.subList(1, rows.size())) { // skip first row - column names | |
List<Datum> allData = myRow.data(); | |
Event event = new Event(); | |
event.setId(parseInt(allData.get(0).varCharValue())); | |
event.setVenueId(parseInt(allData.get(1).varCharValue())); | |
event.setCatId(parseInt(allData.get(2).varCharValue())); | |
event.setDateId(parseInt(allData.get(3).varCharValue())); | |
event.setName(allData.get(4).varCharValue()); | |
event.setStartTime(LocalDateTime.parse(allData.get(5).varCharValue(), formatter)); | |
events.add(event); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment