sqlutil

package
v0.0.5 Latest Latest
Warning

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

Go to latest
Published: Mar 8, 2026 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func InClauseArgs

func InClauseArgs(items []string) (placeholders string, args []any)

InClauseArgs returns a comma-separated list of "?" placeholders and the corresponding args slice.

If items is empty, it returns "NULL" and no args, so `IN (NULL)` matches nothing.

func ScanRows

func ScanRows[T any](rows *sql.Rows, scan func(*sql.Rows) (T, error)) ([]T, error)

ScanRows scans all rows into a slice using the provided scanner.

Types

This section is empty.

Jump to

Keyboard shortcuts

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