sqlectron-gui
sqlectron-gui copied to clipboard
Problem with Casting on Sql Server Date Time Field
When I run the following query I get the incorrect result in sqlectron. SELECT CAST(GETDATE() AS DATE)
Here's an image of the results of the query from sqlectron and ssms:
Looking at this, it seems to fix this will require a larger rewrite of the underlying sqlectron-core library. Right now, the logic for rendering a value is relatively simple: https://github.com/sqlectron/sqlectron-gui/blob/593b75056bde23f20c18f88575a06a29fd50c7b4/src/renderer/utils/convert.js#L21-L47
The simplicity in the rendering here is a result that the underlying core does not surface meaningful information on what type a given column is and so that information must first be written into the core, which is not clear how much effort that will be.