Diff for /parser3/src/classes/table.C between versions 1.288 and 1.289

version 1.288, 2012/06/08 11:44:02 version 1.289, 2012/06/08 12:10:18
Line 766  static void _hash(Request& r, MethodPara Line 766  static void _hash(Request& r, MethodPara
                         Table2hash_value_type value_type=C_HASH;                          Table2hash_value_type value_type=C_HASH;
                         int param_index=params.count()-1;                          int param_index=params.count()-1;
                         if(param_index>0) {                          if(param_index>0) {
                                 if(HashStringValue* options=params.as_hash(param_index)){ // options where specified                                  if(HashStringValue* options=params.as_no_junction(param_index, PARAM_MUST_NOT_BE_CODE).get_hash()){ // can't use .as_has because the 2nd param could be table so .as_hash throws an error
                                         --param_index;                                          --param_index;
                                         int valid_options=0;                                          int valid_options=0;
                                         if(Value* vdistinct_code=options->get(sql_distinct_name)) { // $.distinct ?                                          if(Value* vdistinct_code=options->get(sql_distinct_name)) { // $.distinct ?
Line 801  static void _hash(Request& r, MethodPara Line 801  static void _hash(Request& r, MethodPara
                                 }                                  }
                         }                          }
   
                           if(param_index==2) // options was specified but not as hash
                                   throw Exception(PARSER_RUNTIME, 0, "options must be hash");
   
                         Array<int> value_fields;                          Array<int> value_fields;
                         if(param_index==0){ // list of columns wasn't specified                          if(param_index==0){ // list of columns wasn't specified
                                 if(value_type==C_STRING) // $.type[string]                                  if(value_type==C_STRING) // $.type[string]

Removed from v.1.288  
changed lines
  Added in v.1.289


E-mail: