-
-
Notifications
You must be signed in to change notification settings - Fork 652
Closed
Labels
Description
When fetching FieldPackets from a query, I'm observing that packet.type is undefined, in violation of its type: https://github.com/sidorares/node-mysql2/blob/master/typings/mysql/lib/protocol/packets/FieldPacket.d.ts#L18
Example code:
$ const [res, fields] = await conn.execute<RowDataPacket[]>(sql);
$ fields[0].type
undefined
$ console.log(fields[0])
{ catalog: 'def',
schema: 'companies',
name: 'created_at',
orgName: 'created_at',
table: 'companies',
orgTable: 'companies',
characterSet: 63,
columnLength: 19,
columnType: 12,
flags: 128,
decimals: 0 }
In fact, FieldPacket seems to have a significantly different structure than its type indicates.
tomtiao, cldellow, albertms10 and mojoaxel