querybody

package
v0.149.0 Latest Latest
Warning

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

Go to latest
Published: Nov 7, 2026 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Overview

Package querybody adapts a saved query's explicit body representation to the structured document accepted by DataTug's policy-bound executor.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Databases added in v0.148.0

func Databases(query *datatug.QueryDef) ([]tugql.TugQLDatabase, error)

Databases is the root DATABASES block of a text body, in declaration order. A structured body, and any other query type, declares none: a structured document names its databases only through each source's `database` key.

func Extension

func Extension(queryType datatug.QueryType, structured bool) string

Extension follows Core's filename contract; content is never inspected.

func ParseText added in v0.148.0

func ParseText(text string) (string, []tugql.TugQLDatabase, error)

ParseText parses a TugQL text document into the structured document the executor runs and the database aliases its DATABASES block declares. An `alias::path` source lowers to the alias as that source's `database`; binding each alias to a source is the caller's job.

func Structured

func Structured(query *datatug.QueryDef) (string, error)

Structured keeps structured bodies byte-for-byte. Text bodies are parsed by DALgo, never detected from their content. Authoring definitions and parameter declarations require an authorized ResolveTugQL context; this adapter refuses them instead of discarding them or manufacturing schema authority.

Types

This section is empty.

Jump to

Keyboard shortcuts

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