hook.io icon indicating copy to clipboard operation
hook.io copied to clipboard

KEYS property for Redis datastore

Open zanona opened this issue 9 years ago • 5 comments

Perhaps there's already a way to achieve this but I have doc keys laid out the following pattern:

username/foo/1
username/foo/2
username/bar/1
username/bar/2

I would like to be able to achieve something where I can retrieve all keys based on wildcards like

username/*
username/foo/*

But apparently this isn't possible with the get command. I then found this on Redis documentation and wondered if there is a way to use this command or an alternative method on hook.io?

http://redis.io/commands/KEYS

Thanks

zanona avatar Apr 15 '16 20:04 zanona

@zanona -

Any API commits you can land in https://github.com/bigcompany/hook.io-datastore will surface in hook.io.

It should be pretty easy to start adding more REDIS commands.

If you open up a Pull Request hook.io-datastore I can review and merge. I have a few other datastore updates I plan to push in the next release.

Marak avatar Apr 15 '16 21:04 Marak

@Marak I've added the new method following https://github.com/NodeRedis/node_redis#clientmulticommands documentation, please let me know if that is satisfactory.

Ps. Also, can I just confirm if all users are 100% sandboxed to their own account datastore and there's no way any other user could gain access to someone else's datastore?

Thanks in advance.

zanona avatar Apr 15 '16 23:04 zanona

Datastore in general should be considered "unsafe" right now.

We have a few tracking issues. I expect we'll have the datastore secure within the next month or so.

Marak avatar Apr 15 '16 23:04 Marak

@zanona - If you have any code for review, please open a Pull Request to hook.io-datastore project.

Thanks!

Marak avatar Apr 16 '16 02:04 Marak

Sorry :) forgot about the PR

zanona avatar Apr 16 '16 09:04 zanona