sqlcommon

package
v1.1.0-alpha.1 Latest Latest
Warning

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

Go to latest
Published: Jun 2, 2022 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 Provider

type Provider interface {

	// Name is the name of the database driver
	Name() string

	// MigrationDir is the subdirectory for migrations
	MigrationsDir() string

	// Open creates the DB instances
	Open(url string) (*sql.DB, error)

	// GetDriver returns the driver implementation
	GetMigrationDriver(*sql.DB) (migratedb.Driver, error)

	// Features returns database specific configuration switches
	Features() SQLFeatures

	// ApplyInsertQueryCustomizations updates the INSERT query for returning the Sequence, and returns whether it needs to be run as a query to return the Sequence field
	ApplyInsertQueryCustomizations(insert sq.InsertBuilder, requestConflictEmptyResult bool) (updatedInsert sq.InsertBuilder, runAsQuery bool)
}

Provider defines the interface an individual provider muse implement to customize the SQLCommon implementation

type SQLCommon

type SQLCommon struct {
	// contains filtered or unexported fields
}

func (*SQLCommon) Capabilities

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

func (*SQLCommon) Close

func (s *SQLCommon) Close()

func (*SQLCommon) DB

func (s *SQLCommon) DB() *sql.DB

func (*SQLCommon) DeleteBlob

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

func (*SQLCommon) DeleteConfigRecord

func (s *SQLCommon) DeleteConfigRecord(ctx context.Context, key string) (err error)

func (*SQLCommon) DeleteContractListenerByID added in v0.14.0

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

func (*SQLCommon) DeleteNamespace

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

func (*SQLCommon) DeleteNextPin

func (s *SQLCommon) DeleteNextPin(ctx context.Context, sequence int64) (err 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) DeletePin

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

func (*SQLCommon) DeleteSubscriptionByID

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

func (*SQLCommon) GetBatchByID

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

func (*SQLCommon) GetBatchIDsForDataAttachments added in v1.0.0

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

func (*SQLCommon) GetBatchIDsForMessages added in v1.0.0

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

func (*SQLCommon) GetBatches

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

func (*SQLCommon) GetBlobMatchingHash

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

func (*SQLCommon) GetBlobs

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

func (*SQLCommon) GetBlockchainEventByID added in v0.12.0

func (s *SQLCommon) GetBlockchainEventByID(ctx context.Context, 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, filter database.Filter) ([]*core.BlockchainEvent, *database.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) GetConfigRecord

func (s *SQLCommon) GetConfigRecord(ctx context.Context, key string) (result *fftypes.ConfigRecord, err error)

func (*SQLCommon) GetConfigRecords

func (s *SQLCommon) GetConfigRecords(ctx context.Context, filter database.Filter) (result []*fftypes.ConfigRecord, res *database.FilterResult, err error)

func (*SQLCommon) GetContractAPIByID added in v0.12.0

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

func (*SQLCommon) GetContractAPIByName added in v0.12.0

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

func (*SQLCommon) GetContractAPIs added in v0.12.0

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

func (*SQLCommon) GetContractListener added in v0.14.0

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

func (*SQLCommon) GetContractListenerByBackendID added in v1.0.0

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

func (*SQLCommon) GetContractListenerByID added in v0.14.0

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

func (*SQLCommon) GetContractListeners added in v0.14.0

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

func (*SQLCommon) GetData

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

func (*SQLCommon) GetDataByID

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

func (*SQLCommon) GetDataRefs

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

func (*SQLCommon) GetDatatypeByID

func (s *SQLCommon) GetDatatypeByID(ctx context.Context, 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, filter database.Filter) (message []*core.Datatype, res *database.FilterResult, err error)

func (*SQLCommon) GetEventByID

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

func (*SQLCommon) GetEvents

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

func (*SQLCommon) GetFFI added in v0.12.0

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

func (*SQLCommon) GetFFIByID added in v0.12.0

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

func (*SQLCommon) GetFFIEvent added in v0.12.0

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

func (*SQLCommon) GetFFIEventByID added in v0.12.0

func (s *SQLCommon) GetFFIEventByID(ctx context.Context, id *fftypes.UUID) (*core.FFIEvent, error)

