sqlcommon

package
v1.3.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 25, 2024 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// SQLConfMigrationsAuto enables automatic migrations
	SQLConfMigrationsAuto = "migrations.auto"
	// SQLConfMigrationsDirectory is the directory containing the numerically ordered migration DDL files to apply to the database
	SQLConfMigrationsDirectory = "migrations.directory"
	// SQLConfDatasourceURL is the datasource connection URL string
	SQLConfDatasourceURL = "url"
	// SQLConfMaxConnections maximum connections to the database
	SQLConfMaxConnections = "maxConns"
	// SQLConfMaxConnIdleTime maximum connections to the database
	SQLConfMaxConnIdleTime = "maxConnIdleTime"
	// SQLConfMaxIdleConns maximum connections to the database
	SQLConfMaxIdleConns = "maxIdleConns"
	// SQLConfMaxConnLifetime maximum connections to the database
	SQLConfMaxConnLifetime = "maxConnLifetime"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type IdempotencyError added in v1.3.0

type IdempotencyError struct {
	ExistingTXID  *fftypes.UUID
	OriginalError error
}

func (*IdempotencyError) Error added in v1.3.0

func (e *IdempotencyError) Error() string

type SQLCommon

type SQLCommon struct {
	dbsql.Database
	// contains filtered or unexported fields
}

func (*SQLCommon) Capabilities

func (s *SQLCommon) Capabilities() *database.Capabilities

func (*SQLCommon) DeleteBlob

func (s *SQLCommon) DeleteBlob(ctx context.Context, sequence int64) (err error)

func (*SQLCommon) DeleteContractAPI added in v1.3.0

func (s *SQLCommon) DeleteContractAPI(ctx context.Context, namespace string, id *fftypes.UUID) error

func (*SQLCommon) DeleteContractListenerByID added in v0.14.0

func (s *SQLCommon) DeleteContractListenerByID(ctx context.Context, namespace string, id *fftypes.UUID) (err error)

func (*SQLCommon) DeleteData added in v1.2.0

func (s *SQLCommon) DeleteData(ctx context.Context, namespace string, id *fftypes.UUID) (err error)

func (*SQLCommon) DeleteFFI added in v1.3.0

func (s *SQLCommon) DeleteFFI(ctx context.Context, namespace string, id *fftypes.UUID) error

func (*SQLCommon) DeleteNonce

func (s *SQLCommon) DeleteNonce(ctx context.Context, hash *fftypes.Bytes32) (err error)

func (*SQLCommon) DeleteOffset

func (s *SQLCommon) DeleteOffset(ctx context.Context, t core.OffsetType, name string) (err error)

func (*SQLCommon) DeleteSubscriptionByID

func (s *SQLCommon) DeleteSubscriptionByID(ctx context.Context, namespace string, id *fftypes.UUID) (err error)

func (*SQLCommon) DeleteTokenApprovals added in v1.3.0

func (s *SQLCommon) DeleteTokenApprovals(ctx context.Context, namespace string, poolID *fftypes.UUID) error

func (*SQLCommon) DeleteTokenBalances added in v1.3.0

func (s *SQLCommon) DeleteTokenBalances(ctx context.Context, namespace string, poolID *fftypes.UUID) error

func (*SQLCommon) DeleteTokenPool added in v1.3.0

func (s *SQLCommon) DeleteTokenPool(ctx context.Context, namespace string, id *fftypes.UUID) error

func (*SQLCommon) DeleteTokenTransfers added in v1.3.0

func (s *SQLCommon) DeleteTokenTransfers(ctx context.Context, namespace string, poolID *fftypes.UUID) error

func (*SQLCommon) GetBatchByID

func (s *SQLCommon) GetBatchByID(ctx context.Context, namespace string, id *fftypes.UUID) (message *core.BatchPersisted, err error)

func (*SQLCommon) GetBatchIDsForDataAttachments added in v1.0.0

func (s *SQLCommon) GetBatchIDsForDataAttachments(ctx context.Context, namespace string, dataIDs []*fftypes.UUID) (batchIDs []*fftypes.UUID, err error)

func (*SQLCommon) GetBatchIDsForMessages added in v1.0.0

func (s *SQLCommon) GetBatchIDsForMessages(ctx context.Context, namespace string, msgIDs []*fftypes.UUID) (batchIDs []*fftypes.UUID, err error)

func (*SQLCommon) GetBatches

func (s *SQLCommon) GetBatches(ctx context.Context, namespace string, filter ffapi.Filter) (message []*core.BatchPersisted, res *ffapi.FilterResult, err error)

func (*SQLCommon) GetBlobs

func (s *SQLCommon) GetBlobs(ctx context.Context, namespace string, filter ffapi.Filter) (message []*core.Blob, res *ffapi.FilterResult, err error)

func (*SQLCommon) GetBlockchainEventByID added in v0.12.0

func (s *SQLCommon) GetBlockchainEventByID(ctx context.Context, namespace string, id *fftypes.UUID) (*core.BlockchainEvent, error)

func (*SQLCommon) GetBlockchainEventByProtocolID added in v1.0.0

func (s *SQLCommon) GetBlockchainEventByProtocolID(ctx context.Context, ns string, listener *fftypes.UUID, protocolID string) (*core.BlockchainEvent, error)

func (*SQLCommon) GetBlockchainEvents added in v0.12.0

func (s *SQLCommon) GetBlockchainEvents(ctx context.Context, namespace string, filter ffapi.Filter) ([]*core.BlockchainEvent, *ffapi.FilterResult, error)

func (*SQLCommon) GetChartHistogram added in v0.11.2

func (s *SQLCommon) GetChartHistogram(ctx context.Context, ns string, intervals []core.ChartHistogramInterval, collection database.CollectionName) (histogramList []*core.ChartHistogram, err error)

func (*SQLCommon) GetContractAPIByID added in v0.12.0

func (s *SQLCommon) GetContractAPIByID(ctx context.Context, namespace string, id *fftypes.UUID) (*core.ContractAPI, error)

func (*SQLCommon) GetContractAPIByName added in v0.12.0

func (s *SQLCommon) GetContractAPIByName(ctx context.Context, namespace, name string) (*core.ContractAPI, error)

func (*SQLCommon) GetContractAPIByNetworkName added in v1.3.0

func (s *SQLCommon) GetContractAPIByNetworkName(ctx context.Context, namespace, networkName string) (*core.ContractAPI, error)

func (*SQLCommon) GetContractAPIs added in v0.12.0

func (s *SQLCommon) GetContractAPIs(ctx context.Context, namespace string, filter ffapi.AndFilter) (contractAPIs []*core.ContractAPI, res *ffapi.FilterResult, err error)

func (*SQLCommon) GetContractListener added in v0.14.0

func (s *SQLCommon) GetContractListener(ctx context.Context, namespace, name string) (sub *core.ContractListener, err error)

func (*SQLCommon) GetContractListenerByBackendID added in v1.0.0

func (s *SQLCommon) GetContractListenerByBackendID(ctx context.Context, namespace, id string) (sub *core.ContractListener, err error)

func (*SQLCommon) GetContractListenerByID added in v0.14.0

func (s *SQLCommon) GetContractListenerByID(ctx context.Context, namespace string, id *fftypes.UUID) (sub *core.ContractListener, err error)

func (*SQLCommon) GetContractListeners added in v0.14.0

func (s *SQLCommon) GetContractListeners(ctx context.Context, namespace string, filter ffapi.Filter) ([]*core.ContractListener, *ffapi.FilterResult, error)

func (*SQLCommon) GetData

func (s *SQLCommon) GetData(ctx context.Context, namespace string, filter ffapi.Filter) (message core.DataArray, res *ffapi.FilterResult, err error)

func (*SQLCommon) GetDataByID

func (s *SQLCommon) GetDataByID(ctx context.Context, namespace string, id *fftypes.UUID, withValue bool) (message *core.Data, err error)

func (*SQLCommon) GetDataRefs

