private static Compiler GetCompiler <T>() where T : IDbConnection, new() { Compiler result; var name = typeof(T).Name; switch (name) { case "SqliteConnection ": result = new SqliteCompiler(); break; case "FbConnection": result = new FirebirdCompiler(); break; case "MySqlConnection": result = new MySqlCompiler(); break; case "OracleConnection": result = new OracleCompiler(); break; case "NpgsqlConnection": result = new PostgresCompiler(); break; default: result = new SqlServerCompiler(); break; } return(result); }
public QueryBuilderTest() { mssql = new SqlServerCompiler(); mysql = new MySqlCompiler(); pgsql = new PostgresCompiler(); fbsql = new FirebirdCompiler(); }
public ParameterTypeTest() { mssql = new SqlServerCompiler(); mysql = new MySqlCompiler(); pgsql = new PostgresCompiler(); fbsql = new FirebirdCompiler(); }
public QueryFactory Open() { var connection = new FbConnection( $"character set=NONE;initial catalog={GetDatabase()};user id={_user};data source={_host};user id={_db};Password={_pass};Pooling=true;Dialect=3" ); var compiler = new FirebirdCompiler(); var db = new QueryFactory(connection, compiler) { Logger = compiled => { System.Console.WriteLine(compiled.ToString()); } }; return(db); }
public FirebirdLimitTests() { compiler = Compilers.Get <FirebirdCompiler>(EngineCodes.Firebird); }