I am using nodejs >=v15 with sequelize ORM >=v6 to save and retrieve timestamp(z) into a postgresql databases. However sequelize makes trouble keeping the microsecond resolution.
I achieved preserving the microseconds when storing into the database by using type: DataTypes.STRING(32) for the column, while in the actual database i.e. DDL it's defined as timestamptz and using ISO string representation.
However I can not get it work when retrieving i.e. reading this values, since for some reason, the values are already javascript Dates, which AFAIK only have millisecond resolution. Any suggestions?