sql

package
v1.3.0 Latest Latest
Warning

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

Go to latest
Published: Jan 25, 2024 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Overview

Package sql modifies SQL queries.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FilterString

func FilterString(rules []mss.Rule) string

FilterString returns an SQL WHERE statement that pre-filters rows for this set of rules. Only supports "equal strings" filters.

Rules for:

#foo [type='bar'][level=2] {}
#foo [type='baz'][level=2] {}

will return

"(type IN ('bar', 'baz'))"

Rules for:

#foo [level=2] {}
#foo [type='bar'][level=2] {}

will return an empty string, since any 'type' can match.

func WrapWhere

func WrapWhere(query, where string) string

Types

This section is empty.

Jump to

Keyboard shortcuts

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