dbusr: dbusr search database for user created tables

Description Usage Arguments Value Examples

Description

Searches the databases and schema for user created tables, returns skewness and size of tables.

Usage

1
2
dbusr(conn, uid = NULL, sbstr = NULL, db = NULL, schema = NULL,
  query = FALSE)

Arguments

conn:

Connection to database. Can used assigned output from function connectR for the connection.

uid:

User id for database

sbstr:

A 3 character string, that searches table names i.e. "DL_". Can set sbstr to be a vector for multiple search i.e. c("DL_","DJ_")

db:

Database name i.e. default

schema:

Database schema i.e public

Value

Returns all tables user has created from the database.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
 #Search for default user (account signed into the computer)
  tables in the database default.
   dbusr(post)->dbtables

 #Search for default user (account signed into the computer)
  tables in the database default, also searches for c("DJ_","DRJ") and
   at start of table name variable.
   dbusr(post,sbstr=c("DJ_","DRJ"))->dbtables

 #Search for default user, (account signed into the computer)
  tables in the database postgres, shopdirect and also searches in the schema public
   at start of table name variable.
   dbusr(post,sbstr=c("DJ_","DRJ"), db=c("postgres","postgres1"), schema="public")->dbtables

DyfanJones/connectR documentation built on May 23, 2019, 10:32 p.m.