Skip to content
This repository was archived by the owner on Mar 22, 2022. It is now read-only.

Commit 50bb414

Browse files
author
Jorin Vogel
committed
Allow namespaced tables
1 parent b4f3a3d commit 50bb414

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

project.clj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
(defproject googlesheets-sql-sync "0.4.9"
1+
(defproject googlesheets-sql-sync "0.4.10"
22
:description "Keep your SQL database in sync with Google Sheets"
33
:url "https://github.com/jorinvo/googlesheets-sql-sync"
44
:license {:name "MIT"

src/googlesheets_sql_sync/db.clj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,14 +29,14 @@
2929
Returns nil if table does not exist."
3030
[db table]
3131
(log/info "Getting table headers")
32-
(let [s (str "select * from \"" (escape table "\"") "\" limit 1")]
32+
(let [s (str "select * from " table " limit 1")]
3333
(try
3434
(if-let [h (-> (jdbc/query db s {:identifiers identity
3535
:keywordize? false})
3636
first
3737
keys)]
3838
h
39-
(do (println "Table is empty, dropping it")
39+
(do (log/info "Table is empty, dropping it")
4040
(jdbc/execute! db (str "drop table " table))
4141
nil))
4242
(catch java.sql.SQLException e (when-not (.contains

0 commit comments

Comments
 (0)