63
63
void set_identifier (int identifier, int new_identifier);
66
vector <int> get_identifiers ();
67
int store_new_note (const string& bible, int book, int chapter, int verse, string summary, string contents, bool raw);
66
std::vector <int> get_identifiers ();
67
int store_new_note (const std::string& bible, int book, int chapter, int verse, std::string summary, std::string contents, bool raw);
69
69
int get_new_unique_identifier ();
72
vector <int> select_notes (vector <string> bibles, int book, int chapter, int verse, int passage_selector, int edit_selector, int non_edit_selector, const string& status_selector, string bible_selector, string assignment_selector, bool subscription_selector, int severity_selector, int text_selector, const string& search_text, int limit);
74
string notes_select_identifier ();
75
string notes_optional_fulltext_search_relevance_statement (string search);
76
string notes_from_where_statement ();
77
string notes_optional_fulltext_search_statement (string search);
78
string notes_order_by_relevance_statement ();
81
string get_summary (int identifier);
82
void set_summary (int identifier, const string& summary);
84
string summary_key ();
87
string get_contents (int identifier);
88
void set_contents (int identifier, const string& contents);
90
string contents_key ();
91
string assemble_contents (int identifier, string contents);
92
void set_raw_contents (int identifier, const string& contents);
72
std::vector <int> select_notes (std::vector <std::string> bibles, int book, int chapter, int verse, int passage_selector, int edit_selector, int non_edit_selector, const std::string& status_selector, std::string bible_selector, std::string assignment_selector, bool subscription_selector, int severity_selector, int text_selector, const std::string& search_text, int limit);
74
std::string notes_select_identifier ();
75
std::string notes_optional_fulltext_search_relevance_statement (std::string search);
76
std::string notes_from_where_statement ();
77
std::string notes_optional_fulltext_search_statement (std::string search);
78
std::string notes_order_by_relevance_statement ();
81
std::string get_summary (int identifier);
82
void set_summary (int identifier, const std::string& summary);
84
std::string summary_key ();
87
std::string get_contents (int identifier);
88
void set_contents (int identifier, const std::string& contents);
90
std::string contents_key ();
91
std::string assemble_contents (int identifier, std::string contents);
92
void set_raw_contents (int identifier, const std::string& contents);
95
95
void erase (int identifier);
98
void add_comment (int identifier, const string& comment);
98
void add_comment (int identifier, const std::string& comment);
101
101
void subscribe (int identifier);
102
102
void unsubscribe (int identifier);
103
void subscribe_user (int identifier, const string& user);
104
void unsubscribe_user (int identifier, const string& user);
105
bool is_subscribed (int identifier, const string& user);
106
vector <string> get_subscribers (int identifier);
107
void set_subscribers (int identifier, vector <string> subscribers);
109
string subscriptions_key ();
110
string get_raw_subscriptions (int identifier);
111
void set_raw_subscriptions (int identifier, const string& subscriptions);
114
void assign_user (int identifier, const string& user);
115
bool is_assigned (int identifier, const string& user);
116
void unassign_user (int identifier, const string& user);
117
vector <string> get_all_assignees (const vector <string>& bibles);
118
vector <string> get_assignees (int identifier);
119
void set_assignees (int identifier, vector <string> assignees);
121
string assigned_key ();
122
vector <string> get_assignees_internal (string assignees);
123
void set_raw_assigned (int identifier, const string& assigned);
124
string get_raw_assigned (int identifier);
127
string get_bible (int identifier);
128
void set_bible (int identifier, const string& bible);
129
vector <string> get_all_bibles ();
134
string encode_passage (int book, int chapter, int verse);
135
Passage decode_passage (string passage);
136
string decode_passage (int identifier);
137
vector <Passage> get_passages (int identifier);
138
void set_passages (int identifier, const vector <Passage>& passages, bool import = false);
139
void set_raw_passage (int identifier, const string& passage);
140
void index_raw_passage (int identifier, const string& passage);
142
string passage_key ();
143
string get_raw_passage (int identifier);
146
string get_raw_status (int identifier);
147
string get_status (int identifier);
148
void set_status (int identifier, const string& status, bool import = false);
149
vector <Database_Notes_Text> get_possible_statuses ();
151
string status_key ();
154
string get_severity (int identifier);
103
void subscribe_user (int identifier, const std::string& user);
104
void unsubscribe_user (int identifier, const std::string& user);
105
bool is_subscribed (int identifier, const std::string& user);
106
std::vector <std::string> get_subscribers (int identifier);
107
void set_subscribers (int identifier, std::vector <std::string> subscribers);
109
std::string subscriptions_key ();
110
std::string get_raw_subscriptions (int identifier);
111
void set_raw_subscriptions (int identifier, const std::string& subscriptions);
114
void assign_user (int identifier, const std::string& user);
115
bool is_assigned (int identifier, const std::string& user);
116
void unassign_user (int identifier, const std::string& user);
117
std::vector <std::string> get_all_assignees (const std::vector <std::string>& bibles);
118
std::vector <std::string> get_assignees (int identifier);
119
void set_assignees (int identifier, std::vector <std::string> assignees);
121
std::string assigned_key ();
122
std::vector <std::string> get_assignees_internal (std::string assignees);
123
void set_raw_assigned (int identifier, const std::string& assigned);
124
std::string get_raw_assigned (int identifier);
127
std::string get_bible (int identifier);
128
void set_bible (int identifier, const std::string& bible);
129
std::vector <std::string> get_all_bibles ();
131
std::string bible_key ();
134
std::string encode_passage (int book, int chapter, int verse);
135
Passage decode_passage (std::string passage);
136
std::string decode_passage (int identifier);
137
std::vector <Passage> get_passages (int identifier);
138
void set_passages (int identifier, const std::vector <Passage>& passages, bool import = false);
139
void set_raw_passage (int identifier, const std::string& passage);
140
void index_raw_passage (int identifier, const std::string& passage);
142
std::string passage_key ();
143
std::string get_raw_passage (int identifier);
146
std::string get_raw_status (int identifier);
147
std::string get_status (int identifier);
148
void set_status (int identifier, const std::string& status, bool import = false);
149
std::vector <Database_Notes_Text> get_possible_statuses ();
151
std::string status_key ();
154
std::string get_severity (int identifier);
155
155
int get_raw_severity (int identifier);
156
156
void set_raw_severity (int identifier, int severity);
157
vector <Database_Notes_Text> get_possible_severities ();
157
std::vector <Database_Notes_Text> get_possible_severities ();
159
string severity_key ();
160
vector <string> standard_severities ();
159
std::string severity_key ();
160
std::vector <std::string> standard_severities ();
163
163
int get_modified (int identifier);
164
164
void set_modified (int identifier, int time);
166
string modified_key ();
166
std::string modified_key ();
167
167
void note_modified_actions (int identifier);
170
170
bool get_public (int identifier);
171
171
void set_public (int identifier, bool value);
173
string public_key ();
173
std::string public_key ();
176
string get_search_field (int identifier);
176
std::string get_search_field (int identifier);
177
177
void update_search_fields (int identifier);
178
vector <int> search_notes (string search, const vector <string> & bibles);
178
std::vector <int> search_notes (std::string search, const std::vector <std::string> & bibles);
181
181
void mark_for_deletion (int identifier);
182
182
void unmark_for_deletion (int identifier);
183
183
bool is_marked_for_deletion (int identifier);
185
string expiry_key ();
185
std::string expiry_key ();
186
186
void touch_marked_for_deletion ();
187
vector <int> get_due_for_deletion ();
187
std::vector <int> get_due_for_deletion ();
190
void set_checksum (int identifier, const string & checksum);
191
string get_checksum (int identifier);
190
void set_checksum (int identifier, const std::string & checksum);
191
std::string get_checksum (int identifier);
192
192
void delete_checksum (int identifier);
193
193
void update_checksum (int identifier);
194
string get_multiple_checksum (const vector <int> & identifiers);
195
vector <int> get_notes_in_range_for_bibles (int lowId, int highId, vector <string> bibles, bool anybible);
194
std::string get_multiple_checksum (const std::vector <int> & identifiers);
195
std::vector <int> get_notes_in_range_for_bibles (int lowId, int highId, std::vector <std::string> bibles, bool anybible);
198
198
void set_availability (bool available);
199
199
bool available ();
201
string availability_flag ();
201
std::string availability_flag ();
204
string get_bulk (vector <int> identifiers);
205
vector <string> set_bulk (string json);
204
std::string get_bulk (std::vector <int> identifiers);
205
std::vector <std::string> set_bulk (std::string json);
208
208
void update_database (int identifier);
209
void update_database_internal (int identifier, int modified, string assigned, string subscriptions, string bible, string passage, string status, int severity, string summary, string contents);
209
void update_database_internal (int identifier, int modified, std::string assigned, std::string subscriptions, std::string bible, std::string passage, std::string status, int severity, std::string summary, std::string contents);
212
212
friend void test_database_notes ();