File tree Expand file tree Collapse file tree 1 file changed +12
-19
lines changed
Orm/Xtensive.Orm/Orm/Providers Expand file tree Collapse file tree 1 file changed +12
-19
lines changed Original file line number Diff line number Diff line change @@ -385,27 +385,20 @@ public string BuildIndexName(TypeInfo type, IndexInfo index)
385385 }
386386
387387 if ( index . IsVirtual ) {
388- var sb = new StringBuilder ( result , result . Length + 12 + type . Name . Length ) ;
389-
390388 var indexAttributes = index . Attributes ;
391- if ( indexAttributes . HasFlag ( IndexAttributes . Filtered ) ) {
392- sb . Append ( ".FILTERED." ) ;
393- }
394- else if ( indexAttributes . HasFlag ( IndexAttributes . Join ) ) {
395- sb . Append ( ".JOIN." ) ;
396- }
397- else if ( indexAttributes . HasFlag ( IndexAttributes . Union ) ) {
398- sb . Append ( ".UNION." ) ;
399- }
400- else if ( indexAttributes . HasFlag ( IndexAttributes . View ) ) {
401- sb . Append ( ".VIEW." ) ;
402- }
403- else if ( indexAttributes . HasFlag ( IndexAttributes . Typed ) ) {
404- sb . Append ( ".TYPED." ) ;
405- }
406389
407- sb . Append ( type . Name ) ;
408- result = sb . ToString ( ) ;
390+ var indexNameBeforeRules = indexAttributes . HasFlag ( IndexAttributes . Filtered )
391+ ? $ "{ result } .FILTERED.{ type . Name } "
392+ : indexAttributes . HasFlag ( IndexAttributes . Join )
393+ ? $ "{ result } .JOIN.{ type . Name } "
394+ : indexAttributes . HasFlag ( IndexAttributes . Union )
395+ ? $ "{ result } .UNION.{ type . Name } "
396+ : indexAttributes . HasFlag ( IndexAttributes . View )
397+ ? $ "{ result } .VIEW.{ type . Name } "
398+ : indexAttributes . HasFlag ( IndexAttributes . Typed )
399+ ? $ "{ result } .TYPED.{ type . Name } "
400+ : $ "{ result } { type . Name } ";
401+ return ApplyNamingRules ( indexNameBeforeRules ) ;
409402 }
410403 return ApplyNamingRules ( result ) ;
411404 }
You can’t perform that action at this time.
0 commit comments