Skip to content

Node: Allow chaining function calls on transaction. - #902

Merged
shachlanAmazon merged 2 commits into
valkey-io:mainfrom
nihohit:builder-transaction
Feb 6, 2024
Merged

shachlanAmazon merged 2 commits into
valkey-io:mainfrom
nihohit:builder-transaction

Conversation

@nihohit

@nihohit nihohit commented Feb 5, 2024

Copy link
Copy Markdown
Contributor

This allows a builder-like pattern of calls, which is a bit more readable.

Issue #, if available:

Description of changes:

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

This allows a builder-like pattern of calls, which is a bit more readable.
@nihohit
nihohit requested a review from a team as a code owner February 5, 2024 18:49

@Yury-Fridlyand Yury-Fridlyand left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

linter failed

Comment thread node/src/Transaction.ts
* [OK , "value"]
*/
export class BaseTransaction {
export class BaseTransaction<T extends BaseTransaction<T>> {

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Please update example above

Comment thread node/src/Transaction.ts
*
*/
export class ClusterTransaction extends BaseTransaction {
export class ClusterTransaction extends BaseTransaction<ClusterTransaction> {

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Example here as well?

@acarbonetto acarbonetto left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

lgtm

@barshaul barshaul left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Nice

@shachlanAmazon
shachlanAmazon merged commit 86487cd into valkey-io:main Feb 6, 2024
@nihohit
nihohit deleted the builder-transaction branch February 7, 2024 17:36
affonsov pushed a commit that referenced this pull request Aug 21, 2026
* Node: Allow chaining function calls on transaction.

This allows a builder-like pattern of calls, which is a bit more readable.

* fixes
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.

5 participants