func (s *SQLCommon) GetDataRefs(ctx context.Context, namespace string, filter ffapi.Filter) (message core.DataRefs, res *ffapi.FilterResult, err error)

func (*SQLCommon) GetDataSubPaths added in v1.3.0

func (s *SQLCommon) GetDataSubPaths(ctx context.Context, namespace, path string) (subPaths []string, err error)

func (*SQLCommon) GetDatatypeByID

func (s *SQLCommon) GetDatatypeByID(ctx context.Context, namespace string, id *fftypes.UUID) (message *core.Datatype, err error)

func (*SQLCommon) GetDatatypeByName

func (s *SQLCommon) GetDatatypeByName(ctx context.Context, ns, name, version string) (message *core.Datatype, err error)

func (*SQLCommon) GetDatatypes

func (s *SQLCommon) GetDatatypes(ctx context.Context, namespace string, filter ffapi.Filter) (message []*core.Datatype, res *ffapi.FilterResult, err error)

func (*SQLCommon) GetEventByID

func (s *SQLCommon) GetEventByID(ctx context.Context, namespace string, id *fftypes.UUID) (message *core.Event, err error)

func (*SQLCommon) GetEvents

func (s *SQLCommon) GetEvents(ctx context.Context, namespace string, filter ffapi.Filter) (message []*core.Event, res *ffapi.FilterResult, err error)

func (*SQLCommon) GetEventsInSequenceRange added in v1.3.0

func (s *SQLCommon) GetEventsInSequenceRange(ctx context.Context, namespace string, filter ffapi.Filter, startSequence int, endSequence int) (message []*core.Event, res *ffapi.FilterResult, err error)

func (*SQLCommon) GetFFI added in v0.12.0

func (s *SQLCommon) GetFFI(ctx context.Context, namespace, name, version string) (*fftypes.FFI, error)

func (*SQLCommon) GetFFIByID added in v0.12.0

func (s *SQLCommon) GetFFIByID(ctx context.Context, namespace string, id *fftypes.UUID) (*fftypes.FFI, error)

func (*SQLCommon) GetFFIByNetworkName added in v1.3.0

func (s *SQLCommon) GetFFIByNetworkName(ctx context.Context, namespace, networkName, version string) (*fftypes.FFI, error)

func (*SQLCommon) GetFFIErrors added in v1.1.3

func (s *SQLCommon) GetFFIErrors(ctx context.Context, namespace string, filter ffapi.Filter) (errors []*fftypes.FFIError, res *ffapi.FilterResult, err error)

func (*SQLCommon) GetFFIEvent added in v0.12.0

func (s *SQLCommon) GetFFIEvent(ctx context.Context, namespace string, interfaceID *fftypes.UUID, pathName string) (*fftypes.FFIEvent, error)

func (*SQLCommon) GetFFIEvents added in v0.12.0

func (s *SQLCommon) GetFFIEvents(ctx context.Context, namespace string, filter ffapi.Filter) (events []*fftypes.FFIEvent, res *ffapi.FilterResult, err error)

func (*SQLCommon) GetFFIMethod added in v0.12.0

func (s *SQLCommon) GetFFIMethod(ctx context.Context, ns string, interfaceID *fftypes.UUID, pathName string) (*fftypes.FFIMethod, error)

func (*SQLCommon) GetFFIMethods added in v0.12.0

func (s *SQLCommon) GetFFIMethods(ctx context.Context, namespace string, filter ffapi.Filter) (methods []*fftypes.FFIMethod, res *ffapi.FilterResult, err error)

func (*SQLCommon) GetFFIs added in v0.12.0

func (s *SQLCommon) GetFFIs(ctx context.Context, namespace string, filter ffapi.Filter) (ffis []*fftypes.FFI, res *ffapi.FilterResult, err error)

func (*SQLCommon) GetGroupByHash

func (s *SQLCommon) GetGroupByHash(ctx context.Context, namespace string, hash *fftypes.Bytes32) (group *core.Group, err error)

func (*SQLCommon) GetGroups

