View source
From TaskDepender
for
Selected tasks database table
Jump to:
navigation
,
search
__NOTOC__''This page describes the temporary table that is created to hold the ids of the selected tasks.'' == Description == To hold the selected tasks, a ''temporary'' table is created in the database. Although this table only has to hold the ids of the selected ids, it is convenient to have this table since it can be used when [[Undoing actions|undoing the last edits]]. == Design == The ids of the selected tasks are stored in a temporary table. These ids are references to the ids in the [[Tasks database table|tasks table]]. The usage will be entering and deleting a task and deleting all elements. == Implementation == === Creating the table === <syntaxhighlight lang="sql"> CREATE TEMPORARY TABLE SelectedTasks ( Id INTEGER REFERENCES Tasks(Id) ON DELETE CASCADE ) </syntaxhighlight> === Add a task === <syntaxhighlight lang="sql"> INSERT INTO SelectedTasks VALUE(%d) </syntaxhighlight> === Delete a task === <syntaxhighlight lang="sql"> DELETE FROM SelectedTasks WHERE Id=%d </syntaxhighlight> === Clear table === <syntaxhighlight lang="sql"> DELETE FROM SelectedTasks </syntaxhighlight> ---- * [[Database]]
Return to
Selected tasks database table
.
Views
Page
Discussion
View source
History
Personal tools
Log in
Navigation
Main page
Recent changes
Help
Search
Toolbox
What links here
Related changes
Special pages