Ticket Hash: | 754cb60f478800eecf3e91c7a36dd93a6c45e4c5 | |||
Title: | SQLiteDataReader.GetDataTypeName returning empty string on columns with function calls | |||
Status: | Closed | Type: | Incident | |
Severity: | Important | Priority: | Medium | |
Subsystem: | Data_Reader | Resolution: | Works_As_Designed | |
Last Modified: | 2016-08-05 18:20:55 | |||
Version Found In: | 1.0.99.0 | |||
User Comments: | ||||
anonymous added on 2016-06-14 16:46:29:
(text/x-fossil-plain)
GetDataTypeName used to return DATETIME for computed columns like: select datetime('now'), but now it's returning an empty string. Similarly, 'select substr([name], 1, 13) as filename' returns an empty string even though name is a varchar ... . Even if I cast the column, it doesn't return a type name ... mistachkin added on 2016-06-15 19:07:15: (text/x-fossil-plain) Computed columns do not have a declared type name; however, using the GetFieldType method should return a .NET type usable for the value. mistachkin added on 2016-06-15 19:11:46: (text/x-fossil-plain) Test case checked-in [bba40ece0b746de4]. mistachkin added on 2016-06-15 21:25:29: (text/x-fossil-plain) Related to this change in 1.0.97.0: The IDataReader.GetDataTypeName method should always return the declared type name. ** Potentially Incompatible Change ** anonymous added on 2016-08-04 19:37:52: (text/x-fossil-plain) GetFieldType(idx) for datetime('now') returns System.String. How do I know that it's a datetime? mistachkin added on 2016-08-05 18:20:55: (text/x-fossil-plain) Expressions like datetime('now') do not have any associated column type information for System.Data.SQLite to use as the basis for the GetFieldType(). |