Skip to main content

Crate spiral

Crate spiral 

Source
Expand description

Rust clients for Spiral resources and immutable table data.

Resource clients and wire types are generated from service contracts. Table data runs through scandal and does not initialize the query engine.

Re-exports§

pub use arrow_input::IntoArrowStream;
pub use arrow_input::SortColumn;
pub use arrow_input::WriteInput;
pub use arrow_input::WriteLayout;
pub use arrow_input::WriteProperties;
pub use blob::Blob;
pub use blob::BlobPack;
pub use blob::BlobPart;
pub use blob::BlobStat;
pub use blob::BlobStream;
pub use blob::BlobUpload;
pub use config::Config;
pub use config::ConfigBuilder;
pub use resources::organization::Organization;
pub use scan::BatchStream;
pub use scan::ColumnStatistics;
pub use scan::FilterSupport;
pub use scan::Scan;
pub use scan::ScanMetrics;
pub use scan::ScanMetricsSnapshot;
pub use scan::ScanOptions;
pub use scan::ScanRowRange;
pub use scan::ScanSplit;
pub use scan::ScanStatistics;
pub use scan::ScanStream;
pub use scan::SplitFilter;
pub use scan::StorageCounters;
pub use scan::StorageScope;
pub use scan::TableSplit;
pub use scan::Take;
pub use scan::WindowCounters;
pub use scan::WorkBatch;
pub use scan::WorkItem;
pub use scan::WorkStream;
pub use scandal::plan::PlanDecision;
pub use scandal::plan::PlanDescription;
pub use scandal::plan::PlanNode;
pub use scandal::profile::ExecutionOptions;
pub use scandal::profile::ExecutionProfile;
pub use scandal::profile::NodeProfile;
pub use vector_index::VectorIndex;
pub use vector_index::VectorIndexMetric;
pub use vector_index::VectorIndexOptions;
pub use crate::scandal::emit;
pub use crate::scandal::expression::Expression;
pub use crate::scandal::expression::NamedExpression;
pub use crate::scandal::expression::case_when;
pub use crate::scandal::expression::spql_call;
pub use crate::scandal::functions::FunctionAlias;
pub use crate::scandal::functions::FunctionInfo;
pub use crate::scandal::functions::FunctionVolatility;
pub use crate::scandal::functions::OverloadInfo;
pub use crate::scandal::functions::ParameterInfo;
pub use crate::scandal::read_cache::ReadCacheOptions;
pub use crate::scandal::read_cache::ReadCacheStats;
pub use crate::scandal::types::PreparedWriteReceipt;
pub use crate::scandal::Scandal;
pub use crate::scandal::ScandalConfig;
pub use spiral_auth as auth;
pub use arrow_array;
pub use arrow_ipc;
pub use arrow_schema;
pub use crate::scandal::vortex;

Modules§

api
Raw generated service APIs and HTTP clients.
catalog_types
Validated catalog identifiers and publication helpers. Validated conveniences for the SDK-local generated Catalog contract.
config
Client configuration and credential discovery.
http
Shared authenticated HTTP transport for control-plane tools.
ids
Stable identifiers used by control-plane management operations.
resources
Authenticated resource facades and SDK-owned contract types.
scandal
ScanDAL contracts and wire helpers used by the SDK’s execution adapters. The scandal API: one set of operations that embedded and remote scandal implement alike.
types
The SPQL type registry’s types as Arrow extension fields. The SPQL type registry’s types as Arrow extension fields.

Structs§

Application
The authenticated application. Registration administration is a separate handle.
ApplicationInstallation
An installation discovered by its owning application, before authenticating as it.
ApplicationRegistration
A project-owned application registration, accessed with management credentials.
AuthHeader
An owned Authorization header value without parsing or authentication.
BatchStream
Pull-driven Arrow batches with a fixed schema. A failure terminates the stream.
BlobPack
Payloads to store as blobs of one write, packed together as the inline payloads of appended rows are. Push each payload, then finish to store them all.
BranchHead
The head of a branch, pinned when it was read: a snapshot that a Commit can publish onto.
ChangeOptions
Which rows a change read returns, and how.
ChangePlan
How one version of a table changed since an earlier one, read from version metadata.
Client
A shared Spiral connection with one transport and credential provider.
ClientBuilder
Settings shared by generated resource clients and SDK orchestration.
ColumnPath
A top-level column, or a field nested inside one, named by its segments.
ColumnWrite
Values for new nullable fields over the rows of one exact version of a table, from Table::column_writer, which join its schema in its next version.
Commit
Staged changes to tables and names, published onto a pinned branch head as one Catalog commit.
DeletedRows
Rows deleted from a table, and the version without them.
Enrichment
One Enrichment at the commit a Snapshot selects.
EnrichmentDefinition
An Enrichment version’s definition: its expression and the output type it had when created.
ExecutionDiagnostics
Latest plan/profile snapshots observed by one stream, retained after failure or cancellation. At most 64 reports and 16 MiB of their encoded descriptions are retained per source; excess observations are counted as omitted.
FragmentChange
One fragment of the later version of a ChangePlan.
FrozenCommit
A commit whose publication request is fixed. Publishing it again sends the same request, and the Catalog publishes one operation at most once.
Functions
The SPQL functions of one scandal, embedded or remote, and their evaluation.
Installation
An authenticated installation. Project operations retain installation credentials.
InstallationRegistration
An organization installation accessed with organization management credentials.
List
A lazy collection request. Use send for one page or stream to follow every page. Constructing or configuring a request performs no I/O. Each page resolves current credentials.
LocalTableWrite
The first version of a local Table: blobs uploaded first, then the rows that carry them. Nothing is readable until Self::finish.
Location
One Location at the commit a Snapshot selects.
MergeActions
What a merge does with each kind of row.
MergedRows
Rows a merge changed, and the version with the changes.
NamedConnection
A Connection and its slash-separated name in the selected project snapshot.
Page
One response from a resource collection. Tokens are opaque and retain the request’s filters.
Project
Entry point for project resources, bound to one authenticated connection.
RemoteScandal
Scandal served by a remote scandal endpoint.
ResourceAddress
A slash-separated resource path with an optional @ref suffix.
ResourceUriResolver
Resolve Spiral resource addresses using the SDK host’s shared credentials and HTTP pool. Provider URIs are not implicitly authorized; their policy requires a separate host resolver.
SavedCommit
A frozen commit saved durably, so that it can be recovered or published again after the process restarts. Serialize it with any serde format.
Scan
One exact table scan with fixed options, metadata, and execution placement.
ScanMetrics
All lanes of one scan execution share these counters. This handle retains the final counters after stream cancellation.
ScanSplit
One split of a scan’s plan: stored rows of one fragment of the exact version, in stored order.
ScanStream
One execution lane of a fixed scan.
ServiceFailure
A well-formed service rejection and its optional typed interpretation.
Snapshot
Immutable project state selected by one exact Catalog commit.
Table
An exact immutable table version.
TableCommitChanges
The changes one Catalog commit made to a table: the versions it advanced between, and the changed rows.
TableIdentity
Stable identity of one immutable table version.
TableSession
A default snapshot and branch heads pinned on first use.
TableWrite
One write of a new table’s first version or of a table’s next version, under its own write attempt. Large payloads upload into the attempt first, as blobs; rows appended afterwards carry them, encoded with Blob::array. A write of a table’s next version can also patch and delete the base version’s rows by row ID. TableWrite::finish returns the written version, one version for every part, which is published only once a Commit stages it and publishes.
Take
Rows of one split of a scan, by position, for Scan::take.
TaskHandle
A submitted Task, which resolves to the TaskResult of versions it published.
UpdatedRows
Rows updated in a table, and the version with their new values.
UserInstallation
The same installation viewed through delegated user credentials, never a machine token.
VectorIndex
This handle selects one exact Vector Index version.
VectorIndexOptions
These options select the metric and build controls for a new index.
VectorSearch
Bounded neighbors from one query against exact index and source versions. Pages reuse these neighbors and do not repeat the index search.
VectorSearchOptions
Recall controls and the eligible population for one fixed search.
WorkBatch
A batch of one work item and where the item’s read stands after it.
WorkItem
Stored rows of one split, read in stored order: a unit of work for one consumer of a scan, such as one worker of a distributed job. The application decides which consumer reads which items and in what order.
WorkStream
Batches of work items, in the items’ order. A failure terminates the stream.
Workload
A workload identity bound to an authenticated connection.
WriteInput
Independent Arrow streams with the same schema and guaranteed per-stream ordering.

Enums§

BySource
What a merge does with a table row whose key no source row has.
CallError
A service call failure, independent of local or HTTP dispatch.
ChangeImages
Which images of each changed row a change read returns. Every row carries its row ID in ROW_ID_COLUMN and its kind in CHANGE_KIND_COLUMN.
ChangeKind
How a row of a change read changed.
Error
A Rust SDK operation failed.
FragmentDelta
How one fragment relates to the earlier version of a ChangePlan. Each set of row IDs is sorted, disjoint, half-open ranges.
Matched
What a merge does with a table row whose key a source row has.
NotMatched
What a merge does with a source row whose key no table row has.
PublishError
Publishing a commit failed, conflicted, or has an unknown outcome.
ResourceRef
A branch name, project commit, or exact resource version.
Run
Who executes a submitted Task. It never changes what the Task does.
SchemaChange
One change to a table’s schema. Changes write metadata only, and older versions keep their schema. Arbor’s rules apply: an added column or field is nullable, NOT NULL may relax but not tighten, numbers widen only without loss, and partition and sort source fields cannot be dropped.

Constants§

CHANGE_KIND_COLUMN
The column of a change read that says how each row changed: one of the ChangeKind names.
ENRICHMENT_VALUE_COLUMN
The column of an Enrichment’s backing Table that holds its values.
ROW_ID_COLUMN
The column that names rows by row ID: in the rows that TableWrite::patch_rows and TableWrite::delete_rows take, and in the scans that the SDK’s own edits and change reads open. It is a non-null uint64 column.

Traits§

IntoArrowStream
An owned synchronous Arrow reader suitable for bounded streaming uploads.
SplitFilter
A filter that narrows a scan’s splits as they open, such as a bound that tightens while the rows already read are consumed. Each split reads with the filter as it stands when the split opens and may skip every row the filter then rejects, so it must reject only rows the reader does not need.

Functions§

enrichment_coverage
Coverage of a version whose values a refresh computed, or of one created without values.
mirror_state
The native state that points an Enrichment version at its backing Table’s version.
mirrored_version
The backing Table version a version’s native state names, refusing state of other formats.

Type Aliases§

BlobStream
A bounded, backpressured byte stream. Producers should yield bounded chunks.
ListStream
A lazy stream of collection items, fetching the next page only when needed.