Skip to content

Conversation

Wondertan
Copy link
Member

@Wondertan Wondertan commented Jul 30, 2025

Closes #237

func (d *Datastore) NewTransaction(ctx context.Context, readOnly bool) (ds.Txn, error) {
tds, ok := d.child.(ds.TxnDatastore)
if !ok {
return nil, fmt.Errorf("txn not supported")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Prefer errors.New when no formatting. Also want to avoid abbreviations in message.

Suggested change
return nil, fmt.Errorf("txn not supported")
return nil, errors.New("transaction not supported")

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@guillaumemichel guillaumemichel requested a review from lidel August 19, 2025 14:41
@gammazero gammazero merged commit d1138db into ipfs:master Sep 18, 2025
10 checks passed
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.

Add support for TxnFeature for all standard datastore implementations
2 participants