Giter VIP home page Giter VIP logo

Comments (4)

tamizhvendan avatar tamizhvendan commented on June 13, 2024 4

Thanks @sparkofreason, for reporting this issue.

I can reproduce it with the below schema

image
CREATE TABLE account (
   acc_num INTEGER,
   acc_type INTEGER,
   acc_descr CHAR(20),
   PRIMARY KEY (acc_num, acc_type));

CREATE TABLE sub_account (
   sub_acc INTEGER PRIMARY KEY,
   ref_num INTEGER NOT NULL,
   ref_type INTEGER NOT NULL,
   sub_descr CHAR(20),
   FOREIGN KEY (ref_num, ref_type) REFERENCES account);

Currently, it generates four relationship attributes

:account/ref-num-sub-accounts
:account/ref-type-sub-accounts

:sub-account/account-by-ref-num
:sub-account/account-by-ref-type

Post this fix (which I will address in a week's time), It will have two extra relationship attributes

:account/sub-accounts

:sub-account/account

Which will join based on the composite foreign key.

from honeyeql.

tamizhvendan avatar tamizhvendan commented on June 13, 2024 1

@sparkofreason I did some initial analysis today. It is a bit more complicated than I initially thought. If I am not wrong, it will take at least half a day of work. So, it won't be possible for me to work on it this week. Let me try my best to find some time to wrap this up!

from honeyeql.

tamizhvendan avatar tamizhvendan commented on June 13, 2024 1

Hi @sparkofreason,

It took way more than I expected, and thankfully, I used the holidays effectively to bring it to closure.

Here we go: https://cljdoc.org/d/com.github.tamizhvendan/honeyeql/1.0.2/doc/attributes#composite-primary-and-foreign-keys

Sample Queries: https://github.com/tamizhvendan/honeyeql/blob/1.0.2/test/suite.edn#L698-L723

Let me know your feedback with the latest version :)

from honeyeql.

sparkofreason avatar sparkofreason commented on June 13, 2024

Awesome! Thank you, I will take a look.

from honeyeql.

Related Issues (7)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.