Skip to content

Commit

Permalink
removed local rowsAffected so it now uses the one from BaseSqlWriter …
Browse files Browse the repository at this point in the history
…and handling of empty values for processInputRow
  • Loading branch information
MatthiasSort committed Jun 26, 2024
1 parent 95b429a commit d406b8c
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 12 deletions.
4 changes: 2 additions & 2 deletions src/Dynamicweb.DataIntegration.Providers.UserProvider.csproj
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<Version>10.5.0</Version>
<Version>10.6.0</Version>
<AssemblyVersion>1.0.0.0</AssemblyVersion>
<Title>User Provider</Title>
<Description>User Provider</Description>
Expand All @@ -23,7 +23,7 @@
<SymbolPackageFormat>snupkg</SymbolPackageFormat>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Dynamicweb.DataIntegration" Version="10.5.0" />
<PackageReference Include="Dynamicweb.DataIntegration" Version="10.6.2" />
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.1.1" PrivateAssets="All" />
</ItemGroup>
</Project>
8 changes: 0 additions & 8 deletions src/UserDestinationWriter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -64,14 +64,6 @@ internal class UserDestinationWriter : BaseSqlWriter
private List<int> MappingsWithUpdateUsersByCustomerNumberMode = new List<int>();
private TableCollection _schemaTables = null;

/// <summary>
/// Return rows affected
/// </summary>
internal int RowsAffected
{
get; private set;
}

public UserDestinationWriter(Job job, SqlConnection connection,
bool removeMissingUsers, bool generateUserPasswords, bool encryptUserPasswords, bool removeMissingGroups, bool UseEmailForUsername,
string userKeyField, string mailSubject, string senderEmail, string emailTemplate, bool allowEmail, string destinationGroup, bool deleteOnlyFromGroupsThatAreImportedTo, ILogger logger,
Expand Down
7 changes: 5 additions & 2 deletions src/UserProvider.cs
Original file line number Diff line number Diff line change
Expand Up @@ -255,6 +255,7 @@ public UserProvider()
UserKeyField = "Auto";
DiscardDuplicates = false;
}

public override Schema GetOriginalSourceSchema()
{
List<string> tablestToKeep = new() { "AccessUser", "AccessUserAddress", "AccessUserSecondaryRelation" };
Expand Down Expand Up @@ -706,8 +707,10 @@ public override bool RunJob(Job job)
while (!reader.IsDone())
{
sourceRow = reader.GetNext();
ProcessInputRow(mapping, sourceRow);
Writer.Write(sourceRow, mapping, discardDuplicates);
if (ProcessInputRow(sourceRow, mapping))
{
Writer.Write(sourceRow, mapping, discardDuplicates);
}
}
}
}
Expand Down

0 comments on commit d406b8c

Please sign in to comment.