Skip to content
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

Iterator on MongoDb Adapter with GridFS fails #1087

Closed
tatejones opened this issue Jul 16, 2024 · 1 comment
Closed

Iterator on MongoDb Adapter with GridFS fails #1087

tatejones opened this issue Jul 16, 2024 · 1 comment
Labels

Comments

@tatejones
Copy link
Contributor

tatejones commented Jul 16, 2024

Describe the bug
When GridFS is enabled and the iterator is called it fails.
Needs to handle the filter on filename and not the key.

How To Reproduce (best to provide workable code or tests!)

test.it.only('iterator with namespace using GridFS', async t => {
	const store = new KeyvMongo({namespace: 'key1', useGridFS: true, ...options});
	await store.set('key1:foo', 'bar');
	await store.set('key1:foo2', 'bar2');
	const iterator = store.iterator('key1');
	let entry = await iterator.next();
	// @ts-expect-error - test iterator
	t.expect(entry.value[0]).toBe('key1:foo');
});
@tatejones
Copy link
Contributor Author

Pull requested for the fix.

jaredwray pushed a commit that referenced this issue Jul 17, 2024
* #1084 Implement disconnect for mongodb adapter for a graceful shutdown.

* #1087 Support iterator on MongoDb adatper with GridFS enabled.

* Handle namespace not found on MongoDB adapter with GridFS

---------

Signed-off-by: tatejones <tate@bluedog.com.au>
Co-authored-by: Tate Jones <tate.jones@health.qld.gov.au>
jaredwray added a commit that referenced this issue Jul 18, 2024
…nabled) (#1089)

* #1084 Implement disconnect for mongodb adapter for a graceful shutdown.

* #1087 Support iterator on MongoDb adatper with GridFS enabled.

* Handle namespace not found on MongoDB adapter with GridFS

---------

Signed-off-by: tatejones <tate@bluedog.com.au>
Co-authored-by: Tate Jones <tate.jones@health.qld.gov.au>
Co-authored-by: Jared Wray <me@jaredwray.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants