|
import metakit
db = metakit.storage()
table = db.getas("test[foo]").ordered()
idx = table.append({"foo":"B"})
assert table[idx].foo == "B"
idx = table.append({"foo":"A"})
# this fails...
assert table[idx].foo == "A"
Basically for ordered tables, the idx returned from an append is not
correct. I assume that this is because the table is re-ordered after
the idx is generated for the return value. |