pike.git / lib / modules / __builtin.pmod / Sql.pmod / Connection.pike

version» Context lines:

pike.git/lib/modules/__builtin.pmod/Sql.pmod/Connection.pike:33:   //! @endsection   //!   //! @note   //! For historical reasons, there may be server specific backends that   //! operate differently from what is described here, e.g. some that   //! return a bit of typed data in untyped mode.   //!   //! @note   //! Typed operation was not supported at all prior to Pike 7.8.363,   //! and may not be supported for all databases. + //! + //! @seealso + //! @[Sql.Connection], @[Sql.Sql()], @[Result]      #define ERROR(X ...) predef::error(X)      //! Compatibility interface.   //!   //! This used to be a variable containing the server specific   //! connection object used for the actual SQL queries.   //!   //! As the wrapper no longer exists, this symbol now   //! just evaluates to the object.
pike.git/lib/modules/__builtin.pmod/Sql.pmod/Connection.pike:253:   //!   //! @param password   //! Password to access the database.   //!   //! @param options   //! Optional mapping of options.   //! See the SQL-database documentation for the supported options.   //! (eg @[Mysql.mysql()->create()]).   //!   //! @note + //! This function is typically called via @[Sql.Sql()]. + //! + //! @note   //! Support for @[options] was added in Pike 7.3.   //!   //! @note   //! The base class (@[__builtin.Sql.Connection]) only has a prototype. - void create(string host, void|string|mapping(string:int|string) db, + //! + //! @seealso + //! @[Sql.Sql()] + protected void create(string host, void|string|mapping(string:int|string) db,    void|string user, void|string _password,    void|mapping(string:int|string) options);      //! Returns true if the connection seems to be open.   //!   //! @note   //! This function only checks that there's an open connection,   //! and that the other end hasn't closed it yet. No data is   //! sent over the connection.   //!
pike.git/lib/modules/__builtin.pmod/Sql.pmod/Connection.pike:307:   //! check the connection.   //!   //! @seealso   //! @[is_open()]   int ping()   {    if (!is_open()) return -1;    catch {    return sizeof(query("SELECT 0 AS zero") || ({})) - 1;    }; +  // FIXME: Inform is_open()?    return -1;   }      void set_charset (string charset)   //! Changes the charset that the connection uses for queries and   //! returned text strings.   //!   //! @param charset   //! The charset to use. The valid values and their meanings depends   //! on the database brand. However, the special value
pike.git/lib/modules/__builtin.pmod/Sql.pmod/Connection.pike:350:   //! least) query strings. Returns zero if the connection doesn't   //! support charsets this way (typically means that a call to   //! @[set_charset] will throw an error).   //!   //! @seealso   //! @[set_charset], @[Sql.mysql.get_charset]   {    return UNDEFINED;   }    + // FIXME: _sprintf(). +    protected array(mapping(string:mixed)) res_obj_to_array(.Result res_obj)   {    if (!res_obj)    return 0;       array(mapping(string:mixed)) res = ({});    while (res_obj)    {    // Not very efficient, but sufficient    array(string) fieldnames;