tonsky / tonsky/datascript

Transacting a refid not corresponding with any datom eids should fail?

Open
#189 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Clojure
Stars
5.8k
Forks
318
PR merge metrics
No merged PRs in 30d

Description

The following transaction fails in Datomic, but not DataScript:

[[:db/add (d/tempid :db.part/user -1) :some.ref/attr (d/tempid :db.part/user -2)]]

This means a little bit of extra work automatically syncing Datomic and Datascript, at least if you want to try to catch and handle quirks like this.

There are obviously plenty of other points where DataScript is intentionally different from Datomic, and if this isn't something you want to move towards parity on, I'm fine with that. But perhaps we should have a more comprehensive list of subtle behavior differences like this on the wiki? This could start off with what's at the bottom of the README, but try to encompass a broader range of subtler differences, such as #166, #187, etc. I'm happy to start this if you like.

Contributor guide

No contributing guide indexed for this repository

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

Review the transaction example alongside the README's documented Datomic differences and the related issues #166 and #187. Reproduce the differing behavior, then determine whether the intended result is Datomic parity or a broader wiki comparison; done should be either a tested behavior change or a comprehensive, maintained differences list.

Written by the indexing model from the issue text.

Assessment

Tech stack
clojure
Domain
databases
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.