Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Compiler ¶
type Compiler interface {
// Parse parses source into an intermediate representation.
Parse(source []byte) (IR, error)
// ParseString is a convenience wrapper for string input.
ParseString(source string) (IR, error)
// Compile compiles an already-parsed IR into a Query.
Compile(ir IR) (*Query, error)
}
Compiler turns query sources into DBSP circuits.
type IR ¶
type IR interface {
IRKind() string
}
IR is a compiler intermediate representation. Implementations are compiler-specific but share this marker interface.
type Query ¶
type Query struct {
// Circuit is the DBSP circuit implementing the query.
Circuit *circuit.Circuit
// InputMap maps external input names/topics to circuit input node IDs.
InputMap map[string]string
// InputLogicalMap maps external input names/topics to internal logical names
// used by the compiler inside expressions. If a name is missing, it is
// treated as identity (external == logical).
InputLogicalMap map[string]string
// OutputMap maps external output names/topics to circuit output node IDs.
OutputMap map[string]string
// OutputLogicalMap maps external output names/topics to internal logical
// output names. If a name is missing, it is treated as identity.
OutputLogicalMap map[string]string
}
Query is the result of compiling a query source into a DBSP circuit.
func (*Query) InputLogicalName ¶
InputLogicalName returns the internal logical name for an external input name/topic.
func (*Query) InputNames ¶
InputNames returns the logical input names in sorted order.
func (*Query) OutputLogicalName ¶
OutputLogicalName returns the internal logical name for an external output name/topic.
func (*Query) OutputNames ¶
OutputNames returns the logical output names in sorted order.
Click to show internal directories.
Click to hide internal directories.