src/includes/c/parse_meta.c
//make a ParserType function that takes a string and transform it into lines and return the type of each line
make a ParserType function that takes a string and transform it into lines and return the type of each line
make a ParserType function that takes a string and transform it into lines and return the type of each line
ParserType parse_meta(char* input) {
    if(strncmp(input, "varchar", 7) == 0) {
        return VARCHAR;
    }
    if(strncmp(input, "text", 4) == 0) {
        return TEXT;
    }
    if(strncmp(input, "binary", 6) == 0) {
        return BINARY;
    }
    if(strncmp(input, "image", 5) == 0) {
        return IMAGE;
    }
    if(strncmp(input, "video", 5) == 0) {
        return VIDEO;
    }
    if(strncmp(input, "float", 5) == 0) {
        return FLOAT;
    }
    if(strncmp(input, "int", 3) == 0) {
        return INT;
    }
    if(strncmp(input, "date", 4) == 0) {
        return DATE;
    }
    if(strncmp(input, "time", 4) == 0) {
        return TIME;
    }
    if(strncmp(input, "bool", 4) == 0) {
        return BOOL;
    }
}
ParserType parse_meta ( char * input ) { if ( strncmp ( input , " " , 7 ) == 0 ) { return VARCHAR ; } if ( strncmp ( input , " " , 4 ) == 0 ) { return TEXT ; } if ( strncmp ( input , " " , 6 ) == 0 ) { return BINARY ; } if ( strncmp ( input , " " , 5 ) == 0 ) { return IMAGE ; } if ( strncmp ( input , " " , 5 ) == 0 ) { return VIDEO ; } if ( strncmp ( input , " " , 5 ) == 0 ) { return FLOAT ; } if ( strncmp ( input , " " , 3 ) == 0 ) { return INT ; } if ( strncmp ( input , " " , 4 ) == 0 ) { return DATE ; } if ( strncmp ( input , " " , 4 ) == 0 ) { return TIME ; } if ( strncmp ( input , " " , 4 ) == 0 ) { return BOOL ; } }
make a ParserType function that takes a string and transform it into lines and return the type of each line
make a ParserType function that takes a string and transform it into lines and return the type of each line