Skip to content

Commit

Permalink
modified: Julia/fitsDBCheck.jl
Browse files Browse the repository at this point in the history
  • Loading branch information
jvo203 committed Nov 6, 2023
1 parent 87ad452 commit 947b76d
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions Julia/fitsDBCheck.jl
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
using LibPQ, Tables

function connect_db(db_name, host)
println("LibPQ: connecting to $host")

user = String(UInt8.([106])) * String(UInt8.([118])) * String(UInt8.([111]))
password = user * String(UInt8.([33]))

Expand All @@ -21,6 +23,8 @@ function get_datasets(conn, threshold, start_date)
# find the datasets with the file_size >= threshold AND regist_date >= starting date
strSQL = "select dataset_id, file_size, path, regist_date from cube where binf1=1 and binf2=1 and binf3=1 and binf4=1 and file_size>=$(threshold)*1024*1024*1024. and regist_date>='$(start_date)' order by regist_date asc;"

println("LibPQ: executing query '$strSQL'")

res = execute(conn, strSQL)
data = columntable(res)

Expand Down

0 comments on commit 947b76d

Please sign in to comment.