Branch: Tag:

2016-03-27

2016-03-27 14:56:33 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Mysql: Moved and renamed Mysql.mysql_result to Mysql.mysql.Result.

This is in preparation for allowing overloading of the Result class.

101:    *! use @[Sql.Sql()] with an "mysql://" URL.    *!    *! @seealso -  *! @[Mysql.mysql], @[Mysql.mysql_result], @[Sql.Sql] +  *! @[Mysql.mysql], @[Mysql.mysql()->Result], @[Sql.Sql]    */      /*! @class mysql
111:    *! This class enables access to the Mysql database from within Pike.    *!    *! @seealso -  *! @[Mysql.mysql_result], @[Sql.Sql] +  *! @[Mysql.mysql()->Result], @[Sql.Sql]    */      struct program * mysql_error_program = NULL;
273:   #ifdef HAVE_MYSQL_FIELD_CHARSETNR    add_integer_constant ("HAVE_MYSQL_FIELD_CHARSETNR", 1, 0);   #endif +  +  /* NB: Nest the Result program in the connection program. */ +  init_mysql_res_programs();   }       void pike_mysql_set_ssl(struct mapping *options)
1456:    push_int(prot);   }    - /*! @decl object(Mysql.mysql_result) list_dbs() -  *! @decl object(Mysql.mysql_result) list_dbs(string wild) + /*! @decl object(Mysql.mysql.Result) list_dbs() +  *! @decl object(Mysql.mysql.Result) list_dbs(string wild)    *!    *! List databases    *!
1467:    *!    *! @seealso    *! @[list_tables()], @[list_fields()], @[list_processes()], -  *! @[Mysql.mysql_result] +  *! @[Mysql.mysql()->Result]    */   PIKEFUN object list_dbs(string(1..255)|void wild)   {
1507:    push_object(make_mysql_result(result, 0));   }    - /*! @decl object(Mysql.mysql_result) list_tables() -  *! @decl object(Mysql.mysql_result) list_tables(string wild) + /*! @decl object(Mysql.mysql.Result) list_tables() +  *! @decl object(Mysql.mysql.Result) list_tables(string wild)    *!    *! List tables in the current database    *!
1518:    *!    *! @seealso    *! @[list_dbs()], @[list_fields()], @[list_processes()], -  *! @[Mysql.mysql_result] +  *! @[Mysql.mysql()->Result]    */   PIKEFUN object list_tables(string(1..255)|void wild)   {
1630:    *!    *! @seealso    *! @[list_dbs()], @[list_tables()], @[list_processes()], -  *! @[Mysql.mysql_result.fetch_field()] +  *! @[Mysql.mysql()->Result()->fetch_field()]    */   PIKEFUN array(int|mapping(string:mixed)) list_fields(string(1..255) table,    string(1..255)|void wild)
1690:    f_aggregate(i);   }    - /*! @decl object(Mysql.mysql_result) list_processes() + /*! @decl object(Mysql.mysql.Result) list_processes()    *!    *! List all processes in the Mysql-server    *!
1698:    *! Mysql-server.    *!    *! @seealso -  *! @[list_dbs()], @[list_tables()], @[list_fields()], @[Mysql.mysql_result] +  *! @[list_dbs()], @[list_tables()], @[list_fields()], +  *! @[Mysql.mysql()->Result]    */   PIKEFUN object list_processes()   {
1869:   #endif /* HAVE_MYSQL_PORT */   #endif /* !HAVE_MYSQL_REAL_CONNECT */    -  init_mysql_res_programs(); +    #else    HIDE_MODULE();   #endif /* HAVE_MYSQL */