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
connection
A database connection object, created using a package such as RSQLite.
table
The table that contains the chat information.
Initialize the R6 Object
new()
DBConnection$new(connection, table = "chat_data")
connection
DB connection
table
Table name
get_data()
Reads the full dataset
DBConnection$get_data()
insert_message()
DBConnection$insert_message(message, user, time)
message
The message to be stores
user
The user who entered the message
time
The time when message was submitted
clone()
The objects of this class are cloneable with this method.
DBConnection$clone(deep = FALSE)
deep
Whether to make a deep clone.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.