MCPcopy
hub / github.com/PeerDB-io/peerdb / CreateQRepWorkflowConfig

Function CreateQRepWorkflowConfig

flow/e2e/test_utils.go:471–504  ·  view source on GitHub ↗
(
	t *testing.T,
	flowJobName string,
	sourceTable string,
	dstTable string,
	query string,
	dest string,
	stagingPath string,
	setupDst bool,
	syncedAtCol string,
	isDeletedCol string,
)

Source from the content-addressed store, hash-verified

469}
470
471func CreateQRepWorkflowConfig(
472 t *testing.T,
473 flowJobName string,
474 sourceTable string,
475 dstTable string,
476 query string,
477 dest string,
478 stagingPath string,
479 setupDst bool,
480 syncedAtCol string,
481 isDeletedCol string,
482) *protos.QRepConfig {
483 t.Helper()
484
485 return &protos.QRepConfig{
486 FlowJobName: flowJobName,
487 WatermarkTable: sourceTable,
488 DestinationTableIdentifier: dstTable,
489 SourceName: GeneratePostgresPeer(t).Name,
490 DestinationName: dest,
491 Query: query,
492 WatermarkColumn: "updated_at",
493 StagingPath: stagingPath,
494 WriteMode: &protos.QRepWriteMode{
495 WriteType: protos.QRepWriteType_QREP_WRITE_MODE_APPEND,
496 },
497 NumRowsPerPartition: 1000,
498 InitialCopyOnly: true,
499 SyncedAtColName: syncedAtCol,
500 SetupWatermarkTableOnDestination: setupDst,
501 SoftDeleteColName: isDeletedCol,
502 Version: shared.InternalVersion_Latest,
503 }
504}
505
506func RunQRepFlowWorkflow(t *testing.T, tc client.Client, config *protos.QRepConfig) WorkflowRun {
507 t.Helper()

Callers 15

Test_Overwrite_PGMethod · 0.85
Test_No_Rows_QRep_PGMethod · 0.85
TestQRepPauseMethod · 0.85
TestXminPauseMethod · 0.85
TestTransformMethod · 0.85
TestQRepMethod · 0.85
TestDropQRepMethod · 0.85

Calls 1

GeneratePostgresPeerFunction · 0.85

Tested by 15

Test_Overwrite_PGMethod · 0.68
Test_No_Rows_QRep_PGMethod · 0.68
TestQRepPauseMethod · 0.68
TestXminPauseMethod · 0.68
TestTransformMethod · 0.68
TestQRepMethod · 0.68
TestDropQRepMethod · 0.68