fn_post_odbc: Post any entity to via an ODBC connection. This allows users...

View source: R/odbc_utils.R

fn_post_odbcR Documentation

Post any entity to via an ODBC connection. This allows users to insert or update entities within database.

Description

Post any entity to via an ODBC connection. This allows users to insert or update entities within database.

Usage

fn_post_odbc(entity_type, pk, inputs, con, obj = FALSE, debug = FALSE)

Arguments

entity_type

Most often dh_feature or dh_properties. Indicates which table to retrieve data from. This will be the target table for the query constructed from user inputs input list

pk

= primary key column name, e.g. hydroid, pid, ...

inputs

contents of record to post in list (pid, propname, propvalue, ...). If missing essential values, post will fail. Required information may be found in each table description on the postgres database. Contact OWS WSPA data coordinator for more information

con

connection to ODBC server

obj

optional class with extra query info

debug

optional show query pieces

See Also

fn_get_odbc, fn_post_rest

Examples

## Not run: 
fn_post_odbc('dh_properties','pid',
inputs = list(pid = NA,bundle = NA, featureid = NA, etc.),
con = datasource$connection, obj = FALSE)

## End(Not run)

HARPgroup/hydro-tools documentation built on July 4, 2025, 11:05 a.m.