public void ManualHasMetaSQLIntParamLowercase() { ConfigurationDBRef dbconfig = ConfigOracle; dbconfig.ColumnChangeCase = ConfigurationDBRef.ColumnChangeCaseEnum.LOWERCASE; Configuration configuration = GetConfig(dbconfig); epService = EPServiceProviderManager.GetDefaultProvider(configuration); epService.Initialize(); string sql = "select mydouble from " + TABLE_NAME + " where ${intPrimitive} = myint'" + "metadatasql 'select mydouble from " + TABLE_NAME + "'"; string stmtText = "select mydouble from " + " sql:MyDB ['" + sql + "] as s0," + typeof(SupportBean).Name + "#length(100) as s1"; EPStatement statement = epService.EPAdministrator.CreateEPL(stmtText); listener = new SupportUpdateListener(); statement.AddListener(listener); Assert.AreEqual(typeof(BigDecimal), statement.EventType.GetPropertyType("mydouble")); SendSupportBeanEvent(10); BigDecimal result = (BigDecimal)listener.AssertOneGetNewAndReset().Get("mydouble"); Assert.AreEqual(12, Math.Round(result.DoubleValue() * 10d)); SendSupportBeanEvent(80); result = (BigDecimal)listener.AssertOneGetNewAndReset().Get("mydouble"); Assert.AreEqual(82, Math.Round(result.DoubleValue() * 10d)); }
private void Run(string sql) { string stmtText = "select mydouble from " + " sql:MyDB ['" + sql + "'] as s0," + typeof(SupportBean).Name + "#length(100) as s1"; EPStatement statement = epService.EPAdministrator.CreateEPL(stmtText); listener = new SupportUpdateListener(); statement.AddListener(listener); Assert.AreEqual(typeof(BigDecimal), statement.EventType.GetPropertyType("mydouble")); SendSupportBeanEvent(10); BigDecimal result = (BigDecimal)listener.AssertOneGetNewAndReset().Get("mydouble"); Assert.AreEqual(12, Math.Round(result.DoubleValue() * 10d)); SendSupportBeanEvent(80); result = (BigDecimal)listener.AssertOneGetNewAndReset().Get("mydouble"); Assert.AreEqual(82, Math.Round(result.DoubleValue() * 10d)); }