Help us shape the future of Go! Take the 2026 Go Developer Survey

sqlcgen

package
v0.2.9 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ConfirmPathKeyParams

type ConfirmPathKeyParams struct {
	ID   int64  `json:"id"`
	Path string `json:"path"`
}

type CountEdgesByKindRow

type CountEdgesByKindRow struct {
	Kind  string `json:"kind"`
	Count int64  `json:"count"`
}

type CountNodeMatchesByNameParams

type CountNodeMatchesByNameParams struct {
	Target   string `json:"target"`
	External int64  `json:"external"`
	Kind     string `json:"kind"`
}

type CountNodeMatchesByNameRow

type CountNodeMatchesByNameRow struct {
	Total         int64 `json:"total"`
	StrictMatches int64 `json:"strict_matches"`
}

type CountNodeMatchesByQualifiedNameParams

type CountNodeMatchesByQualifiedNameParams struct {
	Target   string `json:"target"`
	External int64  `json:"external"`
	Kind     string `json:"kind"`
}

type CountNodeMatchesByQualifiedNameRow

type CountNodeMatchesByQualifiedNameRow struct {
	Total         int64 `json:"total"`
	StrictMatches int64 `json:"strict_matches"`
}

type CountNodeMatchesBySubstringParams

type CountNodeMatchesBySubstringParams struct {
	Target   string `json:"target"`
	External int64  `json:"external"`
	Kind     string `json:"kind"`
}

type CountNodeMatchesBySubstringRow

type CountNodeMatchesBySubstringRow struct {
	Total         int64 `json:"total"`
	StrictMatches int64 `json:"strict_matches"`
}

type CountNodesByKindRow

type CountNodesByKindRow struct {
	Kind  string `json:"kind"`
	Count int64  `json:"count"`
}

type DBTX

type DBTX interface {
	ExecContext(context.Context, string, ...interface{}) (sql.Result, error)
	PrepareContext(context.Context, string) (*sql.Stmt, error)
	QueryContext(context.Context, string, ...interface{}) (*sql.Rows, error)
	QueryRowContext(context.Context, string, ...interface{}) *sql.Row
}

type DirtyFact

type DirtyFact struct {
	FactID    identity.Key `json:"fact_id"`
	OwnerFile string       `json:"owner_file"`
}

type DirtyNode

type DirtyNode struct {
	NodeID identity.Key `json:"node_id"`
}

type DirtyOwner

type DirtyOwner struct {
	OwnerFile string `json:"owner_file"`
}

type DirtyTarget

type DirtyTarget struct {
	Target     string `json:"target"`
	TargetKind string `json:"target_kind"`
}

type Edge

type Edge struct {
	FactID     identity.Key `json:"fact_id"`
	FromID     identity.Key `json:"from_id"`
	ToID       identity.Key `json:"to_id"`
	Kind       string       `json:"kind"`
	Properties string       `json:"properties"`
}

type Fact

type Fact struct {
	ID          identity.Key `json:"id"`
	FromID      identity.Key `json:"from_id"`
	Source      string       `json:"source"`
	SourceKind  string       `json:"source_kind"`
	Kind        string       `json:"kind"`
	Producer    string       `json:"producer"`
	TargetID    identity.Key `json:"target_id"`
	Target      string       `json:"target"`
	TargetKind  string       `json:"target_kind"`
	PathID      int64        `json:"path_id"`
	Line        int64        `json:"line"`
	ColumnNo    int64        `json:"column_no"`
	EndLine     int64        `json:"end_line"`
	Properties  string       `json:"properties"`
	OwnerPathID int64        `json:"owner_path_id"`
}

type File

type File struct {
	Path           string `json:"path"`
	Hash           string `json:"hash"`
	Language       string `json:"language"`
	Size           int64  `json:"size"`
	ModifiedNs     int64  `json:"modified_ns"`
	IndexedAt      string `json:"indexed_at"`
	EvidenceDigest string `json:"evidence_digest"`
}

type FindNodesExactKindParams

type FindNodesExactKindParams struct {
	Target string `json:"target"`
	Kind   string `json:"kind"`
}

type FindNodesExactKindRow

type FindNodesExactKindRow struct {
	ID            identity.Key `json:"id"`
	Kind          string       `json:"kind"`
	QualifiedName string       `json:"qualified_name"`
}

type FindNodesExactRow