func (*SQLCommon) GetFFIEvents added in v0.12.0

func (s *SQLCommon) GetFFIEvents(ctx context.Context, filter database.Filter) (events []*core.FFIEvent, res *database.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) (*core.FFIMethod, error)

func (*SQLCommon) GetFFIMethods added in v0.12.0

func (s *SQLCommon) GetFFIMethods(ctx context.Context, filter database.Filter) (methods []*core.FFIMethod, res *database.FilterResult, err error)

func (*SQLCommon) GetFFIs added in v0.12.0

func (s *SQLCommon) GetFFIs(ctx context.Context, ns string, filter database.Filter) (ffis []*core.FFI, res *database.FilterResult, err error)

func (*SQLCommon) GetGroupByHash

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

func (*SQLCommon) GetGroups

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

func (*SQLCommon) GetIdentities added in v0.14.0

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

func (*SQLCommon) GetIdentityByDID added in v0.14.0

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

func (*SQLCommon) GetIdentityByID added in v0.14.0

func (s *SQLCommon) GetIdentityByID(ctx context.Context, 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, id *fftypes.UUID) (message *core.Message, err error)

func (*SQLCommon) GetMessageIDs added in v0.14.0

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

func (*SQLCommon) GetMessages

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

func (*SQLCommon) GetMessagesForData

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

func (*SQLCommon) GetNamespace

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

func (*SQLCommon) GetNamespaceByID added in v0.14.1

func (s *SQLCommon) GetNamespaceByID(ctx context.Context, id *fftypes.UUID) (ns *core.Namespace, err error)

func (*SQLCommon) GetNamespaces

func (s *SQLCommon) GetNamespaces(ctx context.Context, filter database.Filter) (message []*core.Namespace, fr *database.FilterResult, err error)

func (*SQLCommon) GetNextPinByContextAndIdentity

func (s *SQLCommon) GetNextPinByContextAndIdentity(ctx context.Context, context *fftypes.Bytes32, identity string) (message *core.NextPin, err error)

func (*SQLCommon) GetNextPinByHash

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

func (*SQLCommon) GetNextPins

func (s *SQLCommon) GetNextPins(ctx context.Context, filter database.Filter) (message []*core.NextPin, fr *database.FilterResult, 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 database.Filter) (message []*core.Nonce, fr *database.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 database.Filter) (message []*core.Offset, fr *database.FilterResult, err error)

func (*SQLCommon) GetOperationByID

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

func (*SQLCommon) GetOperations

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

func (*SQLCommon) GetPins

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

func (*SQLCommon) GetSubscriptionByID

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

func (*SQLCommon) GetSubscriptionByName

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

func (*SQLCommon) GetSubscriptions

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

func (*SQLCommon) GetTokenAccountPools added in v0.11.0

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

func (*SQLCommon) GetTokenAccounts

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

func (*SQLCommon) GetTokenApprovalByID added in v1.0.0

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

func (*SQLCommon) GetTokenApprovalByProtocolID added in v0.13.1

func (s *SQLCommon) GetTokenApprovalByProtocolID(ctx context.Context, connector, protocolID string) (*core.TokenApproval, error)

func (*SQLCommon) GetTokenApprovals added in v0.13.1

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

func (*SQLCommon) GetTokenBalance added in v0.11.0

func (s *SQLCommon) GetTokenBalance(ctx context.Context, 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, filter database.Filter) ([]*core.TokenBalance, *database.FilterResult, error)

func (*SQLCommon) GetTokenPool

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

func (*SQLCommon) GetTokenPoolByID

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

func (*SQLCommon) GetTokenPoolByLocator added in v1.0.0

func (s *SQLCommon) GetTokenPoolByLocator(ctx context.Context, connector, locator string) (*core.TokenPool, error)

func (*SQLCommon) GetTokenPools

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

func (*SQLCommon) GetTokenTransferByID added in v1.0.0

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

func (*SQLCommon) GetTokenTransferByProtocolID added in v0.11.0

func (s *SQLCommon) GetTokenTransferByProtocolID(ctx context.Context, connector, protocolID string) (*core.TokenTransfer, error)

func (*SQLCommon) GetTokenTransfers

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

