Documentation
¶
Overview ¶
Package fingerprint computes stable, semantic SQL fingerprints via libpg_query. The fingerprint is identical across comment/whitespace differences and literal-vs-placeholder differences. libpg_query is cgo-only; the !cgo build is provided by fingerprint_nocgo.go, reports Supported() == false, and returns ErrEmpty from every Fingerprint call.
This file holds the declarations shared by both builds so the two build-tagged implementations cannot drift apart.
Index ¶
Constants ¶
View Source
const SentinelUnparsable = "<unparsable query>"
Variables ¶
View Source
var ErrEmpty = errors.New("fingerprint: empty query text")
Functions ¶
func Fingerprint ¶
Fingerprint parses query and returns its fingerprint, falling back to a quote/paren repair pass and then to the unparsable sentinel hash.
func FingerprintOf ¶
FingerprintOf hashes a known sentinel string deterministically.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.