xsql

package
v0.16.0-beta.0 Latest Latest
Warning

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

Go to latest
Published: May 15, 2026 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsNoRows

func IsNoRows(err error) bool

IsNoRows returns true if the supplied error indicates no rows were returned.

func RemapCredentialKeys

func RemapCredentialKeys(data map[string][]byte, mapping map[string]string) map[string][]byte

RemapCredentialKeys returns a copy of data where standard Crossplane connection secret keys ("endpoint", "port", "username", "password") are populated from the custom key names defined in mapping. Entries with empty values are skipped. A nil or empty mapping returns data unchanged.

Types

type DB

type DB interface {
	Exec(ctx context.Context, q Query) error
	ExecTx(cts context.Context, ql []Query) error
	Scan(ctx context.Context, q Query, dest ...interface{}) error
	Query(ctx context.Context, q Query) (*sql.Rows, error)
	GetConnectionDetails(username, password string) managed.ConnectionDetails
	GetServerVersion(ctx context.Context) (int, error)
}

A DB client.

type Query

type Query struct {
	String     string
	Parameters []interface{}
}

A Query that may be run against a DB.

Jump to

Keyboard shortcuts

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