#include "mkcal_export.h"#include "extendedstorage.h"#include "notebook.h"#include <KCalendarCore/Incidence>#include <sqlite3.h>

Go to the source code of this file.
Classes | |
| class | mKCal::SqliteFormat |
Namespaces | |
| namespace | mKCal |
Macros | |
| #define | SL3_try_exec(db) |
| #define | SL3_exec(db) |
| #define | SL3_prepare_v2(db, query, qsize, stmt, tail) |
| #define | SL3_bind_text(stmt, index, value, size, desc) |
| #define | SL3_bind_blob(stmt, index, value, size, desc) |
| #define | SL3_bind_int(stmt, index, value) |
| #define | SL3_bind_int64(stmt, index, value) |
| #define | SL3_bind_double(stmt, index, value) |
| #define | SL3_step(stmt) |
| #define | SL3_reset(stmt) |
| #define | CREATE_METADATA "CREATE TABLE IF NOT EXISTS Metadata(transactionId INTEGER)" |
| #define | CREATE_CALENDARS |
| #define | CREATE_COMPONENTS |
| #define | CREATE_RDATES "CREATE TABLE IF NOT EXISTS Rdates(ComponentId INTEGER, Type INTEGER, Date INTEGER, DateLocal INTEGER, TimeZone TEXT)" |
| #define | CREATE_CUSTOMPROPERTIES "CREATE TABLE IF NOT EXISTS Customproperties(ComponentId INTEGER, Name TEXT, Value TEXT, Parameters TEXT)" |
| #define | CREATE_RECURSIVE |
| #define | CREATE_ALARM |
| #define | CREATE_ATTENDEE |
| #define | CREATE_ATTACHMENTS |
| #define | CREATE_CALENDARPROPERTIES |
| #define | INDEX_CALENDAR "CREATE INDEX IF NOT EXISTS IDX_CALENDAR on Calendars(CalendarId)" |
| #define | INDEX_COMPONENT "CREATE INDEX IF NOT EXISTS IDX_COMPONENT on Components(ComponentId, Notebook, DateStart, DateEndDue, DateDeleted)" |
| #define | INDEX_COMPONENT_UID "CREATE UNIQUE INDEX IF NOT EXISTS IDX_COMPONENT_UID on Components(UID, RecurId, DateDeleted)" |
| #define | INDEX_COMPONENT_NOTEBOOK "CREATE INDEX IF NOT EXISTS IDX_COMPONENT_NOTEBOOK on Components(Notebook)" |
| #define | INDEX_RDATES "CREATE INDEX IF NOT EXISTS IDX_RDATES on Rdates(ComponentId)" |
| #define | INDEX_CUSTOMPROPERTIES "CREATE INDEX IF NOT EXISTS IDX_CUSTOMPROPERTIES on Customproperties(ComponentId)" |
| #define | INDEX_RECURSIVE "CREATE INDEX IF NOT EXISTS IDX_RECURSIVE on Recursive(ComponentId)" |
| #define | INDEX_ALARM "CREATE INDEX IF NOT EXISTS IDX_ALARM on Alarm(ComponentId)" |
| #define | INDEX_ATTENDEE "CREATE INDEX IF NOT EXISTS IDX_ATTENDEE on Attendee(ComponentId)" |
| #define | INDEX_ATTACHMENTS "CREATE INDEX IF NOT EXISTS IDX_ATTACHMENTS on Attachments(ComponentId)" |
| #define | INDEX_CALENDARPROPERTIES "CREATE INDEX IF NOT EXISTS IDX_CALENDARPROPERTIES on Calendarproperties(CalendarId)" |
| #define | INSERT_CALENDARS "insert into Calendars values (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, '', '')" |
| #define | INSERT_COMPONENTS |
| #define | INSERT_CUSTOMPROPERTIES "insert into Customproperties values (?, ?, ?, ?)" |
| #define | INSERT_CALENDARPROPERTIES "insert into Calendarproperties values (?, ?, ?)" |
| #define | INSERT_RDATES "insert into Rdates values (?, ?, ?, ?, ?)" |
| #define | INSERT_RECURSIVE "insert into Recursive values (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)" |
| #define | INSERT_ALARM "insert into Alarm values (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)" |
| #define | INSERT_ATTENDEE "insert into Attendee values (?, ?, ?, ?, ?, ?, ?, ?, ?)" |
| #define | INSERT_ATTACHMENTS "insert into Attachments values (?, ?, ?, ?, ?, ?, ?)" |
| #define | UPDATE_METADATA "replace into Metadata (rowid, transactionId) values (1, ?)" |
| #define | UPDATE_CALENDARS |
| #define | UPDATE_COMPONENTS |
| #define | UPDATE_COMPONENTS_AS_DELETED "update Components set DateDeleted=? where ComponentId=?" |
| #define | DELETE_CALENDARS "delete from Calendars where CalendarId=?" |
| #define | DELETE_COMPONENTS "delete from Components where ComponentId=?" |
| #define | DELETE_RDATES "delete from Rdates where ComponentId=?" |
| #define | DELETE_CUSTOMPROPERTIES "delete from Customproperties where ComponentId=?" |
| #define | DELETE_CALENDARPROPERTIES "delete from Calendarproperties where CalendarId=?" |
| #define | DELETE_RECURSIVE "delete from Recursive where ComponentId=?" |
| #define | DELETE_ALARM "delete from Alarm where ComponentId=?" |
| #define | DELETE_ATTENDEE "delete from Attendee where ComponentId=?" |
| #define | DELETE_ATTACHMENTS "delete from Attachments where ComponentId=?" |
| #define | SELECT_METADATA "select * from Metadata where rowid=1" |
| #define | SELECT_CALENDARS_ALL "select * from Calendars order by Name" |
| #define | SELECT_COMPONENTS_ALL "select * from Components where DateDeleted=0" |
| #define | SELECT_COMPONENTS_ALL_DELETED "select * from Components where DateDeleted<>0" |
| #define | SELECT_COMPONENTS_ALL_DELETED_BY_NOTEBOOK "select * from Components where Notebook=? and DateDeleted<>0" |
| #define | SELECT_COMPONENTS_BY_RECURSIVE |
| #define | SELECT_COMPONENTS_BY_DATE_BOTH "select * from Components where DateStart<? and (DateEndDue>=? or (DateEndDue=0 and DateStart>=?)) and DateDeleted=0" |
| #define | SELECT_COMPONENTS_BY_DATE_START "select * from Components where (DateEndDue>=? or (DateEndDue=0 and DateStart>=?)) and DateDeleted=0" |
| #define | SELECT_COMPONENTS_BY_DATE_END "select * from Components where DateStart<? and DateDeleted=0" |
| #define | SELECT_COMPONENTS_BY_UID "select * from Components where UID=? and DateDeleted=0" |
| #define | SELECT_COMPONENTS_BY_NOTEBOOKUID "select * from Components where Notebook=? and DateDeleted=0" |
| #define | SELECT_ROWID_FROM_COMPONENTS_BY_NOTEBOOK_UID_AND_RECURID "select ComponentId from Components where Notebook=? and UID=? and RecurId=? and DateDeleted=0" |
| #define | SELECT_RDATES_BY_ID "select * from Rdates where ComponentId=?" |
| #define | SELECT_CUSTOMPROPERTIES_BY_ID "select * from Customproperties where ComponentId=?" |
| #define | SELECT_RECURSIVE_BY_ID "select * from Recursive where ComponentId=?" |
| #define | SELECT_ALARM_BY_ID "select * from Alarm where ComponentId=?" |
| #define | SELECT_ATTENDEE_BY_ID "select * from Attendee where ComponentId=?" |
| #define | SELECT_ATTACHMENTS_BY_ID "select * from Attachments where ComponentId=?" |
| #define | SELECT_CALENDARPROPERTIES_BY_ID "select * from Calendarproperties where CalendarId=?" |
| #define | SELECT_COMPONENTS_BY_CREATED "select * from Components where DateCreated>=? and DateDeleted=0" |
| #define | SELECT_COMPONENTS_BY_CREATED_AND_NOTEBOOK "select * from Components where DateCreated>=? and Notebook=? and DateDeleted=0" |
| #define | SELECT_COMPONENTS_BY_LAST_MODIFIED "select * from Components where DateLastModified>=? and DateCreated<? and DateDeleted=0" |
| #define | SELECT_COMPONENTS_BY_LAST_MODIFIED_AND_NOTEBOOK "select * from Components where DateLastModified>=? and DateCreated<? and Notebook=? and DateDeleted=0" |
| #define | SELECT_COMPONENTS_BY_DELETED "select * from Components where DateDeleted>=? and DateCreated<?" |
| #define | SELECT_COMPONENTS_BY_DELETED_AND_NOTEBOOK "select * from Components where DateDeleted>=? and DateCreated<? and Notebook=?" |
| #define | SELECT_COMPONENTS_BY_UID_RECID_AND_DELETED "select ComponentId, DateDeleted from Components where UID=? and RecurId=? and DateDeleted<>0" |
| #define | SELECT_COMPONENTS_BY_NOTEBOOK_UID_RECID_AND_DELETED "select ComponentId from Components where Notebook=? and UID=? and RecurId=? and DateDeleted<>0" |
| #define | SEARCH_COMPONENTS |
| #define | UNSET_FLAG_FROM_CALENDAR "update Calendars set Flags=(Flags & (~?))" |
| #define | BEGIN_TRANSACTION "BEGIN IMMEDIATE;" |
| #define | COMMIT_TRANSACTION "END;" |
Enumerations | |
| enum | mKCal::DBOperation { mKCal::DBInsert , mKCal::DBUpdate , mKCal::DBMarkDeleted , mKCal::DBDelete } |
| #define BEGIN_TRANSACTION "BEGIN IMMEDIATE;" |
| #define COMMIT_TRANSACTION "END;" |
| #define CREATE_ALARM |
| #define CREATE_ATTACHMENTS |
| #define CREATE_ATTENDEE |
| #define CREATE_CALENDARPROPERTIES |
| #define CREATE_CALENDARS |
| #define CREATE_COMPONENTS |
| #define CREATE_CUSTOMPROPERTIES "CREATE TABLE IF NOT EXISTS Customproperties(ComponentId INTEGER, Name TEXT, Value TEXT, Parameters TEXT)" |
| #define CREATE_METADATA "CREATE TABLE IF NOT EXISTS Metadata(transactionId INTEGER)" |
| #define CREATE_RDATES "CREATE TABLE IF NOT EXISTS Rdates(ComponentId INTEGER, Type INTEGER, Date INTEGER, DateLocal INTEGER, TimeZone TEXT)" |
| #define CREATE_RECURSIVE |
| #define DELETE_ALARM "delete from Alarm where ComponentId=?" |
| #define DELETE_ATTACHMENTS "delete from Attachments where ComponentId=?" |
| #define DELETE_ATTENDEE "delete from Attendee where ComponentId=?" |
| #define DELETE_CALENDARPROPERTIES "delete from Calendarproperties where CalendarId=?" |
| #define DELETE_CALENDARS "delete from Calendars where CalendarId=?" |
| #define DELETE_COMPONENTS "delete from Components where ComponentId=?" |
| #define DELETE_CUSTOMPROPERTIES "delete from Customproperties where ComponentId=?" |
| #define DELETE_RDATES "delete from Rdates where ComponentId=?" |
| #define DELETE_RECURSIVE "delete from Recursive where ComponentId=?" |
| #define INDEX_ALARM "CREATE INDEX IF NOT EXISTS IDX_ALARM on Alarm(ComponentId)" |
| #define INDEX_ATTACHMENTS "CREATE INDEX IF NOT EXISTS IDX_ATTACHMENTS on Attachments(ComponentId)" |
| #define INDEX_ATTENDEE "CREATE INDEX IF NOT EXISTS IDX_ATTENDEE on Attendee(ComponentId)" |
| #define INDEX_CALENDAR "CREATE INDEX IF NOT EXISTS IDX_CALENDAR on Calendars(CalendarId)" |
| #define INDEX_CALENDARPROPERTIES "CREATE INDEX IF NOT EXISTS IDX_CALENDARPROPERTIES on Calendarproperties(CalendarId)" |
| #define INDEX_COMPONENT "CREATE INDEX IF NOT EXISTS IDX_COMPONENT on Components(ComponentId, Notebook, DateStart, DateEndDue, DateDeleted)" |
| #define INDEX_COMPONENT_NOTEBOOK "CREATE INDEX IF NOT EXISTS IDX_COMPONENT_NOTEBOOK on Components(Notebook)" |
| #define INDEX_COMPONENT_UID "CREATE UNIQUE INDEX IF NOT EXISTS IDX_COMPONENT_UID on Components(UID, RecurId, DateDeleted)" |
| #define INDEX_CUSTOMPROPERTIES "CREATE INDEX IF NOT EXISTS IDX_CUSTOMPROPERTIES on Customproperties(ComponentId)" |
| #define INDEX_RDATES "CREATE INDEX IF NOT EXISTS IDX_RDATES on Rdates(ComponentId)" |
| #define INDEX_RECURSIVE "CREATE INDEX IF NOT EXISTS IDX_RECURSIVE on Recursive(ComponentId)" |
| #define INSERT_ALARM "insert into Alarm values (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)" |
| #define INSERT_ATTACHMENTS "insert into Attachments values (?, ?, ?, ?, ?, ?, ?)" |
| #define INSERT_ATTENDEE "insert into Attendee values (?, ?, ?, ?, ?, ?, ?, ?, ?)" |
| #define INSERT_CALENDARPROPERTIES "insert into Calendarproperties values (?, ?, ?)" |
| #define INSERT_CALENDARS "insert into Calendars values (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, '', '')" |
| #define INSERT_COMPONENTS |
| #define INSERT_CUSTOMPROPERTIES "insert into Customproperties values (?, ?, ?, ?)" |
| #define INSERT_RDATES "insert into Rdates values (?, ?, ?, ?, ?)" |
| #define INSERT_RECURSIVE "insert into Recursive values (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)" |
| #define SEARCH_COMPONENTS |
| #define SELECT_ALARM_BY_ID "select * from Alarm where ComponentId=?" |
| #define SELECT_ATTACHMENTS_BY_ID "select * from Attachments where ComponentId=?" |
| #define SELECT_ATTENDEE_BY_ID "select * from Attendee where ComponentId=?" |
| #define SELECT_CALENDARPROPERTIES_BY_ID "select * from Calendarproperties where CalendarId=?" |
| #define SELECT_CALENDARS_ALL "select * from Calendars order by Name" |
| #define SELECT_COMPONENTS_ALL "select * from Components where DateDeleted=0" |
| #define SELECT_COMPONENTS_ALL_DELETED "select * from Components where DateDeleted<>0" |
| #define SELECT_COMPONENTS_ALL_DELETED_BY_NOTEBOOK "select * from Components where Notebook=? and DateDeleted<>0" |
| #define SELECT_COMPONENTS_BY_CREATED "select * from Components where DateCreated>=? and DateDeleted=0" |
| #define SELECT_COMPONENTS_BY_CREATED_AND_NOTEBOOK "select * from Components where DateCreated>=? and Notebook=? and DateDeleted=0" |
| #define SELECT_COMPONENTS_BY_DATE_BOTH "select * from Components where DateStart<? and (DateEndDue>=? or (DateEndDue=0 and DateStart>=?)) and DateDeleted=0" |
| #define SELECT_COMPONENTS_BY_DATE_END "select * from Components where DateStart<? and DateDeleted=0" |
| #define SELECT_COMPONENTS_BY_DATE_START "select * from Components where (DateEndDue>=? or (DateEndDue=0 and DateStart>=?)) and DateDeleted=0" |
| #define SELECT_COMPONENTS_BY_DELETED "select * from Components where DateDeleted>=? and DateCreated<?" |
| #define SELECT_COMPONENTS_BY_DELETED_AND_NOTEBOOK "select * from Components where DateDeleted>=? and DateCreated<? and Notebook=?" |
| #define SELECT_COMPONENTS_BY_LAST_MODIFIED "select * from Components where DateLastModified>=? and DateCreated<? and DateDeleted=0" |
| #define SELECT_COMPONENTS_BY_LAST_MODIFIED_AND_NOTEBOOK "select * from Components where DateLastModified>=? and DateCreated<? and Notebook=? and DateDeleted=0" |
| #define SELECT_COMPONENTS_BY_NOTEBOOK_UID_RECID_AND_DELETED "select ComponentId from Components where Notebook=? and UID=? and RecurId=? and DateDeleted<>0" |
| #define SELECT_COMPONENTS_BY_NOTEBOOKUID "select * from Components where Notebook=? and DateDeleted=0" |
| #define SELECT_COMPONENTS_BY_RECURSIVE |
| #define SELECT_COMPONENTS_BY_UID "select * from Components where UID=? and DateDeleted=0" |
| #define SELECT_COMPONENTS_BY_UID_RECID_AND_DELETED "select ComponentId, DateDeleted from Components where UID=? and RecurId=? and DateDeleted<>0" |
| #define SELECT_CUSTOMPROPERTIES_BY_ID "select * from Customproperties where ComponentId=?" |
| #define SELECT_METADATA "select * from Metadata where rowid=1" |
| #define SELECT_RDATES_BY_ID "select * from Rdates where ComponentId=?" |
| #define SELECT_RECURSIVE_BY_ID "select * from Recursive where ComponentId=?" |
| #define SELECT_ROWID_FROM_COMPONENTS_BY_NOTEBOOK_UID_AND_RECURID "select ComponentId from Components where Notebook=? and UID=? and RecurId=? and DateDeleted=0" |
| #define SL3_bind_blob | ( | stmt, | |
| index, | |||
| value, | |||
| size, | |||
| desc ) |
| #define SL3_bind_double | ( | stmt, | |
| index, | |||
| value ) |
| #define SL3_bind_int | ( | stmt, | |
| index, | |||
| value ) |
| #define SL3_bind_int64 | ( | stmt, | |
| index, | |||
| value ) |
| #define SL3_bind_text | ( | stmt, | |
| index, | |||
| value, | |||
| size, | |||
| desc ) |
| #define SL3_exec | ( | db | ) |
| #define SL3_prepare_v2 | ( | db, | |
| query, | |||
| qsize, | |||
| stmt, | |||
| tail ) |
| #define SL3_reset | ( | stmt | ) |
| #define SL3_step | ( | stmt | ) |
| #define SL3_try_exec | ( | db | ) |
| #define UNSET_FLAG_FROM_CALENDAR "update Calendars set Flags=(Flags & (~?))" |
| #define UPDATE_CALENDARS |
| #define UPDATE_COMPONENTS |
| #define UPDATE_COMPONENTS_AS_DELETED "update Components set DateDeleted=? where ComponentId=?" |
| #define UPDATE_METADATA "replace into Metadata (rowid, transactionId) values (1, ?)" |
1.16.1