-
Notifications
You must be signed in to change notification settings - Fork 1.9k
DOC-2457 - Adds code examples for the string tutorial #2635
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: emb-examples
Are you sure you want to change the base?
Conversation
There was a problem hiding this 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.
await client.flushDb(); | ||
// REMOVE_END | ||
|
||
// STEP_START set |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
// STEP_START set | |
// STEP_START set_get |
assert.equal(res2, 'Deimos'); | ||
// REMOVE_END | ||
|
||
// STEP_START set_nx_xx |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
// STEP_START set_nx_xx | |
// STEP_START setnx_xx |
@@ -0,0 +1,69 @@ | |||
// EXAMPLE: string_tutorial |
There was a problem hiding this comment.
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.
// EXAMPLE: string_tutorial | |
// EXAMPLE: set_tutorial |
// REMOVE_END | ||
|
||
// STEP_START set_nx_xx | ||
// HIDE_START |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove this line.
// REMOVE_START | ||
assert.equal(res7, 1); | ||
assert.equal(res8, 11); | ||
// REMOVE_END |
There was a problem hiding this comment.
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.
|
||
// STEP_START set | ||
const res1 = await client.set("bike:1", "Deimos"); | ||
console.log(res1); // true |
There was a problem hiding this comment.
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
// STEP_START set_nx_xx | ||
// HIDE_START | ||
const res3 = await client.set("bike:1", "bike", 'NX'); | ||
console.log(res3); // None |
There was a problem hiding this comment.
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)
Description
Addresses this ticket:
https://redislabs.atlassian.net/browse/DOC-2457
Checklist
npm test
pass with this change (including linting)?