practicalli / practicalli/clojure
Clojure sets
Open
Nobody has claimed this yet.
- Dominant language
- Makefile
- Stars
- 117
- Forks
- 36
- PR merge metrics
- No merged PRs in 30d
Description
Some aspects of sets are compatible to relational dB SQL apparently
(def users
#{{:user-id 1 :name "john" :age 22 :type "personal"}
{:user-id 2 :name "jake" :age 28 :type "company"}
{:user-id 3 :name "amanda" :age 63 :type "personal"}})
(def accounts
#{{:acc-id 1 :user-id 1 :amount 300.45 :type "saving"}
{:acc-id 2 :user-id 2 :amount 1200.0 :type "saving"}
{:acc-id 3 :user-id 1 :amount 850.1 :type "debit"}})
(require '[clojure.set :as s])
;; Clojure equivalent of the SQL:
;; SELECT users.user-id, accounts.acc-id,
;; users.type as type, accounts.type as atype
;; FROM users
;; INNER JOIN accounts ON users.user-id = accounts.user-id;
(s/project
(s/join users (s/rename accounts {:type :atype}))
[:user-id :acc-id :type :atype])
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
The issue provides a Clojure set example using clojure.set/join, rename, and project, but names no documentation file, entry point, or requested change. First determine where relational set operations are documented and what content is expected; done would require an agreed scope and a documented, reviewed example.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- clojure
- Domain
- documentation
- Issue type
- Documentation
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 20/100