mirror of
https://github.com/grafana/grafana.git
synced 2025-02-14 17:43:35 -06:00
22 lines
374 B
Go
22 lines
374 B
Go
package sqlstore
|
|
|
|
import (
|
|
"github.com/go-xorm/xorm"
|
|
"github.com/grafana/grafana/pkg/services/annotations"
|
|
)
|
|
|
|
type SqlAnnotationRepo struct {
|
|
}
|
|
|
|
func (r *SqlAnnotationRepo) Save(item *annotations.Item) error {
|
|
return inTransaction(func(sess *xorm.Session) error {
|
|
|
|
if _, err := sess.Table("annotation").Insert(item); err != nil {
|
|
return err
|
|
}
|
|
|
|
return nil
|
|
})
|
|
|
|
}
|