Johnny B.
Johnny B.
DTDrizzle Team
Created by Johnny B. on 7/31/2024 in #help
ResultSetHeader object in the response
It seems like those 3 queries I have tested are of type MySqlRawQueryResult In the session.d.ts I found export type MySqlRawQueryResult = [ResultSetHeader, FieldPacket[]]; That led me to discover a ResultSetHeadr.d.ts file with the following content:
declare interface ResultSetHeader {
constructor: {
name: 'ResultSetHeader';
};
affectedRows: number;
fieldCount: number;
info: string;
insertId: number;
serverStatus: number;
warningStatus: number;
/**
* @deprecated
* `changedRows` is deprecated and might be removed in the future major release. Please use `affectedRows` property instead.
*/
changedRows: number;
}

export { ResultSetHeader };
declare interface ResultSetHeader {
constructor: {
name: 'ResultSetHeader';
};
affectedRows: number;
fieldCount: number;
info: string;
insertId: number;
serverStatus: number;
warningStatus: number;
/**
* @deprecated
* `changedRows` is deprecated and might be removed in the future major release. Please use `affectedRows` property instead.
*/
changedRows: number;
}

export { ResultSetHeader };
3 replies
DTDrizzle Team
Created by Johnny B. on 7/31/2024 in #help
ResultSetHeader object in the response
So far, using mysql the response is consistent / present on update, insert and delete queries, but not for select queries. I haven't tried any others.
3 replies