Function pg_query::fingerprint
source · pub fn fingerprint(statement: &str) -> Result<Fingerprint>
Expand description
Fingerprints the given SQL statement. Useful for comparing parse trees across different implementations
of libpg_query
.
Example
let result = pg_query::fingerprint("SELECT * FROM contacts WHERE name='Paul'");
assert!(result.is_ok());
let result = result.unwrap();
assert_eq!(result.hex, "0e2581a461ece536");