entryExists() — supabase Function Reference
Architecture documentation for the entryExists() function in Troubleshooting.script.mjs from the supabase codebase.
Entity Profile
Dependency Diagram
graph TD 0ef11190_eedb_5b54_2a24_8b50ce4fb9b0["entryExists()"] 9518e40b_fa13_8f55_5b39_98d14611b96a["syncTroubleshootingEntries()"] 9518e40b_fa13_8f55_5b39_98d14611b96a -->|calls| 0ef11190_eedb_5b54_2a24_8b50ce4fb9b0 73f04d43_e114_e11d_0fbe_d1fb61a6a717["calculateChecksum()"] 0ef11190_eedb_5b54_2a24_8b50ce4fb9b0 -->|calls| 73f04d43_e114_e11d_0fbe_d1fb61a6a717 1a9da56d_2644_9c17_0fab_6733599f480b["supabaseAdmin()"] 0ef11190_eedb_5b54_2a24_8b50ce4fb9b0 -->|calls| 1a9da56d_2644_9c17_0fab_6733599f480b style 0ef11190_eedb_5b54_2a24_8b50ce4fb9b0 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
apps/docs/features/docs/Troubleshooting.script.mjs lines 140–160
async function entryExists(entry) {
const checksum = calculateChecksum(entry.content)
const { error } = await supabaseAdmin()
.from('troubleshooting_entries')
.select('id')
.eq('checksum', checksum)
.single()
if (error) {
if (error.code === 'PGRST116') {
// No entry found
return false
}
throw error
}
console.log(
`[INFO] Entry for ${entry.data.title} already exists. Not creating a new one to prevent duplicates.`
)
return true
}
Domain
Subdomains
Called By
Source
Frequently Asked Questions
What does entryExists() do?
entryExists() is a function in the supabase codebase.
What does entryExists() call?
entryExists() calls 2 function(s): calculateChecksum, supabaseAdmin.
What calls entryExists()?
entryExists() is called by 1 function(s): syncTroubleshootingEntries.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free