describe               package:RSQLite               R Documentation

_D_e_s_c_r_i_b_e _a_n _o_b_j_e_c_t _t_h_r_o_u_g_h _i_t_s _m_e_t_a-_d_a_t_a

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

     Prints a concise description of the meta-data associated with an
     object

_U_s_a_g_e:

     describe(obj, verbose, ...)

_A_r_g_u_m_e_n_t_s:

  object: any object that implements some functionality under the R/S
          interface  to databases, e.g., `dbManager', `dbConnection',
          `dbResultSet', `resultSet'. 

 verbose: a logical controling the amount of output.  

    ... : any other argument that the individual methods may take. 

_V_a_l_u_e:

     NULL

_S_i_d_e _E_f_f_e_c_t_s:

     This function is used mainly for its printing side effects.

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

     See the Omega Project for Statistical Computing at <URL:
     http://www.omegahat.org> for more details on the R/S database
     interface.

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

     On database managers:

     `dbManager' `SQLite' `load' `unload'

     On connections, SQL statements and resultSets:

     `dbExecStatement' `dbExec' `fetch' `quickSQL'

     On transaction management:

     `commit' `rollback'

     On meta-data:

     `describe' `getVersion' `getDatabases' `getTables' `getFields'
     `getCurrentDatabase' `getTableIndices' `getException'
     `getStatement' `hasCompleted' `getRowCount' `getAffectedRows'
     `getNullOk' `getInfo'

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

     > m <- dbManager("MySQL")
     > ...
     # Let's look at the status of the manager

     > describe(m, verbose = F)   
     MySQLManager id = (7269) 
       Max  connections: 16 
       Conn. processed: 1 
       Default records per fetch: 500 
       Open connections: 1 

     > rs <- dbExecStatement(con, query)
     > ...

     # The following shows that we extracted only one field
     # names "Tables in opto" plus its corresponding S class, internal 
     # database type, and various other internal attributes.

     > getFields(rs)
                name    Sclass              type len precision scale nullOK 
     1 Tables in opto character FIELD_TYPE_STRING  64        64     0      F

     # A full description of the result set is

     > describe(rs, verbose = T)
     MySQLResultSet id = (7269,3,1) 
       Statement: show tables 
       Has completed? no 
       Affected rows: -1 
       Rows fetched: 3 
       Fields:
                 name    Sclass              type len precision scale nullOK 
     1 Tables in opto character FIELD_TYPE_STRING  64        64     0      F

