8000 Able to pass in string for prefix by nichoth · Pull Request #102 · dominictarr/level-sublevel · GitHub
[go: up one dir, main page]

Skip to content
This repository was archived by the owner on Dec 6, 2018. It is now read-only.

Able to pass in string for prefix - #102

Closed
nichoth wants to merge 1 commit into
dominictarr:masterfrom
nichoth:prefix
Closed

nichoth wants to merge 1 commit into
dominictarr:masterfrom
nichoth:prefix

Conversation

@nichoth
@nichoth nichoth commented Dec 22, 2015
Copy link
Copy Markdown
Contributor

This way we can use batch operations with multilevel / RPC since we don't have to pass in a sublevel instance.

@dominictarr
8000
Copy link
Copy Markdown
Owner

can you add tests? something like this needs test coverage, otherwise I might refactor it away if there are no tests to catch the change.

@dominictarr
Copy link
Copy Markdown
Owner

Actually, I don't think you need this change. just call put(key, value, {prefix: ['sublevel']}, cb)
the prefix should be an array of strings, not a string.

@nichoth
nichoth commented Dec 28, 2015
Copy link
Copy Markdown
Contributor Author

I see what you mean. It will work as is if you pass in an array. I spent a while figuring this out, maybe we should document this interface in the readme?

@dominictarr
Copy link
Copy Markdown
Owner

@nichoth yes, that is exactly what we should do.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

0