DBConnection {shinyChatR} | R Documentation |
DBConnection R6 Class
Description
DBConnection R6 Class
DBConnection R6 Class
Details
An R6 class representing a connection to a database for the chat module.
Value
The full dataset
Save a message to data source
Public fields
connection
A database connection object, created using a package such as RSQLite.
table
The table that contains the chat information.
Initialize the R6 Object
Methods
Public methods
Method new()
Usage
DBConnection$new(connection, table = "chat_data")
Arguments
connection
DB connection
table
Table name
Method get_data()
Reads the full dataset
Usage
DBConnection$get_data()
Method insert_message()
Usage
DBConnection$insert_message(message, user, time)
Arguments
message
The message to be stores
user
The user who entered the message
time
The time when message was submitted
Method clone()
The objects of this class are cloneable with this method.
Usage
DBConnection$clone(deep = FALSE)
Arguments
deep
Whether to make a deep clone.
[Package shinyChatR version 1.2.0 Index]