type FindNodesExactRow struct {
	ID            identity.Key `json:"id"`
	Kind          string       `json:"kind"`
	QualifiedName string       `json:"qualified_name"`
}

type InsertEdgeParams

type InsertEdgeParams struct {
	FactID     identity.Key `json:"fact_id"`
	FromID     identity.Key `json:"from_id"`
	ToID       identity.Key `json:"to_id"`
	Kind       string       `json:"kind"`
	Properties string       `json:"properties"`
}

type ListCanonicalMessagesParams

type ListCanonicalMessagesParams struct {
	PackageName      string      `json:"package_name"`
	MessageName      string      `json:"message_name"`
	PathPrefixesJson interface{} `json:"path_prefixes_json"`
	MaxResults       int64       `json:"max_results"`
}

type ListDirtyFactBatchRow

type ListDirtyFactBatchRow struct {
	ID            identity.Key `json:"id"`
	FromID        identity.Key `json:"from_id"`
	Source        string       `json:"source"`
	SourceKind    string       `json:"source_kind"`
	Kind          string       `json:"kind"`
	Producer      string       `json:"producer"`
	TargetID      identity.Key `json:"target_id"`
	Target        string       `json:"target"`
	TargetKind    string       `json:"target_kind"`
	Path          string       `json:"path"`
	Line          int64        `json:"line"`
	ColumnNo      int64        `json:"column_no"`
	EndLine       int64        `json:"end_line"`
	Properties    string       `json:"properties"`
	OwnerFile     string       `json:"owner_file"`
	PathsResolved int64        `json:"paths_resolved"`
	SourceExists  int64        `json:"source_exists"`
	TargetExists  int64        `json:"target_exists"`
}

type ListEdgesFromRow

type ListEdgesFromRow struct {
	FactID         identity.Key `json:"fact_id"`
	FromID         identity.Key `json:"from_id"`
	ToID           identity.Key `json:"to_id"`
	Kind           string       `json:"kind"`
	Properties     string       `json:"properties"`
	Producer       string       `json:"producer"`
	Path           string       `json:"path"`
	Line           int64        `json:"line"`
	ColumnNo       int64        `json:"column_no"`
	EndLine        int64        `json:"end_line"`
	OriginResolved int64        `json:"origin_resolved"`
}

type ListEdgesToRow

type ListEdgesToRow struct {
	FactID         identity.Key `json:"fact_id"`
	FromID         identity.Key `json:"from_id"`
	ToID           identity.Key `json:"to_id"`
	Kind           string       `json:"kind"`
	Properties     string       `json:"properties"`
	Producer       string       `json:"producer"`
	Path           string       `json:"path"`
	Line           int64        `json:"line"`
	ColumnNo       int64        `json:"column_no"`
	EndLine        int64        `json:"end_line"`
	OriginResolved int64        `json:"origin_resolved"`
}

type ListExternalEdgesMatchingParams

type ListExternalEdgesMatchingParams struct {
	QualifiedName string `json:"qualified_name"`
	Name          string `json:"name"`
}

type ListExternalEdgesMatchingRow

type ListExternalEdgesMatchingRow struct {
	FactID         identity.Key `json:"fact_id"`
	FromID         identity.Key `json:"from_id"`
	ToID           identity.Key `json:"to_id"`
	Kind           string       `json:"kind"`
	Properties     string       `json:"properties"`
	Producer       string       `json:"producer"`
	Path           string       `json:"path"`
	Line           int64        `json:"line"`
	ColumnNo       int64        `json:"column_no"`
	EndLine        int64        `json:"end_line"`
	OriginResolved int64        `json:"origin_resolved"`
}

type ListExternalNodesMatchingParams

type ListExternalNodesMatchingParams struct {
	QualifiedName string `json:"qualified_name"`
	Name          string `json:"name"`
}

type ListExternalRequestEdgesParams

type ListExternalRequestEdgesParams struct {
	AfterFactID identity.Key `json:"after_fact_id"`
	AfterToID   identity.Key `json:"after_to_id"`
	AfterKind   identity.Key `json:"after_kind"`
	MaxResults  int64        `json:"max_results"`
}

type ListExternalRequestEdgesRow

