public override string ToStr() { switch (GetResultType()) { case SimpleTypes.Boolean: return(GetBoolResultOut(null).ToString()); case SimpleTypes.String: return(ParserUtils.ConstToStrEscape(GetStrResultOut(null).ToString())); case SimpleTypes.Integer: return(GetIntResultOut(null).ToString()); case SimpleTypes.Float: return(GetFloatResultOut(null).ToStr()); case SimpleTypes.DateTime: return("datetime '" + GetDateTimeResultOut(null).ToString("dd.MM.yyyy HH:mm:ss") + "'"); case SimpleTypes.Date: return("date '" + GetDateTimeResultOut(null).ToString("dd.MM.yyyy") + "'"); case SimpleTypes.Time: return("time '" + GetTimeResultOut(null).ToString("c") + "'"); case SimpleTypes.Geometry: throw new Exception("Can not convert geometry constant to string"); //return "_Geometry_"; /*Geometry g = GetGeomResultOut(null); * if (g == null) g = new Geometry(wkbGeometryType.wkbPolygon); * return "GeometryFromWkbHex(" + BaseExpressionFactory.StandartCodeEscape(CustomDbDriver.BytesToStr(g.MyExportToWKB()), '\'', '\'') +","+this.GetCoordinateSystem().EpsgCode.ToString()+ ")"; */ default: throw new Exception("Unknown data type"); } }