You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm experiencing an issue with PRIMARY KEY and INSERT. I'm not sure if it's a bug or I'm just missing something. (I'm new to AlaSQL. :))
I'm using the sample code for IndexedDB with a slight modification to set city field as a primary key, and I'm doing two separate INSERTs, trying to re-insert one of the records.
My expectation would be that the second INSERT would be rejected with a "duplicate key" error, however, AlaSQL (v1.7.3) actually inserts the same city twice, regardless of the PRIMARY KEY constraint and the duplicate value.
I tried it with LocalStorage too, got the same result.
Hey,
I'm experiencing an issue with PRIMARY KEY and INSERT. I'm not sure if it's a bug or I'm just missing something. (I'm new to AlaSQL. :))
I'm using the sample code for IndexedDB with a slight modification to set
city
field as a primary key, and I'm doing two separate INSERTs, trying to re-insert one of the records.My expectation would be that the second INSERT would be rejected with a "duplicate key" error, however, AlaSQL (v1.7.3) actually inserts the same city twice, regardless of the PRIMARY KEY constraint and the duplicate value.
I tried it with LocalStorage too, got the same result.
Sample code provided below and on JSFiddle.
Thank you for taking the time to look into this!
The text was updated successfully, but these errors were encountered: