base

package
v0.1.28 Latest Latest
Warning

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

Go to latest
Published: Oct 5, 2025 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ObjectTableDirectiveName = "table"
	ObjectViewDirectiveName  = "view"
)
View Source
const (
	WithDeletedDirectiveName = "with_deleted"
	StatsDirectiveName       = "stats"
	RawResultsDirectiveName  = "raw"
	UnnestDirectiveName      = "unnest"
)
View Source
const (
	FunctionTypeName         = "Function"
	FunctionMutationTypeName = "MutationFunction"
	QueryBaseName            = "Query"
	MutationBaseName         = "Mutation"

	ModuleDirectiveName = "module"
)
View Source
const (
	FieldGeometryInfoDirectiveName         = "geometry_info"
	FieldSqlDirectiveName                  = "sql"
	FieldExtraFieldDirectiveName           = "extra_field"
	FieldSourceDirectiveName               = "field_source"
	FieldDefaultDirectiveName              = "default"
	FieldDefaultDirectiveInsertExprArgName = "insert_exp"
	FieldDefaultDirectiveUpdateExprArgName = "update_exp"
	FieldMeasurementDirectiveName          = "measurement"
	FieldMeasurementFuncArgName            = "measurement_func"
	FieldDimDirectiveName                  = "dim"

	FieldExcludeMCPDirectiveName = "exclude_mcp"
)
View Source
const (
	CacheDirectiveName           = "cache"
	NoCacheDirectiveName         = "no_cache"
	InvalidateCacheDirectiveName = "invalidate_cache"
)
View Source
const (
	CatalogDirectiveName    = "catalog"
	DeprecatedDirectiveName = "deprecated"
	DependencyDirectiveName = "dependency" // dependencies of the catalogs
)
View Source
const (
	GisFeatureDirectiveName    = "feature"
	GisWFSDirectiveName        = "wfs"
	GisWFSFieldDirectiveName   = "wfs_field"
	GisWFSExcludeDirectiveName = "wfs_exclude"

	GisWFSTypeName = "_wfs_features"
)
View Source
const (
	AddH3DirectiveName          = "add_h3"
	H3QueryFieldName            = "h3"
	H3QueryTypeName             = "_h3_query"
	H3DataQueryTypeName         = "_h3_data_query"
	H3DataFieldName             = "data"
	DistributionFieldName       = "distribution_by"
	DistributionTypeName        = "_distribution_by"
	BucketDistributionFieldName = "distribution_by_bucket"
	BucketDistributionTypeName  = "_distribution_by_bucket"
)
View Source
const (
	QueryTimeJoinsFieldName = "_join"
	QueryTimeJoinsTypeName  = "_join"

	QueryTimeSpatialFieldName = "_spatial"
	QueryTimeSpatialTypeName  = "_spatial"

	NoPushdownDirectiveName = "no_pushdown"
)
View Source
const (
	VectorTypeName               = "Vector"
	VectorSearchInputName        = "VectorSearchInput"
	VectorDistanceTypeEnumName   = "VectorDistanceType"
	VectorSearchDistanceL2       = "L2"
	VectorSearchDistanceIP       = "Inner"
	VectorSearchDistanceCosine   = "Cosine"
	SimilaritySearchArgumentName = "similarity"

	EmbeddingsDirectiveName        = "embeddings"
	SemanticSearchArgumentName     = "semantic"
	SemanticSearchInputName        = "SemanticSearchInput"
	SummaryForEmbeddedArgumentName = "summary"

	DistanceFieldNameSuffix              = "distance"
	VectorDistanceExtraFieldName         = "VectorDistance"
	QueryEmbeddingDistanceExtraFieldName = "QueryEmbeddingDistance"
	QueryEmbeddingsDistanceFieldName     = "_distance_to_query"
)
View Source
const (
	FieldPrimaryKeyDirectiveName = "pk"
)
View Source
const (
	OriginalNameDirectiveName = "original_name"
)
View Source
const (
	StubFieldName = "_stub"
)
View Source
const (
	ViewArgsDirectiveName = "args"
)

Variables

View Source
var Schema *ast.Schema
View Source
var SystemDirective = &ast.Directive{Name: "system", Position: CompiledPos("")}

Functions

func AddH3Directive added in v0.1.16

func AddH3Directive(field string, resolution int, transformFrom int, buffer float64, divideVals bool, simplify bool, pos *ast.Position) *ast.Directive

func CatalogDirective

func CatalogDirective(catalog string, engine string) *ast.Directive

func CatalogName

func CatalogName(def *ast.Definition) string

func CompiledPos added in v0.1.16

func CompiledPos(name string) *ast.Position

func ExtraFieldDirective

func ExtraFieldDirective(name, baseField, baseType string) *ast.Directive

func FieldCatalogName

func FieldCatalogName(def *ast.FieldDefinition) string

func FieldGeometryInfoDirective

func FieldGeometryInfoDirective(geomType string, srid int) *ast.Directive

func FieldSourceDirective added in v0.1.15

func FieldSourceDirective(name string) *ast.Directive

func FieldSqlDirective

func FieldSqlDirective(sql string) *ast.Directive

func GisWFSTypeTemplate added in v0.1.18

func GisWFSTypeTemplate() *ast.Definition

func H3QueryDefinitionTemplate added in v0.1.16

func H3QueryDefinitionTemplate() *ast.Definition

func Ident

func Ident(s string) string

func Init

func Init()

func IsValidIdentifier

func IsValidIdentifier(s string) bool

func ModuleDirective

func ModuleDirective(name string, pos *ast.Position) *ast.Directive

func OriginalNameDirective

func OriginalNameDirective(name string) *ast.Directive

func QuerySideDirectives

func QuerySideDirectives() []string

func Sources

func Sources() []*ast.Source

func SqlFieldDirective

func SqlFieldDirective(sql string) *ast.Directive

func VectorEmbeddingsExtraField added in v0.1.28

func VectorEmbeddingsExtraField(vectorFieldName string) *ast.FieldDefinition

Types

type HugrType added in v0.1.28

type HugrType string
const (
	HugrTypeModule     HugrType = "module"
	HugrTypeTable      HugrType = "table"
	HugrTypeView       HugrType = "view"
	HugrTypeJoin       HugrType = "join_queries"
	HugrTypeSpatial    HugrType = "spatial_queries"
	HugrTypeH3Data     HugrType = "h3_data"
	HugrTypeH3Agg      HugrType = "h3_aggregate"
	HugrTypeFilter     HugrType = "filter"
	HugrTypeFilterList HugrType = "filter_list"
	HugrTypeDataInput  HugrType = "data_input"
)

type HugrTypeField added in v0.1.28

type HugrTypeField string
const (
	HugrTypeFieldSubmodule      HugrTypeField = "submodule"
	HugrTypeFieldSelectOne      HugrTypeField = "select_one"
	HugrTypeFieldSelect         HugrTypeField = "select"
	HugrTypeFieldAgg            HugrTypeField = "aggregate"
	HugrTypeFieldBucketAgg      HugrTypeField = "bucket_agg"
	HugrTypeFieldFunction       HugrTypeField = "function"
	HugrTypeFieldJoin           HugrTypeField = "join"
	HugrTypeFieldSpatial        HugrTypeField = "spatial"
	HugrTypeFieldH3Agg          HugrTypeField = "h3_aggregate"
	HugrTypeFieldJQ             HugrTypeField = "jq"
	HugrTypeFieldMutationInsert HugrTypeField = "mutation_insert"
	HugrTypeFieldMutationUpdate HugrTypeField = "mutation_update"
	HugrTypeFieldMutationDelete HugrTypeField = "mutation_delete"
)

Jump to

Keyboard shortcuts

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