View source: R/retrieve-key-value.R
retrieve_key_value | R Documentation |
Facilitates retrieval of key-value pairs that are stored in a SQL Server database.
retrieve_key_value(key, project_name, dsn_name, channel = NULL)
key |
The key associated with the desired value. Required character vector with one element |
project_name |
The project name associated with the desired value. Required character vector with one element |
dsn_name |
Name of the locally-defined DSN passed to |
channel |
An optional connection handle as returned by |
The database table and stored procedure must defined as:
CREATE TABLE security_private.tbl_key_value_static( id smallint identity(1,1) primary key, project varchar(50) not null, attribute varchar(90) not null, value varchar(200) not null, file_last_updated_date date not null, retired bit not null ) CREATE PROCEDURE security.prc_key_value_static @project varchar(50), @attribute varchar(90) AS BEGIN SET NOCOUNT ON; SELECT value from security_private.tbl_key_value_static WHERE project = @project and attribute = @attribute END
A character
vector with one element.
Currently only the 'static' key-value pairs are retrieved through this function. Talk to Will if you need to retrieve the 'rolling' or the 'personal' key-value pairs.
Will Beasley
## Not run:
value <- retrieve_key_value("file-server", "bbmc", "BbmcSecurity")
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.