sql.template.fill: Generic SQL template filler

Description Usage Arguments Examples

Description

Generic SQL template filler

Usage

1
sql.template.fill(template.repo, template.name, query.names, param.list)

Arguments

template.repo

repository of SQL templates

template.name

the name of the template

query.names

the vector of names of the generated queries (in the genereated query list)

param.list

the (named) list with names of parameters to be replaced and the values to be substituted

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
sql.template.fill(
   some.repo,
   "dictionary_values",
   query.names="q1",
   list("%%DICTKEY%%" = "abd", "%%QUERY%%" = "bca")
   )

 sql.template.fill(
   some.repo,
   "dictionary_values",
   query.names = c("q1","q2"),
   list("%%QUERY%%" = c("bca", "bcb"), "%%DICTKEY%%" = c("abd"))
   )

 sql.template.fill(
   some.repo,
   "dictionary_values",
   query.names = c("q1", "q2"),
   list("%%QUERY%%" = c("bca", "bcb"), "%%DICTKEY%%"=c("abc", "abd"))
   )

cezden/rpostgrexplorer documentation built on May 13, 2019, 3:08 p.m.