nanodb

package
v3.18.21 Latest Latest
Warning

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

Go to latest
Published: May 17, 2026 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const DefaultSchema = "main"

Variables

This section is empty.

Functions

This section is empty.

Types

type Column

type Column struct {
	Name         string
	Type         string
	PrimaryKey   bool
	Unique       bool
	NotNull      bool
	Index        bool
	FullText     bool
	FKeyDatabase string
	FKeySchema   string
	FKeyTable    string
	FKeyColumn   string
	FKeyUnique   bool
}

type DB

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

func New

func New(snapshot Snapshot) (*DB, error)

func (*DB) Refresh

func (db *DB) Refresh(snapshot Snapshot) error

func (*DB) Snapshot

func (db *DB) Snapshot() *Snapshot

type Row

type Row map[string]any

type Snapshot

type Snapshot struct {
	Schema string
	Tables []Table
	// contains filtered or unexported fields
}

func (*Snapshot) DBInfo

func (s *Snapshot) DBInfo(name string) *sdata.DBInfo

func (*Snapshot) Rows

func (s *Snapshot) Rows(schema, name string) ([]Row, bool)

func (*Snapshot) SearchRank

func (s *Snapshot) SearchRank(schema, table string, row Row, query string) float64

func (*Snapshot) Table

func (s *Snapshot) Table(schema, name string) (Table, bool)

type Table

type Table struct {
	Name    string
	Schema  string
	Columns []Column
	Rows    []Row
}

Jump to

Keyboard shortcuts

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