views: List Oracle Views

Description Usage Arguments Details Value Note See Also Examples

View source: R/views.R

Description

List all views in the database belonging to a specific owner.

Usage

1
views(owner="%", view="%", tolower=TRUE, ...)

Arguments

owner

owner name.

view

view name.

tolower

whether owner and view output entries should be lowercased.

...

passed to dbConnect.

Details

The arguments owner and view, are passed as patterns that are matched by LIKE, where % means any number of characters and _ means exactly one character. Literal % and _ are escaped using two backslashes: "\\%" and "\\_".

In other words, the default value "%" matches all strings.

The ... argument can be used to set username, password, and/or dbname (see dbConnect). Abbrevations like user and pass are allowed. The default database name is determined by the environment variable ORACLE_SID, which can be redefined within an R session using Sys.setenv(ORACLE_SID="foo").

Value

Data frame containing two columns:

owner

owner name.

view

view name.

Note

The output is a subset of ALL_VIEWS in Oracle, with simplified column names:

OWNER -> owner
VIEW_NAME -> view

See Also

views is to Oracle as ll (in package gdata) is to R environments.

ora gives an overview of the package.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
## Not run: 

# Views belonging to owner "sys":
views("sys")

# Views whose name contains "all", followed by at least one character:
views(,"%all_%")

# Views whose name begins with "all_":
views(,"all\\_%")


## End(Not run)

ora documentation built on May 2, 2019, 3:22 a.m.