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

loresoft / SchemaSaurus / 25437854443

06 May 2026 01:13PM UTC coverage: 87.024% (-0.09%) from 87.11%
25437854443

push

github

pwelter34
Replace SchemaQualifiedName with QualifiedName

1076 of 1424 branches covered (75.56%)

Branch coverage included in aggregate %.

71 of 95 new or added lines in 34 files covered. (74.74%)

5691 of 6352 relevant lines covered (89.59%)

223.1 hits per line

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

0.0
/src/SchemaSaurus.Metadata/ScalarFunction.cs
1
using System.Diagnostics;
2

3
using SchemaSaurus.Metadata.Converters;
4

5
namespace SchemaSaurus.Metadata;
6

7
/// <summary>
8
/// Represents a scalar-valued user-defined function in the database.
9
/// </summary>
10
/// <remarks>
11
/// A scalar function accepts zero or more <see cref="Parameters"/> and returns a single
12
/// value described by <see cref="ReturnType"/>. For functions that return a result set,
13
/// see <see cref="TableValuedFunction"/>.
14
/// </remarks>
15
[Equatable]
16
[DebuggerDisplay("{QualifiedName}")]
17
public sealed partial class ScalarFunction : IAnnotatable, IQualifiedName
18
{
19
    /// <summary>
20
    /// Schema-qualified name that uniquely identifies this function within the database.
21
    /// </summary>
22
    [JsonPropertyName("qualifiedName")]
23
    public required SchemaQualifiedName QualifiedName { get; init; }
24

25
    /// <summary>
26
    /// Gets the unqualified name component of the object.
27
    /// </summary>
28
    [JsonIgnore]
29
    [IgnoreEquality]
NEW
30
    public string Name => QualifiedName.Name;
×
31

32
    /// <summary>
33
    /// Gets the schema component of the qualified name, if available.
34
    /// </summary>
35
    [JsonIgnore]
36
    [IgnoreEquality]
NEW
37
    public string? Schema => QualifiedName.Schema;
×
38

39

40
    /// <summary>
41
    /// <see cref="TypeMapping"/> describing the scalar value returned by the function,
42
    /// including its native type name, <see cref="TypeMapping.DbType"/>, and CLR mapping.
43
    /// </summary>
44
    [JsonPropertyName("returnType")]
45
    public required TypeMapping ReturnType { get; init; }
46

47
    /// <summary>
48
    /// Ordered list of parameters, sorted by <see cref="Parameter.Ordinal"/>.
49
    /// Defaults to an empty collection for parameterless functions.
50
    /// </summary>
51
    [SequenceEquality]
52
    [JsonPropertyName("parameters")]
53
    public IReadOnlyList<Parameter> Parameters { get; init; } = [];
54

55
    /// <summary>
56
    /// Indicates whether this function is deterministic — it always returns the same
57
    /// result given the same inputs, with no observable side effects.
58
    /// Defaults to <see langword="false"/>.
59
    /// </summary>
60
    [JsonPropertyName("isDeterministic")]
61
    public bool IsDeterministic { get; init; }
62

63
    /// <summary>
64
    /// SQL definition of the function.
65
    /// <see langword="null"/> when the caller lacks the necessary permissions to read
66
    /// the definition or when the provider does not expose it.
67
    /// </summary>
68
    [JsonPropertyName("definition")]
69
    public string? Definition { get; init; }
70

71
    /// <summary>
72
    /// Human-readable description or comment for the function.
73
    /// <see langword="null"/> when no description has been set.
74
    /// </summary>
75
    [JsonPropertyName("description")]
76
    public string? Description { get; init; }
77

78
    /// <inheritdoc />
79
    [DictionaryEquality]
80
    [JsonPropertyName("annotations")]
81
    [JsonConverter(typeof(ReadOnlyDictionaryConverter<string, object?>))]
82
    public IReadOnlyDictionary<string, object?> Annotations { get; init; } = new Dictionary<string, object?>();
83
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE TRIAL · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc