Does `ctx db normalizeId` query the DB

Does ctx.db.normalizeId query the DB to verify the ID exists?
3 Replies
sshader
sshader2y ago
It does not (and does not guarantee that a document with that ID exists) https://docs.convex.dev/api/interfaces/server.DatabaseReader#normalizeid
sshader
sshader2y ago
It just ensures that the returned string has the right format of an ID belonging to the table (same with v.id("myTable") -- does not actually guarantee that a document with the ID exists)
Mikael Lirbank
Mikael LirbankOP2y ago
Gotcha! Thanks a lot!

Did you find this page helpful?