ffdb

package
v0.2.21-beta Latest Latest
Warning

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

Go to latest
Published: Oct 22, 2026 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BulkInsertRecords

func BulkInsertRecords(db *sql.DB, filename string, path string) error

Collects records and commits them to the database when enough records are collected.

func BulkStoreEvents

func BulkStoreEvents(db *sql.DB, eventRecordQueue *[]shared.EventRecord) error

Stores a batch of events in the database.

func CommitRecords

func CommitRecords(db *sql.DB) error

Commits any collected records to the database.

func CreateDB

func CreateDB(pathname string) (*sql.DB, error)

Creates and opens a new database at the given pathname.

func DeleteRecord

func DeleteRecord(db *sql.DB, fullpath string) error

Deletes a record from the database with the given fullpath.

func FullPathLikeQuery

func FullPathLikeQuery(path string) (*[]string, error)

func FullPathLikeQueryEach

func FullPathLikeQueryEach(path string, fn func(string)) error

FullPathLikeQueryEach streams matching paths one at a time via the callback, avoiding materializing all results into a slice.

func InsertRecord

func InsertRecord(db *sql.DB, filename string, path string, eventID uint64, objectType shared.ObjectType) error

Inserts a new record into the database.

func OpenDB

func OpenDB(pathname string) (*sql.DB, error)

Opens an existing database

func OpenDBReadOnly

func OpenDBReadOnly(pathname string) (*sql.DB, error)

Open read-only for the UI. Can't use PRAGMAS in read-only mode.

func PrefixSearch

func PrefixSearch(prefix string, limit int) ([]*shared.SearchResult, error)

Performs a substring search for filenames containing the given term. For terms >= 3 characters, uses FTS5 trigram index for fast lookup. For shorter terms, uses prefix search with the B-tree index.

func RecordCount

func RecordCount(db *sql.DB) (int, error)

Returns the count of records in the files table.

Types

This section is empty.

Jump to

Keyboard shortcuts

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