Skip to content

Does Project:M36 support upserts? #336

Answered by agentm
boogerlad asked this question in Q&A
Discussion options

You must be logged in to vote

No, currently Project:M36 does not support this. However, inserting a tuple into a relation which is already present in the tuple is not an error since it's merely a reassertion of the same truth. This behavior is different from SQL.

TutorialD (master/main): x:=relation{tuple{a 0}}
TutorialD (master/main): :showexpr x
┌──────────┐
│a::Integer│
├──────────┤
│0         │
└──────────┘
TutorialD (master/main): insert x (relation{tuple{a 0}})
TutorialD (master/main): :showexpr x
┌──────────┐
│a::Integer│
├──────────┤
│0         │
└──────────┘

Replies: 1 comment 5 replies

Comment options

You must be logged in to vote
5 replies
@boogerlad
Comment options

@agentm
Comment options

@boogerlad
Comment options

@agentm
Comment options

@boogerlad
Comment options

Answer selected by boogerlad
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants