sqlite

package
v0.0.0-...-eaefaf9 Latest Latest
Warning

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

Go to latest
Published: Jul 28, 2025 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Storage

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

Storage implements the connection.Storage interface using SQLite

func NewStorage

func NewStorage(dbPath string) (*Storage, error)

NewStorage creates a new SQLite storage instance

func (*Storage) Close

func (s *Storage) Close() error

Close closes the database connection

func (*Storage) Create

Create creates a new connection

func (*Storage) Delete

func (s *Storage) Delete(ctx context.Context, id int64) error

Delete deletes a connection by ID

func (*Storage) FindConnectionPaths

func (s *Storage) FindConnectionPaths(ctx context.Context, fromNoteID, toNoteID int64, maxDepth int) ([]connection.ConnectionPath, error)

FindConnectionPaths finds paths between two notes (basic implementation)

func (*Storage) Get

func (s *Storage) Get(ctx context.Context, id int64) (*connection.Connection, error)

Get retrieves a connection by ID

func (*Storage) GetBidirectionalConnections

func (s *Storage) GetBidirectionalConnections(ctx context.Context, noteID int64) (*connection.NoteConnectionsResponse, error)

GetBidirectionalConnections retrieves both incoming and outgoing connections for a note

func (*Storage) GetConnectionStats

func (s *Storage) GetConnectionStats(ctx context.Context) (*connection.ConnectionStats, error)

GetConnectionStats retrieves statistics about connections

func (*Storage) GetConnectionsByType

func (s *Storage) GetConnectionsByType(ctx context.Context, connectionType string, req connection.ListConnectionsRequest) (*connection.ListConnectionsResponse, error)

GetConnectionsByType retrieves connections filtered by type

func (*Storage) GetNoteConnections

GetNoteConnections retrieves all connections for a specific note

func (*Storage) List

List lists connections with pagination and filtering

func (*Storage) Update

Update updates an existing connection

Jump to

Keyboard shortcuts

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