|
|
| version 1.196, 2004/02/11 15:33:13 | version 1.201, 2004/04/01 15:08:48 |
|---|---|
| Line 251 static void skip_empty_and_comment_lines | Line 251 static void skip_empty_and_comment_lines |
| while( char c=*data ) { | while( char c=*data ) { |
| if( c== '\n' || c == '#' ) { | if( c== '\n' || c == '#' ) { |
| /*nowhere=*/getrow(&data); // remove empty&comment lines | /*nowhere=*/getrow(&data); // remove empty&comment lines |
| *data_ref=data; | if(!(*data_ref=data)) |
| break; | |
| continue; | continue; |
| } | } |
| break; | break; |
| Line 335 static void _load(Request& r, MethodPara | Line 336 static void _load(Request& r, MethodPara |
| Table::element_type row(new ArrayString); | Table::element_type row(new ArrayString); |
| skip_empty_and_comment_lines(&data); | skip_empty_and_comment_lines(&data); |
| while( lsplit_result sr=lsplit(&data, separators.column, '\n', separators.encloser) ) { | while( lsplit_result sr=lsplit(&data, separators.column, '\n', separators.encloser) ) { |
| if(!sr.delim && !row->count()) // append last empty column [if without \n] | if(!*sr.piece && !sr.delim && !row->count()) // append last empty column [if without \n] |
| break; | break; |
| *row+=new String(sr.piece, 0, true); | *row+=new String(sr.piece, 0, true); |
| if(sr.delim=='\n') { | if(sr.delim=='\n') { |
| Line 629 static void _hash(Request& r, MethodPara | Line 630 static void _hash(Request& r, MethodPara |
| } else | } else |
| throw Exception("parser.runtime", | throw Exception("parser.runtime", |
| 0, | 0, |
| "value field(s) must be string or self_table" | "value field(s) must be string or table" |
| ); | ); |
| } else { // by all columns, including key | } else { // by all columns, including key |
| if(!(distinct!=D_ILLEGAL && distinct!=D_FIRST)) | if(!(distinct!=D_ILLEGAL && distinct!=D_FIRST)) |
| Line 644 static void _hash(Request& r, MethodPara | Line 645 static void _hash(Request& r, MethodPara |
| &r, | &r, |
| &self_table, | &self_table, |
| /*key_code=*/key_param->get_junction()?key_param:0, | /*key_code=*/key_param->get_junction()?key_param:0, |
| /*key_field=*/0, | /*key_field=*/0/*filled below*/, |
| &value_fields, | &value_fields, |
| &result.hash(), | &result.hash(), |
| distinct, | distinct, |