Skip to content

Commit

Permalink
tweak to the logic for deriving the suffix name of a partition
Browse files Browse the repository at this point in the history
  • Loading branch information
jeremydmiller committed Sep 15, 2024
1 parent 0ce69bf commit 6b77a91
Showing 1 changed file with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,13 @@ public static string FormatSqlValue<T>(this T value)
/// <returns></returns>
public static string GetSuffixName(this DbObjectName identifier, string tableName)
{
return tableName.TrimStart(identifier.Name.ToCharArray()).TrimStart('_');
var suffix = tableName;
if (tableName.StartsWith(identifier.Name))
{
suffix = suffix.Substring(identifier.Name.Length);
}

return suffix.TrimStart('_');
}

internal static string GetStringWithinParantheses(this string raw)
Expand Down

0 comments on commit 6b77a91

Please sign in to comment.