Treat all NULL values differently in UNIQUE indexes

SQL standard can be interpreted differently:
either NULL values are all unique (SQLite, PostgreSQL, ... and now Genji)
or they are considered equal (SQL Server, ...).
This commit is contained in:
Asdine El Hrychy
2021-12-13 09:32:22 +05:30
parent 1da209b2ac
commit 2d4df658e4
7 changed files with 87 additions and 38 deletions

View File

@@ -134,7 +134,7 @@ func testDocumentGetByField(t *testing.T, codecBuilder func() encoding.Codec) {
assert.NoError(t, err)
require.Equal(t, types.NewTextValue("john"), v)
v, err = d.GetByField("d")
_, err = d.GetByField("d")
assert.ErrorIs(t, err, document.ErrFieldNotFound)
}