Skip to content

Commit

Permalink
go fmt, npm format
Browse files Browse the repository at this point in the history
  • Loading branch information
serprex committed Nov 10, 2023
1 parent 834ea32 commit 11f910d
Show file tree
Hide file tree
Showing 7 changed files with 17 additions and 16 deletions.
4 changes: 2 additions & 2 deletions flow/activities/flowable.go
Original file line number Diff line number Diff line change
Expand Up @@ -191,8 +191,8 @@ func (a *FlowableActivity) StartFlow(ctx context.Context,
for _, col := range v.Exclude {
exclude[col] = struct{}{}
}
tblNameMapping[v.SourceTableIdentifier] = model.NameAndExclude {
Name: v.DestinationTableIdentifier,
tblNameMapping[v.SourceTableIdentifier] = model.NameAndExclude{
Name: v.DestinationTableIdentifier,
Exclude: exclude,
}
}
Expand Down
6 changes: 3 additions & 3 deletions flow/connectors/postgres/postgres.go
Original file line number Diff line number Diff line change
Expand Up @@ -782,10 +782,10 @@ func (c *PostgresConnector) SetupReplication(signal *SlotSignal, req *protos.Set
return fmt.Errorf("error checking for replication slot and publication: %w", err)
}

tableNameMapping := make(map[string]model.NameAndExclude);
tableNameMapping := make(map[string]model.NameAndExclude)
for k, v := range req.TableNameMapping {
tableNameMapping[k] = model.NameAndExclude {
Name: v,
tableNameMapping[k] = model.NameAndExclude{
Name: v,
Exclude: make(map[string]struct{}, 0),
}
}
Expand Down
2 changes: 1 addition & 1 deletion flow/model/model.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import (
)

type NameAndExclude struct {
Name string
Name string
Exclude map[string]struct{}
}

Expand Down
6 changes: 3 additions & 3 deletions flow/workflows/setup_flow.go
Original file line number Diff line number Diff line change
Expand Up @@ -201,9 +201,9 @@ func (s *SetupFlowExecution) fetchTableSchemaAndSetupNormalizedTables(
if mapping.SourceTableIdentifier == srcTableName {
if len(mapping.Exclude) != 0 {
tableSchema = &protos.TableSchema{
TableIdentifier: tableSchema.TableIdentifier,
Columns: maps.Clone(tableSchema.Columns),
PrimaryKeyColumns: tableSchema.PrimaryKeyColumns,
TableIdentifier: tableSchema.TableIdentifier,
Columns: maps.Clone(tableSchema.Columns),
PrimaryKeyColumns: tableSchema.PrimaryKeyColumns,
IsReplicaIdentityFull: tableSchema.IsReplicaIdentityFull,
}
for _, exclude := range mapping.Exclude {
Expand Down
2 changes: 1 addition & 1 deletion flow/workflows/snapshot_flow.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@ import (
"github.com/PeerDB-io/peer-flow/shared"
"github.com/google/uuid"
logrus "github.com/sirupsen/logrus"
"golang.org/x/exp/maps"
"go.temporal.io/sdk/log"
"go.temporal.io/sdk/temporal"
"go.temporal.io/sdk/workflow"
"golang.org/x/exp/maps"
)

type SnapshotFlowExecution struct {
Expand Down
11 changes: 6 additions & 5 deletions ui/app/dto/MirrorsDTO.ts
Original file line number Diff line number Diff line change
@@ -1,17 +1,18 @@
import {FlowConnectionConfigs, QRepConfig} from '@/grpc_generated/flow';
import {Dispatch, SetStateAction} from 'react';
import { FlowConnectionConfigs, QRepConfig } from '@/grpc_generated/flow';
import { Dispatch, SetStateAction } from 'react';

export type UCreateMirrorResponse = {
created: boolean;
};

export type UDropMirrorResponse = {
dropped: boolean; errorMessage : string;
dropped: boolean;
errorMessage: string;
};

export type CDCConfig = FlowConnectionConfigs;
export type MirrorConfig = CDCConfig|QRepConfig;
export type MirrorSetter = Dispatch<SetStateAction<CDCConfig|QRepConfig>>;
export type MirrorConfig = CDCConfig | QRepConfig;
export type MirrorSetter = Dispatch<SetStateAction<CDCConfig | QRepConfig>>;
export type TableMapRow = {
source: string;
destination: string;
Expand Down
2 changes: 1 addition & 1 deletion ui/app/mirrors/create/tablemapping.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ const TableMapping = ({
source: `${schemaName}.${tableName}`,
destination: dstName,
partitionKey: '',
exclude: [],
exclude: [],
selected: false,
});
}
Expand Down

0 comments on commit 11f910d

Please sign in to comment.