Slide 46
Slide 46 text
46
Confidential
D3.
getDBRecord(id string) record {
// calls DB
}
// HTTP endpoint, no DB call
GetRecordByID(id string) {
// some checks
record := getDBRecord(id)
// check, return data
}
// HTTP endpoint, no DB call
GetRecordsByIDs(ids string) {
// some checks
For id := range ids {
records = append(records,
getDBRecord(id)
)
}
// check, return data