util

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Dec 20, 2025 License: AGPL-3.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ExtractFirstNumeric

func ExtractFirstNumeric(result *models.QueryResult) (float64, error)

ExtractFirstNumeric extracts a numeric value from the first column of the first row in a query result. It supports both value and pointer types for all numeric types. If the query returns no rows (e.g., no matching data for an aggregate query), it returns 0 instead of an error since this typically means "zero matches".

Types

This section is empty.

Jump to

Keyboard shortcuts

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