Skip to content

Commit

Permalink
Also expect sql`` in plain sql functions
Browse files Browse the repository at this point in the history
  • Loading branch information
ChiriVulpes committed Dec 26, 2024
1 parent cb4fd24 commit afc7d87
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/statements/function/CreateOrReplaceFunction.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@ export default class CreateOrReplaceFunction<HAS_CODE extends boolean = false, I
return this as never;
}

public sql (sql: string): CreateOrReplaceFunction<true, IN, OUT, RETURN> {
this.code = sql;
public sql (sql: Sql): CreateOrReplaceFunction<true, IN, OUT, RETURN> {
this.code = sql["asRawSql"];
this.lang = "SQL";
// eslint-disable-next-line @typescript-eslint/no-unsafe-return
return this as any;
Expand Down

0 comments on commit afc7d87

Please sign in to comment.