func (s *SQLCommon) GetGroups(ctx context.Context, namespace string, filter ffapi.Filter) (group []*core.Group, res *ffapi.FilterResult, err error)

func (*SQLCommon) GetIdentities added in v0.14.0

func (s *SQLCommon) GetIdentities(ctx context.Context, namespace string, filter ffapi.Filter) (identities []*core.Identity, fr *ffapi.FilterResult, err error)

func (*SQLCommon) GetIdentityByDID added in v0.14.0

func (s *SQLCommon) GetIdentityByDID(ctx context.Context, namespace, did string) (identity *core.Identity, err error)

func (*SQLCommon) GetIdentityByID added in v0.14.0

func (s *SQLCommon) GetIdentityByID(ctx context.Context, namespace string, id *fftypes.UUID) (identity *core.Identity, err error)

func (*SQLCommon) GetIdentityByName added in v0.14.0

func (s *SQLCommon) GetIdentityByName(ctx context.Context, iType core.IdentityType, namespace, name string) (identity *core.Identity, err error)

func (*SQLCommon) GetMessageByID

func (s *SQLCommon) GetMessageByID(ctx context.Context, namespace string, id *fftypes.UUID) (message *core.Message, err error)

func (*SQLCommon) GetMessageIDs added in v0.14.0

func (s *SQLCommon) GetMessageIDs(ctx context.Context, namespace string, filter ffapi.Filter) (ids []*core.IDAndSequence, err error)

func (*SQLCommon) GetMessages

func (s *SQLCommon) GetMessages(ctx context.Context, namespace string, filter ffapi.Filter) (message []*core.Message, fr *ffapi.FilterResult, err error)

func (*SQLCommon) GetMessagesForData

func (s *SQLCommon) GetMessagesForData(ctx context.Context, namespace string, dataID *fftypes.UUID, filter ffapi.Filter) (message []*core.Message, fr *ffapi.FilterResult, err error)

func (*SQLCommon) GetNamespace

func (s *SQLCommon) GetNamespace(ctx context.Context, name string) (message *core.Namespace, err error)

func (*SQLCommon) GetNextPins

func (s *SQLCommon) GetNextPins(ctx context.Context, namespace string, filter ffapi.Filter) ([]*core.NextPin, *ffapi.FilterResult, error)

func (*SQLCommon) GetNextPinsForContext added in v1.1.0

func (s *SQLCommon) GetNextPinsForContext(ctx context.Context, namespace string, context *fftypes.Bytes32) (message []*core.NextPin, err error)

func (*SQLCommon) GetNonce

func (s *SQLCommon) GetNonce(ctx context.Context, hash *fftypes.Bytes32) (message *core.Nonce, err error)

func (*SQLCommon) GetNonces

func (s *SQLCommon) GetNonces(ctx context.Context, filter ffapi.Filter) (message []*core.Nonce, fr *ffapi.FilterResult, err error)

func (*SQLCommon) GetOffset

func (s *SQLCommon) GetOffset(ctx context.Context, t core.OffsetType, name string) (message *core.Offset, err error)

func (*SQLCommon) GetOffsets

func (s *SQLCommon) GetOffsets(ctx context.Context, filter ffapi.Filter) (message []*core.Offset, fr *ffapi.FilterResult, err error)

func (*SQLCommon) GetOperationByID

func (s *SQLCommon) GetOperationByID(ctx context.Context, namespace string, id *fftypes.UUID) (operation *core.Operation, err error)

func (*SQLCommon) GetOperations

func (s *SQLCommon) GetOperations(ctx context.Context, namespace string, filter ffapi.Filter) (operation []*core.Operation, fr *ffapi.FilterResult, err error)

func (*SQLCommon) GetPins

func (s *SQLCommon) GetPins(ctx context.Context, namespace string, filter ffapi.Filter) (message []*core.Pin, fr *ffapi.FilterResult, err error)

func (*SQLCommon) GetSubscriptionByID

func (s *SQLCommon) GetSubscriptionByID(ctx context.Context, namespace string, id *fftypes.UUID) (message *core.Subscription, err error)

func (*SQLCommon) GetSubscriptionByName

func (s *SQLCommon) GetSubscriptionByName(ctx context.Context, namespace, name string) (message *core.Subscription, err error)

func (*SQLCommon) GetSubscriptions

func (s *SQLCommon) GetSubscriptions(ctx context.Context, namespace string, filter ffapi.Filter) (message []*core.Subscription, fr *ffapi.FilterResult, err error)

func (*SQLCommon) GetTokenAccountPools added in v0.11.0

func (s *SQLCommon) GetTokenAccountPools(ctx context.Context, namespace, key string, filter ffapi.Filter) ([]*core.TokenAccountPool, *ffapi.FilterResult, error)

func (*SQLCommon) GetTokenAccounts

func (s *SQLCommon) GetTokenAccounts(ctx context.Context, namespace string, filter ffapi.Filter) ([]*core.TokenAccount, *ffapi.FilterResult, error)

func (*SQLCommon) GetTokenApprovalByID added in v1.0.0

func (s *SQLCommon) GetTokenApprovalByID(ctx context.Context, namespace string, localID *fftypes.UUID) (*core.TokenApproval, error)

func (*SQLCommon) GetTokenApprovalByProtocolID added in v0.13.1

func (s *SQLCommon) GetTokenApprovalByProtocolID(ctx context.Context, namespace string, poolID *fftypes.UUID, protocolID string) (*core.TokenApproval, error)

func (*SQLCommon) GetTokenApprovals added in v0.13.1

func (s *SQLCommon) GetTokenApprovals(ctx context.Context, namespace string, filter ffapi.Filter) (approvals []*core.TokenApproval, fr *ffapi.FilterResult, err error)

func (*SQLCommon) GetTokenBalance added in v0.11.0

func (s *SQLCommon) GetTokenBalance(ctx context.Context, namespace string, poolID *fftypes.UUID, tokenIndex, key string) (message *core.TokenBalance, err error)

func (*SQLCommon) GetTokenBalances added in v0.11.0

func (s *SQLCommon) GetTokenBalances(ctx context.Context, namespace string, filter ffapi.Filter) ([]*core.TokenBalance, *ffapi.FilterResult, error)

func (*SQLCommon) GetTokenPool

func (s *SQLCommon) GetTokenPool(ctx context.Context, namespace string, name string) (message *core.TokenPool, err error)

func (*SQLCommon) GetTokenPoolByID

func (s *SQLCommon) GetTokenPoolByID(ctx context.Context, namespace string, id *fftypes.UUID) (message *core.TokenPool, err error)

func (*SQLCommon) GetTokenPoolByNetworkName added in v1.3.0

func (s *SQLCommon) GetTokenPoolByNetworkName(ctx context.Context, namespace, networkName string) (*core.TokenPool, error)

func (*SQLCommon) GetTokenPools

func (s *SQLCommon) GetTokenPools(ctx context.Context, namespace string, filter ffapi.Filter) (message []*core.TokenPool, fr *ffapi.FilterResult, err error)

func (*SQLCommon) GetTokenTransferByID added in v1.0.0

func (s *SQLCommon) GetTokenTransferByID(ctx context.Context, namespace string, localID *fftypes.UUID) (*core.TokenTransfer, error)

func (*SQLCommon) GetTokenTransferByProtocolID added in v0.11.0

func (s *SQLCommon) GetTokenTransferByProtocolID(ctx context.Context, namespace string, poolID *fftypes.UUID, protocolID string) (*core.TokenTransfer, error)

func (*SQLCommon) GetTokenTransfers

func (s *SQLCommon) GetTokenTransfers(ctx context.Context, namespace string, filter ffapi.Filter) (message []*core.TokenTransfer, fr *ffapi.FilterResult, err error)

func (*SQLCommon) GetTransactionByID

func (s *SQLCommon) GetTransactionByID(ctx context.Context, namespace string, id *fftypes.UUID) (message *core.Transaction, err error)

