I'm using mysql package from NodeJS in my electron app and would like to identify which keys of the requested table are primary from the response of SELECT statement.
So let's say I'll do this call:
sql.query('SELECT * FROM `npc_vendor` WHERE `entry`= 7324;', (err, result, fields) => {
if (err) return;
console.log(result, fields);
});
In response I got the rows in result and field info in fields. Is there a way to tell which of the fields are primary in that table?
I feel like the info is possibly in flags field of fields but I wasn't able to find any documentation on it.