MCPcopy Create free account
hub / github.com/braintrustdata/bash-agent-evals / runQuery

Function runQuery

src/validate-questions.ts:43–49  ·  view source on GitHub ↗
(sql: string)

Source from the content-addressed store, hash-verified

41
42// Helper to run SQL queries safely
43function runQuery(sql: string): any[] {
44 try {
45 return db.prepare(sql).all();
46 } catch (e: any) {
47 return [{ error: e.message }];
48 }
49}
50
51// Get database schema for context
52function getSchema(): string {

Callers 1

validateQuestionFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected