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)

