Skip to content

Commit

Permalink
fix table names
Browse files Browse the repository at this point in the history
  • Loading branch information
roland-sipos committed Oct 28, 2021
1 parent 199693b commit 6395b2c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions runregistry-rest/queries.py
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
# $ curl -u fooUsr:barPass -X GET np04-srv-021:5005/runregistry/getRunMeta/2
getRunMeta = "select RUN_NUMBER, START_TIME, STOP_TIME, DETECTOR_ID, RUN_TYPE from RUN_REGISTRY where RUN_NUMBER=:run_num"
getRunMeta = "select RUN_NUMBER, START_TIME, STOP_TIME, DETECTOR_ID, RUN_TYPE from RUN_REGISTRY_META where RUN_NUMBER=:run_num"

# $ curl -u fooUsr:barPass -X GET -O -J np04-srv-021:5005/runregistry/getRunBlob/2
getRunBlob = "select FILENAME, CONFIGURATION from RUN_REGISTRY_META natural join RUN_REGISTRY_CONFIGS where RUN_NUMBER=:run_num"

# $ curl -u fooUsr:barPass -X GET np04-srv-021:5005/runregistry/getRunMetaLast/100
getRunMetaLast = "select * from (select RUN_NUMBER, START_TIME, STOP_TIME, DETECTOR_ID, RUN_TYPE from RUN_REGISTRY order by RUN_NUMBER desc) where ROWNUM<=:amount"
getRunMetaLast = "select * from (select RUN_NUMBER, START_TIME, STOP_TIME, DETECTOR_ID, RUN_TYPE from RUN_REGISTRY_META order by RUN_NUMBER desc) where ROWNUM<=:amount"

# $ curl -u fooUsr:barPass -F "file=@sspconf.tar.gz" -F "run_num=4" -F "det_id=foo" -F "run_type=bar" -X POST http://localhost:5005/runregistry/insertRun/
insertRunRegistry = "insert into RUN_REGISTRY (RUN_NUMBER, START_TIME, STOP_TIME, DETECTOR_ID, RUN_TYPE, FILENAME, CONFIGURATION, SOFTWARE_VERSION) values (:run_num, CURRENT_TIMESTAMP, NULL, :det_id, :run_type, :filename, :config_blob, :software_version)"
#insertRunRegistry = "insert into RUN_REGISTRY (RUN_NUMBER, START_TIME, STOP_TIME, DETECTOR_ID, RUN_TYPE, FILENAME, CONFIGURATION, SOFTWARE_VERSION) values (:run_num, CURRENT_TIMESTAMP, NULL, :det_id, :run_type, :filename, :config_blob, :software_version)"

# $ curl -u fooUsr:barPass -F "file=@sspconf.tar.gz" -F "run_num=4" -F "det_id=foo" -F "run_type=bar" -X POST http://localhost:5005/runregistry/insertRun/
insertRunRegistryMeta = "insert into RUN_REGISTRY_META (RUN_NUMBER, START_TIME, STOP_TIME, DETECTOR_ID, RUN_TYPE, FILENAME, SOFTWARE_VERSION) values (:run_num, CURRENT_TIMESTAMP, NULL, :det_id, :run_type, :filename, :software_version)"
Expand Down

0 comments on commit 6395b2c

Please sign in to comment.