File tree Expand file tree Collapse file tree 1 file changed +4
-6
lines changed
Orm/Xtensive.Orm.PostgreSql/Sql.Drivers.PostgreSql/v8_0 Expand file tree Collapse file tree 1 file changed +4
-6
lines changed Original file line number Diff line number Diff line change @@ -18,7 +18,7 @@ namespace Xtensive.Sql.Drivers.PostgreSql.v8_0
1818{
1919 internal class Translator : SqlTranslator
2020 {
21- protected class SqlFunctionTypeTranslations
21+ protected struct SqlFunctionTypeTranslations
2222 {
2323 private readonly string [ ] translations ;
2424
@@ -43,15 +43,13 @@ public string Get(in SqlFunctionType enumValue)
4343 return translations [ index ] ;
4444 }
4545
46- public SqlFunctionTypeTranslations ( )
46+ public SqlFunctionTypeTranslations ( int count )
4747 {
48- // this is still fast but keeps reference to remind the reader
49- // to keep array size in accordance with max enum value
50- translations = new string [ ( int ) SqlFunctionType . RoundDoubleToZero ] ;
48+ translations = new string [ count ] ;
5149 }
5250 }
5351
54- protected readonly SqlFunctionTypeTranslations FunctionTypeTranslations = new ( ) ;
52+ protected readonly SqlFunctionTypeTranslations FunctionTypeTranslations = new ( ( int ) SqlFunctionType . RoundDoubleToZero ) ;
5553
5654 /// <inheritdoc/>
5755 public override string DateTimeFormatString => @"\'yyyyMMdd HHmmss.ffffff\''::timestamp(6)'" ;
You can’t perform that action at this time.
0 commit comments