Skip to main content

Crate faucet_common_spanner

Crate faucet_common_spanner 

Source
Expand description

Shared Google Cloud Spanner types for the faucet-stream ecosystem.

This crate holds everything the faucet-source-spanner and faucet-sink-spanner connectors have in common:

  • SpannerCredentials — the { type, config } credentials enum shared by both connectors (mirrors faucet-common-bigquery).
  • SpannerConnection — the flattened connection block (project_id / instance / database / auth / max_sessions / emulator_host) plus SpannerConnection::connect / SpannerConnection::connect_admin client builders.
  • typesINFORMATION_SCHEMA type-string parsing and the mapping to JSON-Schema fragments.
  • decode — generic Spanner row → serde_json::Value decoding for arbitrary queries (no compile-time schema).
  • encodeserde_json::Value → Spanner mutation value encoding keyed by the destination column type.

Modules§

decode
Generic Spanner row → serde_json::Value decoding.
encode
serde_json::Value → Spanner mutation value encoding.
types
Spanner INFORMATION_SCHEMA type-string parsing and the mapping from Spanner column types to JSON-Schema fragments.

Structs§

SpannerConnection
Connection block shared by the Spanner source and sink configs (flattened into each connector config via #[serde(flatten)]).

Enums§

SpannerCredentials
Credentials used to authenticate against Cloud Spanner.

Functions§

quote_ident_spanner
Quote a Spanner identifier with backticks, doubling any embedded backtick. Spanner uses GoogleSQL backtick quoting (like BigQuery/MySQL).