refactor: sql-tools (#19717)

This commit is contained in:
Jason Rasmussen
2025-07-03 10:59:17 -04:00
committed by GitHub
parent 484529e61e
commit 6044663e26
160 changed files with 1120 additions and 1186 deletions

View File

@@ -0,0 +1,8 @@
import { QueryResult, sql } from 'kysely';
import { DatabaseReader } from 'src/sql-tools/types';
export const readName: DatabaseReader = async (schema, db) => {
const result = (await sql`SELECT current_database() as name`.execute(db)) as QueryResult<{ name: string }>;
schema.databaseName = result.rows[0].name;
};