-
-
Notifications
You must be signed in to change notification settings - Fork 524
Expand file tree
/
Copy pathTestSupport.cs
More file actions
28 lines (26 loc) · 888 Bytes
/
TestSupport.cs
File metadata and controls
28 lines (26 loc) · 888 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
using SqlKata;
using SqlKata.Compilers;
namespace QueryBuilder.Benchmarks.Infrastructure;
public class TestSupport
{
public static Compiler CreateCompiler(string engine)
{
return engine switch
{
EngineCodes.Firebird => new FirebirdCompiler(),
EngineCodes.MySql => new MySqlCompiler(),
EngineCodes.Oracle => new OracleCompiler
{
UseLegacyPagination = false
},
EngineCodes.PostgreSql => new PostgresCompiler(),
EngineCodes.Sqlite => new SqliteCompiler(),
EngineCodes.SqlServer => new SqlServerCompiler
{
UseLegacyPagination = false
},
EngineCodes.Generic => new TestCompiler(),
_ => throw new ArgumentException($"Unsupported engine type: {engine}", nameof(engine)),
};
}
}