Help us shape the future of Go! Take the 2026 Go Developer Survey

sqlfuncs

package
v0.6.1-alpha01 Latest Latest
Warning

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

Go to latest
Published: Oct 13, 2026 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AWSPolicyEqual

func AWSPolicyEqual(a, b any) (any, error)

AWSPolicyEqual implements aws_policy_equal(a, b): 1 if the two IAM policy documents are equivalent under the retired C normalization rules (see awsPolicyCompare and DIVERGENCES.md), else 0. NULL or unparseable arguments are errors.

func JSONEqual

func JSONEqual(a, b any) (any, error)

JSONEqual implements json_equal(a, b): 1 if the documents are deeply equal, else 0. Objects compare unordered, arrays ordered, numbers as doubles with the epsilon rule (1 == 1.0). NULL or unparseable arguments are errors.

func Regexp

func Regexp(pattern, source any) (any, error)

Regexp implements regexp(pattern, source), the function SQLite invokes for the REGEXP operator: `X REGEXP Y` evaluates regexp(Y, X).

func RegexpLike

func RegexpLike(source, pattern any) (any, error)

RegexpLike implements regexp_like(source, pattern): 1 on match, else 0. NULL source or pattern yields NULL; an invalid pattern is an error.

func RegexpReplace

func RegexpReplace(source, pattern, replacement any) (any, error)

RegexpReplace implements regexp_replace(source, pattern, replacement): replaces every match with replacement taken literally ($1 is not expanded, matching the retired C implementation). Any NULL argument yields NULL.

func RegexpSubstr

func RegexpSubstr(source, pattern any) (any, error)

RegexpSubstr implements regexp_substr(source, pattern): the leftmost match of pattern in source, or NULL if none. NULL source or pattern yields NULL.

func Register

func Register(drv *sqlite.Driver) error

Register registers the StackQL extension functions as deterministic scalar functions on the supplied driver. It is the only driver-facing entry point of this package.

func SplitPart

func SplitPart(source, separator, part any) (any, error)

SplitPart implements split_part(source, separator, part): the one-based part of source split on separator; negative indexes count from the end. NULL source, NULL or empty separator, and out-of-range indexes yield NULL.

Types

This section is empty.

Jump to

Keyboard shortcuts

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