(ctx context.Context, appId string, triggerType, source string)
| 1038 | } |
| 1039 | |
| 1040 | func (ds *SQLStore) GetTriggerBySource(ctx context.Context, appId string, triggerType, source string) (*models.Trigger, error) { |
| 1041 | var trigger models.Trigger |
| 1042 | |
| 1043 | query := ds.db.Rebind(triggerIDSourceSelector) |
| 1044 | row := ds.db.QueryRowxContext(ctx, query, appId, triggerType, source) |
| 1045 | |
| 1046 | err := row.StructScan(&trigger) |
| 1047 | if err == sql.ErrNoRows { |
| 1048 | return nil, models.ErrTriggerNotFound |
| 1049 | } else if err != nil { |
| 1050 | return nil, err |
| 1051 | } |
| 1052 | return &trigger, nil |
| 1053 | } |
| 1054 | |
| 1055 | // Close closes the database, releasing any open resources. |
| 1056 | func (ds *SQLStore) Close() error { |
nothing calls this directly
no outgoing calls
no test coverage detected