/// <summary> /// Get QueryExecutor /// </summary> /// <param name="setting"></param> /// <returns></returns> public static IQueryExecutor GetExecutor(ConnectionSetting setting) { switch (setting.Type) { case DatabaseType.POSTGRESQL: return(new CooQ.Database.PostgreSql.PsqlExecutor(setting)); case DatabaseType.MSSQL: return(new CooQ.Database.Mssql.MssqlExecutor(setting)); default: return(null); } }
/// <summary> /// Init config for system /// </summary> /// <param name="setting"></param> public static void Init(ConnectionSetting setting) { DatabaseProvider.Config(setting); QueryExecutor.Init(setting); }
public static IQueryExecutor Init(ConnectionSetting setting) { EXECUTOR = GetExecutor(setting); EXECUTOR.Init(setting); return(EXECUTOR); }
public static void Config(ConnectionSetting setting) { INSTANCE.Setting = setting; }