Skip to content

Commit

Permalink
Use 'get' with default value
Browse files Browse the repository at this point in the history
  • Loading branch information
jamesaoverton committed Dec 7, 2023
1 parent 80214de commit fe2bbe9
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/ldtab/cli.clj
Original file line number Diff line number Diff line change
Expand Up @@ -271,11 +271,10 @@
db (second arguments)
ontology (nth arguments 2)
streaming (:streaming options)
table (:table options)
table (get options :table "statement")
database-connection (:connection options)

;set defaults
table (if table table "statement")
db-con-uri (if database-connection
db ;db is connection-uri
(str "jdbc:sqlite:"
Expand All @@ -293,12 +292,11 @@
db (second arguments)
output (nth arguments 2)
streaming (:streaming options) ;TODO: should we always write with streams?
table (:table options)
table (get options :table "statement")
database-connection (:connection options)
extension (get-file-extension output);TODO: add options for output format

;set defaults
table (if table table "statement")
db-con-uri (if database-connection
db ;db is connection-uri
(str "jdbc:sqlite:"
Expand Down

0 comments on commit fe2bbe9

Please sign in to comment.