| DBConnection | R Documentation |
DBConnection R6 Class
DBConnection R6 Class
An R6 class representing a connection to a database for the chat module.
The full dataset
Save a message to data source
connectionA database connection object, created using a package such as RSQLite.
tableThe table that contains the chat information.
Initialize the R6 Object
new()DBConnection$new(connection, table = "chat_data")
connectionDB connection
tableTable name
get_data()Reads the full dataset
DBConnection$get_data()
insert_message()DBConnection$insert_message(message, user, time)
messageThe message to be stores
userThe user who entered the message
timeThe time when message was submitted
clone()The objects of this class are cloneable with this method.
DBConnection$clone(deep = FALSE)
deepWhether to make a deep clone.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.