summary refs log tree commit diff
path: root/server.h
diff options
context:
space:
mode:
Diffstat (limited to 'server.h')
-rw-r--r--server.h11
1 files changed, 8 insertions, 3 deletions
diff --git a/server.h b/server.h
index 9b665d7..0e77f7c 100644
--- a/server.h
+++ b/server.h
@@ -37,20 +37,23 @@ extern sqlite3 *db;
 
 extern const char *NetworksQuery;
 extern const char *ContextsQuery;
-extern const char *EventsQuery;
+extern const char *EventsAfterQuery;
+extern const char *EventsBeforeQuery;
 extern const char *SearchQuery;
 
 extern struct Statements {
 	sqlite3_stmt *networks;
 	sqlite3_stmt *contexts;
-	sqlite3_stmt *events;
+	sqlite3_stmt *eventsAfter;
+	sqlite3_stmt *eventsBefore;
 	sqlite3_stmt *search;
 } stmt;
 
 static inline void dbClose(void) {
 	if (stmt.networks) sqlite3_finalize(stmt.networks);
 	if (stmt.contexts) sqlite3_finalize(stmt.contexts);
-	if (stmt.events) sqlite3_finalize(stmt.events);
+	if (stmt.eventsAfter) sqlite3_finalize(stmt.eventsAfter);
+	if (stmt.eventsBefore) sqlite3_finalize(stmt.eventsBefore);
 	if (stmt.search) sqlite3_finalize(stmt.search);
 	sqlite3_close(db);
 }
@@ -92,6 +95,7 @@ extern const char *Pages[PagesLen];
 	X(Network, "network", kvalid_stringne) \
 	X(Context, "context", kvalid_stringne) \
 	X(After, "after", kvalid_stringne) \
+	X(Before, "before", kvalid_stringne) \
 	X(Query, "query", kvalid_stringne)
 
 enum {
@@ -104,6 +108,7 @@ enum {
 extern const struct kvalid Keys[KeysLen];
 
 extern bool pagePublic;
+extern int pageLimit;
 
 enum kcgi_err pageNetworks(struct kreq *req);
 enum kcgi_err pageContexts(struct kreq *req);
2018-08-20Update usage of scheme in READMEJune McEnroe 2018-08-20Use scheme.h in fbatt and fbclockJune McEnroe 2018-08-20Generate scheme.hJune McEnroe 2018-08-20Add dependencies on gfx.hJune McEnroe 2018-08-18Add Blondie — Heart of GlassJune McEnroe Why didn't I know about this song? I love it. 2018-08-18Set FCEDIT=$EDITORJune McEnroe 2018-08-18Only post commits with bodies to MastodonJune McEnroe 2018-08-18Run tf/cfg link script with /bin/shJune McEnroe 2018-08-18Run {,s,t}up with /bin/shJune McEnroe 2018-08-18Use whence instead of typeJune McEnroe type is an alias for whence -v and is more for human consumption. 2018-08-18Cut off path components until right prompt fitsJune McEnroe Keeps paths valid (from somehwere) rather than abrupt truncation. 2018-08-17Add "private" alias to source encrypted fileJune McEnroe Why is there no easy way to *edit* an encrypted file? 2018-08-17Add vim mapping to add a #includeJune McEnroe