make.db.names-methods        package:RSQLite        R Documentation

_M_a_k_e _R/_S-_P_l_u_s _i_d_e_n_t_i_f_i_e_r_s _i_n_t_o _l_e_g_a_l _S_Q_L _i_d_e_n_t_i_f_i_e_r_s

_D_e_s_c_r_i_p_t_i_o_n:

     These methods are straight-forward implementations of the
     corresponding generic functions.

_M_e_t_h_o_d_s:

     _d_b_O_b_j any SQLite object (e.g., `SQLiteDriver').

     _s_n_a_m_e_s a character vector of R/S-Plus identifiers (symbols) from
          which we need to make SQL identifiers.

     _n_a_m_e a character vector of SQL identifiers we want to check
          against keywords from the DBMS.

     _u_n_i_q_u_e logical describing whether the resulting set of SQL names
          should be unique.  Its default is `TRUE'.  Following the SQL
          92 standard, uniqueness of SQL identifiers is determined
          regardless of whether letters are upper or lower case.

     _a_l_l_o_w._k_e_y_w_o_r_d_s  logical describing whether SQL keywords should be
          allowed in the resulting set of SQL names.  Its default is
          `TRUE'

     _k_e_y_w_o_r_d_s a character vector with SQL keywords, namely 
          `.SQL92Keywords' defined in the `DBI' package.

     _c_a_s_e a character string specifying whether to make the comparison
          as lower case, upper case, or any of the two. it defaults to
          `any'.

     ... currently not used.

_R_e_f_e_r_e_n_c_e_s:

     The set of SQL keywords is stored in the character vector
     `.SQL92Keywords' and reflects the SQL ANSI/ISO standard as
     documented in "X/Open SQL and RDA", 1994, ISBN 1-872630-68-8.
     Users can easily override or update this vector.

     SQLite does not add keywords to the SQL 92 standard.

     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', `dbReadTable', `dbWriteTable', `dbExistsTable',
     `dbRemoveTable', `dbListTables'.

_E_x_a_m_p_l_e_s:

     # This example shows how we could export a bunch of data.frames
     # into tables on a remote database.

     con <- dbConnect("SQLite", dbname = "sqlite.db")

     export <- c("trantime.email", "trantime.print", "round.trip.time.email")
     tabs <- make.db.names(export, unique = T, allow.keywords = T)

     for(i in seq(along = export) )
        dbWriteTable(con, name = tabs[i],  get(export[i]))

