rikitiki
v0.1.67
Build C++ web server modules that allow easy routing and deployment.
|
#include <rest.h>
Public Member Functions | |
void | throwNQ (ConnContext &ctx, int retval, int desired_retval) |
Throw an exception if a sqlite operation returns an unexpected return value. | |
Json::Value | readRow (sqlite3_stmt *stmt) |
Read a single row from a result set. | |
void | POST (ConnContext &ctx) |
Post operations add items to the DB. | |
void | GET (ConnContext &ctx) |
Get operations without an ID return a list of all books. | |
void | GET (ConnContext &ctx, int id) |
void | DELETE (ConnContext &ctx) |
void | init_db () |
void | Register (Server &server) |
Public Attributes | |
sqlite3_stmt * | insert_stmt |
sqlite3_stmt * | select_all_stmt |
sqlite3_stmt * | select_stmt |
sqlite3 * | handle |
Example implementation of a REST module against sqlite. Demonstrates