type ListExternalRequestEdgesRow struct {
	EdgeFactID          identity.Key `json:"edge_fact_id"`
	EdgeFromID          identity.Key `json:"edge_from_id"`
	EdgeToID            identity.Key `json:"edge_to_id"`
	EdgeKind            string       `json:"edge_kind"`
	EdgeProducer        string       `json:"edge_producer"`
	EdgePath            string       `json:"edge_path"`
	EdgeLine            int64        `json:"edge_line"`
	EdgeColumnNo        int64        `json:"edge_column_no"`
	EdgeEndLine         int64        `json:"edge_end_line"`
	EdgeProperties      string       `json:"edge_properties"`
	EdgeOriginResolved  int64        `json:"edge_origin_resolved"`
	SourceID            identity.Key `json:"source_id"`
	SourceKind          string       `json:"source_kind"`
	SourceName          string       `json:"source_name"`
	SourceQualifiedName string       `json:"source_qualified_name"`
	SourceLanguage      string       `json:"source_language"`
	SourcePath          string       `json:"source_path"`
	SourceLine          int64        `json:"source_line"`
	SourceColumnNo      int64        `json:"source_column_no"`
	SourceEndLine       int64        `json:"source_end_line"`
	SourceProperties    string       `json:"source_properties"`
	SourceOwnerFile     string       `json:"source_owner_file"`
	SourceExternal      int64        `json:"source_external"`
	TargetID            identity.Key `json:"target_id"`
	TargetKind          string       `json:"target_kind"`
	TargetName          string       `json:"target_name"`
	TargetQualifiedName string       `json:"target_qualified_name"`
	TargetLanguage      string       `json:"target_language"`
	TargetPath          string       `json:"target_path"`
	TargetLine          int64        `json:"target_line"`
	TargetColumnNo      int64        `json:"target_column_no"`
	TargetEndLine       int64        `json:"target_end_line"`
	TargetProperties    string       `json:"target_properties"`
	TargetOwnerFile     string       `json:"target_owner_file"`
	TargetExternal      int64        `json:"target_external"`
}

type ListIncomingRelationEdgesParams

type ListIncomingRelationEdgesParams struct {
	SubjectID  identity.Key `json:"subject_id"`
	Relation   string       `json:"relation"`
	MaxResults int64        `json:"max_results"`
}

type ListIncomingRelationEdgesRow

type ListIncomingRelationEdgesRow struct {
	EdgeFactID               identity.Key `json:"edge_fact_id"`
	EdgeFromID               identity.Key `json:"edge_from_id"`
	EdgeToID                 identity.Key `json:"edge_to_id"`
	EdgeKind                 string       `json:"edge_kind"`
	EdgeProducer             string       `json:"edge_producer"`
	EdgePath                 string       `json:"edge_path"`
	EdgeLine                 int64        `json:"edge_line"`
	EdgeColumnNo             int64        `json:"edge_column_no"`
	EdgeEndLine              int64        `json:"edge_end_line"`
	EdgeProperties           string       `json:"edge_properties"`
	EdgeOriginResolved       int64        `json:"edge_origin_resolved"`
	CounterpartID            identity.Key `json:"counterpart_id"`
	CounterpartKind          string       `json:"counterpart_kind"`
	CounterpartName          string       `json:"counterpart_name"`
	CounterpartQualifiedName string       `json:"counterpart_qualified_name"`
	CounterpartLanguage      string       `json:"counterpart_language"`
	CounterpartPath          string       `json:"counterpart_path"`
	CounterpartLine          int64        `json:"counterpart_line"`
	CounterpartColumnNo      int64        `json:"counterpart_column_no"`
	CounterpartEndLine       int64        `json:"counterpart_end_line"`
	CounterpartProperties    string       `json:"counterpart_properties"`
	CounterpartOwnerFile     string       `json:"counterpart_owner_file"`
	CounterpartExternal      int64        `json:"counterpart_external"`
}

type ListNodesByKindParams

type ListNodesByKindParams struct {
	Kind             string      `json:"kind"`
	MinExternal      int64       `json:"min_external"`
	MaxExternal      int64       `json:"max_external"`
	NameFragment     string      `json:"name_fragment"`
	PathPrefixesJson interface{} `json:"path_prefixes_json"`
	MaxResults       int64       `json:"max_results"`
}

type ListOutgoingRelationEdgesParams

type ListOutgoingRelationEdgesParams struct {
	SubjectID  identity.Key `json:"subject_id"`
	Relation   string       `json:"relation"`
	MaxResults int64        `json:"max_results"`
}

type ListOutgoingRelationEdgesRow

