agentm / agentm/project-m36

implement deferred constraints

Offen
#310 7 Kommentare 0 Reaktionen 1 zugewiesene Person Beansprucht von @agentm Auf GitHub ansehen
Vorherrschende Sprache
Haskell
Sterne
952
Forks
50
PR-Merge-Kennzahlen
Keine gemergten PRs in 30 T.

Beschreibung

### Discussed in https://github.com/agentm/project-m36/discussions/307

Originally posted by **farzadbekran** October 19, 2021
I was thinking it might be a good idea to have some way to delay constraint checks until `commit`. Here is an example scenario:

Imagine I have RelVar `a` and `b`, now RelVar `b` has an attribute that is foreign key from `a`. Now if I want to make a change to the attributes of `a`, I need to `undefine` `a`, make changes to the attribs and update the tuples accordingly and redefine it. But since `b` depends on `a` existing, this fails as I can't simply `undefine` `a`, which means I have to `undefine` constaints for `b` to be able to change `a`, and if we have a RelVar `c` which depends on `b`, we have a nightmare on our hands! I assume the is no easy way to determine what constraints reference `a`, so that it can be somewhat automated or something.

But if I can disable constraint checks temporarily, I can make my changes to `a` without having to `undefine` constraints for `b` and `c` in the process. Hope this makes sense!

This would come in handy specially if I need to make a quick change in production.

Beitragsleitfaden

Für dieses Repository ist kein Beitragsleitfaden indexiert

Bewertung

Dieses Issue wurde noch nicht bewertet.

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.