Skip to main content

Module bindpoints

Module bindpoints 

Source
Expand description

Bind point detection and field classification.

Scans op template fields to detect {name} bind point references and {{expr}} inline binding definitions. Classifies fields as static (no bind points) or dynamic (has bind points).

Structs§

CaptureParseResult
Result of parsing capture points from a string.
CapturePoint
A capture point extracted from an op template.

Enums§

BindPoint
A detected bind point in an op template field.
BindQualifier
Namespace qualifier for a bind point reference.
CaptureAgg
Row-set aggregation for a declarative capture: reduce an array-of-rows body (or addressed sub-array) to one scalar by folding the named field across rows. Declared with a :min(field) / :max(field) / :sum(field) suffix on the capture path. Motivating case: system_views.sstable_tasks carries several concurrent tasks in MIXED units (a byte-denominated data compaction plus an ordinal-denominated index build) — a /0/... capture pins whichever row sorts first, so a saturated byte task masks the still-running merge; :min(completion_ratio) reads the least-complete task, which is the drain’s true state.
FieldType
The classification of an op template field value.
LvalueSpec
Workload-author lvalue assertion attached to a BindPoint::Reference.

Functions§

classify_field
Scan a string value for bind points and classify it. Fails as extract_bind_points does.
classify_group
What a { … } group in an op field is, from its trimmed body:
extract_bind_points
Extract all bind points from a string.
is_expression_public
Detect whether bind point content is a Polydat expression (not a simple name).
is_reference_name
True when s can name a wire in a { … } reference: an identifier (name), a dotted chain of them (q.cursor.idx), or either with {name} groups inside it that are filled in before the name is looked up (k_{k}_limits).
parse_capture_points
Parse capture points from an op template string.
referenced_bindings
Extract all referenced binding names from a string (only {name}, not {{expr}}). Returns the bare name without qualifier. Fails as extract_bind_points does.
replace_bind_points_with_markers
Replace {name} bind point references with ? markers for CQL prepared statements. Returns the parameterized statement.
rewrite_inline_definitions
Rewrite each inline definition in an op field’s text as a reference: {{expr}}, {:=expr}, {:=expr:=} and a {expr} group classify_group reads as an expression each become {name}, where name is what name_for answers for the expression. A definition name_for has no name for, and everything else, is kept as written, escaped braces included.
split_lvalue_spec
Public form of extract_lvalue_spec for adapters that need to interleave bind-point processing with text generation (e.g., the cassandra-cpp resolve_structural_and_mark_remaining walker, which scans the statement text char-by-char and must strip a lvalue-spec suffix from a bind-point body before deciding whether to inline-resolve or ?-mark the position).