type ListOutgoingRelationEdgesRow struct {
	EdgeFactID               identity.Key `json:"edge_fact_id"`
	EdgeFromID               identity.Key `json:"edge_from_id"`
	EdgeToID                 identity.Key `json:"edge_to_id"`
	EdgeKind                 string       `json:"edge_kind"`
	EdgeProducer             string       `json:"edge_producer"`
	EdgePath                 string       `json:"edge_path"`
	EdgeLine                 int64        `json:"edge_line"`
	EdgeColumnNo             int64        `json:"edge_column_no"`
	EdgeEndLine              int64        `json:"edge_end_line"`
	EdgeProperties           string       `json:"edge_properties"`
	EdgeOriginResolved       int64        `json:"edge_origin_resolved"`
	CounterpartID            identity.Key `json:"counterpart_id"`
	CounterpartKind          string       `json:"counterpart_kind"`
	CounterpartName          string       `json:"counterpart_name"`
	CounterpartQualifiedName string       `json:"counterpart_qualified_name"`
	CounterpartLanguage      string       `json:"counterpart_language"`
	CounterpartPath          string       `json:"counterpart_path"`
	CounterpartLine          int64        `json:"counterpart_line"`
	CounterpartColumnNo      int64        `json:"counterpart_column_no"`
	CounterpartEndLine       int64        `json:"counterpart_end_line"`
	CounterpartProperties    string       `json:"counterpart_properties"`
	CounterpartOwnerFile     string       `json:"counterpart_owner_file"`
	CounterpartExternal      int64        `json:"counterpart_external"`
}

type MarkDirtyTargetParams

type MarkDirtyTargetParams struct {
	Target     string `json:"target"`
	TargetKind string `json:"target_kind"`
}

type MarkOwnedNamesDirtyParams

type MarkOwnedNamesDirtyParams struct {
	OwnerFile   string `json:"owner_file"`
	OwnerFile_2 string `json:"owner_file_2"`
}

type MatchNodesByNameParams

type MatchNodesByNameParams struct {
	Target     string `json:"target"`
	External   int64  `json:"external"`
	Kind       string `json:"kind"`
	MaxResults int64  `json:"max_results"`
}

type MatchNodesByQualifiedNameParams

type MatchNodesByQualifiedNameParams struct {
	Target     string `json:"target"`
	External   int64  `json:"external"`
	Kind       string `json:"kind"`
	MaxResults int64  `json:"max_results"`
}

type MatchNodesBySubstringParams

type MatchNodesBySubstringParams struct {
	Target     string `json:"target"`
	External   int64  `json:"external"`
	Kind       string `json:"kind"`
	MaxResults int64  `json:"max_results"`
}

type Meta

type Meta struct {
	Key   string `json:"key"`
	Value string `json:"value"`
}

type Node

type Node struct {
	ID                  identity.Key `json:"id"`
	Kind                string       `json:"kind"`
	Name                string       `json:"name"`
	QualifiedName       string       `json:"qualified_name"`
	Language            string       `json:"language"`
	Path                string       `json:"path"`
	Line                int64        `json:"line"`
	ColumnNo            int64        `json:"column_no"`
	EndLine             int64        `json:"end_line"`
	Properties          string       `json:"properties"`
	OwnerFile           string       `json:"owner_file"`
	External            int64        `json:"external"`
	NameFolded          string       `json:"name_folded"`
	QualifiedNameFolded string       `json:"qualified_name_folded"`
}

type Path

type Path struct {
	ID   int64  `json:"id"`
	Path string `json:"path"`
}

type Querier

