Skip to content
This repository has been archived by the owner on May 22, 2024. It is now read-only.

Commit

Permalink
Added db function as an alias of db.q
Browse files Browse the repository at this point in the history
  • Loading branch information
Qian, Hai committed Apr 23, 2014
1 parent e70e567 commit bbefe09
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 5 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ Package: PivotalR
Type: Package
Title: R front-end to PostgreSQL and Pivotal (Greenplum) database,
wrapper for MADlib
Version: 0.1.15.47
Version: 0.1.15.48
Date: 2014-03-10
Author: Predictive Analytics Team at Pivotal Inc. <user@madlib.net>,
with contributions from Data Scientist Team at Pivotal Inc.
Expand Down
2 changes: 1 addition & 1 deletion NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ export("array.len")

exportMethods("na.omit")

export("db.q")
export("db.q", "db")

export("vcov.lm.madlib", "vcov.lm.madlib.grps",
"vcov.logregr.madlib.grps", "vcov.logregr.madlib")
Expand Down
4 changes: 2 additions & 2 deletions R/db.q.R
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
## directly execute SQL
## ----------------------------------------------------------------------

db.q <- function(..., nrows = 100, conn.id = 1, sep = " ",
verbose = TRUE)
db <- db.q <- function(..., nrows = 100, conn.id = 1, sep = " ",
verbose = TRUE)
{
if (!.is.conn.id.valid(conn.id))
stop(conn.id, " is not a valid connection ID. ",
Expand Down
5 changes: 4 additions & 1 deletion man/db.q.Rd
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
\name{db.q}
\alias{db}
\alias{db.q}

\title{
Expand All @@ -8,6 +9,8 @@
This function sends SQL queries into the connected database to execute, and then extracts the result if there is any.
}
\usage{
db(..., nrows = 100, conn.id = 1, sep = " ", verbose = TRUE)

db.q(..., nrows = 100, conn.id = 1, sep = " ", verbose = TRUE)
}

Expand Down Expand Up @@ -68,4 +71,4 @@ db.disconnect(cid, verbose = FALSE)
}

\keyword{utility}
\keyword{database}
\keyword{database}

0 comments on commit bbefe09

Please sign in to comment.