Last data update: 2014.03.03

R: Search Key-Value Pairs, look for existing keys in an Hstore
searchKVPR Documentation

Search Key-Value Pairs, look for existing keys in an Hstore

Description

Search hstore key value in PostgreSQL. Very handsome when crawling the database by meta informaiton. Currently works for non translated meta information.

Usage

searchKVP(key, value, con = get(Sys.getenv("TIMESERIESDB_CON")),
  hstore = "meta_data", tbl = "meta_data_unlocalized", where = NULL,
  schema = "timeseries")

lookForKey(key, con = get(Sys.getenv("TIMESERIESDB_CON")),
  hstore = "meta_data", tbl = "meta_data_unlocalized", where = NULL,
  schema = "timeseries")

Arguments

key

character

value

in the hstore

con

PostgreSQL connection object

hstore

name of the hstore column

tbl

name of the table to be queried. defaults to 'meta_data_localized'

where

character restrict the SQL query by an additional where clause. Defaults to NULL.

schema

SQL schema name. defaults to timeseries. E.g.: ts_key LIKE ...

Results