saveEntitiesDD: Helper functions for saving direct to database

View source: R/directDatabaseSave.R

getEntityIdsDDR Documentation

Helper functions for saving direct to database

Description

A set of functions used internally, expected to be used by saveDataDirectDatabase. Could be expanded later.

Usage

getEntityIdsDD(conn, numberOfIds)

getEntityIdsDDInternal(conn, numberOfIds)

chunkMillionIds(conn, numberOfIds, FUN)

getStateIdsDD(conn, numberOfIds)

getStateIdsDDInternal(conn, numberOfIds)

getValueIdsDD(conn, numberOfIds)

getValueIdsDDInternal(conn, numberOfIds)

getEntityCodesBySqlDD(conn, entityType, numberOfCodes)

getEntityCodesDD(entityType, numberOfCodes)

saveAgDataDD(conn, inputDT, experimentId, lsTransactionId, recordedDate)

saveTgDataDD(conn, inputDT, ag_ids, lsTransactionId, recordedDate)

saveSubjectDataDD(conn, inputDT, tg_ids, lsTransactionId, recordedDate)

saveEntitiesDD(conn, entityType, inputDT)

saveStatesDD(conn, entityType, inputStatesDT)

Arguments

conn

database connection object

numberOfIds

number of ids to return

FUN

function to apply repeatedly

entityType

"ANALYSIS_GROUP", "TREATMENT_GROUP", or "SUBJECT"

numberOfCodes

number of codes to return

inputDT

a data.table input. See source for required columns.

experimentId

id of experiment

lsTransactionId

integer of ls transaction id

recordedDate

date of save, correctly string formatted for database

ag_ids

data.table of analysis_group ids with columns tempParentId and id

tg_ids

data.table of treatment_group ids with columns tempParentId and id

inputStatesDT

a data.table input. See source for required columns.


mcneilco/racas documentation built on April 19, 2024, 1:12 p.m.