Skip to content

Commit

Permalink
remove executeKyselyRawSqlQuery util
Browse files Browse the repository at this point in the history
  • Loading branch information
bbohec committed Jan 31, 2025
1 parent 923173b commit 583b331
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions back/src/config/pg/kysely/kyselyUtils.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import {
CompiledQuery,
Expression,
ExpressionWrapper,
Kysely,
Expand All @@ -8,7 +7,7 @@ import {
Simplify,
sql,
} from "kysely";
import { Pool, QueryResultRow } from "pg";
import { Pool } from "pg";
import { Falsy } from "ramda";
import { createLogger } from "../../../utils/logger";
import { notifyErrorObjectToTeam } from "../../../utils/notifyTeam";
Expand Down Expand Up @@ -36,11 +35,6 @@ type StripNullRecursive<T> = {
export const jsonStripNulls = <T>(
obj: RawBuilder<T>,
): RawBuilder<StripNullRecursive<T>> => sql`json_strip_nulls(${obj})`;
export const executeKyselyRawSqlQuery = <T extends QueryResultRow>(
transaction: KyselyDb,
sqlQuery: string,
values?: any[],
) => transaction.executeQuery<T>(CompiledQuery.raw(sqlQuery, values));

type KyselyOptions = {
skipErrorLog?: boolean;
Expand Down

0 comments on commit 583b331

Please sign in to comment.