Version history
Version 5.0.0-beta04, released 2024-08-13
Bug fixes
- Retriable transactions should be released after successful commit (commit f2c7840)
- Partitioned updates are only executed on an ephemeral transaction (commit d88a807)
- Timestamp bound reads and queries are only executed on an ephemeral transaction (commit f8f8235)
New features
- Add resource reference annotation to backup schedules (commit 8403eb4)
- Add edition field to the instance proto (commit 2b59065)
- BREAKING CHANGE Fully support SpannerTransactionCreationOptoins (commit 34a25d3)
- Support excluding a transaction from change streams (commit 9e3ec98)
- Add protobuf column support for the data layer (commit 8646000)
- Add support for protobuf typed colums for DDL (commit 551d519)
- Add support for Cloud Spanner Incremental Backups (commit aa5a584)
- Add support for Cloud Spanner Scheduled Backups (commit ac15c11)
- BREAKING CHANGE Commit/Rollback releases sessions to the pool (commit 86fa6a6)
- BREAKING CHANGE Support detached sessions/transactions (commit cfa961e)
- Add field order_by in spanner.proto (commit a5f7b22)
- Add field lock_hint in spanner.proto (commit a5f7b22)
- Add support for multi region encryption config (commit bb95bbf)
- Add
RESOURCE_EXHAUSTED
to the list of retryable error codes (commit fbb0099) - Add IServiceCollection extension methods for client registration where an IServiceProvider is required. (commit 022fab2)
Documentation improvements
- Add an example to filter backups based on schedule name (commit 8403eb4)
- Clarify documentation around session acquisition vs. transaction creation (commit 9aae25e)
- Fix linting for several doc comments (commit bb95bbf)
Breaking changes
- Some SpannerConnection begin transaction methods that had only been released in beta versions of the library have been removed. (commit 34a25d3)
- The AmbientTransactionOptions class is split in SpannerTransactionCreationOptions and SpannerTransactionOptions, with all original options moving to one or the other. The SpannerConnection.Open set of methods that received an AmbientTransactionOptions before now receive one SpannerTransactionCreationOptions and one SpannerTransactionOptions. (commit 1541b99)
- After a successfull commit or rollback, the transaction is disposed and may not be used again. See the Google.Cloud.Spanner.Data.SpannerTransaction.DisposeBehavior documentation for more information. (commit 86fa6a6)
Version 5.0.0-beta03, released 2024-04-19
New features
- Add support for FLOAT32 (commit 83700dd)
Breaking changes
- The default mapping for values of CLR type decimal was FLOAT64 and it is now Numeric. (commit 9824a9c)
- The default mapping for values of CLR type float was FLOAT64 and it is now FLOAT32. (commit 83700dd)
- Support for specifying a maximum commit delay was added in v5.0.0-beta02. Unfortunately properties and methods for this feature were erroneously named using "commit delay" instead of "max commit delay". All such names are being corrected in this commit. (commit 03e66d7)
- Remove Obsolete code that had been introduced before v5.0.0-beta01. (commit fdc4bff)
Version 5.0.0-beta02, released 2024-04-04
New features
- Ambient transactions support commit delays (commit f4b4208)
- Implicit transactions support commit delay (commit af15aaf)
- Explicit transactions support commit delays (commit 4934cfd)
- Adding
EXPECTED_FULFILLMENT_PERIOD
to the indicate instance creation times (withFULFILLMENT_PERIOD_NORMAL
orFULFILLMENT_PERIOD_EXTENDED
ENUM) with the extended instance creation time triggered by On-Demand Capacity Feature (commit 20bb7e7) - Change netstandard2.1 target to netstandard2.0 (commit 82bea85)
- SpannerCommand supports directed reads (commit dfeb2c0)
- SpannerConnection supports directed reads (commit d7620e5)
- PooledSession supports directed reads (commit e26c8aa)
- Add PG.OID support (commit 43818f3)
- Update TransactionOptions to include new option exclude_txn_from_change_streams (commit 89764a0)
- Add field for multiplexed session in spanner.proto (commit 4bdb639)
Documentation improvements
- Fix typo (commit ce1be02)
- Update comments (commit 4bdb639)
Other changes
- Deprecate ambient transaction creation overloads (commit 50f5f65)
(This isn't a breaking change unless code is compiled with warnings as errors, but we do expect to remove these methods entirely in v6.0 of this library.)
Version 5.0.0-beta01, released 2024-02-09
Bug fixes
- Have SpannerTransaction check if it has been disposed before executing commands. (commit c97a70a)
New features
- Add leader routing support. (commit eb2157a)
- Add FLOAT32 enum to TypeCode (commit 18e6491)
- Add proto descriptors for proto and enum types in create/update/get database ddl requests (commit 7085e3f)
- Add max_commit_delay API (commit 3984609)
- Add proto and enum types (commit ea75989)
- BREAKING CHANGE Support inline transactions. (#11360)
- Add directed_read_option in spanner.proto (commit 3b374e0)
- Add PG.OID type cod annotation (commit a8662dc)
- Add autoscaling config to the instance proto (commit 07022a6)
- Add BatchWrite API (commit 7a127d0)
Documentation improvements
- Update the comment regarding eligible SQL shapes for PartitionQuery (commit 1eb3d3e)
- Updated comment formatting (commit 3b374e0)
BREAKING CHANGE: In supporting inline transactions the main breaking change is behavioral: transactions are not prewarmed, instead they are acquired
as needed, mainly through inlining transaction creation in the first command that attempts to use a transaction. The method
Google.Cloud.Spanner.V1.PooledSession.WithFreshTransactionOrNewAsync
has been removed, as a transaction is not created by the session until command execution.
Use instead Google.Cloud.Spanner.V1.PooledSession.RefreshedOrNewAsync
which returns a new PooledSession instance that either represents the same
session but with no transaction associated to it or a newly acquired session. Since transactions are not prewarmed, the session pool does not need
to distinguish between read-only and read-write session/transaction pairs. In the statistics classes that may be used for diagnostic purposes all
properties distinguising between read-only and read-write statistics have been removed. Similarly, Google.Cloud.Spanner.V1.SessionPoolOptions.WriteSessionsFraction
has bee removed.
Version 4.6.0, released 2023-06-26
Bug fixes
- Makes transactions marked as DisposedBehaviour.Detach actually detach from the session pool. (commit ab7526f)
- Dispose result streams (commit d92f88e)
New features
- Support
dataBoostEnabled
field in partitioned read and execute SQL operations. (commit 25531f2) - Add DdlStatementActionInfo and add actions to UpdateDatabaseDdlMetadata (commit 2bdd8bc)
- Add support for UpdateDatabase in Cloud Spanner (commit 3b98d26)
Documentation improvements
- Improvements on DataBoostEnabled docs. (commit 5791342)
Version 4.5.0, released 2023-05-04
New features
- Introduce data_boost_enabled; this is currently not exposed via Google.Cloud.Spanner.Data (commit 983fbe6)
Documentation improvements
- Formatting fix for the logging documentation
Version 4.4.0, released 2023-03-09
New features
- ExecuteQuery can now execute DML, returning data from affected rows (issue 10013) (commit 4787593)
Version 4.3.0, released 2023-02-08
New features
- Enable REST transport in C# (commit f6a1c3e)
- Exposed RpcException property to SpannerException (issue 9527) (commit 4c96a04)
Version 4.2.0, released 2022-11-03
Bug fixes
- Fix SpannerConnectionStringBuilder.ConnectionString handling of conversion options. Fixes issue 9158 (commit 92ba08b)
New features
- Update transaction.proto to include different lock modes (issue 9236) (commit 4fed510)
- Add support for FGAC in Spanner (commit 4e7eddb)
- Update result_set.proto to return undeclared parameters in ExecuteSql API (commit cb86746)
- Support dependency injection of SpannerConnection (commit f29a7f9)
- Support custom GoogleCredential in SpannerConnectionStringBuilder/SpannerConnection (commit 898d3b3)
- Added support for JSONB type in the PostgreSQL dialect. Note that JSONB arrays are not supported server-side yet.
Version 4.1.0, released 2022-09-20
New features
- Add custom instance config operations (commit 58cadb7)
- Adds auto-generated CL for googleapis for jsonb (commit b8b8752)
- Add ListDatabaseRoles API to support role based access control (commit 98e2aae)
- Adding two new fields for Instance create_time and update_time (commit d002223)
Version 4.0.0, released 2022-06-22
First GA release of v4.0. Please see release notes for 4.0.0-beta01 and 4.0.0-beta02 for details of breaking changes since v3.x
Bug fixes
- Fix ToDecimal truncation for SpannerNumeric. (commit 2be4686)
- Fixes ToDecimal truncation for PgNumeric. (commit 3ff15fb)
Version 4.0.0-beta02, released 2022-06-13
New features
- Add connection string options support to Keys (commit 65920aa)
BREAKING CHANGE: The Key classes (Key, KeyRange, KeySet) used to be immutable, and support equality as well as overriding ToString. As conversions from CLR to Spanner values now depend on the connection string, there's now an overload for ToString accepting a ConnectioStringBuilder, but no support for equality. We don't anticipate this breaking customers except perhaps for testing purposes.
Version 4.0.0-beta01, released 2022-06-09
This is the first version of this package to depend on GAX v4.
There are some breaking changes, both in GAX v4 and in the generated code. The changes that aren't specific to any given API are described in the Google Cloud documentation. We don't anticipate any changes to most customer code, but please file a GitHub issue if you run into problems.
The most important change in this release is the use of the Grpc.Net.Client package for gRPC communication, instead of Grpc.Core. When using .NET Core 3.1 or .NET 5.0+ this should lead to a smaller installation footprint and greater compatibility (e.g. with Apple M1 chips). Any significant change in a core component comes with the risk of incompatibility, however - so again, please let us know if you encounter any issues.
New features
- Add an adapter for an ILogger to a Spanner Logger (commit 5b7556b)
- This is an interim step to allow logs to be easily unified (to ILogger) before we eventually remove the Spanner internal logging system entirely.
- Use self-signed JWTs in Spanner clients (commit d465906)
- Add Session creator role (commit ffa9c84)
- Allow default conversions between Spanner and the CLR to be specified via connection string options
Documentation improvements
- Clarify transaction semantics (commit ffa9c84)
Version 3.15.1, released 2022-05-05
Bug fixes
- Make SpannerTransaction pick up SpannerConnection.LogCommitStats as documented. (commit db5c55d)
Version 3.15.0, released 2022-05-04
New features
- Make ephemeral transactions retry on abort. (commit 97faf1c)
- Introduced
SpannerDate
struct for date-only values. (The default type forDATE
columns is stillDateTime
.) (commit 4e3b94e) - Introduced
PgNumeric
struct for support of theNUMERIC
data type in the Postgres dialect. (commit 87c3306)
Version 3.14.0, released 2022-03-28
New features
- Add database dialect to Admin Database API (commit 721f908)
- Add database dialect to Spanner V1 API (commit d345d55)
- Add support for cross-region backup (commit 599f0a3)
Version 3.13.0, released 2021-12-01
- Commit 02b16d7: fix: clone each SpannerParameter when cloning a parameter collection
- Commit c653720: feat: add support for DataReader.GetBytes (issue 7395)
- Commit 9bc116d: fix: allow setting parameter size to the same as the current value (issue 7401)
- Commit 0666123: feat: Spanner Read API
Version 3.12.0, released 2021-08-24
- Commit 7c6a6f1: feat: add support for JSON data type in Spanner (issue 6390)
- Commit ac367e2: feat: Regenerate all APIs to support self-signed JWTs
- Commit 61938b6:
- feat(Spanner): Support comments and statement hints in untyped commands.
- Alternative to issue 6848
- Closes issue 6847
- Commit d26b04c: fix: address review comments
- Commit d2025be: fix: use logger from SpannerSettings
- Commit b34f6f4: cleanup: fix comment + remove unnecessary import
- Commit fc7a41b: test: remove connectionstring tests and add settings test
- Commit 6016ef0:
- feat: support custom SpannerSettings in SessionPoolManager
- Support setting custom SpannerSettings when creating a SessionPoolManager.
- Commit 0ab6b8b:
- feat: allow adding an additional version header
- Allows adding an additional version header to the connection string. This will be
- added to the
x-goog-api-client
header that is used by the underlying Spanner client. - Only a fixed set of values may be set for the header (currently only 'efcore' is
- allowed), and the property is not intended for public use.
- Commit 250124f:
- fix: synchronize access to the underlying transaction for ambient transactions (issue 6616)
- fix: synchronize access to the underlying transaction for ambient transactions
- Synchronizes access to the underlying Spanner transaction to prevent
- multiple transactions from being created if parallel commands are
- executed on the ambient transaction.
- test: add integration test
- fix: use Lazy for initialization
- chore: address review comments
- fix: remove unnecessary read call
Version 3.11.0, released 2021-07-09
- Commit 9dc6f8b: feat(spanner): add leader_options to InstanceConfig
- Commit e59ffc5: feat(spanner): add default_leader to Database
Version 3.10.0, released 2021-06-28
- Commit 10c86e0: feat: add JSON type (currently only in the low-level API)
- Commit 41094ed: feat: add processing_units to Instance resource
Version 3.9.0, released 2021-06-09
- Commit 0fb438e: feat: add
query_optimizer_statistics_package
support (see below)
The optimizer statistics package can be set through QueryOptions
, which can be configured through the following mechanisms:
- At the
SpannerConnection
level. - Through the
SPANNER_OPTIMIZER_STATISTICS_PACKAGE
environment variable. - At a query level.
If the options are configured through multiple mechanisms then:
- Options set at an environment variable level will override options configured at the
SpannerConnection
level. - Options set at a query-level will override options set at either the
SpannerConnection
or environment variable level.
If no options are set, the optimizer statistics package will default to the package the database is pinned to. If the database is not pinned to a specific package, then the Cloud Spanner backend will use the "latest" version.
Version 3.8.0, released 2021-05-18
- Commit a334723: feat: add option to return read timestamp
- Commit fbcacf0: fix: Use CopySettingsForEmulator in Spanner clients
- Commit 4371842: feat: add
progress
field toUpdateDatabaseDdlMetadata
- Commit 5eef4b4: feat: add
progress
field toUpdateDatabaseDdlMetadata
- Commit 9f5f0aa: fix: Regenerate server-streaming calls with Google request params
Version 3.7.0, released 2021-04-01
- Commit 63f54b5: feat: add support for request and transaction tagging
- Commit a7d1b22: feat: add support for RPC priority
- Commit b40ca4e: feat: add tagging request options (proto)
- Commit ec9fd53: feat: add RPC Priority request options (proto)
Version 3.6.0, released 2021-03-17
- Commit 69c83e4:
- fix: retry errors in stream until timeout (issue 6013)
- Also fixes issue 5977
- Commit fa5641d: fix: retry consecutive retryable errors in sql stream. Fixes issue 5977
- Commit a86b6ea: feat: add
optimizer_statistics_package
field inQueryOptions
- Commit ef02e74: feat: add CMEK fields to backup and database
Version 3.5.0, released 2021-02-08
- Commit d5abc62: feat: add Point In Time Recovery (PITR) support
- Commit 65f6e7b:
- feat: log CommitStats if requested by the client application (issue 5506)
- Commit 8562ced: fix: use null instead of empty array + integration test
- Commit 0343ff8:
- fix: parse WITH command as SELECT. Fixes issue 5857
- Commit 4866adf: fix: NUMERIC is missing default mapping
- Commit a223bd0: fix: local date could lead to wrong date in database
Version 3.4.0, released 2020-12-14
- Commit 9fb3e43: feat: Database Admin: Adds UpdateDatabaseDdlMetadata.Throttled to indicate when a DDL operation is throttled due to resource constraints.
Version 3.3.0, released 2020-10-01
- Commit 9d984c8: fix: Trust SpannerClientCreationOptions to connect to the emulator. Fixes issue 5362.
Version 3.2.0, released 2020-09-10
- Commit 0272d4e: fix: retry PDML on EOS on DATA error (issue 5238)
- Commit b43315c: feat: add NUMERIC support (issue 5057)
Version 3.1.0, released 2020-07-14
- Commit 6bde7a3: Regenerate all APIs with service comments in client documentation
- Commit 2db277b:
- Improvements to GetOrdinal behavior
- Fixes issue 5114
- Commit f83bdf1: Regenerate APIs with timeouts for RPCs that don't have retries
Version 3.1.0-beta01, released 2020-06-16
- Commit 5b07f5a: fix: Roll back uncommitted (and not-rolled-back) read/write transactions on session release
- Commit 7de296c: fix: Workaround for emulator bug of not populating ExecuteBatchDmlResponse.status
- Commit a4455b9: feat: Spanner emulator support in Google.Cloud.Spanner.Data
- Commit 947a573: fix: Regenerate all clients with more explicit documentation
- Commit 0b01e4b: feat: add support for spanner emulator detection in clients (issue 4928)
Note that while the SpannerNumeric
type has been added to the Google.Cloud.Spanner.V1 library, it is not currently integrated with the rest of the code, and should be ignored at this time.
Version 3.0.0, released 2020-04-15
GA release targeting GAX 3.0.0. No new features compared with 3.0.0-beta02, other than small resource name improvements for backups.
Version 3.0.0-beta02, released 2020-03-18
- Commit c5090d1:
- feat: Adds the ability to set QueryOptions when running Cloud Spanner queries.
- Commit 36f1e1e: Apply gccl header for Spanner clients in Google.Cloud.Spanner.Data
- Commit f21fd27:
- feat: Backup support in Database Admin API
- feat: List operations RPC in Database Admin API
This release depends on the GA version of GAX 3.0.
Version 3.0.0-beta01, released 2020-02-18
This is the first prerelease targeting GAX v3. Please see the breaking changes guide for details of changes to both GAX and code generation.
Version 2.1.0, released 2019-12-12
- Commit 0740a76: Adds support for retriable transactions
- Transparent support for batch creation of sessions (to make session creation more efficient)
Version 2.0.0, released 2019-06-03
New features:
- Batch query support
- Connection string option to enable
SpannerDataReader.GetSchemaTable()
to return schema information - DML and PDML support
- Batch DML support
- Session label support
Breaking changes:
- Many aspects of configuration have changed. Please refer to the configuration guide, migration guide and connection string options for more details.
- Null values are returned as
DBNull.Value
by default rather than the CLR default value for the type. Array and struct elements use a null value where feasible, but throwInvalidCastException
when requested to be converted to a non-nullable value type. The 1.0 behavior can be requested using theUseClrDefaultForNull
connection string option. Hashtable
is no longer used as a default type for struct values. It can still be specified explicitly. The new default isDictionary<string, object>
.- The libraries no longer target netstandard1.5; only netstandard2.0 and net45 are supported
Version 1.0.0, released 2017-12-05
Initial release.