< Summary

Information
Class: Elsa.Diagnostics.StructuredLogs.Persistence.Sqlite.Services.SqliteStructuredLogConnectionFactory
Assembly: Elsa.Diagnostics.StructuredLogs.Persistence.Sqlite
File(s): /home/runner/work/elsa-core/elsa-core/src/modules/Elsa.Diagnostics.StructuredLogs.Persistence.Sqlite/Services/SqliteStructuredLogConnectionFactory.cs
Line coverage
100%
Covered lines: 5
Uncovered lines: 0
Coverable lines: 5
Total lines: 17
Line coverage: 100%
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
.ctor(...)100%11100%
OpenConnectionAsync()100%11100%

File(s)

/home/runner/work/elsa-core/elsa-core/src/modules/Elsa.Diagnostics.StructuredLogs.Persistence.Sqlite/Services/SqliteStructuredLogConnectionFactory.cs

#LineLine coverage
 1using System.Data.Common;
 2using Elsa.Diagnostics.StructuredLogs.Persistence.Relational.Contracts;
 3using Elsa.Diagnostics.StructuredLogs.Persistence.Sqlite.Options;
 4using Microsoft.Data.Sqlite;
 5using Microsoft.Extensions.Options;
 6
 7namespace Elsa.Diagnostics.StructuredLogs.Persistence.Sqlite.Services;
 8
 199public class SqliteStructuredLogConnectionFactory(IOptions<SqliteStructuredLogOptions> options) : IRelationalStructuredL
 10{
 11    public async ValueTask<DbConnection> OpenConnectionAsync(CancellationToken cancellationToken = default)
 12    {
 3813        var connection = new SqliteConnection(options.Value.ConnectionString);
 3814        await connection.OpenAsync(cancellationToken);
 3815        return connection;
 3816    }
 17}