Exporting all rows (in CSV, SQL, or JSON format) currently uses offset pagination, which can cause performance problems if the table is large. There is also a correctness problem if the table is being actively updated as the export happens, because the relative row offsets could shift between queries.
Now that composite filters are available in postgres-meta, we can change to using cursor pagination on the primary key (or any non-null unique keys) wherever possible. Where this is not possible, the user will be shown a confirmation dialog explaining the possible performance impact.
---------
Co-authored-by: Ali Waseem <waseema393@gmail.com>
Co-authored-by: Joshen Lim <joshenlimek@gmail.com>
* feat/export-as-sql
* Rename export items
* EntityListItem change dropdown menu items for exporting data to a sub menu
* Set width
* Pull out SQL formatting logic into formatTableRowsToSQL and start a test
* Fix export function
* Do not stringify null values
* Add comment
* Add blank test cases
* Wrap up formatTableRowsToSQL
* Add max export row count validation to exporting actions in EntityListItem + add link to pg _dump docs
---------
Co-authored-by: Joshen Lim <joshenlimek@gmail.com>
* Start
* Start
* Move advisors
* cleanup
* Add redirects
* Check for an id
* Cleanup
* Link to the advisor from the table editor
* Cleanup
* Link to rows in performance grid