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
18
18
{
19
19
internal class Translator : SqlTranslator
20
20
{
21
- protected class SqlFunctionTypeTranslations
21
+ protected struct SqlFunctionTypeTranslations
22
22
{
23
23
private readonly string [ ] translations ;
24
24
@@ -43,15 +43,13 @@ public string Get(in SqlFunctionType enumValue)
43
43
return translations [ index ] ;
44
44
}
45
45
46
- public SqlFunctionTypeTranslations ( )
46
+ public SqlFunctionTypeTranslations ( int count )
47
47
{
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 ] ;
51
49
}
52
50
}
53
51
54
- protected readonly SqlFunctionTypeTranslations FunctionTypeTranslations = new ( ) ;
52
+ protected readonly SqlFunctionTypeTranslations FunctionTypeTranslations = new ( ( int ) SqlFunctionType . RoundDoubleToZero ) ;
55
53
56
54
/// <inheritdoc/>
57
55
public override string DateTimeFormatString => @"\'yyyyMMdd HHmmss.ffffff\''::timestamp(6)'" ;
You can’t perform that action at this time.
0 commit comments