agentm / agentm/project-m36

implement deferred constraints

オープン
#310 コメント 7 件 リアクション 0 件 担当者 1 名 @agentm が担当を希望しています GitHub で見る
主要言語
Haskell
スター
952
フォーク
50
PR マージ指標
30日以内にマージされた PR はありません

説明

### 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.

コントリビューションガイド

このリポジトリのコントリビューションガイドは索引されていません

評価

この issue はまだ評価されていません。

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。