Skip to content

Commit adf7730

Browse files
fix: remove redundant param for SqlMapper delegate
1 parent 75bef38 commit adf7730

5 files changed

Lines changed: 6 additions & 6 deletions

File tree

Drivers/ColumnMapping.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ public record DbTypeInfo(int? Length = null, string? NpgsqlTypeOverride = null);
1010

1111
public delegate string ConvertFunc(string el);
1212

13-
public delegate string SqlMapperImplFunc(bool isDotnetCore, string? dbType);
13+
public delegate string SqlMapperImplFunc(bool isDotnetCore);
1414

1515
public class ColumnMapping(
1616
Dictionary<string, DbTypeInfo> dbTypes,

Drivers/DbDriver.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,7 @@ private MemberDeclarationSyntax[] GetSqlMapperMemberDeclarations()
187187
{
188188
return [.. ColumnMappings
189189
.Where(m => TypeExistsInQueries(m.Key) && m.Value.SqlMapperImpl is not null)
190-
.Select(m => ParseMemberDeclaration(m.Value.SqlMapperImpl!(Options.DotnetFramework.IsDotnetCore(), null))!)];
190+
.Select(m => ParseMemberDeclaration(m.Value.SqlMapperImpl!(Options.DotnetFramework.IsDotnetCore()))!)];
191191
}
192192

193193
public abstract string TransformQueryText(Query query);

Drivers/MySqlConnectorDriver.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@ public sealed partial class MySqlConnectorDriver(
156156

157157
public override string TransactionClassName => "MySqlTransaction";
158158

159-
private static readonly SqlMapperImplFunc JsonElementTypeHandler = (_, _) => $$"""
159+
private static readonly SqlMapperImplFunc JsonElementTypeHandler = _ => $$"""
160160
private class JsonElementTypeHandler : SqlMapper.TypeHandler<JsonElement>
161161
{
162162
public override JsonElement Parse(object value)

Drivers/NpgsqlDriver.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -344,7 +344,7 @@ public NpgsqlDriver(
344344

345345
public override string TransactionClassName => "NpgsqlTransaction";
346346

347-
private static readonly SqlMapperImplFunc JsonElementTypeHandler = (_, _) => $$"""
347+
private static readonly SqlMapperImplFunc JsonElementTypeHandler = _ => $$"""
348348
private class JsonElementTypeHandler : SqlMapper.TypeHandler<JsonElement>
349349
{
350350
public override JsonElement Parse(object value)
@@ -361,7 +361,7 @@ public override void SetValue(IDbDataParameter parameter, JsonElement value)
361361
}
362362
""";
363363

364-
private static readonly SqlMapperImplFunc XmlDocumentTypeHandler = (isDotnetCore, _) => $$"""
364+
private static readonly SqlMapperImplFunc XmlDocumentTypeHandler = isDotnetCore => $$"""
365365
private class XmlDocumentTypeHandler : SqlMapper.TypeHandler<XmlDocument>
366366
{
367367
public override XmlDocument Parse(object value)

Drivers/SqliteDriver.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ public sealed partial class SqliteDriver(
9595
)
9696
};
9797

98-
private static readonly SqlMapperImplFunc DateTimeTypeHandler = (_, dbType) => $$"""
98+
private static readonly SqlMapperImplFunc DateTimeTypeHandler = _ => $$"""
9999
private class DateTimeTypeHandler : SqlMapper.TypeHandler<DateTime>
100100
{
101101
public override DateTime Parse(object value)

0 commit comments

Comments
 (0)