idaDeleteTable, idaExistTable, idaGetValidTableName, idaIsView {ibmdbR} | R Documentation |
Miscellaneous tools
Description
These functions simplify working with database tables.
Usage
idaAppend(df, table)
idaDeleteTable(table)
idaExistTable(tableName)
idaIsView(tableName)
idaGetValidTableName(prefix="DATA_FRAME_")
Arguments
df |
A |
table |
The name of a database table or an |
tableName |
The name of a database table. |
prefix |
Keyword used to specify the prefix of a table name. |
Details
Use the idaAppend
function to append a data.frame
to the specified table.
Use the idaDeleteTable
function to drop the specified table.
The specified table must exist in the current database.
Use the idaExistTable
function to determine whether the specified table exists in the database.
Use the idaGetValidTableName
function to obtain a table name that is not yet in use. This name will be the specified or default prefix followed by a number, for example, data_frame_7.
Value
The idaDeleteTable
function does not return a value.
The idaExistTable
function returns a logical value (TRUE or FALSE) that indicates
whether the specified table exists in the database.
The idaGetValidTableName
function returns a string representing a table name.
Examples
## Not run:
#Check whether a table with a given name exists
idaExistTable('IRIS')
#Create a pointer to the table
idf <- ida.data.frame('IRIS')
#Obtain a unique table name for a copy
copyTableName <- idaGetValidTableName(prefix = "COPY_")
#Create a copy of the original table
idfCopy <- as.ida.data.frame(as.data.frame(idf),copyTableName)
#Delete the copy again
idaDeleteTable(copyTableName)
## End(Not run)