Structured output of measurements
This commit is contained in:
parent
53791076c9
commit
1637fdbf93
6 changed files with 33 additions and 11 deletions
|
|
@ -18,6 +18,7 @@ func ListMeasurements(sess sqlbuilder.Database, resultID int64) ([]MeasurementUR
|
|||
measurements := []MeasurementURLNetwork{}
|
||||
|
||||
req := sess.Select(
|
||||
"measurements.id as msmt_tbl_id",
|
||||
"networks.id as network_id",
|
||||
"results.id as result_id",
|
||||
"urls.id as url_id",
|
||||
|
|
|
|||
|
|
@ -22,6 +22,7 @@ type ResultNetwork struct {
|
|||
// MeasurementURLNetwork is used for the JOIN between Measurement and URL
|
||||
type MeasurementURLNetwork struct {
|
||||
Measurement `db:",inline"`
|
||||
MsmtTblID int64 `db:"msmt_tbl_id"`
|
||||
Network `db:",inline"`
|
||||
NetworkID int64 `db:"network_id"`
|
||||
URL `db:",inline"`
|
||||
|
|
|
|||
Loading…
Reference in a new issue