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

Share:

Description

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

Usage

1
2
3
4
5
6
7
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 ...

Want to suggest features or report bugs for rdrr.io? Use the GitHub issue tracker.