func (*SQLCommon) GetTransactionByID

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

func (*SQLCommon) GetTransactions

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

func (*SQLCommon) GetVerifierByHash added in v0.14.0

func (s *SQLCommon) GetVerifierByHash(ctx context.Context, 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, filter database.Filter) (verifiers []*core.Verifier, fr *database.FilterResult, err error)

func (*SQLCommon) Init

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

func (*SQLCommon) InitConfig added in v1.1.0

func (s *SQLCommon) InitConfig(provider 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) InsertBlockchainEvent added in v0.12.0

func (s *SQLCommon) InsertBlockchainEvent(ctx context.Context, event *core.BlockchainEvent) (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) 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) 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) ResolveOperation added in v0.13.0

func (s *SQLCommon) ResolveOperation(ctx context.Context, ns string, id *fftypes.UUID, status core.OpStatus, errorMsg string, output fftypes.JSONObject) (err error)

func (*SQLCommon) RunAsGroup

func (s *SQLCommon) RunAsGroup(ctx context.Context, fn func(ctx context.Context) error) error

func (*SQLCommon) UpdateBatch

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

func (*SQLCommon) UpdateData

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

func (*SQLCommon) UpdateDatatype

func (s *SQLCommon) UpdateDatatype(ctx context.Context, id *fftypes.UUID, update database.Update) (err error)

func (*SQLCommon) UpdateEvent

func (s *SQLCommon) UpdateEvent(ctx context.Context, id *fftypes.UUID, update database.Update) (err error)

func (*SQLCommon) UpdateGroup

func (s *SQLCommon) UpdateGroup(ctx context.Context, hash *fftypes.Bytes32, update database.Update) (err error)

func (*SQLCommon) UpdateGroups

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

func (*SQLCommon) UpdateIdentity added in v0.14.0

func (s *SQLCommon) UpdateIdentity(ctx context.Context, id *fftypes.UUID, update database.Update) (err error)

func (*SQLCommon) UpdateMessage

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

func (*SQLCommon) UpdateMessages

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

func (*SQLCommon) UpdateNextPin

func (s *SQLCommon) UpdateNextPin(ctx context.Context, sequence int64, update database.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 database.Update) (err error)

func (*SQLCommon) UpdateOperation

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

func (*SQLCommon) UpdatePins added in v0.13.0

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

func (*SQLCommon) UpdateSubscription

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

func (*SQLCommon) UpdateTokenApprovals added in v1.0.0

func (s *SQLCommon) UpdateTokenApprovals(ctx context.Context, filter database.Filter, update database.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, id *fftypes.UUID, update database.Update) (err error)

func (*SQLCommon) UpdateVerifier added in v0.14.0

func (s *SQLCommon) UpdateVerifier(ctx context.Context, hash *fftypes.Bytes32, update database.Update) (err error)

func (*SQLCommon) UpsertBatch

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

func (*SQLCommon) UpsertConfigRecord

func (s *SQLCommon) UpsertConfigRecord(ctx context.Context, configRecord *fftypes.ConfigRecord, allowExisting bool) (err error)

func (*SQLCommon) UpsertContractAPI added in v0.12.0

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

func (*SQLCommon) UpsertContractListener added in v0.14.0

func (s *SQLCommon) UpsertContractListener(ctx context.Context, listener *core.ContractListener) (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 *core.FFI) (err error)

func (*SQLCommon) UpsertFFIEvent added in v0.12.0

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

func (*SQLCommon) UpsertFFIMethod added in v0.12.0

func (s *SQLCommon) UpsertFFIMethod(ctx context.Context, method *core.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) (err error)

func (*SQLCommon) UpsertTokenTransfer

func (s *SQLCommon) UpsertTokenTransfer(ctx context.Context, transfer *core.TokenTransfer) (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)

type SQLFeatures added in v0.12.0

type SQLFeatures struct {
	UseILIKE              bool
	MultiRowInsert        bool
	PlaceholderFormat     sq.PlaceholderFormat
	ExclusiveTableLockSQL func(table string) string
}

func DefaultSQLProviderFeatures added in v0.12.0

func DefaultSQLProviderFeatures() SQLFeatures

Jump to

Keyboard shortcuts

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