Skip to content

Implement has() and hasMany() #111

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

Merged
merged 2 commits into from
Apr 12, 2025
Merged

Implement has() and hasMany() #111

merged 2 commits into from
Apr 12, 2025

Conversation

vweevers
Copy link
Member

@vweevers vweevers commented Dec 29, 2024

Adds support of two methods:

await db.put('love', 'u')
await db.has('love') // true
await db.hasMany(['love', 'hate']) // [true, false]

Ref: Level/community#142

@vweevers vweevers added enhancement New feature or request semver-minor New features that are backward compatible labels Dec 29, 2024
@vweevers vweevers force-pushed the has branch 2 times, most recently from e3a328c to 081a741 Compare January 26, 2025 22:44
@vweevers
Copy link
Member Author

vweevers commented Jan 26, 2025

Optimized it by using an iterator instead of many Get() calls, and a bitset instead of many napi_set_element calls.

@vweevers vweevers marked this pull request as ready for review January 26, 2025 22:46
@vweevers vweevers added the free-of-ai No generative AI was used for this issue or pull request label Apr 12, 2025
Adds support of two methods:

```js
await db.put('love', 'u')
await db.has('love') // true
await db.hasMany(['love', 'hate']) // [true, false]
```

Ref: Level/community#142
Category: addition
@vweevers vweevers merged commit 6aeb739 into main Apr 12, 2025
24 checks passed
@vweevers vweevers deleted the has branch April 12, 2025 16:51
@github-project-automation github-project-automation bot moved this from Review to Done in Level Apr 12, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request free-of-ai No generative AI was used for this issue or pull request semver-minor New features that are backward compatible
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

1 participant