datalog

package
v0.9.1 Latest Latest
Warning

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

Go to latest
Published: Jan 11, 2026 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DB

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

func CreateDB

func CreateDB(triples ...Triple) *DB

func (*DB) Query

func (db *DB) Query(find []string, where ...Pattern) [][]string

func (*DB) QuerySingle

func (db *DB) QuerySingle(state State, pattern Pattern) (valid []State)

func (*DB) QueryWhere

func (db *DB) QueryWhere(where ...Pattern) []State

type Pattern

type Pattern = [3]string

type State

type State map[string]string

func MatchPattern

func MatchPattern(pattern Pattern, triple Triple, state State) State

type Triple

type Triple = [3]string

func NewTriple

func NewTriple(subject, predicate, object string) Triple

Jump to

Keyboard shortcuts

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