четверг, 7 января 2021 г.

SQL, ulong, uint

 @markolbert Unsigned longs, ints, and shorts are not yet supported for SQL Server because the underlying ADO.NET provider for SQL Server ("a.k.a. SQL Client") does not support them. They can be used with other providers, such as SQLite. We plan to support them for SQL Server when type conversions are implemented. This is being tracked by issue #242. Closing this as a duplicate of that issue.

https://github.com/dotnet/efcore/issues/6480

These are the default conversions:

  • sbyte -> smallint
  • ushort -> int
  • uint -> bigint
  • ulong -> decimal(20, 0)
  • char -> nchar(1)

These can be used by changing the store type:

  • sbyte -> byte (not order preserving)
  • ushort -> short (not order preserving)
  • uint -> int (not order preserving)
  • ulong -> long (not order preserving)
  • char -> other string types of any size: char, nchar, varchar, nvarchar, text
  • char -> int



Комментариев нет:

Отправить комментарий