func (*SQLCommon) GetTransactions

func (s *SQLCommon) GetTransactions(ctx context.Context, namespace string, filter ffapi.Filter) (message []*core.Transaction, fr *ffapi.FilterResult, err error)

func (*SQLCommon) GetVerifierByHash added in v0.14.0

func (s *SQLCommon) GetVerifierByHash(ctx context.Context, namespace string, hash *fftypes.Bytes32) (verifier *core.Verifier, err error)

func (*SQLCommon) GetVerifierByValue added in v0.14.0

func (s *SQLCommon) GetVerifierByValue(ctx context.Context, vType core.VerifierType, namespace, value string) (verifier *core.Verifier, err error)

func (*SQLCommon) GetVerifiers added in v0.14.0

func (s *SQLCommon) GetVerifiers(ctx context.Context, namespace string, filter ffapi.Filter) (verifiers []*core.Verifier, fr *ffapi.FilterResult, err error)

func (*SQLCommon) Init

func (s *SQLCommon) Init(ctx context.Context, provider dbsql.Provider, config config.Section, capabilities *database.Capabilities) (err error)

func (*SQLCommon) InitConfig added in v1.1.0

func (s *SQLCommon) InitConfig(provider dbsql.Provider, config config.Section)

func (*SQLCommon) InsertBlob

func (s *SQLCommon) InsertBlob(ctx context.Context, blob *core.Blob) (err error)

func (*SQLCommon) InsertBlobs added in v1.0.0

func (s *SQLCommon) InsertBlobs(ctx context.Context, blobs []*core.Blob) (err error)

func (*SQLCommon) InsertBlockchainEvents added in v1.3.0

func (s *SQLCommon) InsertBlockchainEvents(ctx context.Context, events []*core.BlockchainEvent, hooks ...database.PostCompletionHook) (err error)

func (*SQLCommon) InsertContractListener added in v1.1.0

func (s *SQLCommon) InsertContractListener(ctx context.Context, listener *core.ContractListener) (err error)

func (*SQLCommon) InsertDataArray added in v0.14.0

func (s *SQLCommon) InsertDataArray(ctx context.Context, dataArray core.DataArray) (err error)

func (*SQLCommon) InsertEvent

func (s *SQLCommon) InsertEvent(ctx context.Context, event *core.Event) (err error)

Events are special.

They are an ordered sequence of recorded state, that must be detected and processed in order.

We choose (today) to coordinate the emission of these, into a DB transaction where the other state changes happen - so the event is assured atomically to happen "after" the other state changes, but also not to be lost. Downstream fan-out of those events occurs via Webhook/WebSocket (.../NATS/Kafka) pluggable pub/sub interfaces.

Implementing this single stream of incrementing (note not guaranteed to be gapless) ordered items on top of a SQL database, means taking a lock (see below). This is not safe to do unless you are really sure what other locks will be taken after that in the transaction. So we defer the emission of the events to a pre-commit capture.

func (*SQLCommon) InsertMessages added in v0.14.0

func (s *SQLCommon) InsertMessages(ctx context.Context, messages []*core.Message, hooks ...database.PostCompletionHook) (err error)

func (*SQLCommon) InsertNextPin

func (s *SQLCommon) InsertNextPin(ctx context.Context, nextpin *core.NextPin) (err error)

func (*SQLCommon) InsertNonce added in v1.0.0

func (s *SQLCommon) InsertNonce(ctx context.Context, nonce *core.Nonce) (err error)

func (*SQLCommon) InsertOperation added in v0.11.2

func (s *SQLCommon) InsertOperation(ctx context.Context, operation *core.Operation, hooks ...database.PostCompletionHook) (err error)

func (*SQLCommon) InsertOperations added in v1.3.0

func (s *SQLCommon) InsertOperations(ctx context.Context, operations []*core.Operation, hooks ...database.PostCompletionHook) (err error)

func (*SQLCommon) InsertOrGetBatch added in v1.1.4

func (s *SQLCommon) InsertOrGetBatch(ctx context.Context, batch *core.BatchPersisted) (existing *core.BatchPersisted, err error)

