Create a faketable object
Arguments
- data
A data.frame
- table_def
A
table_def()object- rowId
A character vector of length one identifying which column is a primary key, if any.
- show_delete
A named list passed to the
shiny::column()that holds the Delete button. IfFALSE, the delete column will not be shown.
Value
A faketable object with the following properties:
data: The current state of the table of inputsinserted: Rows fromdatathat were inserted into the data (were not present in.raw_data)updated: Rows fromdatathat have been modified, but were present in.raw_datadeleted: Rows that were in.raw_data, but have been removed from and do not appear indata.raw_data: The data originally pased tofaketable()with the addition of a.rowIdcolumn as the first column. This column is calculated using by hashing either the providedrowIdcolumn or using the row number and system time..rowId: The value of therowIdargument.data: The same asdata, but retains the.rowIdcolumn.inserted: The same asinserted, but retains the.rowIdcolumn.deleted: All rows that have been removed fromdata, including those that were inserted then deleted.table_def: A copy of the user suppliedtable_def()passed as the argumenttable_def.show_delete: A copy of the user supplied list passed as the argumentshow_delete. IfTRUEwas supplied, it is replaced withlist()..iteration: INTERNAL USE ONLY.
Details
A faketable object is an S7::S7_object() with the class
faketable. S7 object properties are accessed using an @, rather than
the traditional $. For example, the property data for a faketable
object called faketable can be accessed using faketable@data.
A note on faketables@.iteration: Shiny does not currently support
removing inputs from the server. This allows faketables to refresh fully
after using dbWriteTable(), by creating a new backend set of
input ids which otherwise would be duplicated because the data is the same.
See also
For more details on S7, see the vignette on the website or by running:
vignette('S7', package = 'S7')
