-
Type:
Task
-
Status: Done (View Workflow)
-
Priority:
Normal
-
Resolution: Done
-
Component/s: spt_operational_database
-
Labels:None
There is a new insert_copy_from method on Opdb which allows efficient copying from the user to the database, which is absolutely necessary for FPS/MCS operations. Those actors also need to copy from the database to the user – the MCS needs the FPS targets, and the FPS needs the MCS matches.
So can we add select_by_copy(sqlSelect or something? I admit that I get confused by the postgres terminology of COPY_FROM and COPY_TO. We probably do not need to expose the internal postgres names that way, so insert_by_copy. select_by_copy, or insertBulk, selectBulk might be better?
Also, can the opdb methods have the context manager or try-except wrapping? Leaving transactions open on failures causes all sorts of trouble later.