dbSetDataMappings-methods      package:RSQLite      R Documentation

_S_e_t _d_a_t_a _m_a_p_p_i_n_g_s _b_e_t_w_e_e_n _S_Q_L_i_t_e _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 `SQLiteResult' 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://developer.r-project.org/db>.

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

     `SQLite', `dbSendQuery', `fetch', `dbColumnInfo'.

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

     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)

