how to find the table tig_pairs

fefe efwef
Added almost 4 years ago

in the past I use mysql for the databse,but now i want to use mongodb and i set up it successfully .but i can not find the table tig_pairs,the database initialed .we build a tools to use the mysql database,we use the tig_pairs but now the mongodb have not the we can not change it from mysql to mongodb .so i want to know that the tigase mongodb is configured like this or i configured it unsuccessfully? help

Replies (3)

Added by Wojciech Kapcia TigaseTeam almost 4 years ago

MongoDB implementation stores data directly in tig_nodes collection:

> use tigase_test
switched to db tigase_test

> show collections

> db.tig_nodes.find()
{ "_id" : ObjectId("549983f294ca5d4ea265fff0"), "uid" : BinData(0,"WJmwe4BzvOVIC6z9ezriNwHIrpAdEQbrcNvIAJb6ou8="), "key" : "email", "value" : "admin@atlantiscity" }
{ "_id" : ObjectId("5499841c94ca5d4ea265fff1"), "uid" : BinData(0,"WJmwe4BzvOVIC6z9ezriNwHIrpAdEQbrcNvIAJb6ou8="), "key" : "privacy-list", "node" : "privacy/blocked", "value" : "<list nam…" }

Added by fefe efwef almost 4 years ago

thank you,I find it.but I want to know that the table tig_nodes in mysql diffrent with the table tig_nodes in mongodb ?? and how to find the table .and the table count_result in mysql I can not find it in mongodb can you help me can you tell me the other table in bettwen the two db ? thank you .

Added by Wojciech Kapcia TigaseTeam almost 4 years ago

The differences in tables are mostly result of how MongoDB handles data - basically there wasn't a need to have tig_nodes/tig_pairs tables to realize concept described in Tigase DB Schema Explained You can query for particular items in mongo by using .find() method directly with parameters narrowing your result and then chaining it with .count() method, for example searching for all vCards:

db.tig_nodes.find( {"key" : "vCard" })
db.tig_nodes.find( {"key" : "vCard" }).count()