Documentation
¶
Index ¶
- func AggRefArgs(filterName string, pos *ast.Position) ast.ArgumentDefinitionList
- func AggSubRefArgs(filterName string, pos *ast.Position) ast.ArgumentDefinitionList
- func AggTypeNameAtDepth(objectName string, depth int) string
- func CatalogDirective(name, engine string) *ast.Directive
- func CloneArgDefs(args ast.ArgumentDefinitionList, _ *ast.Position) ast.ArgumentDefinitionList
- func DropIfExistsDirective(pos *ast.Position) *ast.Directive
- func EmitDropFieldOnType(emit func(*ast.Definition), targetType, fieldName string, pos *ast.Position)
- func EmitDropFieldOnTypeIfExists(emit func(*ast.Definition), targetType, fieldName string, pos *ast.Position, ...)
- func EmitExtraFieldAdd(emit func(*ast.Definition), typeName string, field *ast.FieldDefinition, ...)
- func EmitExtraFieldDrop(emit func(*ast.Definition), typeName string, fieldName string, ...)
- func EmitFunctionFieldDrop(emit func(*ast.Definition), funcTypeName string, fieldName string, ...)
- func EmitReferenceFieldsDrop(emit func(*ast.Definition), typeDef *ast.Definition, fieldName string, ...)
- func EmitScalarFieldDerivedTypes(emit func(*ast.Definition), typeName string, field *ast.FieldDefinition, ...)
- func EmitScalarFieldDrop(emit func(*ast.Definition), typeName string, fieldName string, ...)
- func EmitVirtualFieldAggDrop(emit func(*ast.Definition), typeName string, fieldName string, ...)
- func EmitVirtualFieldAggregations(emit func(*ast.Definition), typeName string, field *ast.FieldDefinition, ...)
- func FieldReferencesToReferences(fieldName string, dir *ast.Directive, def *ast.Definition, ...) *ast.Directive
- func PrefixAndRegister(ctx base.CompilationContext, sourceNames map[string]bool) error
- func ProcessExtensionReferences(ctx base.CompilationContext, ext *ast.Definition, dir *ast.Directive, ...)
- func RegisterAll() []base.Rule
- func RenameDirectiveArgIfSource(d *ast.Directive, argName, prefix string, sourceNames map[string]bool)
- func RenameTypeRefs(t *ast.Type, prefix string, sourceNames map[string]bool)
- func SubQueryArgs(filterName string, pos *ast.Position) ast.ArgumentDefinitionList
- type AggregationRule
- type ArgumentTypeValidator
- type CatalogTagger
- type CubeHypertableRule
- type DefinitionValidator
- type DependencyCollector
- type EmbeddingsRule
- type ExtensionFieldAggregationRule
- type ExtensionValidator
- type ExtraFieldRule
- type FunctionCallValidator
- type FunctionRule
- type H3Rule
- type InternalExtensionMerger
- type JoinSpatialRule
- type JoinValidator
- type ModuleAssembler
- type PassthroughRule
- type PostValidator
- type PrefixPreparer
- type ReadOnlyFinalizer
- type ReferencesRule
- type RootTypeAssembler
- type SourceValidator
- type TableRule
- type UniqueRule
- type VectorSearchRule
- type ViewRule
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AggRefArgs ¶
func AggRefArgs(filterName string, pos *ast.Position) ast.ArgumentDefinitionList
AggRefArgs returns reference field args on aggregation types: filter + order_by + distinct_on + inner + nested_*.
func AggSubRefArgs ¶
func AggSubRefArgs(filterName string, pos *ast.Position) ast.ArgumentDefinitionList
AggSubRefArgs returns args for the _aggregation sub-field on aggregation types. Includes filter + order_by + limit/offset + distinct_on + inner + nested_*.
func AggTypeNameAtDepth ¶
aggTypeNameAtDepth returns the aggregation type name at a given depth. depth 0: _Type_aggregation depth 1: _Type_aggregation_sub_aggregation depth 2: _Type_aggregation_sub_aggregation_sub_aggregation
func CatalogDirective ¶
CatalogDirective creates a @catalog(name, engine) directive. This is the exported version for use by the incremental compiler.
func CloneArgDefs ¶
func CloneArgDefs(args ast.ArgumentDefinitionList, _ *ast.Position) ast.ArgumentDefinitionList
CloneArgDefs creates a shallow copy of an argument definition list.
func DropIfExistsDirective ¶
DropIfExistsDirective creates a @drop(if_exists: true) directive.
func EmitDropFieldOnType ¶
func EmitDropFieldOnType(emit func(*ast.Definition), targetType, fieldName string, pos *ast.Position)
EmitDropFieldOnType emits an extension with @drop(if_exists: true) for a single field on a target type.
func EmitDropFieldOnTypeIfExists ¶
func EmitDropFieldOnTypeIfExists(emit func(*ast.Definition), targetType, fieldName string, pos *ast.Position, typeExists func(string) bool)
EmitDropFieldOnTypeIfExists emits a drop extension only if the target type exists (according to typeExists). Prevents "definition not found" errors when dropping fields from derived types that may not have been created.
func EmitExtraFieldAdd ¶
func EmitExtraFieldAdd( emit func(*ast.Definition), typeName string, field *ast.FieldDefinition, scalarLookup func(string) types.ScalarType, )
EmitExtraFieldAdd generates extra fields (like _departure_part for Timestamp, _geom_measurement for Geometry) when a scalar field is added. This mirrors what ExtraFieldRule does during full compilation.
func EmitExtraFieldDrop ¶
func EmitExtraFieldDrop( emit func(*ast.Definition), typeName string, fieldName string, scalarLookup func(string) types.ScalarType, existingFieldTypeName string, typeExists func(string) bool, )
EmitExtraFieldDrop drops extra fields generated by ExtraFieldProvider when the base field is removed. For example, dropping a Timestamp field also drops the _field_part extra field from the type and its aggregation types.
func EmitFunctionFieldDrop ¶
func EmitFunctionFieldDrop( emit func(*ast.Definition), funcTypeName string, fieldName string, typeExists func(string) bool, )
EmitFunctionFieldDrop drops a function field and its aggregation fields from the Function/MutationFunction type (or module function type).
func EmitReferenceFieldsDrop ¶
func EmitReferenceFieldsDrop( emit func(*ast.Definition), typeDef *ast.Definition, fieldName string, typeExists func(string) bool, )
EmitReferenceFieldsDrop drops all reference-generated fields when a field with @field_references is removed. It looks up the corresponding @references directive on the type to find the generated field names.
func EmitScalarFieldDerivedTypes ¶
func EmitScalarFieldDerivedTypes( emit func(*ast.Definition), typeName string, field *ast.FieldDefinition, opts base.Options, scalarLookup func(string) types.ScalarType, )
EmitScalarFieldDerivedTypes generates extensions for all derived types (filter, mutation, aggregation) when a scalar field is added. Used by both full compilation (gen_table) and incremental compilation.
The emit callback abstracts over output.AddExtension (incremental) vs ctx.AddExtension (full compilation).
func EmitScalarFieldDrop ¶
func EmitScalarFieldDrop( emit func(*ast.Definition), typeName string, fieldName string, opts base.Options, typeExists func(string) bool, )
EmitScalarFieldDrop generates @drop extensions for all derived types when a scalar field is removed.
func EmitVirtualFieldAggDrop ¶
func EmitVirtualFieldAggDrop( emit func(*ast.Definition), typeName string, fieldName string, existingField *ast.FieldDefinition, typeExists func(string) bool, )
EmitVirtualFieldAggDrop drops aggregation fields generated by virtual fields.
func EmitVirtualFieldAggregations ¶
func EmitVirtualFieldAggregations( emit func(*ast.Definition), typeName string, field *ast.FieldDefinition, opts base.Options, scalarLookup func(string) types.ScalarType, typeExists func(string) bool, )
EmitVirtualFieldAggregations generates aggregation extensions for @join/@table_function_call_join/@function_call fields.
func FieldReferencesToReferences ¶
func FieldReferencesToReferences(fieldName string, dir *ast.Directive, def *ast.Definition, ctx base.CompilationContext, pos *ast.Position) *ast.Directive
FieldReferencesToReferences converts a @field_references directive on a field to an object-level @references directive.
func PrefixAndRegister ¶
func PrefixAndRegister(ctx base.CompilationContext, sourceNames map[string]bool) error
PrefixAndRegister applies prefix renaming to source definitions and registers ObjectInfo for data objects. The sourceNames map controls which type references get prefixed — it must include ALL names from the catalog namespace (not just the definitions being processed). This is the core logic shared between PrefixPreparer (full compilation) and the incremental compiler (which passes sourceNames that include the full baseCatalog namespace).
func ProcessExtensionReferences ¶
func ProcessExtensionReferences(ctx base.CompilationContext, ext *ast.Definition, dir *ast.Directive, pos *ast.Position)
ProcessExtensionReferences handles @references directives on extension `extend type` blocks. Generates forward/back query fields, filter extensions, and aggregation extensions. MUST NOT modify mutation input types (cross-catalog mutations not supported).
func RegisterAll ¶
RegisterAll returns all built-in rules in correct phase order. Call compiler.RegisterRules(rules.RegisterAll()...) to wire them up.
func RenameDirectiveArgIfSource ¶
func RenameDirectiveArgIfSource(d *ast.Directive, argName, prefix string, sourceNames map[string]bool)
RenameDirectiveArgIfSource prefixes a directive argument value if it matches a source definition name.
func RenameTypeRefs ¶
RenameTypeRefs prefixes type names that refer to source definitions.
func SubQueryArgs ¶
func SubQueryArgs(filterName string, pos *ast.Position) ast.ArgumentDefinitionList
SubQueryArgs returns the standard query arguments for sub-queries (references).
Types ¶
type AggregationRule ¶
type AggregationRule struct{}
AggregationRule generates aggregation types for @table and @view definitions:
- _X_aggregation (base aggregation type with scalar fields)
- _X_aggregation_bucket (bucket aggregation with filter + base agg fields)
- _X_aggregation_sub_aggregation (sub-aggregation for nested reference queries)
Also adds @query(AGGREGATE/AGGREGATE_BUCKET) metadata directives on the data object. Must run after UniqueRule to ensure correct directive ordering (SELECT_ONE before AGGREGATE).
func (*AggregationRule) Match ¶
func (r *AggregationRule) Match(def *ast.Definition) bool
func (*AggregationRule) Name ¶
func (r *AggregationRule) Name() string
func (*AggregationRule) Phase ¶
func (r *AggregationRule) Phase() base.Phase
func (*AggregationRule) Process ¶
func (r *AggregationRule) Process(ctx base.CompilationContext, def *ast.Definition) error
type ArgumentTypeValidator ¶
type ArgumentTypeValidator struct{}
ArgumentTypeValidator verifies that all field arguments reference valid input types (Scalar, Enum, InputObject) after compilation. It also validates that InputObject fields reference valid input types. This catches cases where an argument or InputObject field type is accidentally an Object (which is illegal in GraphQL and causes "Introspection must provide input type for arguments" errors).
func (*ArgumentTypeValidator) Name ¶
func (r *ArgumentTypeValidator) Name() string
func (*ArgumentTypeValidator) Phase ¶
func (r *ArgumentTypeValidator) Phase() base.Phase
func (*ArgumentTypeValidator) ProcessAll ¶
func (r *ArgumentTypeValidator) ProcessAll(ctx base.CompilationContext) error
type CatalogTagger ¶
type CatalogTagger struct{}
func (*CatalogTagger) Name ¶
func (r *CatalogTagger) Name() string
func (*CatalogTagger) Phase ¶
func (r *CatalogTagger) Phase() base.Phase
func (*CatalogTagger) ProcessAll ¶
func (r *CatalogTagger) ProcessAll(ctx base.CompilationContext) error
type CubeHypertableRule ¶
type CubeHypertableRule struct{}
CubeHypertableRule adds measurement_func arguments to @measurement fields on @cube objects, and gapfill arguments to @timescale_key Timestamp fields on @hypertable objects. It also propagates these arguments to the corresponding aggregation type fields.
func (*CubeHypertableRule) Match ¶
func (r *CubeHypertableRule) Match(def *ast.Definition) bool
func (*CubeHypertableRule) Name ¶
func (r *CubeHypertableRule) Name() string
func (*CubeHypertableRule) Phase ¶
func (r *CubeHypertableRule) Phase() base.Phase
func (*CubeHypertableRule) Process ¶
func (r *CubeHypertableRule) Process(ctx base.CompilationContext, def *ast.Definition) error
type DefinitionValidator ¶
type DefinitionValidator struct{}
DefinitionValidator validates source schema structure during the VALIDATE phase. It checks that @table/@view types have @pk fields and that field types are valid.
func (*DefinitionValidator) Name ¶
func (r *DefinitionValidator) Name() string
func (*DefinitionValidator) Phase ¶
func (r *DefinitionValidator) Phase() base.Phase
func (*DefinitionValidator) ProcessAll ¶
func (r *DefinitionValidator) ProcessAll(ctx base.CompilationContext) error
type DependencyCollector ¶
type DependencyCollector struct{}
DependencyCollector collects @dependency directives from source definitions AND extensions during the VALIDATE phase and registers them on the compilation context. Only active when opts.IsExtension is true.
This must be a BatchRule (not DefinitionRule) because extension sources primarily contain "extend type" blocks that are extensions, not definitions. DefinitionRules only iterate source.Definitions(), missing extensions entirely.
func (*DependencyCollector) Name ¶
func (r *DependencyCollector) Name() string
func (*DependencyCollector) Phase ¶
func (r *DependencyCollector) Phase() base.Phase
func (*DependencyCollector) ProcessAll ¶
func (r *DependencyCollector) ProcessAll(ctx base.CompilationContext) error
type EmbeddingsRule ¶
type EmbeddingsRule struct{}
func (*EmbeddingsRule) Match ¶
func (r *EmbeddingsRule) Match(def *ast.Definition) bool
func (*EmbeddingsRule) Name ¶
func (r *EmbeddingsRule) Name() string
func (*EmbeddingsRule) Phase ¶
func (r *EmbeddingsRule) Phase() base.Phase
func (*EmbeddingsRule) Process ¶
func (r *EmbeddingsRule) Process(ctx base.CompilationContext, def *ast.Definition) error
type ExtensionFieldAggregationRule ¶
type ExtensionFieldAggregationRule struct{}
ExtensionFieldAggregationRule generates aggregation, sub-aggregation, bucket aggregation, and filter types for fields added via `extend type` blocks targeting provider types. Also handles @references directives on extension types (new feature).
Must run after AggregationRule so that base aggregation types already exist.
func (*ExtensionFieldAggregationRule) Name ¶
func (r *ExtensionFieldAggregationRule) Name() string
func (*ExtensionFieldAggregationRule) Phase ¶
func (r *ExtensionFieldAggregationRule) Phase() base.Phase
func (*ExtensionFieldAggregationRule) ProcessAll ¶
func (r *ExtensionFieldAggregationRule) ProcessAll(ctx base.CompilationContext) error
type ExtensionValidator ¶
type ExtensionValidator struct{}
ExtensionValidator validates extension source constraints during the VALIDATE phase. Only active when opts.IsExtension is true. Extension definitions:
- Can only contain views (no @table-only objects)
- Cannot contain modules, functions, system types, or scalars
func (*ExtensionValidator) Name ¶
func (r *ExtensionValidator) Name() string
func (*ExtensionValidator) Phase ¶
func (r *ExtensionValidator) Phase() base.Phase
func (*ExtensionValidator) ProcessAll ¶
func (r *ExtensionValidator) ProcessAll(ctx base.CompilationContext) error
type ExtraFieldRule ¶
type ExtraFieldRule struct{}
func (*ExtraFieldRule) Match ¶
func (r *ExtraFieldRule) Match(def *ast.Definition) bool
func (*ExtraFieldRule) Name ¶
func (r *ExtraFieldRule) Name() string
func (*ExtraFieldRule) Phase ¶
func (r *ExtraFieldRule) Phase() base.Phase
func (*ExtraFieldRule) Process ¶
func (r *ExtraFieldRule) Process(ctx base.CompilationContext, def *ast.Definition) error
type FunctionCallValidator ¶
type FunctionCallValidator struct{}
FunctionCallValidator validates @function_call and @table_function_call_join directives on fields in data objects. It checks: - Referenced function exists in Function/MutationFunction types - Return type matches the function definition - Field arguments exist in function definition and types match - Args map entries reference valid function arguments - Args map source fields exist in the parent object and types match - All required function arguments are provided
Runs in FINALIZE phase because Function types are created during GENERATE.
func (*FunctionCallValidator) Name ¶
func (r *FunctionCallValidator) Name() string
func (*FunctionCallValidator) Phase ¶
func (r *FunctionCallValidator) Phase() base.Phase
func (*FunctionCallValidator) ProcessAll ¶
func (r *FunctionCallValidator) ProcessAll(ctx base.CompilationContext) error
type FunctionRule ¶
type FunctionRule struct{}
func (*FunctionRule) Match ¶
func (r *FunctionRule) Match(def *ast.Definition) bool
func (*FunctionRule) Name ¶
func (r *FunctionRule) Name() string
func (*FunctionRule) Phase ¶
func (r *FunctionRule) Phase() base.Phase
func (*FunctionRule) Process ¶
func (r *FunctionRule) Process(ctx base.CompilationContext, def *ast.Definition) error
type H3Rule ¶
type H3Rule struct{}
H3Rule extends the _h3_data_query type with fields from the _spatial extension. It runs after JoinSpatialRule because it copies fields from the _spatial type.
Base types (_h3_data_query, _h3_query) and the h3 query field are defined in system_types.graphql. This rule only adds catalog-specific data fields as extensions so they accumulate across catalogs.
func (*H3Rule) ProcessAll ¶
func (r *H3Rule) ProcessAll(ctx base.CompilationContext) error
type InternalExtensionMerger ¶
type InternalExtensionMerger struct{}
InternalExtensionMerger merges source extensions into source definitions during the PREPARE phase. This handles "extend type Foo { ... }" within the same catalog where Foo is also defined.
Merge rules (matching old compiler behavior from pkg/compiler/validate.go):
- Stub fields (_stub, _placeholder) from extensions are skipped
- New fields are appended to the definition
- If a field already exists: its type, arguments, position, and default value are replaced; directives are appended; description is updated if non-empty
- Directives, enum values, and interfaces from the extension are appended
When the extension targets a type NOT in the source but present in the provider (target schema), e.g. "extend type Function { ... }", the extension is promoted to a source-level definition via ctx.PromoteToSource so that GENERATE-phase DefinitionRules (like FunctionRule) can process it.
func (*InternalExtensionMerger) Name ¶
func (r *InternalExtensionMerger) Name() string
func (*InternalExtensionMerger) Phase ¶
func (r *InternalExtensionMerger) Phase() base.Phase
func (*InternalExtensionMerger) ProcessAll ¶
func (r *InternalExtensionMerger) ProcessAll(ctx base.CompilationContext) error
type JoinSpatialRule ¶
type JoinSpatialRule struct{}
JoinSpatialRule creates _join, _join_aggregation, _spatial, _spatial_aggregation types and adds _join / _spatial fields to data objects.
func (*JoinSpatialRule) Name ¶
func (r *JoinSpatialRule) Name() string
func (*JoinSpatialRule) Phase ¶
func (r *JoinSpatialRule) Phase() base.Phase
func (*JoinSpatialRule) ProcessAll ¶
func (r *JoinSpatialRule) ProcessAll(ctx base.CompilationContext) error
type JoinValidator ¶
type JoinValidator struct{}
JoinValidator validates @join directives on fields in data objects. It checks that: - source_fields and references_fields have equal length - Referenced object exists - Source fields exist and are scalars - References fields exist and types match source fields - SQL-referenced fields are valid
Runs in FINALIZE phase so all types are resolved.
func (*JoinValidator) Name ¶
func (r *JoinValidator) Name() string
func (*JoinValidator) Phase ¶
func (r *JoinValidator) Phase() base.Phase
func (*JoinValidator) ProcessAll ¶
func (r *JoinValidator) ProcessAll(ctx base.CompilationContext) error
type ModuleAssembler ¶
type ModuleAssembler struct{}
ModuleAssembler creates module type hierarchy from ObjectInfo.Module values and moves per-object query/mutation fields into module-scoped types.
func (*ModuleAssembler) Name ¶
func (r *ModuleAssembler) Name() string
func (*ModuleAssembler) Phase ¶
func (r *ModuleAssembler) Phase() base.Phase
func (*ModuleAssembler) ProcessAll ¶
func (r *ModuleAssembler) ProcessAll(ctx base.CompilationContext) error
type PassthroughRule ¶
type PassthroughRule struct{}
PassthroughRule adds source definitions that are not handled by other Generate-phase rules (e.g. structural Object types, InputObject, Interface, Union, Enum) directly to the compiler output so they appear in the final schema.
func (*PassthroughRule) Match ¶
func (r *PassthroughRule) Match(def *ast.Definition) bool
func (*PassthroughRule) Name ¶
func (r *PassthroughRule) Name() string
func (*PassthroughRule) Phase ¶
func (r *PassthroughRule) Phase() base.Phase
func (*PassthroughRule) Process ¶
func (r *PassthroughRule) Process(ctx base.CompilationContext, def *ast.Definition) error
type PostValidator ¶
type PostValidator struct{}
PostValidator performs post-compilation validation during the FINALIZE phase. It verifies compiled output consistency.
func (*PostValidator) Name ¶
func (r *PostValidator) Name() string
func (*PostValidator) Phase ¶
func (r *PostValidator) Phase() base.Phase
func (*PostValidator) ProcessAll ¶
func (r *PostValidator) ProcessAll(ctx base.CompilationContext) error
type PrefixPreparer ¶
type PrefixPreparer struct{}
func (*PrefixPreparer) Name ¶
func (r *PrefixPreparer) Name() string
func (*PrefixPreparer) Phase ¶
func (r *PrefixPreparer) Phase() base.Phase
func (*PrefixPreparer) ProcessAll ¶
func (r *PrefixPreparer) ProcessAll(ctx base.CompilationContext) error
type ReadOnlyFinalizer ¶
type ReadOnlyFinalizer struct{}
ReadOnlyFinalizer handles read-only mode cleanup during the FINALIZE phase. ReadOnly is primarily handled by rules not generating mutations in the first place; this rule is here for any final cleanup if needed.
func (*ReadOnlyFinalizer) Name ¶
func (r *ReadOnlyFinalizer) Name() string
func (*ReadOnlyFinalizer) Phase ¶
func (r *ReadOnlyFinalizer) Phase() base.Phase
func (*ReadOnlyFinalizer) ProcessAll ¶
func (r *ReadOnlyFinalizer) ProcessAll(ctx base.CompilationContext) error
type ReferencesRule ¶
type ReferencesRule struct{}
func (*ReferencesRule) Match ¶
func (r *ReferencesRule) Match(def *ast.Definition) bool
func (*ReferencesRule) Name ¶
func (r *ReferencesRule) Name() string
func (*ReferencesRule) Phase ¶
func (r *ReferencesRule) Phase() base.Phase
func (*ReferencesRule) Process ¶
func (r *ReferencesRule) Process(ctx base.CompilationContext, def *ast.Definition) error
type RootTypeAssembler ¶
type RootTypeAssembler struct{}
RootTypeAssembler creates/extends Query and Mutation root types from the remaining collected fields after module assembly.
func (*RootTypeAssembler) Name ¶
func (r *RootTypeAssembler) Name() string
func (*RootTypeAssembler) Phase ¶
func (r *RootTypeAssembler) Phase() base.Phase
func (*RootTypeAssembler) ProcessAll ¶
func (r *RootTypeAssembler) ProcessAll(ctx base.CompilationContext) error
type SourceValidator ¶
type SourceValidator struct{}
SourceValidator rejects redefinition of system types during the VALIDATE phase.
func (*SourceValidator) Match ¶
func (r *SourceValidator) Match(_ *ast.Definition) bool
func (*SourceValidator) Name ¶
func (r *SourceValidator) Name() string
func (*SourceValidator) Phase ¶
func (r *SourceValidator) Phase() base.Phase
func (*SourceValidator) Process ¶
func (r *SourceValidator) Process(_ base.CompilationContext, def *ast.Definition) error
type TableRule ¶
type TableRule struct{}
func (*TableRule) Process ¶
func (r *TableRule) Process(ctx base.CompilationContext, def *ast.Definition) error
type UniqueRule ¶
type UniqueRule struct{}
func (*UniqueRule) Match ¶
func (r *UniqueRule) Match(def *ast.Definition) bool
func (*UniqueRule) Name ¶
func (r *UniqueRule) Name() string
func (*UniqueRule) Phase ¶
func (r *UniqueRule) Phase() base.Phase
func (*UniqueRule) Process ¶
func (r *UniqueRule) Process(ctx base.CompilationContext, def *ast.Definition) error
type VectorSearchRule ¶
type VectorSearchRule struct{}
VectorSearchRule adds the similarity query argument to objects that have any Vector-typed field. Objects with @embeddings additionally get semantic search args via EmbeddingsRule.
func (*VectorSearchRule) Match ¶
func (r *VectorSearchRule) Match(def *ast.Definition) bool
func (*VectorSearchRule) Name ¶
func (r *VectorSearchRule) Name() string
func (*VectorSearchRule) Phase ¶
func (r *VectorSearchRule) Phase() base.Phase
func (*VectorSearchRule) Process ¶
func (r *VectorSearchRule) Process(ctx base.CompilationContext, def *ast.Definition) error
type ViewRule ¶
type ViewRule struct{}
func (*ViewRule) Process ¶
func (r *ViewRule) Process(ctx base.CompilationContext, def *ast.Definition) error
Source Files
¶
- assemble_modules.go
- assemble_root.go
- finalize_readonly.go
- finalize_validate.go
- gen_aggregation.go
- gen_cube_hypertable.go
- gen_embeddings.go
- gen_extension_fields.go
- gen_extra_field.go
- gen_function.go
- gen_h3.go
- gen_join.go
- gen_passthrough.go
- gen_references.go
- gen_table.go
- gen_unique.go
- gen_vector_search.go
- gen_view.go
- helpers.go
- incremental_helpers.go
- init.go
- prepare_catalog.go
- prepare_extensions.go
- prepare_prefix.go
- validate_argument_types.go
- validate_definitions.go
- validate_extension.go
- validate_function_call.go
- validate_join.go
- validate_source.go