Documentation ¶
Index ¶
- Constants
- type Provider
- type SQLCommon
- func (s *SQLCommon) Capabilities() *database.Capabilities
- func (s *SQLCommon) Close()
- func (s *SQLCommon) DB() *sql.DB
- func (s *SQLCommon) DeleteBlob(ctx context.Context, sequence int64) (err error)
- func (s *SQLCommon) DeleteConfigRecord(ctx context.Context, key string) (err error)
- func (s *SQLCommon) DeleteContractListenerByID(ctx context.Context, id *fftypes.UUID) (err error)
- func (s *SQLCommon) DeleteNamespace(ctx context.Context, id *fftypes.UUID) (err error)
- func (s *SQLCommon) DeleteNextPin(ctx context.Context, sequence int64) (err error)
- func (s *SQLCommon) DeleteNonce(ctx context.Context, hash *fftypes.Bytes32) (err error)
- func (s *SQLCommon) DeleteOffset(ctx context.Context, t core.OffsetType, name string) (err error)
- func (s *SQLCommon) DeletePin(ctx context.Context, sequence int64) (err error)
- func (s *SQLCommon) DeleteSubscriptionByID(ctx context.Context, id *fftypes.UUID) (err error)
- func (s *SQLCommon) GetBatchByID(ctx context.Context, id *fftypes.UUID) (message *core.BatchPersisted, err error)
- func (s *SQLCommon) GetBatchIDsForDataAttachments(ctx context.Context, dataIDs []*fftypes.UUID) (batchIDs []*fftypes.UUID, err error)
- func (s *SQLCommon) GetBatchIDsForMessages(ctx context.Context, msgIDs []*fftypes.UUID) (batchIDs []*fftypes.UUID, err error)
- func (s *SQLCommon) GetBatches(ctx context.Context, filter database.Filter) (message []*core.BatchPersisted, res *database.FilterResult, err error)
- func (s *SQLCommon) GetBlobMatchingHash(ctx context.Context, hash *fftypes.Bytes32) (message *core.Blob, err error)
- func (s *SQLCommon) GetBlobs(ctx context.Context, filter database.Filter) (message []*core.Blob, res *database.FilterResult, err error)
- func (s *SQLCommon) GetBlockchainEventByID(ctx context.Context, id *fftypes.UUID) (*core.BlockchainEvent, error)
- func (s *SQLCommon) GetBlockchainEventByProtocolID(ctx context.Context, ns string, listener *fftypes.UUID, protocolID string) (*core.BlockchainEvent, error)
- func (s *SQLCommon) GetBlockchainEvents(ctx context.Context, filter database.Filter) ([]*core.BlockchainEvent, *database.FilterResult, error)
- func (s *SQLCommon) GetChartHistogram(ctx context.Context, ns string, intervals []core.ChartHistogramInterval, ...) (histogramList []*core.ChartHistogram, err error)
- func (s *SQLCommon) GetConfigRecord(ctx context.Context, key string) (result *fftypes.ConfigRecord, err error)
- func (s *SQLCommon) GetConfigRecords(ctx context.Context, filter database.Filter) (result []*fftypes.ConfigRecord, res *database.FilterResult, err error)
- func (s *SQLCommon) GetContractAPIByID(ctx context.Context, id *fftypes.UUID) (*core.ContractAPI, error)
- func (s *SQLCommon) GetContractAPIByName(ctx context.Context, ns, name string) (*core.ContractAPI, error)
- func (s *SQLCommon) GetContractAPIs(ctx context.Context, ns string, filter database.AndFilter) (contractAPIs []*core.ContractAPI, res *database.FilterResult, err error)
- func (s *SQLCommon) GetContractListener(ctx context.Context, ns, name string) (sub *core.ContractListener, err error)
- func (s *SQLCommon) GetContractListenerByBackendID(ctx context.Context, id string) (sub *core.ContractListener, err error)
- func (s *SQLCommon) GetContractListenerByID(ctx context.Context, id *fftypes.UUID) (sub *core.ContractListener, err error)
- func (s *SQLCommon) GetContractListeners(ctx context.Context, filter database.Filter) ([]*core.ContractListener, *database.FilterResult, error)
- func (s *SQLCommon) GetData(ctx context.Context, filter database.Filter) (message core.DataArray, res *database.FilterResult, err error)
- func (s *SQLCommon) GetDataByID(ctx context.Context, id *fftypes.UUID, withValue bool) (message *core.Data, err error)
- func (s *SQLCommon) GetDataRefs(ctx context.Context, filter database.Filter) (message core.DataRefs, res *database.FilterResult, err error)
- func (s *SQLCommon) GetDatatypeByID(ctx context.Context, id *fftypes.UUID) (message *core.Datatype, err error)
- func (s *SQLCommon) GetDatatypeByName(ctx context.Context, ns, name, version string) (message *core.Datatype, err error)
- func (s *SQLCommon) GetDatatypes(ctx context.Context, filter database.Filter) (message []*core.Datatype, res *database.FilterResult, err error)
- func (s *SQLCommon) GetEventByID(ctx context.Context, id *fftypes.UUID) (message *core.Event, err error)
- func (s *SQLCommon) GetEvents(ctx context.Context, filter database.Filter) (message []*core.Event, res *database.FilterResult, err error)
- func (s *SQLCommon) GetFFI(ctx context.Context, ns, name, version string) (*core.FFI, error)
- func (s *SQLCommon) GetFFIByID(ctx context.Context, id *fftypes.UUID) (*core.FFI, error)
- func (s *SQLCommon) GetFFIEvent(ctx context.Context, ns string, interfaceID *fftypes.UUID, pathName string) (*core.FFIEvent, error)
- func (s *SQLCommon) GetFFIEventByID(ctx context.Context, id *fftypes.UUID) (*core.FFIEvent, error)
- func (s *SQLCommon) GetFFIEvents(ctx context.Context, filter database.Filter) (events []*core.FFIEvent, res *database.FilterResult, err error)
- func (s *SQLCommon) GetFFIMethod(ctx context.Context, ns string, interfaceID *fftypes.UUID, pathName string) (*core.FFIMethod, error)
- func (s *SQLCommon) GetFFIMethods(ctx context.Context, filter database.Filter) (methods []*core.FFIMethod, res *database.FilterResult, err error)
- func (s *SQLCommon) GetFFIs(ctx context.Context, ns string, filter database.Filter) (ffis []*core.FFI, res *database.FilterResult, err error)
- func (s *SQLCommon) GetGroupByHash(ctx context.Context, hash *fftypes.Bytes32) (group *core.Group, err error)
- func (s *SQLCommon) GetGroups(ctx context.Context, filter database.Filter) (group []*core.Group, res *database.FilterResult, err error)
- func (s *SQLCommon) GetIdentities(ctx context.Context, filter database.Filter) (identities []*core.Identity, fr *database.FilterResult, err error)
- func (s *SQLCommon) GetIdentityByDID(ctx context.Context, did string) (identity *core.Identity, err error)
- func (s *SQLCommon) GetIdentityByID(ctx context.Context, id *fftypes.UUID) (identity *core.Identity, err error)
- func (s *SQLCommon) GetIdentityByName(ctx context.Context, iType core.IdentityType, namespace, name string) (identity *core.Identity, err error)
- func (s *SQLCommon) GetMessageByID(ctx context.Context, id *fftypes.UUID) (message *core.Message, err error)
- func (s *SQLCommon) GetMessageIDs(ctx context.Context, filter database.Filter) (ids []*core.IDAndSequence, err error)
- func (s *SQLCommon) GetMessages(ctx context.Context, filter database.Filter) (message []*core.Message, fr *database.FilterResult, err error)
- func (s *SQLCommon) GetMessagesForData(ctx context.Context, dataID *fftypes.UUID, filter database.Filter) (message []*core.Message, fr *database.FilterResult, err error)
- func (s *SQLCommon) GetNamespace(ctx context.Context, name string) (message *core.Namespace, err error)
- func (s *SQLCommon) GetNamespaceByID(ctx context.Context, id *fftypes.UUID) (ns *core.Namespace, err error)
- func (s *SQLCommon) GetNamespaces(ctx context.Context, filter database.Filter) (message []*core.Namespace, fr *database.FilterResult, err error)
- func (s *SQLCommon) GetNextPinByContextAndIdentity(ctx context.Context, context *fftypes.Bytes32, identity string) (message *core.NextPin, err error)
- func (s *SQLCommon) GetNextPinByHash(ctx context.Context, hash *fftypes.Bytes32) (message *core.NextPin, err error)
- func (s *SQLCommon) GetNextPins(ctx context.Context, filter database.Filter) (message []*core.NextPin, fr *database.FilterResult, err error)
- func (s *SQLCommon) GetNonce(ctx context.Context, hash *fftypes.Bytes32) (message *core.Nonce, err error)
- func (s *SQLCommon) GetNonces(ctx context.Context, filter database.Filter) (message []*core.Nonce, fr *database.FilterResult, err error)
- func (s *SQLCommon) GetOffset(ctx context.Context, t core.OffsetType, name string) (message *core.Offset, err error)
- func (s *SQLCommon) GetOffsets(ctx context.Context, filter database.Filter) (message []*core.Offset, fr *database.FilterResult, err error)
- func (s *SQLCommon) GetOperationByID(ctx context.Context, id *fftypes.UUID) (operation *core.Operation, err error)
- func (s *SQLCommon) GetOperations(ctx context.Context, filter database.Filter) (operation []*core.Operation, fr *database.FilterResult, err error)
- func (s *SQLCommon) GetPins(ctx context.Context, filter database.Filter) (message []*core.Pin, fr *database.FilterResult, err error)
- func (s *SQLCommon) GetSubscriptionByID(ctx context.Context, id *fftypes.UUID) (message *core.Subscription, err error)
- func (s *SQLCommon) GetSubscriptionByName(ctx context.Context, ns, name string) (message *core.Subscription, err error)
- func (s *SQLCommon) GetSubscriptions(ctx context.Context, filter database.Filter) (message []*core.Subscription, fr *database.FilterResult, err error)
- func (s *SQLCommon) GetTokenAccountPools(ctx context.Context, key string, filter database.Filter) ([]*core.TokenAccountPool, *database.FilterResult, error)
- func (s *SQLCommon) GetTokenAccounts(ctx context.Context, filter database.Filter) ([]*core.TokenAccount, *database.FilterResult, error)
- func (s *SQLCommon) GetTokenApprovalByID(ctx context.Context, localID *fftypes.UUID) (*core.TokenApproval, error)
- func (s *SQLCommon) GetTokenApprovalByProtocolID(ctx context.Context, connector, protocolID string) (*core.TokenApproval, error)
- func (s *SQLCommon) GetTokenApprovals(ctx context.Context, filter database.Filter) (approvals []*core.TokenApproval, fr *database.FilterResult, err error)
- func (s *SQLCommon) GetTokenBalance(ctx context.Context, poolID *fftypes.UUID, tokenIndex, key string) (message *core.TokenBalance, err error)
- func (s *SQLCommon) GetTokenBalances(ctx context.Context, filter database.Filter) ([]*core.TokenBalance, *database.FilterResult, error)
- func (s *SQLCommon) GetTokenPool(ctx context.Context, ns string, name string) (message *core.TokenPool, err error)
- func (s *SQLCommon) GetTokenPoolByID(ctx context.Context, id *fftypes.UUID) (message *core.TokenPool, err error)
- func (s *SQLCommon) GetTokenPoolByLocator(ctx context.Context, connector, locator string) (*core.TokenPool, error)
- func (s *SQLCommon) GetTokenPools(ctx context.Context, filter database.Filter) (message []*core.TokenPool, fr *database.FilterResult, err error)
- func (s *SQLCommon) GetTokenTransferByID(ctx context.Context, localID *fftypes.UUID) (*core.TokenTransfer, error)
- func (s *SQLCommon) GetTokenTransferByProtocolID(ctx context.Context, connector, protocolID string) (*core.TokenTransfer, error)
- func (s *SQLCommon) GetTokenTransfers(ctx context.Context, filter database.Filter) (message []*core.TokenTransfer, fr *database.FilterResult, err error)
- func (s *SQLCommon) GetTransactionByID(ctx context.Context, id *fftypes.UUID) (message *core.Transaction, err error)
- func (s *SQLCommon) GetTransactions(ctx context.Context, filter database.Filter) (message []*core.Transaction, fr *database.FilterResult, err error)
- func (s *SQLCommon) GetVerifierByHash(ctx context.Context, hash *fftypes.Bytes32) (verifier *core.Verifier, err error)
- func (s *SQLCommon) GetVerifierByValue(ctx context.Context, vType core.VerifierType, namespace, value string) (verifier *core.Verifier, err error)
- func (s *SQLCommon) GetVerifiers(ctx context.Context, filter database.Filter) (verifiers []*core.Verifier, fr *database.FilterResult, err error)
- func (s *SQLCommon) Init(ctx context.Context, provider Provider, config config.Section, ...) (err error)
- func (s *SQLCommon) InitConfig(provider Provider, config config.Section)
- func (s *SQLCommon) InsertBlob(ctx context.Context, blob *core.Blob) (err error)
- func (s *SQLCommon) InsertBlobs(ctx context.Context, blobs []*core.Blob) (err error)
- func (s *SQLCommon) InsertBlockchainEvent(ctx context.Context, event *core.BlockchainEvent) (err error)
- func (s *SQLCommon) InsertDataArray(ctx context.Context, dataArray core.DataArray) (err error)
- func (s *SQLCommon) InsertEvent(ctx context.Context, event *core.Event) (err error)
- func (s *SQLCommon) InsertMessages(ctx context.Context, messages []*core.Message, ...) (err error)
- func (s *SQLCommon) InsertNextPin(ctx context.Context, nextpin *core.NextPin) (err error)
- func (s *SQLCommon) InsertNonce(ctx context.Context, nonce *core.Nonce) (err error)
- func (s *SQLCommon) InsertOperation(ctx context.Context, operation *core.Operation, ...) (err error)
- func (s *SQLCommon) InsertPins(ctx context.Context, pins []*core.Pin) error
- func (s *SQLCommon) InsertTransaction(ctx context.Context, transaction *core.Transaction) (err error)
- func (s *SQLCommon) ReplaceMessage(ctx context.Context, message *core.Message) (err error)
- func (s *SQLCommon) ResolveOperation(ctx context.Context, ns string, id *fftypes.UUID, status core.OpStatus, ...) (err error)
- func (s *SQLCommon) RunAsGroup(ctx context.Context, fn func(ctx context.Context) error) error
- func (s *SQLCommon) UpdateBatch(ctx context.Context, id *fftypes.UUID, update database.Update) (err error)
- func (s *SQLCommon) UpdateData(ctx context.Context, id *fftypes.UUID, update database.Update) (err error)
- func (s *SQLCommon) UpdateDatatype(ctx context.Context, id *fftypes.UUID, update database.Update) (err error)
- func (s *SQLCommon) UpdateEvent(ctx context.Context, id *fftypes.UUID, update database.Update) (err error)
- func (s *SQLCommon) UpdateGroup(ctx context.Context, hash *fftypes.Bytes32, update database.Update) (err error)
- func (s *SQLCommon) UpdateGroups(ctx context.Context, filter database.Filter, update database.Update) (err error)
- func (s *SQLCommon) UpdateIdentity(ctx context.Context, id *fftypes.UUID, update database.Update) (err error)
- func (s *SQLCommon) UpdateMessage(ctx context.Context, msgid *fftypes.UUID, update database.Update) (err error)
- func (s *SQLCommon) UpdateMessages(ctx context.Context, filter database.Filter, update database.Update) (err error)
- func (s *SQLCommon) UpdateNextPin(ctx context.Context, sequence int64, update database.Update) (err error)
- func (s *SQLCommon) UpdateNonce(ctx context.Context, nonce *core.Nonce) (err error)
- func (s *SQLCommon) UpdateOffset(ctx context.Context, rowID int64, update database.Update) (err error)
- func (s *SQLCommon) UpdateOperation(ctx context.Context, ns string, id *fftypes.UUID, update database.Update) (err error)
- func (s *SQLCommon) UpdatePins(ctx context.Context, filter database.Filter, update database.Update) (err error)
- func (s *SQLCommon) UpdateSubscription(ctx context.Context, namespace, name string, update database.Update) (err error)
- func (s *SQLCommon) UpdateTokenApprovals(ctx context.Context, filter database.Filter, update database.Update) (err error)
- func (s *SQLCommon) UpdateTokenBalances(ctx context.Context, transfer *core.TokenTransfer) (err error)
- func (s *SQLCommon) UpdateTransaction(ctx context.Context, id *fftypes.UUID, update database.Update) (err error)
- func (s *SQLCommon) UpdateVerifier(ctx context.Context, hash *fftypes.Bytes32, update database.Update) (err error)
- func (s *SQLCommon) UpsertBatch(ctx context.Context, batch *core.BatchPersisted) (err error)
- func (s *SQLCommon) UpsertConfigRecord(ctx context.Context, configRecord *fftypes.ConfigRecord, allowExisting bool) (err error)
- func (s *SQLCommon) UpsertContractAPI(ctx context.Context, api *core.ContractAPI) (err error)
- func (s *SQLCommon) UpsertContractListener(ctx context.Context, listener *core.ContractListener) (err error)
- func (s *SQLCommon) UpsertData(ctx context.Context, data *core.Data, optimization database.UpsertOptimization) (err error)
- func (s *SQLCommon) UpsertDatatype(ctx context.Context, datatype *core.Datatype, allowExisting bool) (err error)
- func (s *SQLCommon) UpsertFFI(ctx context.Context, ffi *core.FFI) (err error)
- func (s *SQLCommon) UpsertFFIEvent(ctx context.Context, event *core.FFIEvent) (err error)
- func (s *SQLCommon) UpsertFFIMethod(ctx context.Context, method *core.FFIMethod) (err error)
- func (s *SQLCommon) UpsertGroup(ctx context.Context, group *core.Group, ...) (err error)
- func (s *SQLCommon) UpsertIdentity(ctx context.Context, identity *core.Identity, ...) (err error)
- func (s *SQLCommon) UpsertMessage(ctx context.Context, message *core.Message, ...) (err error)
- func (s *SQLCommon) UpsertNamespace(ctx context.Context, namespace *core.Namespace, allowExisting bool) (err error)
- func (s *SQLCommon) UpsertOffset(ctx context.Context, offset *core.Offset, allowExisting bool) (err error)
- func (s *SQLCommon) UpsertPin(ctx context.Context, pin *core.Pin) (err error)
- func (s *SQLCommon) UpsertSubscription(ctx context.Context, subscription *core.Subscription, allowExisting bool) (err error)
- func (s *SQLCommon) UpsertTokenApproval(ctx context.Context, approval *core.TokenApproval) (err error)
- func (s *SQLCommon) UpsertTokenPool(ctx context.Context, pool *core.TokenPool) (err error)
- func (s *SQLCommon) UpsertTokenTransfer(ctx context.Context, transfer *core.TokenTransfer) (err error)
- func (s *SQLCommon) UpsertVerifier(ctx context.Context, verifier *core.Verifier, ...) (err error)
- type SQLFeatures
Constants ¶
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) DeleteBlob ¶
func (*SQLCommon) DeleteConfigRecord ¶
func (*SQLCommon) DeleteContractListenerByID ¶ added in v0.14.0
func (*SQLCommon) DeleteNamespace ¶
func (*SQLCommon) DeleteNextPin ¶
func (*SQLCommon) DeleteNonce ¶
func (*SQLCommon) DeleteOffset ¶
func (*SQLCommon) DeleteSubscriptionByID ¶
func (*SQLCommon) GetBatchByID ¶
func (*SQLCommon) GetBatchIDsForDataAttachments ¶ added in v1.0.0
func (*SQLCommon) GetBatchIDsForMessages ¶ added in v1.0.0
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 (*SQLCommon) GetBlockchainEventByID ¶ added in v0.12.0
func (*SQLCommon) GetBlockchainEventByProtocolID ¶ added in v1.0.0
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 (*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 (*SQLCommon) GetContractAPIByName ¶ added in v0.12.0
func (*SQLCommon) GetContractAPIs ¶ added in v0.12.0
func (*SQLCommon) GetContractListener ¶ added in v0.14.0
func (*SQLCommon) GetContractListenerByBackendID ¶ added in v1.0.0
func (*SQLCommon) GetContractListenerByID ¶ added in v0.14.0
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) GetDataByID ¶
func (*SQLCommon) GetDataRefs ¶
func (*SQLCommon) GetDatatypeByID ¶
func (*SQLCommon) GetDatatypeByName ¶
func (*SQLCommon) GetDatatypes ¶
func (*SQLCommon) GetEventByID ¶
func (*SQLCommon) GetFFIByID ¶ added in v0.12.0
func (*SQLCommon) GetFFIEvent ¶ added in v0.12.0
func (*SQLCommon) GetFFIEventByID ¶ added in v0.12.0
func (*SQLCommon) GetFFIEvents ¶ added in v0.12.0
func (*SQLCommon) GetFFIMethod ¶ added in v0.12.0
func (*SQLCommon) GetFFIMethods ¶ added in v0.12.0
func (*SQLCommon) GetGroupByHash ¶
func (*SQLCommon) GetIdentities ¶ added in v0.14.0
func (*SQLCommon) GetIdentityByDID ¶ added in v0.14.0
func (*SQLCommon) GetIdentityByID ¶ added in v0.14.0
func (*SQLCommon) GetIdentityByName ¶ added in v0.14.0
func (*SQLCommon) GetMessageByID ¶
func (*SQLCommon) GetMessageIDs ¶ added in v0.14.0
func (*SQLCommon) GetMessages ¶
func (*SQLCommon) GetMessagesForData ¶
func (*SQLCommon) GetNamespace ¶
func (*SQLCommon) GetNamespaceByID ¶ added in v0.14.1
func (*SQLCommon) GetNamespaces ¶
func (*SQLCommon) GetNextPinByContextAndIdentity ¶
func (*SQLCommon) GetNextPinByHash ¶
func (*SQLCommon) GetNextPins ¶
func (*SQLCommon) GetOffsets ¶
func (*SQLCommon) GetOperationByID ¶
func (*SQLCommon) GetOperations ¶
func (*SQLCommon) GetSubscriptionByID ¶
func (*SQLCommon) GetSubscriptionByName ¶
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 (*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 (*SQLCommon) GetTokenApprovalByProtocolID ¶ added in v0.13.1
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 (*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 (*SQLCommon) GetTokenPoolByID ¶
func (*SQLCommon) GetTokenPoolByLocator ¶ added in v1.0.0
func (*SQLCommon) GetTokenPools ¶
func (*SQLCommon) GetTokenTransferByID ¶ added in v1.0.0
func (*SQLCommon) GetTokenTransferByProtocolID ¶ added in v0.11.0
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 (*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 (*SQLCommon) GetVerifierByValue ¶ added in v0.14.0
func (*SQLCommon) GetVerifiers ¶ added in v0.14.0
func (*SQLCommon) InitConfig ¶ added in v1.1.0
func (*SQLCommon) InsertBlob ¶
func (*SQLCommon) InsertBlobs ¶ added in v1.0.0
func (*SQLCommon) InsertBlockchainEvent ¶ added in v0.12.0
func (*SQLCommon) InsertDataArray ¶ added in v0.14.0
func (*SQLCommon) InsertEvent ¶
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 (*SQLCommon) InsertNextPin ¶
func (*SQLCommon) InsertNonce ¶ added in v1.0.0
func (*SQLCommon) InsertOperation ¶ added in v0.11.2
func (*SQLCommon) InsertPins ¶ added in v0.14.0
func (*SQLCommon) InsertTransaction ¶ added in v0.12.0
func (*SQLCommon) ReplaceMessage ¶ added in v0.11.5
In SQL update+bump is a delete+insert within a TX
func (*SQLCommon) ResolveOperation ¶ added in v0.13.0
func (*SQLCommon) RunAsGroup ¶
func (*SQLCommon) UpdateBatch ¶
func (*SQLCommon) UpdateData ¶
func (*SQLCommon) UpdateDatatype ¶
func (*SQLCommon) UpdateEvent ¶
func (*SQLCommon) UpdateGroup ¶
func (*SQLCommon) UpdateGroups ¶
func (*SQLCommon) UpdateIdentity ¶ added in v0.14.0
func (*SQLCommon) UpdateMessage ¶
func (*SQLCommon) UpdateMessages ¶
func (*SQLCommon) UpdateNextPin ¶
func (*SQLCommon) UpdateNonce ¶ added in v1.0.0
func (*SQLCommon) UpdateOffset ¶
func (*SQLCommon) UpdateOperation ¶
func (*SQLCommon) UpdatePins ¶ added in v0.13.0
func (*SQLCommon) UpdateSubscription ¶
func (*SQLCommon) UpdateTokenApprovals ¶ added in v1.0.0
func (*SQLCommon) UpdateTokenBalances ¶ added in v0.11.0
func (*SQLCommon) UpdateTransaction ¶
func (*SQLCommon) UpdateVerifier ¶ added in v0.14.0
func (*SQLCommon) UpsertBatch ¶
func (*SQLCommon) UpsertConfigRecord ¶
func (*SQLCommon) UpsertContractAPI ¶ added in v0.12.0
func (*SQLCommon) UpsertContractListener ¶ added in v0.14.0
func (*SQLCommon) UpsertData ¶
func (*SQLCommon) UpsertDatatype ¶
func (*SQLCommon) UpsertFFIEvent ¶ added in v0.12.0
func (*SQLCommon) UpsertFFIMethod ¶ added in v0.12.0
func (*SQLCommon) UpsertGroup ¶
func (*SQLCommon) UpsertIdentity ¶ added in v0.14.0
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 (*SQLCommon) UpsertOffset ¶
func (*SQLCommon) UpsertSubscription ¶
func (*SQLCommon) UpsertTokenApproval ¶ added in v0.13.1
func (*SQLCommon) UpsertTokenPool ¶
func (*SQLCommon) UpsertTokenTransfer ¶
func (*SQLCommon) UpsertVerifier ¶ added in v0.14.0
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
Source Files ¶
- batch_sql.go
- blob_sql.go
- blockchainevents_sql.go
- chart_sql.go
- config.go
- config_record_sql.go
- contractapis_sql.go
- contractlisteners_sql.go
- data_sql.go
- datatype_sql.go
- event_sql.go
- ffi_events_sql.go
- ffi_methods_sql.go
- ffi_sql.go
- filter_sql.go
- group_sql.go
- identity_sql.go
- message_sql.go
- namespace_sql.go
- nextpin_sql.go
- nonce_sql.go
- offset_sql.go
- operation_sql.go
- pin_sql.go
- provider.go
- sqlcommon.go
- subscription_sql.go
- tokenapproval_sql.go
- tokenbalance_sql.go
- tokenpool_sql.go
- tokentransfer_sql.go
- transaction_sql.go
- verifier_sql.go