Closed mauricioszabo closed 1 month ago
Heya, thanks for the heads up and giving it a try.
I kind of expected this (JDBC loves to sneak java objects into resultsets), but couldn't reproduce. What data types was your table using? I just tried and wasn't able to get the blank card and error. Using postgres.
CREATE TABLE datetime_test (
id SERIAL PRIMARY KEY,
name VARCHAR(50),
event_date DATE,
event_time TIME,
event_timestamp TIMESTAMP,
event_timestamptz TIMESTAMPTZ
);
INSERT INTO datetime_test (name, event_date, event_time, event_timestamp, event_timestamptz)
VALUES
('Event 1', '2023-05-15', '14:30:00', '2023-05-15 14:30:00', '2023-05-15 14:30:00+00'),
('Event 2', '2023-06-20', '09:15:00', '2023-06-20 09:15:00', '2023-06-20 09:15:00+00'),
('Event 3', '2023-07-04', '18:45:00', '2023-07-04 18:45:00', '2023-07-04 18:45:00+00'),
('Event 4', '2023-08-10', '11:00:00', '2023-08-10 11:00:00', '2023-08-10 11:00:00+00'),
('Event 5', CURRENT_DATE, CURRENT_TIME, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP);
And then just some drag and drops in Rabbit.. seemed to work?
Again, I might just look for Java Inst times and convert them anyways, since the UI will def not support that - but I'd love to confirm. Let me know if I missed something, test-wise!
Just checked, at the Rvbbit log it shows this info:
{:id 36,
....
:refreshed_at #<org.joda.time.DateTime@18a09ae8 2022-06-16T15:32:00.507Z>,
...}
Weirdly enough, if I do remove this field from the query, the query works. Weird because my table have other timestamp fields too:
Column | Type | Collation | Nullable | Default
-----------------------+--------------------------------+-----------+----------+---------------
id | bigint | | not null |
...
created_at | timestamp(6) without time zone | | not null |
updated_at | timestamp(6) without time zone | | not null |
...
refreshed_at | timestamp without time zone | | |
Only refreshed_at
is problematic, the other fields are fine.
I'm running on Ubuntu 20.04, PostgreSQL version 16.0. JDK info:
openjdk version "20.0.2" 2023-07-18
OpenJDK Runtime Environment (build 20.0.2+9-78)
OpenJDK 64-Bit Server VM (build 20.0.2+9-78, mixed mode, sharing)
I have a similar issue, but with the ::jsonb data type. If I remove the fields with unknown data types, the data starts to display correctly.
Cool thanks, very helpful. What I'm going to do it make sure that rowset sent to the client is stringified if it's an object (since at the moment its not useful from the grid UI - although there could def be some cool "map interactions" with json/jsonb/etc as legit EDN w UI around it in the future) - BUT, I'll make sure that if a REPL client tries to access query data (via :data/query-name) that the original data is preserved, so objects can be used natively if sent back from JDBC that way.
Will be in the next release this weekend most likely.
As a workaround, now I just make a view and use it, turning the data I need from json into columns. But, of course, this does not solve the problem in the general case.
Anyway, thank you for your fantastic work. I'm thrilled!
Hi, first of all, thanks for this project!
So, I tried to drag a PostgreSQL table into the canvas, but all I get is a empty black window. At the devtools console I get the error
No reader function for tag clj-time/date-time.
Please let me know if I can help with more info :+1: