mirror of
https://github.com/immich-app/immich.git
synced 2026-04-19 17:08:48 -04:00
9 lines
299 B
TypeScript
9 lines
299 B
TypeScript
import { QueryResult, sql } from 'kysely';
|
|
import { Reader } from 'src/sql-tools/types';
|
|
|
|
export const readName: Reader = async (ctx, db) => {
|
|
const result = (await sql`SELECT current_database() as name`.execute(db)) as QueryResult<{ name: string }>;
|
|
|
|
ctx.databaseName = result.rows[0].name;
|
|
};
|