DBD-KB

 view release on metacpan or  search on metacpan

quote.c  view on Meta::CPAN


    int max_keyword_length = 17;
    int keyword_len;
    int i;
    char word[64];

    keyword_len = (int)strlen(string);
    if (keyword_len > max_keyword_length || keyword_len > 64) {
        return DBDPG_FALSE;
    }

    /* Because of locale issues, we manually downcase A-Z only */
    for (i = 0; i < keyword_len; i++) {
        char ch = string[i];
        if (ch >= 'A' && ch <= 'Z')
            ch += 'a' - 'A';
        word[i] = ch;
    }
    word[keyword_len] = '\0';

    /* Check for each reserved word */
    if (0==strcmp(word, "abort")) return DBDPG_TRUE;
    if (0==strcmp(word, "absolute")) return DBDPG_TRUE;
    if (0==strcmp(word, "access")) return DBDPG_TRUE;
    if (0==strcmp(word, "action")) return DBDPG_TRUE;
    if (0==strcmp(word, "add")) return DBDPG_TRUE;
    if (0==strcmp(word, "admin")) return DBDPG_TRUE;
    if (0==strcmp(word, "after")) return DBDPG_TRUE;
    if (0==strcmp(word, "aggregate")) return DBDPG_TRUE;
    if (0==strcmp(word, "all")) return DBDPG_TRUE;
    if (0==strcmp(word, "also")) return DBDPG_TRUE;
    if (0==strcmp(word, "alter")) return DBDPG_TRUE;
    if (0==strcmp(word, "always")) return DBDPG_TRUE;
    if (0==strcmp(word, "analyse")) return DBDPG_TRUE;
    if (0==strcmp(word, "analyze")) return DBDPG_TRUE;
    if (0==strcmp(word, "and")) return DBDPG_TRUE;
    if (0==strcmp(word, "any")) return DBDPG_TRUE;
    if (0==strcmp(word, "array")) return DBDPG_TRUE;
    if (0==strcmp(word, "as")) return DBDPG_TRUE;
    if (0==strcmp(word, "asc")) return DBDPG_TRUE;
    if (0==strcmp(word, "assertion")) return DBDPG_TRUE;
    if (0==strcmp(word, "assignment")) return DBDPG_TRUE;
    if (0==strcmp(word, "asymmetric")) return DBDPG_TRUE;
    if (0==strcmp(word, "at")) return DBDPG_TRUE;
    if (0==strcmp(word, "attach")) return DBDPG_TRUE;
    if (0==strcmp(word, "attribute")) return DBDPG_TRUE;
    if (0==strcmp(word, "authorization")) return DBDPG_TRUE;
    if (0==strcmp(word, "backward")) return DBDPG_TRUE;
    if (0==strcmp(word, "before")) return DBDPG_TRUE;
    if (0==strcmp(word, "begin")) return DBDPG_TRUE;
    if (0==strcmp(word, "between")) return DBDPG_TRUE;
    if (0==strcmp(word, "bigint")) return DBDPG_TRUE;
    if (0==strcmp(word, "binary")) return DBDPG_TRUE;
    if (0==strcmp(word, "bit")) return DBDPG_TRUE;
    if (0==strcmp(word, "boolean")) return DBDPG_TRUE;
    if (0==strcmp(word, "both")) return DBDPG_TRUE;
    if (0==strcmp(word, "by")) return DBDPG_TRUE;
    if (0==strcmp(word, "cache")) return DBDPG_TRUE;
    if (0==strcmp(word, "call")) return DBDPG_TRUE;
    if (0==strcmp(word, "called")) return DBDPG_TRUE;
    if (0==strcmp(word, "cascade")) return DBDPG_TRUE;
    if (0==strcmp(word, "cascaded")) return DBDPG_TRUE;
    if (0==strcmp(word, "case")) return DBDPG_TRUE;
    if (0==strcmp(word, "cast")) return DBDPG_TRUE;
    if (0==strcmp(word, "catalog")) return DBDPG_TRUE;
    if (0==strcmp(word, "chain")) return DBDPG_TRUE;
    if (0==strcmp(word, "char")) return DBDPG_TRUE;
    if (0==strcmp(word, "character")) return DBDPG_TRUE;
    if (0==strcmp(word, "characteristics")) return DBDPG_TRUE;
    if (0==strcmp(word, "check")) return DBDPG_TRUE;
    if (0==strcmp(word, "checkpoint")) return DBDPG_TRUE;
    if (0==strcmp(word, "class")) return DBDPG_TRUE;
    if (0==strcmp(word, "close")) return DBDPG_TRUE;
    if (0==strcmp(word, "cluster")) return DBDPG_TRUE;
    if (0==strcmp(word, "coalesce")) return DBDPG_TRUE;
    if (0==strcmp(word, "collate")) return DBDPG_TRUE;
    if (0==strcmp(word, "collation")) return DBDPG_TRUE;
    if (0==strcmp(word, "column")) return DBDPG_TRUE;
    if (0==strcmp(word, "columns")) return DBDPG_TRUE;
    if (0==strcmp(word, "comment")) return DBDPG_TRUE;
    if (0==strcmp(word, "comments")) return DBDPG_TRUE;
    if (0==strcmp(word, "commit")) return DBDPG_TRUE;
    if (0==strcmp(word, "committed")) return DBDPG_TRUE;
    if (0==strcmp(word, "concurrently")) return DBDPG_TRUE;
    if (0==strcmp(word, "configuration")) return DBDPG_TRUE;
    if (0==strcmp(word, "conflict")) return DBDPG_TRUE;
    if (0==strcmp(word, "connection")) return DBDPG_TRUE;
    if (0==strcmp(word, "constraint")) return DBDPG_TRUE;
    if (0==strcmp(word, "constraints")) return DBDPG_TRUE;
    if (0==strcmp(word, "content")) return DBDPG_TRUE;
    if (0==strcmp(word, "continue")) return DBDPG_TRUE;
    if (0==strcmp(word, "conversion")) return DBDPG_TRUE;
    if (0==strcmp(word, "copy")) return DBDPG_TRUE;
    if (0==strcmp(word, "cost")) return DBDPG_TRUE;
    if (0==strcmp(word, "create")) return DBDPG_TRUE;
    if (0==strcmp(word, "cross")) return DBDPG_TRUE;
    if (0==strcmp(word, "csv")) return DBDPG_TRUE;
    if (0==strcmp(word, "cube")) return DBDPG_TRUE;
    if (0==strcmp(word, "current")) return DBDPG_TRUE;
    if (0==strcmp(word, "current_catalog")) return DBDPG_TRUE;
    if (0==strcmp(word, "current_date")) return DBDPG_TRUE;
    if (0==strcmp(word, "current_role")) return DBDPG_TRUE;
    if (0==strcmp(word, "current_schema")) return DBDPG_TRUE;
    if (0==strcmp(word, "current_time")) return DBDPG_TRUE;
    if (0==strcmp(word, "current_timestamp")) return DBDPG_TRUE;
    if (0==strcmp(word, "current_user")) return DBDPG_TRUE;
    if (0==strcmp(word, "cursor")) return DBDPG_TRUE;
    if (0==strcmp(word, "cycle")) return DBDPG_TRUE;
    if (0==strcmp(word, "data")) return DBDPG_TRUE;
    if (0==strcmp(word, "database")) return DBDPG_TRUE;
    if (0==strcmp(word, "day")) return DBDPG_TRUE;
    if (0==strcmp(word, "deallocate")) return DBDPG_TRUE;
    if (0==strcmp(word, "dec")) return DBDPG_TRUE;
    if (0==strcmp(word, "decimal")) return DBDPG_TRUE;
    if (0==strcmp(word, "declare")) return DBDPG_TRUE;
    if (0==strcmp(word, "default")) return DBDPG_TRUE;
    if (0==strcmp(word, "defaults")) return DBDPG_TRUE;
    if (0==strcmp(word, "deferrable")) return DBDPG_TRUE;
    if (0==strcmp(word, "deferred")) return DBDPG_TRUE;
    if (0==strcmp(word, "definer")) return DBDPG_TRUE;
    if (0==strcmp(word, "delete")) return DBDPG_TRUE;
    if (0==strcmp(word, "delimiter")) return DBDPG_TRUE;



( run in 0.556 second using v1.01-cache-2.11-cpan-e93a5daba3e )