type Querier interface {
	ClearDirtyNodes(ctx context.Context) error
	ClearDirtyOwners(ctx context.Context) error
	ClearDirtyTargets(ctx context.Context) error
	ClearReconciliationCleanup(ctx context.Context) error
	ConfirmPathKey(ctx context.Context, arg ConfirmPathKeyParams) (bool, error)
	CountDirtyFacts(ctx context.Context) (int64, error)
	CountEdges(ctx context.Context) (int64, error)
	CountEdgesByKind(ctx context.Context) ([]CountEdgesByKindRow, error)
	CountExternalNodes(ctx context.Context) (int64, error)
	CountFacts(ctx context.Context) (int64, error)
	CountFiles(ctx context.Context) (int64, error)
	CountNodeMatchesByName(ctx context.Context, arg CountNodeMatchesByNameParams) (CountNodeMatchesByNameRow, error)
	CountNodeMatchesByQualifiedName(ctx context.Context, arg CountNodeMatchesByQualifiedNameParams) (CountNodeMatchesByQualifiedNameRow, error)
	CountNodeMatchesBySubstring(ctx context.Context, arg CountNodeMatchesBySubstringParams) (CountNodeMatchesBySubstringRow, error)
	CountNodes(ctx context.Context) (int64, error)
	CountNodesByKind(ctx context.Context) ([]CountNodesByKindRow, error)
	CountPaths(ctx context.Context) (int64, error)
	// An edge stores only what reconciliation can resolve differently from its
	// originating fact: the resolved endpoints, the relation kind (a structural
	// test edge is derived from a calls or references fact), and the properties
	// (destination evidence and test-coverage evidence are added per edge). Its
	// producer and location are the fact's, so they are joined back instead of
	// stored twice. origin_resolved lets the adapter fail closed on an index whose
	// edge has lost its fact or interned path rather than report an empty location.
	DeleteAllEdges(ctx context.Context) error
	DeleteDirtyFactBatch(ctx context.Context, limit int64) error
	DeleteEdgesByDirtyFactBatch(ctx context.Context, limit int64) error
	DeleteEdgesByOwnerFacts(ctx context.Context, path string) error
	DeleteExternalNodes(ctx context.Context) error
	DeleteFactsByOwner(ctx context.Context, path string) error
	DeleteFile(ctx context.Context, path string) error
	DeleteNodesByOwner(ctx context.Context, ownerFile string) error
	DeleteOrphanExternalNodes(ctx context.Context) error
	DeleteUnreferencedPaths(ctx context.Context) error
	EnqueueDirtyFacts(ctx context.Context) error
	FindNodesExact(ctx context.Context, target string) ([]FindNodesExactRow, error)
	FindNodesExactKind(ctx context.Context, arg FindNodesExactKindParams) ([]FindNodesExactKindRow, error)
	GetMeta(ctx context.Context, key string) (string, error)
	GetNode(ctx context.Context, id identity.Key) (Node, error)
	InsertEdge(ctx context.Context, arg InsertEdgeParams) error
	InternPath(ctx context.Context, path string) (int64, error)
	ListCanonicalMessages(ctx context.Context, arg ListCanonicalMessagesParams) ([]Node, error)
	ListDirtyFactBatch(ctx context.Context, limit int64) ([]ListDirtyFactBatchRow, error)
	ListEdgesFrom(ctx context.Context, fromID identity.Key) ([]ListEdgesFromRow, error)
	ListEdgesTo(ctx context.Context, toID identity.Key) ([]ListEdgesToRow, error)
	ListExternalEdgesMatching(ctx context.Context, arg ListExternalEdgesMatchingParams) ([]ListExternalEdgesMatchingRow, error)
	ListExternalNodesMatching(ctx context.Context, arg ListExternalNodesMatchingParams) ([]Node, error)
	ListExternalRequestEdges(ctx context.Context, arg ListExternalRequestEdgesParams) ([]ListExternalRequestEdgesRow, error)
	ListFiles(ctx context.Context) ([]File, error)
	ListIncomingRelationEdges(ctx context.Context, arg ListIncomingRelationEdgesParams) ([]ListIncomingRelationEdgesRow, error)
	ListNodesByKind(ctx context.Context, arg ListNodesByKindParams) ([]Node, error)
	ListOutgoingRelationEdges(ctx context.Context, arg ListOutgoingRelationEdgesParams) ([]ListOutgoingRelationEdgesRow, error)
	ListSemanticCandidateNodes(ctx context.Context) ([]Node, error)
	MarkDirtyNode(ctx context.Context, nodeID identity.Key) error
	MarkDirtyOwner(ctx context.Context, ownerFile string) error
	MarkDirtyTarget(ctx context.Context, arg MarkDirtyTargetParams) error
	MarkOwnedNamesDirty(ctx context.Context, arg MarkOwnedNamesDirtyParams) error
	MarkOwnedNodesDirty(ctx context.Context, ownerFile string) error
	MarkReconciliationCleanup(ctx context.Context) error
	MatchNodesByName(ctx context.Context, arg MatchNodesByNameParams) ([]Node, error)
	// Selector resolution queries. Each level is narrow and index-backed so
	// ambiguity is decided from complete counts instead of a truncated substring
	// window. nodes_qualified and nodes_name are COLLATE NOCASE indexes, so the
	// case-insensitive equality below stays an index seek; the case-sensitive
	// ("strict") form is counted separately because it is stronger evidence.
	// @external selects the scope rather than discarding one: the adapter asks for
	// local declarations first and falls back to external boundary nodes, so exact
	// evidence about an external target is still exact rather than being pushed down
	// into the weaker substring level.
	MatchNodesByQualifiedName(ctx context.Context, arg MatchNodesByQualifiedNameParams) ([]Node, error)
	MatchNodesBySubstring(ctx context.Context, arg MatchNodesBySubstringParams) ([]Node, error)
	PruneDirtyFacts(ctx context.Context) error
	ReconciliationCleanupPending(ctx context.Context) (bool, error)
	ReconciliationPending(ctx context.Context) (bool, error)
	SearchNodes(ctx context.Context, arg SearchNodesParams) ([]Node, error)
	SetMeta(ctx context.Context, arg SetMetaParams) error
	UpsertFact(ctx context.Context, arg UpsertFactParams) error
	UpsertFile(ctx context.Context, arg UpsertFileParams) error
	UpsertNode(ctx context.Context, arg UpsertNodeParams) error
}

