40 m_fin.open(fname.c_str());
44 if (!
m_fin.is_open()) {
45 cerr <<
"error: problem opening file '" <<
m_fname <<
"' for reading"
60 ptr = strchr(base,
'\t');
63 if (!strcmp(base,
"name"))
65 else if (!strcmp(base,
"id"))
74 ptr = strchr(base,
'\t');
77 if (!strcmp(base,
"name"))
79 else if (!strcmp(base,
"id"))
90 cerr <<
"error: 'name' not found in column position 0 in file '"
96 cerr <<
"error: 'id' not found in column position 1 in file '"
101 if ((base = (
char*)strrchr(fname.c_str(),
'/')) == 0)
102 base = (
char *)fname.c_str();
105 if ((ptr = strchr(base,
'.')) != 0)
119 while (!
m_fin.eof()) {
124 base = (
char *)
m_line.c_str();
126 ptr = strchr(base,
'\t');
136 ptr = strchr(base,
'\t');
148 cerr <<
"error: 'id' field not found on line " <<
m_lineno
149 <<
" of file '" <<
m_fname <<
"'" << endl;
180 for (
size_t i=2; i<nfields; i++) {
const char * column_qualifier
std::vector< ColumnInfo > m_column_info
bool load(const std::string fname)
size_t column_qualifier_len
std::string m_header_line
Compatibility Macros for C/C++.
InsertRec * next(int *countp)
const char * column_family