예제 #1
0
        public IEnumerable <Message> GetMessages(DateTime from, DateTime to)
        {
            var query = string.Format("SELECT * FROM Messages WHERE timestamp >= {0} AND timestamp <= {1}", DateUtils.ConvertToLinuxStamp(from), DateUtils.ConvertToLinuxStamp(to));

            return(ExecuteReaderItems <Message>(query, Fill));
        }
        public IEnumerable <Call> GetCalls(DateTime @from, DateTime to)
        {
            var query = string.Format("SELECT * FROM Calls WHERE begin_timestamp >= {0} AND (begin_timestamp+duration) <= {1}", DateUtils.ConvertToLinuxStamp(from), DateUtils.ConvertToLinuxStamp(to));
            var calls = ExecuteReaderItems <Call>(query, Fill);

            return(calls);
        }
예제 #3
0
        public IEnumerable <Chat> GetChats(DateTime @from, DateTime to)
        {
            var query = string.Format("SELECT * FROM Chats WHERE timestamp >= {0} AND timestamp <= {1}", DateUtils.ConvertToLinuxStamp(from), DateUtils.ConvertToLinuxStamp(to));
            var chats = ExecuteReaderItems <Chat>(query,
                                                  this.Fill).ToList();

            return(chats);
        }