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, and its bundled C does not link with the TDM-GCC toolchain used for Windows container builds, so the stub in fingerprint_nocgo.go covers both the !cgo cross-compile and all Windows builds: it 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 ¶
const SentinelUnparsable = "<unparsable query>"
Variables ¶
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.