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
Fix generic type validation to support datetimes and non-ASCII strings. (#291)
* Throw `ArgumentException` on type mismatches.
* Fix and centralize generic type validation.
And also document which type is compatible with which `DataType`.
* Improve type checking for `FragmentInfo` methods when the type is string.
If the generic type is string, we check ourselves that the `DataType` is a string one. This ensures the exception thrown is `ArgumentException` instead of `TileDBException`.
The exception message also is more descriptive.
* Obsolete the converters between TileDB data types and .NET types.
* Use the correct obsoletion code in two cases.
The obsoletions in question have not yet shipped.
* Validate the data type in a couple more cases.
* Suppress obsoletion warning `TILEDB0013` in the `TileDB.CSharp` project.
## `TILEDB0001` - Enum value names that start with `TILEDB_` were replaced with C#-friendly names.
13
13
@@ -320,3 +320,17 @@ The obsoleted APIs fall into the following categories:
320
320
- Types with the name `tiledb_***_t` were made public again only to support the APIs of the safe handles above. They have little other use on their own. You should use APIs in the `TileDB.CSharp` namespace instead.
## `TILEDB0013` - The `EnumUtils.TypeToDataType` and `EnumUtils.DataTypeToType` methods are obsolete and will be removed in a future version.
325
+
326
+
<aname="TILEDB0013"></a>
327
+
328
+
The `EnumUtils.TypeToDataType` and `EnumUtils.DataTypeToType` methods convert between TileDB data types and .NET types. Given that there is no one-to-one correspondence between these two and for legacy reasons, these methods sometimes return wrong results and were obsoleted.
329
+
330
+
### Version introduced
331
+
332
+
5.7.0
333
+
334
+
### Recommended action
335
+
336
+
If you are performing queries on arrays of unknown schema, you can use the `Query.UnsafeSetDataBuffer` and `Query.UnsafeSetWriteDataBuffer` methods to set a data buffer to a query without type validation.
0 commit comments