alliasgher opened a new pull request, #899:
URL: https://github.com/apache/iceberg-go/pull/899

   Fixes #714.
   
   Adds `Table.NewTransactionOnBranch(branch string)` so callers can commit
   to a named branch. The existing `NewTransaction()` becomes a convenience
   wrapper for `NewTransactionOnBranch(MainBranch)`.
   
   The branch name flows through `Transaction.branch` into
   `snapshotProducer`, replacing the two hardcoded `"main"` strings in
   `NewSetSnapshotRefUpdate` and `AssertRefSnapshotID`.
   
   ```go
   // Commit to a feature branch
   txn := tbl.NewTransactionOnBranch("my-feature-branch")
   if err := txn.Append(ctx, reader, nil); err != nil { ... }
   if _, err := txn.Commit(ctx); err != nil { ... }
   ```


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to