You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on May 1, 2020. It is now read-only.
I have such a need.I want to create a chat information table for each friend when I receive a chat message from the Internet.For example when I receive chat message from my friend Tom,I will check if there are tom_chat_table locally.If it exists,I will insert this chat message to tom_chat_table.If it not exists,I will create tom_chat_table and insert this chat message to tom_chat_table.
Thanks
The text was updated successfully, but these errors were encountered:
SquidDatabase has methods tryCreateTable() (or tryExecSql() if you have arbitrary SQL you want to run), but this is not a good way to approach this problem. Regardless which kind of database or you use, your approach is going to run into problems because you are not identifying and associating your entities correctly.
The entities you have are chats, messages, and users. Preferably, these entities would also exist on your server and have globally unique IDs.
Each message belongs to a chat. This would be a foreign key to an ID in chats.
Each message has a sender. This would be a foreign key to a row to an ID in users.
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
I have such a need.I want to create a chat information table for each friend when I receive a chat message from the Internet.For example when I receive chat message from my friend Tom,I will check if there are tom_chat_table locally.If it exists,I will insert this chat message to tom_chat_table.If it not exists,I will create tom_chat_table and insert this chat message to tom_chat_table.
Thanks
The text was updated successfully, but these errors were encountered: