indexcheck

package
v1.57.0 Latest Latest
Warning

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

Go to latest
Published: Oct 20, 2026 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func WrapWithIndexCheckingDatastoreProxyIfApplicable

func WrapWithIndexCheckingDatastoreProxyIfApplicable(ds datastore.Datastore) datastore.Datastore

WrapWithIndexCheckingDatastoreProxyIfApplicable wraps the provided datastore with an index-checking proxy if the datastore is an SQLDatastore.

Delegation stays on the datastore as given. Only the Explainable is taken from the unwrapped SQLDatastore, because that is all index checking needs.

Delegating to the unwrapped datastore instead would silently discard every proxy wrapped around it - in particular NewSeparatingContextDatastoreProxy, which the SQL datastores apply to themselves. That proxy severs cancellation on reads so that a caller going away cannot kill an in-flight query; pgx reacts to a cancelled context by setting an immediate deadline on the connection. Without it, the dispatcher cancelling losing subproblems - thousands of times in a run - churns pooled connections, and a read can come back with "timeout: read tcp ...: i/o timeout" having nothing to do with the query that reported it.

Types

This section is empty.

Jump to

Keyboard shortcuts

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