Message Archiving Retrieval -- round up by date (for non Derby) ? (#4)
Andrzej Wójcik (Tigase) opened 1 decade ago

There should be no round up algorithm in message retrieval. Propably following code needs to be modified and tested:

                if (derby) {
                    get_messages_st.setTimestamp(3, collection);
                    get_messages_st.setInt(4, offset);
                    get_messages_st.setInt(5, limit);
                } else {                
                    if(collection==null){
                        get_messages_st.setInt(3, limit);
                        get_messages_st.setInt(4, offset);
                    }else{
                        long milis = collection.getTime() / (24 * 60 * 60 * 1000);    <==== Round up?
                        get_messages_st.setDate(3, new java.sql.Date(milis * 24 * 60 * 60 * 1000)); <==== Round up?
                        get_messages_st.setInt(4, limit);
                        get_messages_st.setInt(5, offset);
                    }

                }
Andrzej Wójcik (Tigase) commented 1 decade ago

I removed this round up for all databases to allow retrieval of messages for more than one day. I also changed sql queries to fix this.

issue 1 of 1
Type
Consulting
Priority
Normal
Assignee
RedmineID
1629
Issue Votes (0)
Watchers (0)
Reference
tigase/_server/tigase-message-archiving#4
Please wait...
Page is in error, reload to recover