< Summary

Information
Class: Elsa.Persistence.EFCore.PostgreSql.Helpers.TableNameHelpers
Assembly: Elsa.Persistence.EFCore.PostgreSql
File(s): /home/runner/work/elsa-core/elsa-core/src/modules/Elsa.Persistence.EFCore.PostgreSql/Helpers/TableNameHelpers.cs
Line coverage
0%
Covered lines: 0
Uncovered lines: 4
Coverable lines: 4
Total lines: 19
Line coverage: 0%
Branch coverage
N/A
Covered branches: 0
Total branches: 0
Branch coverage: N/A
Method coverage

Feature is only available for sponsors

Upgrade to PRO version

Metrics

MethodBranch coverage Crap Score Cyclomatic complexity Line coverage
QuoteSchemaQualifiedTableName(...)100%210%
QuoteSchemaQualifiedTableName(...)100%210%

File(s)

/home/runner/work/elsa-core/elsa-core/src/modules/Elsa.Persistence.EFCore.PostgreSql/Helpers/TableNameHelpers.cs

#LineLine coverage
 1using Microsoft.EntityFrameworkCore;
 2using Microsoft.EntityFrameworkCore.Metadata;
 3
 4namespace Elsa.Persistence.EFCore.PostgreSql.Helpers;
 5
 6public static class TableNameHelpers
 7{
 8    public static string QuoteSchemaQualifiedTableName(this IEntityType entityType)
 9    {
 010        var schemaQualifiedTableName = entityType.GetSchemaQualifiedTableName()!;
 011        return QuoteSchemaQualifiedTableName(schemaQualifiedTableName);
 12    }
 13
 14    public static string QuoteSchemaQualifiedTableName(string schemaQualifiedTableName)
 15    {
 016        var parts = schemaQualifiedTableName.Split('.');
 017        return string.Join(".", parts.Select(p => $"\"{p}\""));
 18    }
 19}