Documentation
¶
Overview ¶
Package queryplan contains Golem's immutable, provider-neutral query-plan diagnostic report.
A report is evidence about a prepared typed read, not database authority. It deliberately has no SQL, bind, physical-name, cost, estimate, row, timing, provider-setting, or raw-provider-detail field. Version 1 is bounded to 32 statements, 256 nodes, node depth 32, 64 field identities per node, 64 total warnings, and 256 KiB of private canonical encoding. Reports can only be produced through Golem's validated internal planning boundary.
Index ¶
- type AccessKind
- type ErrorCode
- type IndexID
- type Node
- func (node Node) Access() AccessKind
- func (node Node) BatchCapacity() (uint32, bool)
- func (node Node) Children() []Node
- func (node Node) FieldIDs() []golem.FieldID
- func (node Node) IndexID() (IndexID, bool)
- func (node Node) Kind() NodeKind
- func (node Node) MaximumExecutionStatements() (uint32, bool)
- func (node Node) MinimumExecutionStatements() (uint32, bool)
- func (node Node) ModelID() (golem.ModelID, bool)
- func (node Node) RelationID() (golem.RelationID, bool)
- func (node Node) Warnings() []Warning
- type NodeKind
- type Operation
- type Report
- func (report Report) CanonicalDigest() [32]byte
- func (report Report) FormatVersion() uint16
- func (report Report) MaximumExecutionStatements() uint32
- func (report Report) MinimumExecutionStatements() uint32
- func (report Report) Operation() Operation
- func (report Report) Provider() golem.Provider
- func (report Report) RootModelID() golem.ModelID
- func (report Report) Statements() []Statement
- func (report Report) Warnings() []Warning
- type Statement
- type StatementPurpose
- type Warning
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AccessKind ¶
type AccessKind string
const ( AccessKindNone AccessKind = "none" AccessKindPrimaryKey AccessKind = "primaryKey" AccessKindUniqueIndex AccessKind = "uniqueIndex" AccessKindIndex AccessKind = "index" AccessKindBitmapIndex AccessKind = "bitmapIndex" AccessKindFullScan AccessKind = "fullScan" AccessKindConstant AccessKind = "constant" AccessKindUnknown AccessKind = "unknown" )
type IndexID ¶
type IndexID [16]byte
IndexID is the stable logical identity of a provider access object. It is a report identity only and grants no query or provider capability.
type Node ¶
type Node internalreport.Node
func (Node) Access ¶
func (node Node) Access() AccessKind
func (Node) BatchCapacity ¶
func (Node) MaximumExecutionStatements ¶
func (Node) MinimumExecutionStatements ¶
func (Node) RelationID ¶
func (node Node) RelationID() (golem.RelationID, bool)
type NodeKind ¶
type NodeKind string
const ( NodeKindAccess NodeKind = "access" NodeKindJoin NodeKind = "join" NodeKindSort NodeKind = "sort" NodeKindAggregate NodeKind = "aggregate" NodeKindMaterialize NodeKind = "materialize" NodeKindDeferredBatch NodeKind = "deferredBatch" NodeKindConstant NodeKind = "constant" NodeKindUnknown NodeKind = "unknown" )
type Operation ¶
type Operation string
const ( OperationFindUnique Operation = "findUnique" OperationFindFirst Operation = "findFirst" OperationFindMany Operation = "findMany" OperationCount Operation = "count" OperationAggregate Operation = "aggregate" OperationGroupBy Operation = "groupBy" OperationRelationGroupBy Operation = "relationGroupBy" OperationScoped Operation = "scoped" )
type Report ¶
type Report internalreport.Report
Report is an immutable closed query-plan diagnostic. Its zero value is the invalid report returned alongside a failed explain operation.
func (Report) CanonicalDigest ¶
func (Report) FormatVersion ¶
func (Report) MaximumExecutionStatements ¶
func (Report) MinimumExecutionStatements ¶
func (Report) RootModelID ¶
func (Report) Statements ¶
type Statement ¶
type Statement internalreport.Statement
func (Statement) Purpose ¶
func (statement Statement) Purpose() StatementPurpose
type StatementPurpose ¶
type StatementPurpose string
const ( StatementPurposeRoot StatementPurpose = "root" StatementPurposeRelationBatch StatementPurpose = "relationBatch" StatementPurposePolicyHydration StatementPurpose = "policyHydration" StatementPurposeAnalytics StatementPurpose = "analytics" StatementPurposeScoped StatementPurpose = "scoped" )
type Warning ¶
type Warning string
const ( WarningFullScan Warning = "FULL_SCAN" WarningTemporarySort Warning = "TEMPORARY_SORT" WarningMaterialization Warning = "MATERIALIZATION" WarningDeferredBatch Warning = "DEFERRED_BATCH" WarningMultiStatement Warning = "MULTI_STATEMENT" WarningUnknownProviderNode Warning = "UNKNOWN_PROVIDER_NODE" )