Skip to content

project.transaction

Begin, commit, cancel, and renew project transactions.

5 functions / 7 types

Index

FunctionDescription
BeginOpens a transaction and returns its id. An expired lease discards its writes. Call RenewLease before expiry to keep the transaction open.
CancelEnds the transaction matching id as canceled, discarding its writes. Errors when no transaction with that id is open, or when a concurrent Commit or Cancel already finalized it.
CommitEnds the transaction matching id as committed. Errors when no transaction with that id is open, or when a concurrent Commit or Cancel already finalized it.
ForceCancelCancels the open transaction without its id. This can cancel another caller’s transaction. Errors when no transaction is open. Prefer Cancel when the id is known.
RenewLeaseExtends an unexpired transaction by its original lease duration.
TypeDescription
BeginOpens a transaction and returns its id. An expired lease discards its writes. Call RenewLease before expiry to keep the transaction open.
BeginResponse
CancelEnds the transaction matching id as canceled, discarding its writes. Errors when no transaction with that id is open, or when a concurrent Commit or Cancel already finalized it.
CommitEnds the transaction matching id as committed. Errors when no transaction with that id is open, or when a concurrent Commit or Cancel already finalized it.
ForceCancelCancels the open transaction without its id. This can cancel another caller’s transaction. Errors when no transaction is open. Prefer Cancel when the id is known.
RenewLeaseExtends an unexpired transaction by its original lease duration.
TransactionModePolicy for operations submitted while a transaction is open.

Begin

RPC

Begin(request: project.transaction.Begin) -> project.transaction.BeginResponse

Opens a transaction and returns its id. An expired lease discards its writes. Call RenewLease before expiry to keep the transaction open.

Service method: spatialengine.v1.project.transaction.ProjectTransaction.Begin.

Returns project.transaction.BeginResponse.

mode : project.transaction.TransactionMode

Whether untagged operations are absorbed by this transaction.

lease_seconds optional : double

Lease duration in seconds. Defaults to 60. Must be finite and between 0.001 and 86400.

Cancel

RPC

Cancel(request: project.transaction.Cancel) -> google.protobuf.Empty

Ends the transaction matching id as canceled, discarding its writes. Errors when no transaction with that id is open, or when a concurrent Commit or Cancel already finalized it.

Service method: spatialengine.v1.project.transaction.ProjectTransaction.Cancel.

Returns google.protobuf.Empty.

id : string

The transaction to end (hyphenated UUID string).

Commit

RPC

Commit(request: project.transaction.Commit) -> google.protobuf.Empty

Ends the transaction matching id as committed. Errors when no transaction with that id is open, or when a concurrent Commit or Cancel already finalized it.

Service method: spatialengine.v1.project.transaction.ProjectTransaction.Commit.

Returns google.protobuf.Empty.

id : string

The transaction to end (hyphenated UUID string).

ForceCancel

RPC

ForceCancel(request: project.transaction.ForceCancel) -> google.protobuf.Empty

Cancels the open transaction without its id. This can cancel another caller’s transaction. Errors when no transaction is open. Prefer Cancel when the id is known.

Service method: spatialengine.v1.project.transaction.ProjectTransaction.ForceCancel.

Returns google.protobuf.Empty.

RenewLease

RPC

RenewLease(request: project.transaction.RenewLease) -> google.protobuf.Empty

Extends an unexpired transaction by its original lease duration.

Service method: spatialengine.v1.project.transaction.ProjectTransaction.RenewLease.

Returns google.protobuf.Empty.

id : string

Begin

Message

Opens a transaction and returns its id. An expired lease discards its writes. Call RenewLease before expiry to keep the transaction open.

mode : project.transaction.TransactionMode

Whether untagged operations are absorbed by this transaction.

lease_seconds optional : double

Lease duration in seconds. Defaults to 60. Must be finite and between 0.001 and 86400.

BeginResponse

Message

value optional : string

Cancel

Message

Ends the transaction matching id as canceled, discarding its writes. Errors when no transaction with that id is open, or when a concurrent Commit or Cancel already finalized it.

id : string

The transaction to end (hyphenated UUID string).

Commit

Message

Ends the transaction matching id as committed. Errors when no transaction with that id is open, or when a concurrent Commit or Cancel already finalized it.

id : string

The transaction to end (hyphenated UUID string).

ForceCancel

Message

Cancels the open transaction without its id. This can cancel another caller’s transaction. Errors when no transaction is open. Prefer Cancel when the id is known.

RenewLease

Message

Extends an unexpired transaction by its original lease duration.

id : string

TransactionMode

Enum

Policy for operations submitted while a transaction is open.

Shared (default) includes every operation. Private accepts only operations tagged with this transaction’s ID and rejects others with StatementError.TransactionNotAdmitted.

TRANSACTION_MODE_SHARED = 0

TRANSACTION_MODE_PRIVATE = 1