Liking cljdoc? Tell your friends :D

pgmalli.impl.pghash

PostgreSQL's hash functions (src/common/hashfn.c, Bob Jenkins' lookup3, little-endian) as the extended, seeded, 64-bit variants hash partitioning uses, and the routing of a row to a hash partition (satisfies_hash_partition). Values hash as the database hashes them: integers through hashint8extended (which agrees with hashint4 and hashint2 for the values they share), text through its bytes (a deterministic collation), booleans and dates as 32-bit integers, timestamps as microseconds since 2000, uuids as their 16 bytes.

PostgreSQL's hash functions (src/common/hashfn.c, Bob Jenkins' lookup3, little-endian) as
the extended, seeded, 64-bit variants hash partitioning uses, and the routing of a row to a
hash partition (satisfies_hash_partition). Values hash as the database hashes them:
integers through hashint8extended (which agrees with hashint4 and hashint2 for the values
they share), text through its bytes (a deterministic collation), booleans and dates as
32-bit integers, timestamps as microseconds since 2000, uuids as their 16 bytes.
raw docstring

combine64clj

(combine64 a b)

hash_combine64.

hash_combine64.
sourceraw docstring

hash-bytes-extendedclj

(hash-bytes-extended k seed)

hash_bytes_extended: a 64-bit hash of bytes with a seed.

hash_bytes_extended: a 64-bit hash of bytes with a seed.
sourceraw docstring

hash-int8-extendedclj

(hash-int8-extended v seed)

hashint8extended: the high half folded into the low, so an int4 and an int8 of the same value hash alike.

hashint8extended: the high half folded into the low, so an int4 and an int8 of the same
value hash alike.
sourceraw docstring

hash-uint32-extendedclj

(hash-uint32-extended k seed)

hash_bytes_uint32_extended: a 64-bit hash of one 32-bit value with a seed.

hash_bytes_uint32_extended: a 64-bit hash of one 32-bit value with a seed.
sourceraw docstring

hash-valueclj

(hash-value v)

The database's hash of a partition key value with the partition seed, or nil for a value pgmalli cannot hash like the database (a numeric, an enum, an interval).

The database's hash of a partition key value with the partition seed, or nil for a value
pgmalli cannot hash like the database (a numeric, an enum, an interval).
sourceraw docstring

partition-seedclj

source

satisfies-hash-partition?clj

(satisfies-hash-partition? modulus remainder vs)

Whether a row whose partition key values are vs lands in the partition of the given modulus and remainder: the database's satisfies_hash_partition. nil when a value cannot be hashed like the database.

Whether a row whose partition key values are vs lands in the partition of the given modulus
and remainder: the database's satisfies_hash_partition. nil when a value cannot be hashed
like the database.
sourceraw docstring

cljdoc builds & hosts documentation for Clojure/Script libraries

Keyboard shortcuts
Ctrl+kJump to recent docs
Move to previous article
Move to next article
Ctrl+/Jump to the search field
× close