MCPcopy Create free account
hub / github.com/VGabriel45/SolidityVisualizer / testDatabaseConnection

Function testDatabaseConnection

src/app/_actions/cache.ts:8–19  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

6import { sql } from "drizzle-orm";
7
8export async function testDatabaseConnection() {
9 'use server';
10 try {
11 console.log('SERVER: Testing database connection...');
12 const result = await db.execute(sql`SELECT 1 as test`);
13 console.log('SERVER: Database connection successful:', result);
14 return true;
15 } catch (error) {
16 console.error('SERVER: Database connection failed:', error);
17 return false;
18 }
19}
20
21export async function getCachedDiagram(username: string, repo: string) {
22 'use server';

Callers 2

cache.tsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected