MINI MINI MANI MO
%
% Copyright (c) 2012, 2015, Oracle and/or its affiliates. All rights reserved.
%
\name{ore.grant}
\alias{ore.grant}
\alias{ore.revoke}
\title{
Oracle R Enterprise 权限授予和撤销函数
}
\description{
授予或撤销 \R 脚本或数据存储的读取权限。
}
\usage{
ore.grant(name, type = c("datastore", "rqscript"), user = NULL)
ore.revoke(name, type = c("datastore", "rqscript"), user = NULL)
}
\arguments{
\item{name}{
一个字符串, 用于指定 \R 脚本资料档案库中的
\R 脚本名称或数据存储名称。当前
用户必须是 \R 脚本或数据存储的所有者。
}
\item{type}{
一个标量字符串, 指定授予或撤销 'datastore' 或 'rqscript' 的
读取权限。必须指定此参数。
}
\item{user}{
一个可选字符串, 指定要为其授予或
从其撤销给定 \R 脚本或数据存储的
读取权限的用户。默认值 \code{NULL} 指示
授予或撤销公共权限。
}
}
\details{
函数 \code{\link{ore.grant}} 和 \code{\link{ore.revoke}} 需要
用户具有 \\option{RQADMIN} Oracle 数据库角色。
}
\value{
函数 \code{ore.grant} 和 \code{ore.revoke} 在成功授予或
撤销权限时返回不可见的 \code{NULL} 值; 否则
将生成错误。
}
\references{
\href{http://www.oracle.com/technetwork/database/database-technologies/r/r-enterprise/documentation/index.html}{Oracle R Enterprise}
}
\author{
Oracle \email{oracle-r-enterprise@oracle.com}
}
\seealso{
\code{\link{ore.scriptCreate}},
\code{\link{ore.scriptDrop}},
\code{\link{ore.scriptLoad}},
\code{\link{ore.scriptList}},
\code{\link{ore.load}},
\code{\link{ore.datastore}},
\code{\link{ore.datastoreSummary}}
}
\examples{
if (!interactive())
{
# create an R script for the current user
ore.scriptCreate("MYLM",
function(data, formula, ...) lm(formula, data, ...))
IRIS <- ore.push(iris)
ore.tableApply(IRIS[1:4], FUN.NAME = "MYLM",
formula = Sepal.Length ~ .)
# create a global R script available to any user
ore.scriptCreate("GLBGLM",
function(data, formula, ...)
glm(formula=formula, data=data, ...),
global = TRUE)
ore.tableApply(IRIS[1:4], FUN.NAME = "GLBGLM",
formula = Sepal.Length ~ .)
# list R scripts
ore.scriptList()
ore.scriptList(pattern="LM", type="all")
# load an R script to an R function object
ore.scriptLoad(name="MYLM")
ore.scriptLoad(name="GLBGLM", newname="MYGLM")
MYLM(iris, formula = Sepal.Length ~ .)
MYGLM(iris, formula = Sepal.Length ~ .)
# grant and revoke R script read privilege to and from public
ore.grant(name = "MYLM", type = "rqscript")
ore.scriptList(type="grant")
ore.revoke(name = "MYLM", type = "rqscript")
ore.scriptList(type="grant")
# drop an R script
ore.scriptDrop("MYLM")
ore.scriptDrop("GLBGLM", global=TRUE)
ore.scriptList(type="all")
# create grantable datastores
ore.save(iris, name="ds_1", grantable=TRUE)
ore.save(mtcars, name="ds_2", grantable=TRUE)
# grant the read privilege of one datastore to every user
ore.grant(name="ds_1", type="datastore", user=NULL)
# show all the datastores
ore.datastore(type="all")[,-5L]
# show the grantable datstores
ore.datastore(type="grantable")[, -4L]
# show the datastoe the read privilege for which was granted to other users
ore.datastore(type="grant")
# revoke the granted privilege
ore.revoke(name="ds_1", type="datastore", user=NULL)
ore.delete(name="ds_1")
ore.delete(name="ds_2")
}
}
\keyword{programming}
\keyword{database}
\keyword{ORE}
OHA YOOOO