(ns ch.lyrion.pgwiz (:gen-class) (:require [cljfx.api :as fx] [next.jdbc :as jdbc] [ch.lyrion.pgwiz.gui :as gui] [ch.lyrion.pgwiz.inspect :as inspect] [ch.lyrion.pgwiz.db-table-editor :refer [db-table-editor]])) (def value-conversion-types {"serial" :long "citext" :string "text" :string "timestamp" :string "uuid" :string "bool" :string "interval" :string}) (def *context (atom (fx/create-context {}))) (defn mainwindow [{:keys [fx/context]}] {:fx/type :stage :showing true :title "PgWiz" :scene {:fx/type :scene :root {:fx/type :v-box :children [{:fx/type db-table-editor :schema "company" :table "vc" :offset 0 :limit 20}]}} }) (def app (fx/create-app *context :event-handler gui/event-handler :desc-fn (fn [_] {:fx/type mainwindow}))) (when *compile-files* (Thread/sleep 1500) (javafx.application.Platform/exit))