When I execute a query via the MySQL node I get the following output (for example):
[
{
"fieldCount": 0,
"affectedRows": 0,
"insertId": 0,
"info": "",
"serverStatus": 2,
"warningStatus": 0
}
]
Does anybody know what each key can return and what it means? … or where to find the documentation on this?
1 Like
Hey @dickhoning
What query you’re trying to run?
Hey @mcnaveen anything from
SHOW TABLES LIKE, DROP TABLE, CREATE TABLE IF NOT EXISTS … etc.
1 Like
If I understand correctly, You’re getting just below ouput instead of the actual data?
dickhoning:
[
{
"fieldCount": 0,
"affectedRows": 0,
"insertId": 0,
"info": "",
"serverStatus": 2,
"warningStatus": 0
}
]
or if you want to know what these means.
fieldcount - shows the count of the number of rows
affectedrows - It’ll increase if a new row is created or updated
insertId - returns the last inserted ID of the row
serverStatus - I have seen 0, 1, and 2 so far (If I remember correctly) like status 200 or something like that. Denotes success failed.
warningStatus - shows either 0 or 1 based on the warning. Zero means no warning
This is based on my observation when using that node. Might be partially correct or wrong.
@mcnaveen depends on the SQL statement but with the CREATE TABLE for example, I’m getting this output data.
I think I also figure out that with the SQL statement CREATE TABLE, the warningStatus = 1 when the table got created, and 2 when not …for example because it already exists.
But instead of having to figure out what all of the possible options are and what they mean, it would be nicer to have detailled information on this. But I have not found it yet, and do not know where to look either …
1 Like
Maybe the docs need a little update.
CC: @MutedJam
I’d be glad to help with anything I encounter. For example, if you Execute the following query
"SHOW TABLES LIKE 'Test';"
And there is no table Test in your database, the result is empty …
system
closed
March 8, 2023, 3:58pm
#8
This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.