sqlcommon

package
v0.9.0-rc.1 Latest Latest
Warning

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

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

Documentation

Overview

Package sqlcommon holds the small pieces the SQL drivers share: reading the args option, and the min_rows and expect checks. Each driver keeps its own wire protocol.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Check

func Check(driver string, minRows, rowCount int, expect string, rows [][]any) error

Check applies min_rows (against rowCount, which counts every row) and expect (a substring of the text of any kept cell).

func ErrNoSQL

func ErrNoSQL(driver string) error

ErrNoSQL is the error for a call that was given no SQL text.

func ParseArgs

func ParseArgs(driver, raw string) ([]any, error)

ParseArgs reads the args option, a JSON array. A whole number becomes an int64, so it is not rounded through a float. Any other number becomes a float64. A nested object or array becomes its JSON text, which a JSON column accepts. Errors start with the driver's name.

Types

This section is empty.

Jump to

Keyboard shortcuts

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