25. Vacuum

<<argparse_entries>>=
{"vacuum", 6, p_vacuum, NULL},
<<static_funcdefs>>=
static int p_vacuum(int argc, char *argv[]);
<<functions>>=
static int p_vacuum(int argc, char *argv[])
{
    weewiki_d ww;
    sqlite3 *db;

    weewiki_init(&ww);
    weewiki_open(&ww, weewiki_dbname_get());

    db = weewiki_db(&ww);
    sqlite3_exec(db, "VACUUM;\n", NULL, NULL, NULL);

    weewiki_close(&ww);
    weewiki_clean(&ww);
    return 0;
}



prev | home | next