Skip to content

Commit

Permalink
Add IN to safe string (#86)
Browse files Browse the repository at this point in the history
  • Loading branch information
lucasavila00 authored Dec 4, 2024
1 parent 527e49d commit 9ef533c
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions src/safe-string.ts
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,22 @@ export class SafeString {
divide(other: SafeString | null | number | string): SafeString {
return dsql`(${this} / ${other})`;
}

/**
* @since 2.0.8
*/
in(other: SafeString | null | number | string | SafeString[]): SafeString {
return dsql`(${this} IN (${other}))`;
}

/**
* @since 2.0.8
*/
notIn(
other: SafeString | null | number | string | SafeString[]
): SafeString {
return dsql`(${this} NOT IN (${other}))`;
}
}

/**
Expand Down

0 comments on commit 9ef533c

Please sign in to comment.