sequeler
sequeler copied to clipboard
displaying dates
I have a database with a table in it that contains some fields of the type date. When issuing a query on that table the dates don't get displayed.
I attached screenshots from both sequeler and dbeaver issueing the same query to the same database.
Thanks for the report, that's definitely a bug! Would you be able to share with me the raw data? I don't need the entire table, just a couple of rows with the same data format, in order for me to test it locally. Cheers
I attached a create table script with a table containing some of the problematic data test_data.sql.txt
I pushed a new version to the AppCenter that should fix the problem, I'll test your data later today and see if it works. Thanks
So, the problem happens because the field date
has a set type of datetime
, which the correct format is YYYY-MM-DD HH:MM:SS
.
You're saving just the date format YYYY-MM-DD
, which is ok for the database itself, and the majority of the software out there.
Unfortunately, Sequeler uses LibGda
, which as you noticed it doesn't handle properly entries that don't exactly match the data type specified in the field.
I'll look around and try to find a solution.
Try to do a check
if (HH:MM:SS == null) {
HH:MM:SS = 00:00:00
}
That's not how Vala or the LibGDA works, that check can't be done, and I shouldn't do if statements for specific conditions, the code won't be scalable.
Just to confirm this is still a problem when using DATE field instead of DATETIME. In my case, it just displays the content of the previous column.
It also displays the previous column for me:
Same as @nickelghost
This bug is present in v0.7.0.( db connection: mariadb 10). Like the others have reported here, it's showing the previous columns value instead of the date field.
This issue is still present as of 00e5f7b471.
In case it helps, this line is getting logged repeatedly:
(Sequeler:11902): GLib-GObject-WARNING **: 13:29:55.530: unable to set property 'text' of type 'gchararray' from value of type 'GDate'