• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

Giorgi / DuckDB.NET / 11718008911

07 Nov 2024 06:48AM UTC coverage: 89.937% (+0.09%) from 89.848%
11718008911

push

github

Giorgi
Merge branch 'develop'

1063 of 1216 branches covered (87.42%)

Branch coverage included in aggregate %.

256 of 275 new or added lines in 15 files covered. (93.09%)

1 existing line in 1 file now uncovered.

2083 of 2282 relevant lines covered (91.28%)

833852.27 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

86.67
/DuckDB.NET.Data/DuckDBParameter.cs
1
using System.ComponentModel;
2
using System.Data;
3
using System.Data.Common;
4
using System.Diagnostics.CodeAnalysis;
5
using DuckDB.NET.Data.Internal;
6

7
namespace DuckDB.NET.Data;
8

9
public class DuckDBParameter : DbParameter
10
{
11
    private const DbType DefaultDbType = DbType.String;
12

13
    private object? value;
14

15
    public override DbType DbType { get; set; }
807✔
16

NEW
17
    public DuckDBDbType DuckDBType { get; set; }
×
18

19
#if NET6_0_OR_GREATER
20
    [AllowNull]
21
#endif
22
    [DefaultValue("")]
23
    public override string ParameterName { get; set; }
2,043✔
24

25
    public override object? Value
26
    {
27
        get => value;
1,398✔
28
        set
29
        {
30
            if (this.value != value)
75✔
31
            {
32
                this.value = value;
75✔
33
                DbType = DuckDBTypeMap.GetDbTypeForValue(value);
75✔
34
            }
35
        }
75✔
36
    }
37

38
    public override ParameterDirection Direction { get; set; }
69✔
UNCOV
39
    public override bool IsNullable { get; set; }
×
40

41
#if NET6_0_OR_GREATER
42
    [AllowNull]
43
#endif
44
    [DefaultValue("")]
45
    public override string SourceColumn { get; set; }
672✔
46
    public override bool SourceColumnNullMapping { get; set; }
×
47
    public override int Size { get; set; }
30✔
48

49
    public DuckDBParameter()
50
        : this (string.Empty, DefaultDbType, null)
78✔
51
    { }
78✔
52

53
    public DuckDBParameter(object value) 
54
        : this(string.Empty, DuckDBTypeMap.GetDbTypeForValue(value), value)
462✔
55
    {
56
    }
462✔
57

58
    public DuckDBParameter(DbType type, object? value) 
59
        : this(string.Empty, type, value)
6✔
60
    {
61
    }
6✔
62

63
    public DuckDBParameter(string name, object? value) 
64
        : this(name, DuckDBTypeMap.GetDbTypeForValue(value), value)
126✔
65
    {
66
    }
126✔
67

68
    public DuckDBParameter(string name, DbType type, object? value)
672✔
69
    {
70
        DbType = type;
672✔
71
        ParameterName = name;
672✔
72
        this.value = value;
672✔
73
        SourceColumn = string.Empty;
672✔
74
    }
672✔
75

NEW
76
    public override void ResetDbType() => DbType = DefaultDbType;
×
77
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc