getPK                  package:maDB                  R Documentation

_G_e_t_t_i_n_g _t_h_e _p_r_i_m_a_r_y _k_e_y _o_f _t_h_e _a_p_p_r_o_p_r_i_a_t_e _o_b_j_e_c_t _f_r_o_m _t_h_e _d_a_t_a_b_a_s_e

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

     This function is intended to get the primary key of an object from
     the database. If in the corresponding database table no entry with
     the same attribute values (as the object submitted) exists, the
     values will be inserted into the ddatabase and the primary key of
     the new entry will be returned. So basically this method should
     check if the object exists in the database and return its primary
     key when it does. If the entry does not exist it inserts it and
     returns the new primary key.

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

     getPK(object, Con, table.name = NULL, all.fields = FALSE, ...)

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

  object: The data object. 

     Con: The connection to the database. 

table.name: The database table name where objects from the type of the
          submitted objects are stored into. 

all.fields: If all attributes have to match between the database entry
          and the object submitted. 

     ...: some additional things. 

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

     The primary key of the database entry.

_A_u_t_h_o_r(_s):

     Johannes Rainer

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

