Skip to content

Commit

Permalink
unique values in tabs
Browse files Browse the repository at this point in the history
  • Loading branch information
jharrell committed Aug 4, 2024
1 parent a4a3913 commit 56ae1d2
Showing 1 changed file with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -255,15 +255,15 @@ With [TypedSQL](/orm/prisma-client/using-raw-sql), you can use PostgreSQL's `to_

<TabbedContent>

<TabItem title="fullTextSearch.sql">
<TabItem value="fullTextSearch.sql">

```sql
SELECT * FROM "Blog" WHERE to_tsvector('english', "Blog"."content") @@ to_tsquery('english', ${term});
```

</TabItem>

<TabItem title="index.ts">
<TabItem value="index.ts">

```ts
const term = `cat`
Expand All @@ -280,15 +280,15 @@ If you want to include a wildcard in your search term, you can do this as follow

<TabbedContent>

<TabItem title="fullTextSearch.sql">
<TabItem value="fullTextSearch.sql">

```sql
SELECT * FROM "Blog" WHERE to_tsvector('english', "Blog"."content") @@ to_tsquery('english', ${term});
```

</TabItem>

<TabItem title="index.ts">
<TabItem value="index.ts">

```ts
//highlight-next-line
Expand All @@ -306,15 +306,15 @@ In MySQL, you can express your search query as follows:

<TabbedContent>

<TabItem title="fullTextSearch.sql">
<TabItem value="fullTextSearch.sql">

```sql
SELECT * FROM Blog WHERE MATCH(content) AGAINST(${term} IN NATURAL LANGUAGE MODE);
```

</TabItem>

<TabItem title="index.ts">
<TabItem value="index.ts">

```ts
const term = `cat`
Expand Down

0 comments on commit 56ae1d2

Please sign in to comment.