getPK {maDB}R Documentation

Getting the primary key of the appropriate object from the database

Description

Returns the primary key of an object from the database. If in the corresponding database table no entry with the same attribute values (of the submitted object) exists, the values will be inserted into the database and the primary key of the new entry will be returned.

Usage

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

Arguments

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.

Value

The primary key of the database entry.

Author(s)

Johannes Rainer


[Package maDB version 1.14.1 Index]