Exemplo n.º 1
0
void BWCGI::process_query_string() {
	if(!have_query_string()) return;
	BWString qs = getvar(_bwcgi_kenv_query_string);
	std::vector<BWString> queries = qs.split("&");
	for ( BWString q : queries ) {
		std::vector<BWString> qv = q.split("=");
		if (qv.size() >= 2) {
			BWString k = qv[0];
			BWString v = qv[1];
			if(k.have_value()) {
				_qmap[k] = v.have_value() ? v : "";
			}
		}
	}
}
Exemplo n.º 2
0
bool BWDB::table_exists(const BWString &table_name)
{
    BWString rs = get_query_value("SELECT name FROM sqlite_master WHERE type = ? and name = ?", {"table", table_name});

    if (rs.have_value())
    {
        return true;
    } else
    {
        return false;
    }

    return false;
}