Skip to content

Commit

Permalink
handle nulls in inserts for routesegment shadow table
Browse files Browse the repository at this point in the history
  • Loading branch information
runeanielsen committed Aug 19, 2020
1 parent 55406f7 commit 50ad76c
Showing 1 changed file with 30 additions and 30 deletions.
60 changes: 30 additions & 30 deletions src/OpenFTTH.GDBIntegrator.GeoDatabase/Postgres/Postgis.cs
Original file line number Diff line number Diff line change
Expand Up @@ -750,21 +750,21 @@ INSERT INTO route_network_integrator.route_segment(
applicationInfo = routeSegment.ApplicationInfo,
markAsDeleted = routeSegment.MarkAsDeleted,
deleteMe = routeSegment.DeleteMe,
lifeCycleDeploymentState = routeSegment.LifeCycleInfo.DeploymentState is null ? null : nameof(routeSegment.LifeCycleInfo.DeploymentState),
lifeCycleInstallationDate = routeSegment.LifeCycleInfo.InstallationDate,
lifeCycleRemovalDate = routeSegment.LifeCycleInfo.RemovalDate,
mappingMethod = routeSegment.MappingInfo.Method is null ? null : nameof(routeSegment.MappingInfo.Method),
mappingVerticalAccuracy = routeSegment.MappingInfo.VerticalAccuracy,
mappingHorizontalAccuracy = routeSegment.MappingInfo.HorizontalAccuracy,
mappingSourceInfo = routeSegment.MappingInfo.SourceInfo,
mappingSurveyDate = routeSegment.MappingInfo.SurveyDate,
safetyClassification = routeSegment.SafetyInfo.Classification,
safetyRemark = routeSegment.SafetyInfo.Remark,
routeSegmentKind = routeSegment.RouteSegmentInfo is null ? null : nameof(routeSegment.RouteSegmentInfo.Kind),
routeSegmentHeight = routeSegment.RouteSegmentInfo.Height,
routeSegmentWidth = routeSegment.RouteSegmentInfo.Width,
namingName = routeSegment.NamingInfo.Name,
namingDescription = routeSegment.NamingInfo.Description
lifeCycleDeploymentState = routeSegment.LifeCycleInfo?.DeploymentState?.ToString("g"),
lifeCycleInstallationDate = routeSegment.LifeCycleInfo?.InstallationDate,
lifeCycleRemovalDate = routeSegment.LifeCycleInfo?.RemovalDate,
mappingMethod = routeSegment.MappingInfo?.Method?.ToString("g"),
mappingVerticalAccuracy = routeSegment.MappingInfo?.VerticalAccuracy,
mappingHorizontalAccuracy = routeSegment.MappingInfo?.HorizontalAccuracy,
mappingSourceInfo = routeSegment.MappingInfo?.SourceInfo,
mappingSurveyDate = routeSegment.MappingInfo?.SurveyDate,
safetyClassification = routeSegment.SafetyInfo?.Classification,
safetyRemark = routeSegment.SafetyInfo?.Remark,
routeSegmentKind = routeSegment?.RouteSegmentInfo?.Kind?.ToString("g"),
routeSegmentHeight = routeSegment.RouteSegmentInfo?.Height,
routeSegmentWidth = routeSegment.RouteSegmentInfo?.Width,
namingName = routeSegment.NamingInfo?.Name,
namingDescription = routeSegment.NamingInfo?.Description
};

await connection.OpenAsync();
Expand Down Expand Up @@ -811,21 +811,21 @@ UPDATE route_network_integrator.route_segment
applicationInfo = routeSegment.ApplicationInfo,
markAsDeleted = routeSegment.MarkAsDeleted,
deleteMe = routeSegment.DeleteMe,
lifeCycleDeploymentState = routeSegment.LifeCycleInfo.DeploymentState is null ? null : nameof(routeSegment.LifeCycleInfo.DeploymentState),
lifeCycleInstallationDate = routeSegment.LifeCycleInfo.InstallationDate,
lifeCycleRemovalDate = routeSegment.LifeCycleInfo.RemovalDate,
mappingMethod = routeSegment.MappingInfo.Method is null ? null : nameof(routeSegment.MappingInfo.Method),
mappingVerticalAccuracy = routeSegment.MappingInfo.VerticalAccuracy,
mappingHorizontalAccuracy = routeSegment.MappingInfo.HorizontalAccuracy,
mappingSourceInfo = routeSegment.MappingInfo.SourceInfo,
mappingSurveyDate = routeSegment.MappingInfo.SurveyDate,
safetyClassification = routeSegment.SafetyInfo.Classification,
safetyRemark = routeSegment.SafetyInfo.Remark,
routeSegmentKind = routeSegment.RouteSegmentInfo is null ? null : nameof(routeSegment.RouteSegmentInfo.Kind),
routeSegmentHeight = routeSegment.RouteSegmentInfo.Height,
routeSegmentWidth = routeSegment.RouteSegmentInfo.Width,
namingName = routeSegment.NamingInfo.Name,
namingDescription = routeSegment.NamingInfo.Description
lifeCycleDeploymentState = routeSegment.LifeCycleInfo?.DeploymentState?.ToString("g"),
lifeCycleInstallationDate = routeSegment.LifeCycleInfo?.InstallationDate,
lifeCycleRemovalDate = routeSegment.LifeCycleInfo?.RemovalDate,
mappingMethod = routeSegment.MappingInfo?.Method?.ToString("g"),
mappingVerticalAccuracy = routeSegment.MappingInfo?.VerticalAccuracy,
mappingHorizontalAccuracy = routeSegment.MappingInfo?.HorizontalAccuracy,
mappingSourceInfo = routeSegment.MappingInfo?.SourceInfo,
mappingSurveyDate = routeSegment.MappingInfo?.SurveyDate,
safetyClassification = routeSegment.SafetyInfo?.Classification,
safetyRemark = routeSegment.SafetyInfo?.Remark,
routeSegmentKind = routeSegment?.RouteSegmentInfo?.Kind?.ToString("g"),
routeSegmentHeight = routeSegment.RouteSegmentInfo?.Height,
routeSegmentWidth = routeSegment.RouteSegmentInfo?.Width,
namingName = routeSegment.NamingInfo?.Name,
namingDescription = routeSegment.NamingInfo?.Description
};

await connection.OpenAsync();
Expand Down

0 comments on commit 50ad76c

Please sign in to comment.