package selection_queries

import "context"

type Querier interface {
	Query(ctx context.Context, query string) ([]byte, error)
}

type NodeRef struct {
	ID       uint32
	TermType string // "uri" | "bnode"
	IRI      string
}

type Index struct {
	IDToNode map[uint32]NodeRef
	KeyToID  map[string]uint32
}

type Meta struct {
	ID    string `json:"id"`
	Label string `json:"label"`
}

type Definition struct {
	Meta Meta
	Run  func(ctx context.Context, q Querier, idx Index, selectedIDs []uint32, includeBNodes bool) ([]uint32, error)
}
