          query-atom                 (get @client-query-cache   query-key)
          list-of-record-positions   (range (:start params) (inc (:end params)))
        ]
+    (log (pr-str "populate: "  query-key " : " records))
+    (log (pr-str "        : "  records))
+    (log (pr-str "        : "  records-count))
 
     ; -----------------------------------------------
     ; update the record count in the query

                              )))
                       )

                       (update-all-views-for-query   query-key)

                       ))


-----------------------------------------------------------"
(defn  add-data-query-watch-v2 [ query-key ]

  (let [  data-query-atom              (get @client-query-cache  query-key)
          list-of-data-windows-atom    (get @data-query-atom  :list-of-data-window-keys)
          name-of-watch                (merge query-key {:type "views"})
          ]


    ; this says that whenever the list of data windows changes then update all of the
    ; data windows. This is a bit much, as really only the added data windows need to be updated
    (add-watch list-of-data-windows-atom
               name-of-watch
               (fn [_ _ old-val new-val]
                 ;(js/alert (pr-str "new view: " new-val))
                 (update-all-data-windows-for-query   query-key)))




    ; this says that whenever the query information changes then see if
    ; we need to get any more information from the database
