ESP32 MQTT IoT Communication
Loading...
Searching...
No Matches
device_writer.Writer Class Reference

Abstract Class containing basic functions for inserting JSON objects ito a database. More...

Inheritance diagram for device_writer.Writer:

Public Member Functions

str __str__ (self)
 Returns an SQL insert query as a str.
 
str sql_query (self)
 Returns The Object encoded into an "INSERT" SQL statement.
 
None insert (self, sqlite3.Connection db_connection)
 Inserts the object into the provided database.
 

Detailed Description

Abstract Class containing basic functions for inserting JSON objects ito a database.

Writer Abstract Class

Member Function Documentation

◆ __str__()

str device_writer.Writer.__str__ (   self)

Returns an SQL insert query as a str.

Returns
object encoded into SQL Query
Returns an SQL insert query as a str

◆ insert()

None device_writer.Writer.insert (   self,
sqlite3.Connection  db_connection 
)

Inserts the object into the provided database.

Parameters
OpenedSqlite connection
Inserts the object into the provided database

◆ sql_query()

str device_writer.Writer.sql_query (   self)

Returns The Object encoded into an "INSERT" SQL statement.

Returns
INSERT Statement
Returns The Object encoded into an "INSERT" SQL statement

Reimplemented in device_writer.DeviceWriter, device_writer.SensorWriter, and device_writer.ReadingsWriter.


The documentation for this class was generated from the following file: