feat(ksuid): add Equal and IsZero for ApplyInterfacePtr

StringKSUID and BinaryKSUID now implement ApplyInterface with nil-nil
equality semantics, enabling ApplyInterfacePtr in patch logic. Adds nil
sentinel vars and tests.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-06-29 18:24:07 -07:00
parent 0f8e79a890
commit cc44931ea9
6 changed files with 69 additions and 3 deletions
+4 -3
View File
@@ -23,9 +23,10 @@
// # Identifier types
//
// [StringKSUID] and [BinaryKSUID] wrap segmentio/ksuid with storage-specific
// SQL encoding. Both share identical GraphQL string scalar transit. Choose StringKSUID
// for text columns (VARCHAR, TEXT); choose BinaryKSUID for binary columns
// (BINARY(20), BYTEA).
// SQL encoding. Both implement [ApplyInterface] via Equal and IsZero for use
// with [ApplyInterfacePtr]. Both share identical GraphQL string scalar transit.
// Choose StringKSUID for text columns (VARCHAR, TEXT); choose BinaryKSUID for
// binary columns (BINARY(20), BYTEA).
//
// [JSONB] provides map-based JSON column scanning for Postgres JSONB and MySQL JSON.
//