You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
SQL Server includes the timestamp data type, which is essentially a synonym for rowversion. Mapping for this data type is missing from SqlServerDataTypes.fs, which means columns with data type timestamp are currently excluded from generated SqlHydra types and readers. rowversion is included in the data type mappings, and thus I believe timestamp should be implemented too.
The text was updated successfully, but these errors were encountered:
I think it should actually map to byte[], since it's the same as rowversion. I manually added the missing timestamp column to my generated SqlHydra type and reader as byte[], and that seemed to work correctly. Also, according to Microsoft's documentation the correct ClrType for timestamp is Byte[].
This could potentially be as simple as just copying the rowversion mapping like this:
SqlServerdatatypes.ds
letsupportedTypeMappings=[// ..."ROWVERSION","byte[]", DbType.Binary, Some (nameof SqlDbType.Binary), nameof r.GetFieldValue
// Added timestamp data type mapping"TIMESTAMP","byte[]", DbType.Binary, Some (nameof SqlDbType.Binary), nameof r.GetFieldValue
// ...]
And yes, timestamp in SQL Server is notorious for being confusing and badly named. 😄
SQL Server includes the
timestamp
data type, which is essentially a synonym forrowversion
. Mapping for this data type is missing from SqlServerDataTypes.fs, which means columns with data typetimestamp
are currently excluded from generated SqlHydra types and readers.rowversion
is included in the data type mappings, and thus I believetimestamp
should be implemented too.The text was updated successfully, but these errors were encountered: