Skip to content

Commit

Permalink
fix: change out xt$id with _id
Browse files Browse the repository at this point in the history
  • Loading branch information
Akeboshiwind committed Jun 18, 2024
1 parent b15f492 commit c274d17
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 10 deletions.
9 changes: 1 addition & 8 deletions src/cljs/xt_play/client.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -100,19 +100,12 @@
"Data:"]
[:p (pr-str data)]])]])

(defn table-order [a b]
(cond
(= a b) 0
(= a :xt$id) -1
(= b :xt$id) 1
:else (compare a b)))

(defn display-table [results type]
(when results
(let [all-keys (->> results
(mapcat keys)
(into #{})
(sort table-order))]
(sort))]
[:table {:class "table-auto w-full"}
[:thead
[:tr {:class "border-b"}
Expand Down
2 changes: 1 addition & 1 deletion src/cljs/xt_play/query.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
;; >> API

(def default-xtql-query "(from :docs [xt/id foo])")
(def default-sql-query "SELECT xt$id, foo FROM docs")
(def default-sql-query "SELECT _id, foo FROM docs")

(defn default [type]
(case type
Expand Down
2 changes: 1 addition & 1 deletion src/cljs/xt_play/tx_batch.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@
(def blank {:txs "" :system-time nil})

(def default-dml "[:put-docs :docs {:xt/id 1 :foo \"bar\"}]")
(def default-sql-insert "INSERT INTO docs (xt$id, foo) VALUES (1, 'bar')")
(def default-sql-insert "INSERT INTO docs (_id, foo) VALUES (1, 'bar')")
(defn default [type]
{:system-time nil
:txs (case type
Expand Down

0 comments on commit c274d17

Please sign in to comment.