On Sat, Jun 20, 2015 at 5:22 PM, Pali Rohár <pali.ro...@gmail.com> wrote:

> On Saturday 20 June 2015 15:56:05 Joshua Joseph wrote:
> > On Sat, Jun 20, 2015 at 4:38 PM, Pali Rohár <pali.ro...@gmail.com>
> > wrote:
> > > > I had not thought of that. :)
> > > >
> > > > > Same for Contact: Does not it make sense to store
> > > > > Kopete::Contact representing room? Or do you think it is not
> > > > > needed at all?
> > > >
> > > > Yes. I will change to Kopete::Contact.
> > >
> > > I think you did not change anything, or yes?
> >
> > Just changed the type column to int.
> >
> > > Anyway detecting multi user
> > > chat messages with that mutually exclusive condition (only one of
> > > contact/session or name is set) is really hard to imagine and also
> > > write correct select sql statement (it is even possible to write
> > > optimal one for SQLite??). Rather use some multi user group chat
> > > boolean column (in SQLite there is no boolean, just int).
> >
> > LIke this?
> >
>
> Still I do not know what description means... There is still information
> about "If in multi user mode..." and so on.
>
> Also timestamp cannot be text.
>
>
I'd sent in the wrong one:

--messages table
CREATE TABLE "messages" (
   "id" Integer Primary Key Autoincrement Not Null, --Unique message
identifier
   "timestamp" Integer, --When the message was handled
   "message" Text, --HTML containing the message contents
   "protocol" Text Not Null, --Protocol used (Kopete::Protocol::pluginId())
   "account" Text Not Null, --Account used (Kopete::Account::accountId())
   "direction" Integer Not Null, --(Inbound = 0, Outbound=1, Internal=2)
(Kopete::Message::MessageDirection)
   "importance" Integer, -- (Low, Normal, Highlight) (Kopete::Message)
(Kopete::Message::MessageImportance)
   "contact" Text, -- The local contact used in this message (if
applicable). (Kopete::Contact::ContactId()). If present, we know we are in
single user mode.
   "subject" Text, --If applicable, this will store the subject of the
message
   "session" Text, -- Internal session identifier.
   "session_name" Text, -- A human readable name for the session.
   "from" Text, --Internal identifier for the message sender
   "from_name" Text, --Human readable name of the message sender
   "to" Text, --Internal identifier for the message recipient
   "to_name" Text, --Human readable name of the message recipient.
   "state" Integer, --(Unknown = 0, Sending = 1, Sent = 2, Error = 3)
   "type" Integer, --The type of message. (TypeNormal, TypeAction,
TypeFileTransferRequest, TypeVoiceClipRequest)
(Kopete::Message::MessageType)
   "is_group" Integer Default='0' --If this is set to 1, then we know we
are in multi user mode.
)

Thanks,
Joshua
_______________________________________________
kopete-devel mailing list
kopete-devel@kde.org
https://mail.kde.org/mailman/listinfo/kopete-devel

Reply via email to