Skip to content

Conversation

@vishesh
Copy link
Contributor

@vishesh vishesh commented Oct 22, 2025

No description provided.

@jzhou77 jzhou77 merged commit 32b7192 into FoundationDB:main Oct 23, 2025
1 check passed
1amageek added a commit to 1amageek/fdb-swift-bindings that referenced this pull request Nov 8, 2025
1. Use TupleTypeCode enum in switch statements for type safety
   Convert raw UInt8 type code to TupleTypeCode enum before switching.
   This provides compile-time safety and makes the code more maintainable.

2. Rename encode/decode to pack/unpack for cross-language consistency
   All official FoundationDB bindings use pack/unpack terminology:
   - Python: tuple.pack() / tuple.unpack()
   - Java: Tuple.pack() / Tuple.fromBytes()
   - Go: Tuple.Pack() / Tuple.Unpack()

   Using pack/unpack:
   - Matches established FDB terminology ("tuple packing")
   - Avoids confusion with Swift's Codable encode/decode
   - Improves searchability and documentation consistency

   API changes:
   - Tuple.encode() → Tuple.pack()
   - Tuple.decode(from:) → Tuple.unpack(from:)
   - Subspace methods already used pack/unpack (no change)

Addresses: glbrntt review comment FoundationDB#9, MMcM review comment FoundationDB#2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants