-
Notifications
You must be signed in to change notification settings - Fork 97
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
21 changed files
with
359 additions
and
143 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
import { MirrorType } from '@/app/dto/MirrorsDTO'; | ||
import { GetPeerDBClickhouseMode } from '@/peerdb-env/allowed_targets'; | ||
import { NextRequest } from 'next/server'; | ||
export const dynamic = 'force-dynamic'; | ||
export async function GET(request: NextRequest) { | ||
const cards = [ | ||
{ | ||
title: MirrorType.CDC, | ||
description: | ||
'Change-data Capture or CDC refers to replication of changes on the source table to the target table with initial load. This is recommended.', | ||
link: 'https://docs.peerdb.io/usecases/Real-time%20CDC/overview', | ||
}, | ||
{ | ||
title: MirrorType.QRep, | ||
description: | ||
'Query Replication allows you to specify a set of rows to be synced via a SELECT query. Useful for replicating views and tables without primary keys.', | ||
link: 'https://docs.peerdb.io/usecases/Streaming%20Query%20Replication/overview', | ||
}, | ||
]; | ||
const xminCard = { | ||
title: MirrorType.XMin, | ||
description: | ||
'XMIN mode uses the xmin system column of PostgreSQL as a watermark column for replication.', | ||
link: 'https://docs.peerdb.io/sql/commands/create-mirror#xmin-query-replication', | ||
}; | ||
|
||
const isClickhouseMode = GetPeerDBClickhouseMode(); | ||
if (!isClickhouseMode) { | ||
cards.push(xminCard); | ||
} | ||
return new Response(JSON.stringify(cards)); | ||
} |
Oops, something went wrong.