1
0
mirror of https://github.com/Radarr/Radarr.git synced 2024-11-20 01:42:35 +01:00

Sync coding style with upstream for join methods

Towards #10637
This commit is contained in:
Bogdan 2024-11-04 13:01:40 +02:00
parent ca724836ce
commit 40d95a04e3

View File

@ -57,25 +57,22 @@ public static SqlBuilder OrWhere<TModel>(this SqlBuilder builder, Expression<Fun
public static SqlBuilder Join<TLeft, TRight>(this SqlBuilder builder, Expression<Func<TLeft, TRight, bool>> filter)
{
var wb = GetWhereBuilder(builder.DatabaseType, filter, false, builder.Sequence);
var rightTable = TableMapping.Mapper.TableNameMapping(typeof(TRight));
return builder.Join($"\"{rightTable}\" ON {wb.ToString()}");
return builder.Join($"\"{rightTable}\" ON {wb}");
}
public static SqlBuilder LeftJoin<TLeft, TRight>(this SqlBuilder builder, Expression<Func<TLeft, TRight, bool>> filter)
{
var wb = GetWhereBuilder(builder.DatabaseType, filter, false, builder.Sequence);
var rightTable = TableMapping.Mapper.TableNameMapping(typeof(TRight));
return builder.LeftJoin($"\"{rightTable}\" ON {wb.ToString()}");
return builder.LeftJoin($"\"{rightTable}\" ON {wb}");
}
public static SqlBuilder InnerJoin<TLeft, TRight>(this SqlBuilder builder, Expression<Func<TLeft, TRight, bool>> filter)
{
var wb = GetWhereBuilder(builder.DatabaseType, filter, false, builder.Sequence);
var rightTable = TableMapping.Mapper.TableNameMapping(typeof(TRight));
return builder.InnerJoin($"\"{rightTable}\" ON {wb}");