#2 Use per-entity ID type

Хаасан
нээсэн 2 жил өмнө by kestrel · 0 саналууд
kestrel санал үлдээсэн 2 жил өмнө

Rather than the current universal query::ID rowid wrapper, ideally we want an entirely separate type so that the compiler can help with accidental cross-table ID use.

The problem with this is mostly the column names of serialized structs (especially newtype structs) are not currently clear, and if there are multiple (e.g. for a struct S (i64, i64)) then it's not clear to the derive macro exactly how many table columns there are.

This may mean that we are limited to newtype structs and tuples, as tuples should be handlable with a .i suffix.

Rather than the current universal `query::ID` rowid wrapper, ideally we want an entirely separate type so that the compiler can help with accidental cross-table ID use. The problem with this is mostly the column names of serialized structs (especially newtype structs) are not currently clear, and if there are multiple (e.g. for a `struct S (i64, i64)`) then it's not clear to the derive macro exactly how many table columns there are. This may mean that we are limited to newtype structs and tuples, as tuples should be handlable with a `.i` suffix.
kestrel энэ асуудлыг 2 жил өмнө коммитоос иш татсан болно
kestrel энэ асуудлыг 2 жил өмнө коммитоос иш татсан болно
Энэ хэлэлцүүлгэнд нэгдэхийн тулт та нэвтэрнэ үү.
Шошгогүй
Үе шат заахгүй
Хариуцагч байхгүй
1 Оролцогчид
Ачааллаж байна ...
Цуцлах
Хадгалах
Харуулах агуулга байхгүй байна.