func (*SQLCommon) InsertOrGetBlockchainEvent added in v1.1.0

func (s *SQLCommon) InsertOrGetBlockchainEvent(ctx context.Context, event *core.BlockchainEvent) (existing *core.BlockchainEvent, err error)

func (*SQLCommon) InsertOrGetContractAPI added in v1.3.0

func (s *SQLCommon) InsertOrGetContractAPI(ctx context.Context, api *core.ContractAPI) (*core.ContractAPI, error)

func (*SQLCommon) InsertOrGetFFI added in v1.3.0

func (s *SQLCommon) InsertOrGetFFI(ctx context.Context, ffi *fftypes.FFI) (existing *fftypes.FFI, err error)

func (*SQLCommon) InsertOrGetTokenPool added in v1.3.0

func (s *SQLCommon) InsertOrGetTokenPool(ctx context.Context, pool *core.TokenPool) (existing *core.TokenPool, err error)

func (*SQLCommon) InsertOrGetTokenTransfer added in v1.3.0

func (s *SQLCommon) InsertOrGetTokenTransfer(ctx context.Context, transfer *core.TokenTransfer) (existing *core.TokenTransfer, err error)

func (*SQLCommon) InsertPins added in v0.14.0

func (s *SQLCommon) InsertPins(ctx context.Context, pins []*core.Pin) error

func (*SQLCommon) InsertTransaction added in v0.12.0

func (s *SQLCommon) InsertTransaction(ctx context.Context, transaction *core.Transaction) (err error)

func (*SQLCommon) InsertTransactions added in v1.3.0

func (s *SQLCommon) InsertTransactions(ctx context.Context, txns []*core.Transaction) (err error)

func (*SQLCommon) ReplaceMessage added in v0.11.5

func (s *SQLCommon) ReplaceMessage(ctx context.Context, message *core.Message) (err error)

In SQL update+bump is a delete+insert within a TX

func (*SQLCommon) SetHandler added in v1.1.0

func (s *SQLCommon) SetHandler(namespace string, handler database.Callbacks)

func (*SQLCommon) UpdateBatch

func (s *SQLCommon) UpdateBatch(ctx context.Context, namespace string, id *fftypes.UUID, update ffapi.Update) (err error)

func (*SQLCommon) UpdateContractListener added in v1.3.0

func (s *SQLCommon) UpdateContractListener(ctx context.Context, ns string, id *fftypes.UUID, update ffapi.Update) (err error)

func (*SQLCommon) UpdateData

func (s *SQLCommon) UpdateData(ctx context.Context, namespace string, id *fftypes.UUID, update ffapi.Update) (err error)

func (*SQLCommon) UpdateMessage

func (s *SQLCommon) UpdateMessage(ctx context.Context, namespace string, msgid *fftypes.UUID, update ffapi.Update) (err error)

func (*SQLCommon) UpdateMessages

func (s *SQLCommon) UpdateMessages(ctx context.Context, namespace string, filter ffapi.Filter, update ffapi.Update) (err error)

func (*SQLCommon) UpdateNextPin

func (s *SQLCommon) UpdateNextPin(ctx context.Context, namespace string, sequence int64, update ffapi.Update) (err error)

func (*SQLCommon) UpdateNonce added in v1.0.0

func (s *SQLCommon) UpdateNonce(ctx context.Context, nonce *core.Nonce) (err error)

func (*SQLCommon) UpdateOffset

func (s *SQLCommon) UpdateOffset(ctx context.Context, rowID int64, update ffapi.Update) (err error)

func (*SQLCommon) UpdateOperation

func (s *SQLCommon) UpdateOperation(ctx context.Context, ns string, id *fftypes.UUID, filter ffapi.Filter, update ffapi.Update) (updated bool, err error)

func (*SQLCommon) UpdatePins added in v0.13.0

func (s *SQLCommon) UpdatePins(ctx context.Context, namespace string, filter ffapi.Filter, update ffapi.Update) (err error)

func (*SQLCommon) UpdateSubscription

func (s *SQLCommon) UpdateSubscription(ctx context.Context, namespace, name string, update ffapi.Update) (err error)

func (*SQLCommon) UpdateTokenApprovals added in v1.0.0

func (s *SQLCommon) UpdateTokenApprovals(ctx context.Context, filter ffapi.Filter, update ffapi.Update) (err error)

func (*SQLCommon) UpdateTokenBalances added in v0.11.0

func (s *SQLCommon) UpdateTokenBalances(ctx context.Context, transfer *core.TokenTransfer) (err error)

func (*SQLCommon) UpdateTransaction

func (s *SQLCommon) UpdateTransaction(ctx context.Context, namespace string, id *fftypes.UUID, update ffapi.Update) (err error)

func (*SQLCommon) UpsertContractAPI added in v0.12.0

func (s *SQLCommon) UpsertContractAPI(ctx context.Context, api *core.ContractAPI, optimization database.UpsertOptimization) (err error)

func (*SQLCommon) UpsertData

func (s *SQLCommon) UpsertData(ctx context.Context, data *core.Data, optimization database.UpsertOptimization) (err error)

func (*SQLCommon) UpsertDatatype

func (s *SQLCommon) UpsertDatatype(ctx context.Context, datatype *core.Datatype, allowExisting bool) (err error)

func (*SQLCommon) UpsertFFI added in v0.12.0

func (s *SQLCommon) UpsertFFI(ctx context.Context, ffi *fftypes.FFI, optimization database.UpsertOptimization) error

func (*SQLCommon) UpsertFFIError added in v1.1.3

func (s *SQLCommon) UpsertFFIError(ctx context.Context, errorDef *fftypes.FFIError) (err error)

func (*SQLCommon) UpsertFFIEvent added in v0.12.0

func (s *SQLCommon) UpsertFFIEvent(ctx context.Context, event *fftypes.FFIEvent) (err error)

func (*SQLCommon) UpsertFFIMethod added in v0.12.0

func (s *SQLCommon) UpsertFFIMethod(ctx context.Context, method *fftypes.FFIMethod) (err error)

func (*SQLCommon) UpsertGroup

func (s *SQLCommon) UpsertGroup(ctx context.Context, group *core.Group, optimization database.UpsertOptimization) (err error)

func (*SQLCommon) UpsertIdentity added in v0.14.0

func (s *SQLCommon) UpsertIdentity(ctx context.Context, identity *core.Identity, optimization database.UpsertOptimization) (err error)

func (*SQLCommon) UpsertMessage

func (s *SQLCommon) UpsertMessage(ctx context.Context, message *core.Message, optimization database.UpsertOptimization, hooks ...database.PostCompletionHook) (err error)

func (*SQLCommon) UpsertNamespace

func (s *SQLCommon) UpsertNamespace(ctx context.Context, namespace *core.Namespace, allowExisting bool) (err error)

func (*SQLCommon) UpsertOffset

func (s *SQLCommon) UpsertOffset(ctx context.Context, offset *core.Offset, allowExisting bool) (err error)

func (*SQLCommon) UpsertPin

func (s *SQLCommon) UpsertPin(ctx context.Context, pin *core.Pin) (err error)

func (*SQLCommon) UpsertSubscription

func (s *SQLCommon) UpsertSubscription(ctx context.Context, subscription *core.Subscription, allowExisting bool) (err error)

func (*SQLCommon) UpsertTokenApproval added in v0.13.1

func (s *SQLCommon) UpsertTokenApproval(ctx context.Context, approval *core.TokenApproval) (err error)

func (*SQLCommon) UpsertTokenPool

func (s *SQLCommon) UpsertTokenPool(ctx context.Context, pool *core.TokenPool, optimization database.UpsertOptimization) (err error)

func (*SQLCommon) UpsertVerifier added in v0.14.0

func (s *SQLCommon) UpsertVerifier(ctx context.Context, verifier *core.Verifier, optimization database.UpsertOptimization) (err error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL