Branch: Tag:

2017-04-03

2017-04-03 15:28:08 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Sql.mysql: Fixed API for list_{dbs,tables}().

The low-level implementations of these function return
Result objects, so they need to be converted to arrays
to comply with the standard API.

760:    QUERY_BODY (streaming_typed_query);   }    + array(string) list_dbs(string|void wild) + { +  Result res = ::list_dbs(wild); +  array(string) ret = ({}); +  array(string) row; +  while((row = res->fetch_row()) && sizeof(row)) { +  ret += ({ row[0] }); +  } +  return ret; + } +  + array(string) list_tables(string|void wild) + { +  Result res = ::list_tables(wild); +  array(string) ret = ({}); +  array(string) row; +  while((row = res->fetch_row()) && sizeof(row)) { +  ret += ({ row[0] }); +  } +  return ret; + } +    int(0..1) is_keyword( string name )   //! Return 1 if the argument @[name] is a mysql keyword that needs to   //! be quoted in a query. The list is currently up-to-date with MySQL