Classes | Public Types | Public Member Functions | List of all members
mKCal::SqliteFormat Class Reference

Sqlite format implementation. More...

#include <sqliteformat.h>

Classes

class  Private
 

Public Types

enum  RDateType { RDate = 1 , XDate , RDateTime , XDateTime }
 The different types of rdates. More...
 

Public Member Functions

 SqliteFormat (SqliteStorage *storage, sqlite3 *database)
 Constructor a new Sqlite Format object. More...
 
virtual ~SqliteFormat ()
 Destructor. More...
 
bool modifyCalendars (const Notebook::Ptr &notebook, DBOperation dbop, sqlite3_stmt *stmt)
 Update notebook data in Calendars table. More...
 
Notebook::Ptr selectCalendars (sqlite3_stmt *stmt)
 Select notebooks from Calendars table. More...
 
bool modifyComponents (const KCalendarCore::Incidence::Ptr &incidence, const QString &notebook, DBOperation dbop, sqlite3_stmt *stmt1, sqlite3_stmt *stmt2, sqlite3_stmt *stmt3, sqlite3_stmt *stmt4, sqlite3_stmt *stmt5, sqlite3_stmt *stmt6, sqlite3_stmt *stmt7, sqlite3_stmt *stmt8, sqlite3_stmt *stmt9, sqlite3_stmt *stmt10, sqlite3_stmt *stmt11, sqlite3_stmt *delAttachmentStmt, sqlite3_stmt *insAttachmentStmt)
 Update incidence data in Components table. More...
 
bool purgeDeletedComponents (const KCalendarCore::Incidence::Ptr &incidence, sqlite3_stmt *stmt1, sqlite3_stmt *stmt2, sqlite3_stmt *stmt3, sqlite3_stmt *stmt4, sqlite3_stmt *stmt5, sqlite3_stmt *stmt6, sqlite3_stmt *stmt7, sqlite3_stmt *attachmentStmt)
 
KCalendarCore::Incidence::Ptr selectComponents (sqlite3_stmt *stmt1, sqlite3_stmt *stmt2, sqlite3_stmt *stmt3, sqlite3_stmt *stmt4, sqlite3_stmt *stmt5, sqlite3_stmt *stmt6, sqlite3_stmt *attachmentStmt, QString &notebook)
 Select incidences from Components table. More...
 
KCalendarCore::Person::List selectContacts (sqlite3_stmt *stmt)
 Select contacts and order them by appearances. More...
 

Detailed Description

Sqlite format implementation.

This class implements the Sqlite format. It provides methods for loading/saving/converting Sqlite format data into the internal representation as Calendar and Incidences.

Member Enumeration Documentation

◆ RDateType

The different types of rdates.

Enumerator
RDate 
XDate 
RDateTime 
XDateTime 

Constructor & Destructor Documentation

◆ SqliteFormat()

SqliteFormat::SqliteFormat ( SqliteStorage storage,
sqlite3 *  database 
)

Constructor a new Sqlite Format object.

◆ ~SqliteFormat()

SqliteFormat::~SqliteFormat ( )
virtual

Destructor.

Member Function Documentation

◆ modifyCalendars()

bool SqliteFormat::modifyCalendars ( const Notebook::Ptr notebook,
DBOperation  dbop,
sqlite3_stmt *  stmt 
)

Update notebook data in Calendars table.

Parameters
notebooknotebook to update
dbopdatabase operation
stmtprepared sqlite statement for calendars table
Returns
true if the operation was successful; false otherwise.

◆ modifyComponents()

bool SqliteFormat::modifyComponents ( const KCalendarCore::Incidence::Ptr &  incidence,
const QString &  notebook,
DBOperation  dbop,
sqlite3_stmt *  stmt1,
sqlite3_stmt *  stmt2,
sqlite3_stmt *  stmt3,
sqlite3_stmt *  stmt4,
sqlite3_stmt *  stmt5,
sqlite3_stmt *  stmt6,
sqlite3_stmt *  stmt7,
sqlite3_stmt *  stmt8,
sqlite3_stmt *  stmt9,
sqlite3_stmt *  stmt10,
sqlite3_stmt *  stmt11,
sqlite3_stmt *  delAttachmentStmt,
sqlite3_stmt *  insAttachmentStmt 
)

Update incidence data in Components table.

Parameters
incidenceincidence to update
notebooknotebook of incidence
dbopdatabase operation
stmt1prepared sqlite statement for components table
stmt2prepared sqlite statement for customproperties table
stmt3prepared sqlite statement for attendee table
stmt4prepared sqlite statement for alarm table
delAttachmentStmtprepared sqlite statement to delete entries from the attachment table
insAttachmentStmtprepared sqlite statement to insert entries into the attachment table
Returns
true if the operation was successful; false otherwise.

◆ purgeDeletedComponents()

bool SqliteFormat::purgeDeletedComponents ( const KCalendarCore::Incidence::Ptr &  incidence,
sqlite3_stmt *  stmt1,
sqlite3_stmt *  stmt2,
sqlite3_stmt *  stmt3,
sqlite3_stmt *  stmt4,
sqlite3_stmt *  stmt5,
sqlite3_stmt *  stmt6,
sqlite3_stmt *  stmt7,
sqlite3_stmt *  attachmentStmt 
)

◆ selectCalendars()

Notebook::Ptr SqliteFormat::selectCalendars ( sqlite3_stmt *  stmt)

Select notebooks from Calendars table.

Parameters
stmtprepared sqlite statement for calendars table
Returns
the queried notebook.

◆ selectComponents()

Incidence::Ptr SqliteFormat::selectComponents ( sqlite3_stmt *  stmt1,
sqlite3_stmt *  stmt2,
sqlite3_stmt *  stmt3,
sqlite3_stmt *  stmt4,
sqlite3_stmt *  stmt5,
sqlite3_stmt *  stmt6,
sqlite3_stmt *  attachmentStmt,
QString &  notebook 
)

Select incidences from Components table.

Parameters
stmt1prepared sqlite statement for components table
stmt2prepared sqlite statement for customproperties table
stmt3prepared sqlite statement for attendee table
stmt4prepared sqlite statement for alarm table
stmt5prepared sqlite statement for recursive table
stmt6prepared sqlite statement for rdates table
attachmentStmtprepared sqlite statement for attachments table
notebooknotebook of incidence
Returns
the queried incidence.

◆ selectContacts()

KCalendarCore::Person::List mKCal::SqliteFormat::selectContacts ( sqlite3_stmt *  stmt)

Select contacts and order them by appearances.

Parameters
stmtprepared sqlite statement for Attendees table
Returns
ordered list of contacts.

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

Generated on Mon Sep 13 2021 12:08:02 for libextendedkcal by doxygen 1.9.2