GetPageview selects a single pageview by its string ID
(id string)
| 10 | |
| 11 | // GetPageview selects a single pageview by its string ID |
| 12 | func (db *sqlstore) GetPageview(id string) (*models.Pageview, error) { |
| 13 | result := &models.Pageview{} |
| 14 | query := db.Rebind(`SELECT * FROM pageviews WHERE id = ? LIMIT 1`) |
| 15 | err := db.Get(result, query, id) |
| 16 | |
| 17 | if err != nil { |
| 18 | return nil, mapError(err) |
| 19 | } |
| 20 | |
| 21 | return result, nil |
| 22 | } |
| 23 | |
| 24 | // InsertPageviews bulks-insert multiple pageviews using a single INSERT statement |
| 25 | // IMPORTANT: This does not insert the actual IsBounce, Duration and IsFinished values |
nothing calls this directly
no test coverage detected