dbSetDataMappings-methods       package:RMySQL       R Documentation

_S_e_t _d_a_t_a _m_a_p_p_i_n_g_s _b_e_t_w_e_e_n _M_y_S_Q_L _a_n_d _R/_S-_P_l_u_s

_D_e_s_c_r_i_p_t_i_o_n:

     Not yet implemented

_M_e_t_h_o_d_s:

     _r_e_s a 'MySQLResult' object as returned by 'dbSendQuery'.

     _f_l_d_s a data.frame with field descriptions as returned by 
          'dbColumnInfo'.

     ...  any additional arguments are passed to the implementing
          method.

_R_e_f_e_r_e_n_c_e_s:

     See the Database Interface definition document 'DBI.pdf' in the
     base directory of this package or <URL:
     http://stat.bell-labs.com/RS-DBI>.

_S_e_e _A_l_s_o:

     'MySQL', 'dbSendQuery', 'fetch', 'dbColumnInfo'.

_E_x_a_m_p_l_e_s:

     ## Not run: 
     makeImage <- function(x) {
       .C("make_Image", as.integer(x), length(x))
     }

     res <- dbSendQuery(con, statement)
     flds <- dbColumnInfo(res)
     flds[3, "Sclass"] <- makeImage

     dbSetDataMappings(rs, flds)

     im <- fetch(rs, n = -1)
     ## End(Not run)

