"Active database connection to the target database we are loading into."
nil)
;; TODO - `e` is a bad variable name! This should be something like `entity`
(defn-insert-entity![eobjs]
(print(u/format-color'blue"Transfering %d instances of %s..."(countobjs)(:namee))); TODO - I don't think the print+flush is working as intended :/
(defn-insert-entity![entityobjs]
(print(u/format-color'blue"Transfering %d instances of %s..."(countobjs)(:nameentity))); TODO - I don't think the print+flush is working as intended :/
(flush)
;; The connection closes prematurely on occasion when we're inserting thousands of rows at once. Break into smaller chunks so connection stays alive
;; 1) `:sizeX` and `:sizeY` come out of H2 as `:sizex` and `:sizey` because of automatic lowercasing; fix the names of these before putting into the new DB
;; 2) Need to wrap the column names in quotes because Postgres automatically lowercases unquoted identifiers
quote-char(case(config/config-kw:mb-db-type)
:postgres\"
:mysql\`)
cols(for[kks]
(strquote-char(name(casek
:sizex:sizeX
:sizey:sizeY
k))quote-char))]
;; The connection closes prematurely on occasion when we're inserting thousands of rows at once. Break into smaller chunks so connection stays alive