-
- Downloads
Paginated collection metadata (#16275)
* Add the last-edit-info to the child query just for cards right now, need to extend to dashboards and then make sure we clean it up into the proper map. Have a set of all columns that are required and ensure those are in each query. Nulls need to be cast to the correct type if they aren't a text column (at least on postgres, need to investigate h2 and mysql). * Correct find last-edit-info for cards and dashboards * Move from group-by max id to self join * Paginate and search on collection items - include the metadata information in the query - to accomplish this, make a backstop to add all columns into each query - need types to union the null. in postgres it assumes all nulls are text. Haven't checked what mysql and h2 do here yet - sort_column: name, last_edited, model - sort_direction: asc, desc * Add default sort column and direction * handle mysql mysql doesn't need types on nulls to unify them * Correct batch post processing for cards and dashboards * Correct order of expectations they were alphabetical inside of models previous order: - acme products | pulse - electro-magnetic pulse | pulse - birthday card | card - dine & Dashboard | dashboard and is now ordered solely by name * Tests and sort on lower name after timestamp When sorting by last edited, lots of things don't have this, so don't want arbitrary sorting, but sort by name afterwards * Ensure nulls go to the end of the list * Tests * trying to make h2, mysql, and pg happy sorting timestamps and always having nulls last is quite difficult * Make diff bigger this was going in as a string and losing the timezone information, so was actually advancing time. Now: (java.time.OffsetDateTime/now) "2021-06-01T13:59:33.165483Z" Minus 2 hours: (.minusHours (java.time.OffsetDateTime/now) 2) "2021-06-01T11:59:27.528500Z" As seen in the code: ;; unaltered "now" "2021-06-01T08:55:28" ;; altered "two hours ago" "2021-06-01T11:55:29" <- UTC shenanigans. so just bump back 24 hours * Sort by model ranking * Remove clj-time and use ZonedDateTime instead of OffsetDateTime
Please register or sign in to comment