sql

m3tti 2024-10-17T11:17:42.555359Z

if i have a timestamp value in my postgres db what data type do i have to provide to next.jdbc honeysql. Is it sufficient to use LocalDateTime?

p-himik 2024-10-17T11:20:15.109739Z

If you have required next.jdbc.date-time then yeah, LocalDateTime should be usable for timestamps without timezone.

m3tti 2024-10-17T11:21:09.793869Z

should that be requiered next to jdbc?

p-himik 2024-10-17T11:21:33.183549Z

I don't understand the question.

m3tti 2024-10-17T11:22:28.791439Z

so in my ns i do

(ns some.ns
  (require 
    [next.jdbc :as jdbc]
    [next.jdbc.date-time :as jdbc2]))
or just require the date-time one

p-himik 2024-10-17T11:23:54.323039Z

Just read the source code of next.jdbc.date-time. There's no need for :as - you won't use that namespace by itself, unless you need something other than being able to write LocalDateTime. It's not important where you require it as well - as long as you require it before you actually attempt to write LocalDateTime.