Exemplo n.º 1
0
        public IList <double> GetValues(long seriesID)
        {
            var list = DbOperations.Read("SELECT DataValue FROM DataValues WHERE SeriesID = " + seriesID,
                                         r => r.GetDouble(0));

            return(list);
        }
Exemplo n.º 2
0
        public IList <long> GetDataValuesIDs(long seriesID)
        {
            var query = "SELECT ValueID FROM DataValues WHERE SeriesID = " + seriesID;
            var res   = DbOperations.Read(query,
                                          r => r.GetInt64(0));

            return(res);
        }
Exemplo n.º 3
0
        public Tuple <DateTime, DateTime> GetDatesRange(long seriesID)
        {
            var query = string.Format("select BeginDateTime, EndDateTime from DataSeries where SeriesID={0}", seriesID);
            var list  = DbOperations.Read(query, reader =>
                                          new Tuple <DateTime, DateTime>(reader.GetDateTime(0), reader.GetDateTime(1)));

            return(list.FirstOrDefault());
        }
Exemplo n.º 4
0
        public IList <double> GetValuesOrderByLocalDateTime(long seriesID, DateTime firstDate, DateTime lastDate)
        {
            var list = DbOperations.Read("SELECT DataValue FROM DataValues WHERE SeriesID = " + seriesID +
                                         " AND LocalDateTime >=@p0 AND LocalDateTime <= @p1 ORDER BY LocalDateTime",
                                         r => r.GetDouble(0), new object[] { firstDate, lastDate });

            return(list);
        }