1
0
mirror of https://github.com/redis/node-redis.git synced 2025-07-31 05:44:24 +03:00

34 Commits

Author SHA1 Message Date
2c9ad2e772 chore(examples): fix examples for v5 (#2938) 2025-05-05 11:35:41 +03:00
b2d35c5286 V5 bringing RESP3, Sentinel and TypeMapping to node-redis
RESP3 Support
   - Some commands responses in RESP3 aren't stable yet and therefore return an "untyped" ReplyUnion.
 
Sentinel

TypeMapping

Correctly types Multi commands

Note: some API changes to be further documented in v4-to-v5.md
2024-10-15 17:46:52 +03:00
01ca54e907 fix #1970 - add support for RESTORE (#2535)
* - Added RESTORE functionality

* add FIRST_KEY_INDEX, fix tests, clean example, add example to examples table

* use returnBuffers in test

---------

Co-authored-by: Leibale Eidelman <me@leibale.com>
2023-09-18 19:45:33 -04:00
abf2b4bc82 update examples/README.md - add search-knn to the table 2023-01-18 14:36:57 -05:00
fa47b572d4 Adds example for mixing arbitrary and supported commands in a transaction context. (#2315)
* Adds example for transactions with arbitrary commands.

* Formatting.

* Update transaction-with-arbitrary-commands.js

Co-authored-by: Leibale Eidelman <me@leibale.com>
2023-01-18 12:59:04 -05:00
da3face951 Add connection status check example and documentation. (#2340)
* Adds example for transactions with arbitrary commands.

* Formatting.

* Adds isReady doc and example for isReady and isOpen.

* Improved example.

* Added isOpen explanation.

* Removed example from a different PR.
2022-12-13 15:19:45 -05:00
64e982d2bf Adds transaction with watched key example script. (#2297)
* transction example improved

* readme fixed

* delay added for watched key changes

* pooling error fixed on recursion

* Minor comment update.

Co-authored-by: Ajay <ajay.markana@yudiz.com>
Co-authored-by: Simon Prickett <simon@redis.com>

Closes #2280.
2022-10-19 17:50:57 +01:00
1eed12ec65 Connecting to cluster example (#2298)
* Connecting to cluster example

* Connecting to cluster example

* Making changes according to review

* Adding example to Readme.md in alphabetical order

* Fixed order of scripts so they are alphabetic.

Co-authored-by: Simon Prickett <simon@redis.com>

Closes #2281.
2022-10-19 13:02:07 +01:00
d0bfa771a8 #2287 Add example scripts showing pub/sub usage. (#2288)
* #2287 Add example scripts showing pub/sub usage.
https://github.com/redis/node-redis/issues/2287

* #2287 Add example scripts showing pub/sub usage.
Fixing comments requested
Adding client.connect() to pubsub-subscriber.js
Reformatting Readme
updating logging in pubsub-publisher.js

* #2287 Add example scripts showing pub/sub usage.
Fix publish and subscriber
Update tidy up comments

* Update examples/pubsub-subscriber.js

Making suggested changes

Co-authored-by: Simon Prickett <simon@crudworks.org>

Co-authored-by: Simon Prickett <simon@crudworks.org>

Closes #2287.
2022-10-14 23:07:28 +01:00
9398e5d05e #2285-Add-example-scripts-hyperloglog - Added hyperloglog examples to… (#2289)
* #2285-Add-example-scripts-hyperloglog - Added hyperloglog examples to address Issue #2285

* #2285-Add-example-scripts-hyperloglog - Added the results as comments

* #2285-Add-example-scripts-hyperloglog - Changes from review

* #2285-Add-example-scripts-hyperloglog - Changes from review
2022-10-14 20:34:06 +01:00
f3462abf33 Updates examples. (#2219)
* Updates examples.

* Added command link for hset.
2022-08-15 08:39:28 -04:00
88586048e1 Fixes the time command response. (#2008)
* Fixes the time command response.

* Adds TIME example.

* Update TIME.ts

* Update get-server-time.js

Co-authored-by: Leibale Eidelman <leibale1998@gmail.com>
2022-03-07 07:20:19 -05:00
ac7d50c731 Added sorted set example. (#2005)
* Added sorted set example.

* Update sorted-set.js

Co-authored-by: Leibale Eidelman <leibale1998@gmail.com>
2022-02-24 18:04:06 -05:00
41f6b009d3 Add streams XREADGROUP and XACK example. (#1832)
* Removed stream delete command to allow consumer group example to work.

* Adds stream consumer group example.

* Adds stream consumer group example code.

* Update README.md

Co-authored-by: Leibale Eidelman <leibale1998@gmail.com>
2022-01-19 13:36:24 -05:00
d602682b64 Adding a RedisTimeSeries example (#1839)
* Adds the start of a timeseries example.

* Exports required TimeSeries items.

* Fixed import.

* Added TS.INFO example output.

* Fixed typo.

* Fixed typo.

* Exported aggregation enum.

* Working time series example.

Co-authored-by: Leibale Eidelman <leibale1998@gmail.com>
2022-01-19 13:35:18 -05:00
b68836c59f Adds Cuckoo Filter example. (#1843)
Co-authored-by: Leibale Eidelman <leibale1998@gmail.com>
2022-01-19 13:32:20 -05:00
86c239e7e9 Adds a basic count-min sketch example for RedisBloom. (#1842) 2022-01-19 13:30:41 -05:00
06cb63756c Adds Bloom Filter example using RedisBloom. (#1835)
* Adds Bloom Filter example using RedisBloom.

* Update bloom-filter.js

Co-authored-by: Leibale Eidelman <leibale1998@gmail.com>
2022-01-15 11:47:47 -05:00
e4601b6960 Adds topk example for RedisBloom (#1837)
* Adds topk example.

* Update topk.js

Co-authored-by: Leibale Eidelman <leibale1998@gmail.com>
2022-01-15 11:44:53 -05:00
309cdbdd7c Add stream examples. (#1830)
* Adds stream consumer and producer scripts to doc.

* Updated build command example.

* Adds stream producer example.

* Adds basic stream consumer example.

* Added isolated execution.

* Update README.md

* Update stream-consumer.js

Co-authored-by: Leibale Eidelman <leibale1998@gmail.com>
2022-01-13 11:57:03 -05:00
99b261b79c Renamed JSON search example. 2021-11-24 19:40:20 +00:00
055af50890 Adds RedisJSON example. 2021-11-24 19:32:37 +00:00
13714e69ba Adds RediSearch demo. 2021-11-23 21:39:05 +00:00
3ad8a227eb update examples 2021-11-09 18:24:01 -05:00
ab339d396a fix #1714 - update README(s) 2021-11-09 18:07:26 -05:00
3eb99dbe83 use dockers for tests, use npm workspaces, add rejson & redisearch modules, fix some bugs 2021-11-08 19:21:15 -05:00
d409120e5b Issue # 1697 FIX - creates an example script that shows how to use the SSCAN iterator (#1699)
* #1697 fix for set scan example

* adds the js file

* adds comment

* Minor layout and comment adjustment.

Co-authored-by: srawat2 <shashank19aug>
Co-authored-by: Simon Prickett <simon@redislabs.com>

Closes #1697.
2021-10-27 21:54:12 +01:00
fdffa2383f Add command-with-modifiers.js example (#1695)
* Adds TypeScript note and corrects a typo.

* Adds command-with-modifiers example. (redis#1688)

* Adds command-with-modifiers example. (redis#1688)

* Adds command-with-modifiers example. (redis#1688)

* Removed callbacks.

Co-authored-by: Simon Prickett <simon@redislabs.com>

Closes #1688.
2021-10-27 00:22:19 +01:00
9c3c42f113 Add(examples): Create an example for blPop & lPush (#1696)
* Add(examples): Create an example for blPop & lPush

Signed-off-by: Aditya Rastogi <adit.rastogi2014@gmail.com>

* Update(examples): fix case, add timeout, update readme

Signed-off-by: Aditya Rastogi <adit.rastogi2014@gmail.com>

Closes #1693.
2021-10-25 23:43:47 +01:00
9a4ac34f18 Add lua-multi-incr.js example (#1692)
Also fix syntax error in the lua example in the README

Closes #1689.
2021-10-25 23:31:19 +01:00
55391557ca Made examples use local version. 2021-10-25 22:53:22 +01:00
dec504851e Adds TypeScript note and corrects a typo. 2021-10-21 21:48:29 +01:00
46aad787eb Updated examples to use named functions. (#1687)
* Updated examples to user named functions.

* Update README.md

Co-authored-by: Leibale Eidelman <leibale1998@gmail.com>
2021-10-19 16:13:35 -04:00
a5eb16595f Adds examples table of contents and contribution guidelines. (#1686) 2021-10-19 09:33:00 -04:00