Simple program to transform SQL queries to go structs.
The fields need to have a as
clause for now.
SELECT inbounds.count as inbounds_count,
inbounds.last_week as inbounds_last_week,
inbounds.most_active_user as inbounds_most_active_user,
outbounds.count as outbounds_count,
outbounds.last_week as outbounds_last_week,
outbounds.most_active_user as outbounds_most_active_user,
locations.count as locations_count,
users.count as user_count,
items.count as items_count,
items.avg_price as items_avg_price,
items.total_price as items_total_price
FROM .....
Outputs
type AutoGenerated struct {
InboundsCount string `json:"inbounds_count"`
InboundsLastWeek string `json:"inbounds_last_week"`
InboundsMostActiveUser string `json:"inbounds_most_active_user"`
OutboundsCount string `json:"outbounds_count"`
OutboundsLastWeek string `json:"outbounds_last_week"`
OutboundsMostActiveUser string `json:"outbounds_most_active_user"`
LocationsCount string `json:"locations_count"`
UserCount string `json:"user_count"`
ItemsCount string `json:"items_count"`
ItemsAvgPrice string `json:"items_avg_price"`
ItemsTotalPrice string `json:"items_total_price"`
}