Skip to content

DOC-2457 - Adds code examples for the string tutorial#2635

Closed
justincastilla wants to merge 4 commits intoredis:emb-examplesfrom
justincastilla:DOC-2457
Closed

DOC-2457 - Adds code examples for the string tutorial#2635
justincastilla wants to merge 4 commits intoredis:emb-examplesfrom
justincastilla:DOC-2457

Conversation

@justincastilla
Copy link
Copy Markdown

Description

Addresses this ticket:
https://redislabs.atlassian.net/browse/DOC-2457

Describe your pull request here


Checklist

  • Does npm test pass with this change (including linting)?
  • Is the new or changed code fully tested?
  • Is a documentation update included (if this change modifies existing APIs, or introduces new ones)?

Copy link
Copy Markdown

@dwdougherty dwdougherty left a comment

Choose a reason for hiding this comment

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

Collection name is incorrect. Two step names need correction. Superfluous HIDE_START.

Comment thread doctests/dt-string.js
await client.flushDb();
// REMOVE_END

// STEP_START set
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Suggested change
// STEP_START set
// STEP_START set_get

Comment thread doctests/dt-string.js
assert.equal(res2, 'Deimos');
// REMOVE_END

// STEP_START set_nx_xx
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Suggested change
// STEP_START set_nx_xx
// STEP_START setnx_xx

Comment thread doctests/dt-string.js
@@ -0,0 +1,69 @@
// EXAMPLE: string_tutorial
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Needs to match what's in the CLI example.

Suggested change
// EXAMPLE: string_tutorial
// EXAMPLE: set_tutorial

Comment thread doctests/dt-string.js
// REMOVE_END

// STEP_START set_nx_xx
// HIDE_START
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Remove this line.

Comment thread doctests/dt-string.js
// REMOVE_START
assert.equal(res7, 1);
assert.equal(res8, 11);
// REMOVE_END
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Move line 67 to end.

Comment thread doctests/dt-string.js

// STEP_START set
const res1 = await client.set("bike:1", "Deimos");
console.log(res1); // true
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.

in v5, return OK, not true

Comment thread doctests/dt-string.js
// STEP_START set_nx_xx
// HIDE_START
const res3 = await client.set("bike:1", "bike", 'NX');
console.log(res3); // None
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.

Unsure what None means here (checking that its OK below)

@github-actions
Copy link
Copy Markdown

This pull request has been automatically marked as stale due to inactivity.
It will be closed in 30 days if no further activity occurs.

@github-actions github-actions Bot added the stale label Dec 26, 2025
@github-actions
Copy link
Copy Markdown

This pull request has been automatically closed due to inactivity.
If you would like to continue this work, please reopen the PR or create a new one.

@github-actions github-actions Bot closed this Jan 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants