SeaQL / SeaQL/sea-orm

Allow using BTreeSet, HashSet as `Value`

Open
#2,804 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Rust
Stars
9.9k
Forks
734
Avg merge
6h 36m
Merged PRs (30d)
8

Description

Motivation

Using PgFunc::any() requires a Vec. Since it requires an Into<SimpleExpr>, which is provided for Into<Value>.

However, having a BTreeSet or HashSet isn't supported.

Proposed Solutions

An easy way should be to implement From<BTreeSet<T>> (and HashSet) similar to the Vec<T> implementation.

More ideal would be to have this for IntoIterator<Item=T>. But I'm not sure this is feasible.

Additional Information

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by tracing PgFunc::any and the Into/Into implementations, then compare the existing Vec conversion. Done means BTreeSet and HashSet can be used as Value inputs in the same relevant expression path, with tests covering both collection types.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
databases
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.