type Queries

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

func New

func New(db DBTX) *Queries

func Prepare

func Prepare(ctx context.Context, db DBTX) (*Queries, error)

func (*Queries) ClearDirtyNodes

func (q *Queries) ClearDirtyNodes(ctx context.Context) error

func (*Queries) ClearDirtyOwners

func (q *Queries) ClearDirtyOwners(ctx context.Context) error

func (*Queries) ClearDirtyTargets

func (q *Queries) ClearDirtyTargets(ctx context.Context) error

func (*Queries) ClearReconciliationCleanup

func (q *Queries) ClearReconciliationCleanup(ctx context.Context) error

func (*Queries) Close

func (q *Queries) Close() error

func (*Queries) ConfirmPathKey

func (q *Queries) ConfirmPathKey(ctx context.Context, arg ConfirmPathKeyParams) (bool, error)

func (*Queries) CountDirtyFacts

func (q *Queries) CountDirtyFacts(ctx context.Context) (int64, error)

func (*Queries) CountEdges

func (q *Queries) CountEdges(ctx context.Context) (int64, error)

func (*Queries) CountEdgesByKind

func (q *Queries) CountEdgesByKind(ctx context.Context) ([]CountEdgesByKindRow, error)

func (*Queries) CountExternalNodes

func (q *Queries) CountExternalNodes(ctx context.Context) (int64, error)

func (*Queries) CountFacts

func (q *Queries) CountFacts(ctx context.Context) (int64, error)

func (*Queries) CountFiles

func (q *Queries) CountFiles(ctx context.Context) (int64, error)

func (*Queries) CountNodeMatchesByName

func (q *Queries) CountNodeMatchesByName(ctx context.Context, arg CountNodeMatchesByNameParams) (CountNodeMatchesByNameRow, error)

func (*Queries) CountNodes

func (q *Queries) CountNodes(ctx context.Context) (int64, error)

func (*Queries) CountNodesByKind

func (q *Queries) CountNodesByKind(ctx context.Context) ([]CountNodesByKindRow, error)

func (*Queries) CountPaths

func (q *Queries) CountPaths(ctx context.Context) (int64, error)

func (*Queries) DeleteAllEdges

func (q *Queries) DeleteAllEdges(ctx context.Context) error

An edge stores only what reconciliation can resolve differently from its originating fact: the resolved endpoints, the relation kind (a structural test edge is derived from a calls or references fact), and the properties (destination evidence and test-coverage evidence are added per edge). Its producer and location are the fact's, so they are joined back instead of stored twice. origin_resolved lets the adapter fail closed on an index whose edge has lost its fact or interned path rather than report an empty location.

func (*Queries) DeleteDirtyFactBatch

func (q *Queries) DeleteDirtyFactBatch(ctx context.Context, limit int64) error

func (*Queries) DeleteEdgesByDirtyFactBatch

func (q *Queries) DeleteEdgesByDirtyFactBatch(ctx context.Context, limit int64) error

func (*Queries) DeleteEdgesByOwnerFacts

func (q *Queries) DeleteEdgesByOwnerFacts(ctx context.Context, path string) error

func (*Queries) DeleteExternalNodes

func (q *Queries) DeleteExternalNodes(ctx context.Context) error

func (*Queries) DeleteFactsByOwner

func (q *Queries) DeleteFactsByOwner(ctx context.Context, path string) error

func (*Queries) DeleteFile

func (q *Queries) DeleteFile(ctx context.Context, path string) error

func (*Queries) DeleteNodesByOwner

func (q *Queries) DeleteNodesByOwner(ctx context.Context, ownerFile string) error

func (*Queries) DeleteOrphanExternalNodes

func (q *Queries) DeleteOrphanExternalNodes(ctx context.Context) error

func (*Queries) DeleteUnreferencedPaths

func (q *Queries) DeleteUnreferencedPaths(ctx context.Context) error

func (*Queries) EnqueueDirtyFacts

func (q *Queries) EnqueueDirtyFacts(ctx context.Context) error

func (*Queries) FindNodesExact

func (q *Queries) FindNodesExact(ctx context.Context, target string) ([]FindNodesExactRow, error)

func (*Queries) FindNodesExactKind

func (q *Queries) FindNodesExactKind(ctx context.Context, arg FindNodesExactKindParams) ([]FindNodesExactKindRow, error)

func (*Queries) GetMeta

func (q *Queries) GetMeta(ctx context.Context, key string) (string, error)

func (*Queries) GetNode

func (q *Queries) GetNode(ctx context.Context, id identity.Key) (Node, error)

func (*Queries) InsertEdge

func (q *Queries) InsertEdge(ctx context.Context, arg InsertEdgeParams) error

func (*Queries) InternPath

func (q *Queries) InternPath(ctx context.Context, path string) (int64, error)

func (*Queries) ListCanonicalMessages

func (q *Queries) ListCanonicalMessages(ctx context.Context, arg ListCanonicalMessagesParams) ([]Node, error)

func (*Queries) ListDirtyFactBatch

func (q *Queries) ListDirtyFactBatch(ctx context.Context, limit int64) ([]ListDirtyFactBatchRow, error)

func (*Queries) ListEdgesFrom

func (q *Queries) ListEdgesFrom(ctx context.Context, fromID identity.Key) ([]ListEdgesFromRow, error)

func (*Queries) ListEdgesTo

func (q *Queries) ListEdgesTo(ctx context.Context, toID identity.Key) ([]ListEdgesToRow, error)

func (*Queries) ListExternalEdgesMatching

func (q *Queries) ListExternalEdgesMatching(ctx context.Context, arg ListExternalEdgesMatchingParams) ([]ListExternalEdgesMatchingRow, error)

func (*Queries) ListExternalNodesMatching

func (q *Queries) ListExternalNodesMatching(ctx context.Context, arg ListExternalNodesMatchingParams) ([]Node, error)

func (*Queries) ListExternalRequestEdges

func (q *Queries) ListExternalRequestEdges(ctx context.Context, arg ListExternalRequestEdgesParams) ([]ListExternalRequestEdgesRow, error)

func (*Queries) ListFiles

func (q *Queries) ListFiles(ctx context.Context) ([]File, error)

func (*Queries) ListIncomingRelationEdges

func (q *Queries) ListIncomingRelationEdges(ctx context.Context, arg ListIncomingRelationEdgesParams) ([]ListIncomingRelationEdgesRow, error)

func (*Queries) ListNodesByKind

func (q *Queries) ListNodesByKind(ctx context.Context, arg ListNodesByKindParams) ([]Node, error)

func (*Queries) ListOutgoingRelationEdges

func (q *Queries) ListOutgoingRelationEdges(ctx context.Context, arg ListOutgoingRelationEdgesParams) ([]ListOutgoingRelationEdgesRow, error)

func (*Queries) ListSemanticCandidateNodes

func (q *Queries) ListSemanticCandidateNodes(ctx context.Context) ([]Node, error)

func (*Queries) MarkDirtyNode

func (q *Queries) MarkDirtyNode(ctx context.Context, nodeID identity.Key) error

func (*Queries) MarkDirtyOwner

func (q *Queries) MarkDirtyOwner(ctx context.Context, ownerFile string) error

func (*Queries) MarkDirtyTarget

func (q *Queries) MarkDirtyTarget(ctx context.Context, arg MarkDirtyTargetParams) error

func (*Queries) MarkOwnedNamesDirty

func (q *Queries) MarkOwnedNamesDirty(ctx context.Context, arg MarkOwnedNamesDirtyParams) error

func (*Queries) MarkOwnedNodesDirty

func (q *Queries) MarkOwnedNodesDirty(ctx context.Context, ownerFile string) error

func (*Queries) MarkReconciliationCleanup

func (q *Queries) MarkReconciliationCleanup(ctx context.Context) error

func (*Queries) MatchNodesByName

func (q *Queries) MatchNodesByName(ctx context.Context, arg MatchNodesByNameParams) ([]Node, error)

func (*Queries) MatchNodesByQualifiedName

func (q *Queries) MatchNodesByQualifiedName(ctx context.Context, arg MatchNodesByQualifiedNameParams) ([]Node, error)

Selector resolution queries. Each level is narrow and index-backed so ambiguity is decided from complete counts instead of a truncated substring window. nodes_qualified and nodes_name are COLLATE NOCASE indexes, so the case-insensitive equality below stays an index seek; the case-sensitive ("strict") form is counted separately because it is stronger evidence. @external selects the scope rather than discarding one: the adapter asks for local declarations first and falls back to external boundary nodes, so exact evidence about an external target is still exact rather than being pushed down into the weaker substring level.

func (*Queries) MatchNodesBySubstring

func (q *Queries) MatchNodesBySubstring(ctx context.Context, arg MatchNodesBySubstringParams) ([]Node, error)

func (*Queries) PruneDirtyFacts

func (q *Queries) PruneDirtyFacts(ctx context.Context) error

func (*Queries) ReconciliationCleanupPending

func (q *Queries) ReconciliationCleanupPending(ctx context.Context) (bool, error)

func (*Queries) ReconciliationPending

func (q *Queries) ReconciliationPending(ctx context.Context) (bool, error)

func (*Queries) SearchNodes

func (q *Queries) SearchNodes(ctx context.Context, arg SearchNodesParams) ([]Node, error)

func (*Queries) SetMeta

func (q *Queries) SetMeta(ctx context.Context, arg SetMetaParams) error

func (*Queries) UpsertFact

func (q *Queries) UpsertFact(ctx context.Context, arg UpsertFactParams) error

func (*Queries) UpsertFile

func (q *Queries) UpsertFile(ctx context.Context, arg UpsertFileParams) error

func (*Queries) UpsertNode

func (q *Queries) UpsertNode(ctx context.Context, arg UpsertNodeParams) error

func (*Queries) WithTx

func (q *Queries) WithTx(tx *sql.Tx) *Queries

type ReconciliationCleanup

type ReconciliationCleanup struct {
	ID int64 `json:"id"`
}

type SearchNodesParams

type SearchNodesParams struct {
	Term       string `json:"term"`
	MaxResults int64  `json:"max_results"`
}

type SetMetaParams

type SetMetaParams struct {
	Key   string `json:"key"`
	Value string `json:"value"`
}

type UpsertFactParams

type UpsertFactParams struct {
	ID          identity.Key `json:"id"`
	FromID      identity.Key `json:"from_id"`
	Source      string       `json:"source"`
	SourceKind  string       `json:"source_kind"`
	Kind        string       `json:"kind"`
	Producer    string       `json:"producer"`
	TargetID    identity.Key `json:"target_id"`
	Target      string       `json:"target"`
	TargetKind  string       `json:"target_kind"`
	PathID      int64        `json:"path_id"`
	Line        int64        `json:"line"`
	ColumnNo    int64        `json:"column_no"`
	EndLine     int64        `json:"end_line"`
	Properties  string       `json:"properties"`
	OwnerPathID int64        `json:"owner_path_id"`
}

type UpsertFileParams

type UpsertFileParams struct {
	Path           string `json:"path"`
	Hash           string `json:"hash"`
	Language       string `json:"language"`
	Size           int64  `json:"size"`
	ModifiedNs     int64  `json:"modified_ns"`
	IndexedAt      string `json:"indexed_at"`
	EvidenceDigest string `json:"evidence_digest"`
}

type UpsertNodeParams

type UpsertNodeParams struct {
	ID                  identity.Key `json:"id"`
	Kind                string       `json:"kind"`
	Name                string       `json:"name"`
	QualifiedName       string       `json:"qualified_name"`
	Language            string       `json:"language"`
	Path                string       `json:"path"`
	Line                int64        `json:"line"`
	ColumnNo            int64        `json:"column_no"`
	EndLine             int64        `json:"end_line"`
	Properties          string       `json:"properties"`
	OwnerFile           string       `json:"owner_file"`
	External            int64        `json:"external"`
	NameFolded          string       `json:"name_folded"`
	QualifiedNameFolded string       `json:"qualified_name_folded"`
}

Jump to

Keyboard shortcuts

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