Skip to content

Conversation

nihohit
Copy link
Contributor

@nihohit nihohit commented Feb 5, 2024

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
Copy link
Collaborator

@Yury-Fridlyand Yury-Fridlyand left a comment

Choose a reason for hiding this comment

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

linter failed

@@ -77,21 +77,26 @@ import { redis_request } from "./ProtobufMessage";
* await client.exec(transaction);
* [OK , "value"]
*/
export class BaseTransaction {
export class BaseTransaction<T extends BaseTransaction<T>> {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Please update example above

@@ -866,6 +881,6 @@ export class Transaction extends BaseTransaction {
* Specific response types are documented alongside each method.
*
*/
export class ClusterTransaction extends BaseTransaction {
export class ClusterTransaction extends BaseTransaction<ClusterTransaction> {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Example here as well?

Copy link
Contributor

@acarbonetto acarbonetto left a comment

Choose a reason for hiding this comment

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

lgtm

Copy link
Collaborator

@barshaul barshaul left a comment

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
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