Remove unused event store methods

This commit is contained in:
braginini
2022-12-07 10:32:38 +01:00
parent 0e3bbf0e55
commit c09c3a70ab
2 changed files with 0 additions and 19 deletions

View File

@@ -16,8 +16,6 @@ type Type string
type Store interface {
// Save an event in the store
Save(event Event) (*Event, error)
// GetSince returns a list of events from the store for a given account since the specified time
GetSince(accountID string, from time.Time) ([]Event, error)
// Get returns "limit" number of events from the "offset" index ordered descending or ascending by a timestamp
Get(accountID string, offset, limit int, descending bool) ([]Event, error)
// Close the sink flushing events if necessary

View File

@@ -90,23 +90,6 @@ func (store *SQLiteStore) Get(accountID string, offset, limit int, descending bo
return processResult(result)
}
// GetSince returns a list of events from the store for a given account since the specified time
func (store *SQLiteStore) GetSince(accountID string, from time.Time) ([]Event, error) {
stmt, err := store.db.Prepare("SELECT id, operation, timestamp, modifier, target, account, type" +
" FROM events WHERE account = ? and timestamp >= ?;")
if err != nil {
return nil, err
}
result, err := stmt.Query(accountID, from)
if err != nil {
return nil, err
}
defer result.Close() //nolint
return processResult(result)
}
// Save an event in the SQLite events table
func (store *SQLiteStore) Save(event Event) (*Event, error) {