getPK {maDB} | R Documentation |
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.
getPK(object, Con, table.name = NULL, all.fields = FALSE, ...)
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. |
The primary key of the database entry.
Johannes Rainer