對於pdo結構體的梳理代碼

來源:互聯網
上載者:User
這篇文章主要介紹了關於對pdo結構體的梳理代碼,有著一定的參考價值,現在分享給大家,有需要的朋友可以參考一下

typedef struct {    pdo_mysql_db_handle     *H;    MYSQL_RES               *result;    const MYSQL_FIELD       *fields;    MYSQL_ROW               current_data;#if PDO_USE_MYSQLND    const size_t            *current_lengths;#else    zend_long               *current_lengths;#endif    pdo_mysql_error_info    einfo;#if PDO_USE_MYSQLND    MYSQLND_STMT            *stmt; //st_mysqlnd_stmt#else    MYSQL_STMT              *stmt;#endif    int                     num_params;    PDO_MYSQL_PARAM_BIND    *params;#ifndef PDO_USE_MYSQLND    my_bool                 *in_null;    zend_ulong          *in_length;#endif    PDO_MYSQL_PARAM_BIND    *bound_result;    my_bool                 *out_null;    zend_ulong              *out_length;    unsigned int            params_given;    unsigned                max_length:1;} pdo_mysql_stmt; struct st_mysqlnd_stmt{    MYSQLND_STMT_DATA * data;///st_mysqlnd_stmt_data    MYSQLND_CLASS_METHODS_TYPE(mysqlnd_stmt) * m;    zend_bool persistent;};struct st_mysqlnd_res{    MYSQLND_CONN_DATA       *conn;    enum_mysqlnd_res_type   type;    unsigned int            field_count;    /* For metadata functions */    MYSQLND_RES_METADATA    *meta;    /* To be used with store_result() - both normal and PS */    MYSQLND_RES_BUFFERED    *stored_data;    MYSQLND_RES_UNBUFFERED  *unbuf;    zend_bool               persistent;    MYSQLND_CLASS_METHODS_TYPE(mysqlnd_res) m;};struct st_mysqlnd_stmt_data{    MYSQLND_CONN_DATA           *conn;       MYSQLND_RES                 *result;    unsigned int                field_count;    unsigned int                param_count;      MYSQLND_CMD_BUFFER          execute_cmd_buffer;    unsigned int                execute_count;/* count how many times the stmt was executed */};struct _pdo_stmt_t {    /* driver specifics */    struct pdo_stmt_methods *methods;    void *driver_data;    /* if true, we've already successfully executed this statement at least     * once */    unsigned executed:1;    /* if true, the statement supports placeholders and can implement     * bindParam() for its prepared statements, if false, PDO should     * emulate prepare and bind on its behalf */    unsigned supports_placeholders:2;    unsigned _reserved:29;    /* the number of columns in the result set; not valid until after     * the statement has been executed at least once.  In some cases, might     * not be valid until fetch (at the driver level) has been called at least once.     * */    int column_count;    struct pdo_column_data *columns;}

以上就是本文的全部內容,希望對大家的學習有所協助,更多相關內容請關注topic.alibabacloud.com!

相關文章

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.