Edit all queries before executing with iql.query (add columns: rowid, label)
Generate a select all query using columns in the schema and add the query to the query textbox on startup or whenever the dataset is changed. (This is to the deal with not being able todo SELECT rowid, * FROM data;
Use iql.query rowids as rowheaders in Handsontable
Use iql.query rowids to store rows in app-db. (under rows-by-id and row-ids and the same keys under :physical-data)
Reorganize keys for storing information about data in Handsontable, visual state in Handsontable, and changes made in the table UI.
physical-data - Keys related to data sent to the Handsontable reagent component. Changing any of these keys will cause Handsontable to update.
visual-state - Keys related to the visual state of Handsontable. Takes into account columns moves, filtering, sorting, etc. Updated by various Handsontable hooks.
rows-by-id - Contains the same data as [:physical-data :rows-by-id] but also contains changes to the table made in the UI. (labels, and data in new-rows). Updated by the :hot/before-change hook and the :table/add-row event.
row-ids - Contains the same data as [:physical-data :row-ids] but also contains row-ids for new rows added in the UI. Updated by the :table/add-row event.
Make query component store a bunch of additional information about a query when it's executed.
Add :hot/before-change event for capturing edits made in Handsontable.
Add :table/add-row event for adding a new row to the dataset and Handsontable.
Add re-frame effects for making selections in Handsontable and for adding a row.
Change selections in Handsontable via a re-frame effect instead of via a subscription passed into the reagent component.
Change how Handsontable hooks call their respective re-frame events. Previously this was done by passing the whole Handsontable object into the event vector along with the hook arguments, but now we extract only the necessary data from the Handsontable object and pass that in. This prevents state changing from underneath events.
Add query editing functions for reflecting dataset changes made in Handsontable and for incorporating those changes into models.
Use a query editing function in the :hot/before-change and :table/add-row events to automatically update the query string for changes to the label column or new rows.
Add a right click menu with an option for updating the query string with datasets changes INCORPORATED into any models present in the query.
What does this do?
Many changes to enable FSL
select all query
using columns in the schema and add the query to the query textbox on startup or whenever the dataset is changed. (This is to the deal with not being able todoSELECT rowid, * FROM data;
rows-by-id
androw-ids
and the same keys under:physical-data
)physical-data
- Keys related to data sent to the Handsontable reagent component. Changing any of these keys will cause Handsontable to update.visual-state
- Keys related to the visual state of Handsontable. Takes into account columns moves, filtering, sorting, etc. Updated by various Handsontable hooks.rows-by-id
- Contains the same data as[:physical-data :rows-by-id]
but also contains changes to the table made in the UI. (labels, and data in new-rows). Updated by the:hot/before-change
hook and the:table/add-row
event.row-ids
- Contains the same data as[:physical-data :row-ids]
but also contains row-ids for new rows added in the UI. Updated by the:table/add-row
event.:hot/before-change
event for capturing edits made in Handsontable.:table/add-row
event for adding a new row to the dataset and Handsontable.:hot/before-change
and:table/add-row
events to automatically update the query string for changes to the label column or new rows.And
How to test
Use the beat19 dataset and model by applying this patch. 0001-Add-beat-19-items.patch.zip
Then run some of the queries found here. https://gist.github.com/harishtella/4e9d44a9d98a3154298e01d08a48dcc3