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.
- Application
Installation - An installation discovered by its owning application, before authenticating as it.
- Application
Registration - A project-owned application registration, accessed with management credentials.
- Auth
Header - An owned Authorization header value without parsing or authentication.
- Batch
Stream - Pull-driven Arrow batches with a fixed schema. A failure terminates the stream.
- Blob
Pack - Payloads to store as blobs of one write, packed together as the inline payloads of appended
rows are. Push each payload, then
finishto store them all. - Branch
Head - The head of a branch, pinned when it was read: a snapshot that a
Commitcan publish onto. - Change
Options - Which rows a change read returns, and how.
- Change
Plan - 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.
- Client
Builder - Settings shared by generated resource clients and SDK orchestration.
- Column
Path - A top-level column, or a field nested inside one, named by its segments.
- Column
Write - 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.
- Deleted
Rows - Rows deleted from a table, and the version without them.
- Enrichment
- One Enrichment at the commit a
Snapshotselects. - Enrichment
Definition - An Enrichment version’s definition: its expression and the output type it had when created.
- Execution
Diagnostics - 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.
- Fragment
Change - One fragment of the later version of a
ChangePlan. - Frozen
Commit - 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.
- Installation
Registration - An organization installation accessed with organization management credentials.
- List
- A lazy collection request. Use
sendfor one page orstreamto follow every page. Constructing or configuring a request performs no I/O. Each page resolves current credentials. - Local
Table Write - 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
Snapshotselects. - Merge
Actions - What a merge does with each kind of row.
- Merged
Rows - Rows a merge changed, and the version with the changes.
- Named
Connection - 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.
- Remote
Scandal - Scandal served by a remote
scandalendpoint. - Resource
Address - A slash-separated resource path with an optional
@refsuffix. - Resource
UriResolver - 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.
- Saved
Commit - 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.
- Scan
Metrics - All lanes of one scan execution share these counters. This handle retains the final counters after stream cancellation.
- Scan
Split - One split of a scan’s plan: stored rows of one fragment of the exact version, in stored order.
- Scan
Stream - One execution lane of a fixed scan.
- Service
Failure - 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.
- Table
Commit Changes - The changes one Catalog commit made to a table: the versions it advanced between, and the changed rows.
- Table
Identity - Stable identity of one immutable table version.
- Table
Session - A default snapshot and branch heads pinned on first use.
- Table
Write - 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::finishreturns the written version, one version for every part, which is published only once aCommitstages it and publishes. - Take
- Rows of one split of a scan, by position, for
Scan::take. - Task
Handle - A submitted Task, which resolves to the
TaskResultof versions it published. - Updated
Rows - Rows updated in a table, and the version with their new values.
- User
Installation - The same installation viewed through delegated user credentials, never a machine token.
- Vector
Index - This handle selects one exact Vector Index version.
- Vector
Index Options - These options select the metric and build controls for a new index.
- Vector
Search - Bounded neighbors from one query against exact index and source versions. Pages reuse these neighbors and do not repeat the index search.
- Vector
Search Options - Recall controls and the eligible population for one fixed search.
- Work
Batch - A batch of one work item and where the item’s read stands after it.
- Work
Item - 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.
- Work
Stream - Batches of work items, in the items’ order. A failure terminates the stream.
- Workload
- A workload identity bound to an authenticated connection.
- Write
Input - 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.
- Call
Error - A service call failure, independent of local or HTTP dispatch.
- Change
Images - Which images of each changed row a change read returns. Every row carries its row ID in
ROW_ID_COLUMNand its kind inCHANGE_KIND_COLUMN. - Change
Kind - How a row of a change read changed.
- Error
- A Rust SDK operation failed.
- Fragment
Delta - 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.
- Publish
Error - Publishing a commit failed, conflicted, or has an unknown outcome.
- Resource
Ref - A branch name, project commit, or exact resource version.
- Run
- Who executes a submitted Task. It never changes what the Task does.
- Schema
Change - 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 NULLmay 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
ChangeKindnames. - 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_rowsandTableWrite::delete_rowstake, and in the scans that the SDK’s own edits and change reads open. It is a non-nulluint64column.
Traits§
- Into
Arrow Stream - An owned synchronous Arrow reader suitable for bounded streaming uploads.
- Split
Filter - 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§
- Blob
Stream - A bounded, backpressured byte stream. Producers should yield bounded chunks.
- List
Stream - A lazy stream of collection items, fetching the next page only when needed.