sqlite

package
v0.0.27 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 12, 2025 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewHappeningService added in v0.0.15

func NewHappeningService(filePath string) (storage.HappeningService, error)

func NewLogEntryService

func NewLogEntryService(filePath string) (storage.LogEntryService, error)

func NewLogNoteService

func NewLogNoteService(filePath string) (storage.LogNoteService, error)

func NewStateRecordingService added in v0.0.16

func NewStateRecordingService(filePath string) (storage.StateRecordingService, error)

Types

type HappeningSQLiteStore added in v0.0.15

type HappeningSQLiteStore struct {
	*SQLiteStore
}

func (*HappeningSQLiteStore) Add added in v0.0.15

func (hss *HappeningSQLiteStore) Add(ctx context.Context, happening *models.Happening) (*models.Happening, error)

func (*HappeningSQLiteStore) Delete added in v0.0.15

func (hss *HappeningSQLiteStore) Delete(ctx context.Context, id int64) error

func (*HappeningSQLiteStore) List added in v0.0.15

Happening service methods

func (*HappeningSQLiteStore) Update added in v0.0.15

type LogEntrySQLiteStore

type LogEntrySQLiteStore struct {
	*SQLiteStore
}

func (*LogEntrySQLiteStore) Add

func (les *LogEntrySQLiteStore) Add(entry models.LogEntry) (int64, error)

func (*LogEntrySQLiteStore) Delete

func (les *LogEntrySQLiteStore) Delete(id int64) error

func (*LogEntrySQLiteStore) GetTree added in v0.0.12

func (les *LogEntrySQLiteStore) GetTree(ctx context.Context, id int64, includeHistory bool) ([]models.LogEntry, error)

func (*LogEntrySQLiteStore) List

LogEntry service methods

func (*LogEntrySQLiteStore) Move added in v0.0.9

func (les *LogEntrySQLiteStore) Move(id int64, newParentID int64) error

func (*LogEntrySQLiteStore) Update

func (les *LogEntrySQLiteStore) Update(id int64, update models.LogEntryOptional) error

type LogNoteSQLiteStore

type LogNoteSQLiteStore struct {
	*SQLiteStore
}

func (*LogNoteSQLiteStore) Add

func (lns *LogNoteSQLiteStore) Add(entryID int64, note models.Note) (int64, error)

func (*LogNoteSQLiteStore) Delete

func (lns *LogNoteSQLiteStore) Delete(entryID int64, noteID int64) error

func (*LogNoteSQLiteStore) List

func (lns *LogNoteSQLiteStore) List(entryID int64, options storage.LogNoteListOptions) ([]models.Note, int64, error)

LogNote service methods

func (*LogNoteSQLiteStore) ListForEntries added in v0.0.10

func (lns *LogNoteSQLiteStore) ListForEntries(entryIDs []int64) (map[int64][]models.Note, error)

func (*LogNoteSQLiteStore) Update

func (lns *LogNoteSQLiteStore) Update(entryID int64, noteID int64, update models.NoteOptional) error

type SQLiteStore

type SQLiteStore struct {
	// contains filtered or unexported fields
}

func New

func New(filePath string) (*SQLiteStore, error)

func (*SQLiteStore) Close

func (s *SQLiteStore) Close() error

type StateRecordingSQLiteStore added in v0.0.16

type StateRecordingSQLiteStore struct {
	*SQLiteStore
}

func (*StateRecordingSQLiteStore) CreateState added in v0.0.16

func (srs *StateRecordingSQLiteStore) CreateState(ctx context.Context, state *models.State) (*models.State, error)

func (*StateRecordingSQLiteStore) GetState added in v0.0.16

func (srs *StateRecordingSQLiteStore) GetState(ctx context.Context, name string) (*models.State, error)

StateRecordingService methods

func (*StateRecordingSQLiteStore) GetStateEvents added in v0.0.16

func (srs *StateRecordingSQLiteStore) GetStateEvents(ctx context.Context, stateID int64, limit int) ([]*models.StateEvent, error)

func (*StateRecordingSQLiteStore) GetStateHistory added in v0.0.23

func (*StateRecordingSQLiteStore) ListStates added in v0.0.16

func (srs *StateRecordingSQLiteStore) ListStates(ctx context.Context, scope string) ([]*models.State, error)

func (*StateRecordingSQLiteStore) RecordStateEvent added in v0.0.16

func (srs *StateRecordingSQLiteStore) RecordStateEvent(ctx context.Context, name string, deltaScore float64) error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL