In the wallet I use a transaction gets a "number of confirmations" and is indicated as "low" (red), "medium"(yellow), or "high"(green) confidence based on that number.
I have access to db-sync and can examine all sorts of information about transactions, but am not seeing how "number of confirmations" is derived..?