MCPcopy
hub / github.com/usefathom/fathom / GetPageview

Method GetPageview

pkg/datastore/sqlstore/pageviews.go:12–22  ·  view source on GitHub ↗

GetPageview selects a single pageview by its string ID

(id string)

Source from the content-addressed store, hash-verified

10
11// GetPageview selects a single pageview by its string ID
12func (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

Callers

nothing calls this directly

Calls 1

mapErrorFunction · 0.85

Tested by

no test coverage detected