databases

package
v0.2.13 Latest Latest
Warning

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

Go to latest
Published: Nov 25, 2026 License: Apache-2.0 Imports: 30 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package databases executes operations against external PostgreSQL, MySQL and SQLite databases. Execution is adapted from sailry-code 67ae9fa0 sailry-connections.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Execute

func Execute(ctx context.Context, operation Operation) (protocol.DatabaseOutcome, error)

Execute runs the operation until it completes, its query timeout elapses or ctx is cancelled. Every returned error is a *protocol.Fault.

Types

type Browse

type Browse struct {
	Database *string
}

Browse selects a catalog read. A nil Database lists databases; otherwise the tables of the database already selected in the profile connection are listed.

type Operation

type Operation struct {
	Profile  protocol.DatabaseProfile
	Password protocol.Secret
	SSH      *SSH
	Query    *Query
	Browse   *Browse
	Storage  string
}

Operation is one database request. Browse reads the catalog, Query runs one statement, and neither checks the connection. Storage is the Node profile directory that SQLite paths may not enter.

type Query

type Query struct {
	SQL       string
	RowLimit  uint32
	TimeoutMS uint64
}

Query is one SQL statement with its result and time limits.

type SSH

type SSH struct {
	Profile    protocol.SshProfile
	Credential protocol.SshCredential
}

SSH is the saved SSH connection that tunnels a PostgreSQL or MySQL operation.

Jump to

Keyboard shortcuts

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