Skip to content
This repository has been archived by the owner on Apr 14, 2018. It is now read-only.

Commit

Permalink
dplyr integration; src interface improvements
Browse files Browse the repository at this point in the history
- Bring dplyr integration back (#4). See

https://groups.google.com/forum/#!topic/manipulatr/9QrAEMt-9jc/discussion
- src_sqlserver interface improved to match dbConnect for
SQLServerDriver and improved documentation
- Improve performance of printing tbl objects (#12)
  • Loading branch information
imanuelcostigan committed Apr 23, 2015
1 parent b7cad01 commit d7a3ff4
Show file tree
Hide file tree
Showing 6 changed files with 467 additions and 353 deletions.
4 changes: 3 additions & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,8 @@ Imports:
DBI (>= 0.3.1),
RJDBC (>= 0.2-4),
assertthat (>= 0.1),
yaml
yaml,
dplyr
Enhances: dplyr (>= 0.3.0.2)
SystemRequirements: Java (>= 1.3), Windows (>= 6.1)
URL: https://github.com/imanuelcostigan/RSQLServer
Expand All @@ -38,3 +39,4 @@ Collate:
'RSQLServer.R'
'Utils.R'
'onLoad.R'
'src-sqlserver.R'
28 changes: 28 additions & 0 deletions NAMESPACE
Original file line number Diff line number Diff line change
@@ -1,7 +1,23 @@
# Generated by roxygen2 (4.1.1): do not edit by hand

S3method(compute,tbl_sqlserver)
S3method(db_explain,SQLServerConnection)
S3method(db_has_table,SQLServerConnection)
S3method(db_list_tables,SQLServerConnection)
S3method(db_query_fields,SQLServerConnection)
S3method(db_query_rows,SQLServerConnection)
S3method(db_save_query,SQLServerConnection)
S3method(sql_join,SQLServerConnection)
S3method(sql_select,SQLServerConnection)
S3method(src_desc,src_sqlserver)
S3method(src_translate_env,src_sqlserver)
S3method(tbl,src_sqlserver)
export(SQLServer)
export(have_test_server)
export(head.tbl_sqlserver)
export(intersect.tbl_sqlserver)
export(setdiff.tbl_sqlserver)
export(src_sqlserver)
exportClasses(SQLServerConnection)
exportClasses(SQLServerDriver)
exportClasses(SQLServerResult)
Expand All @@ -15,3 +31,15 @@ import(DBI)
import(RJDBC)
import(methods)
import(rJava)
importFrom(dplyr,compute)
importFrom(dplyr,db_explain)
importFrom(dplyr,db_has_table)
importFrom(dplyr,db_list_tables)
importFrom(dplyr,db_query_fields)
importFrom(dplyr,db_query_rows)
importFrom(dplyr,db_save_query)
importFrom(dplyr,sql_join)
importFrom(dplyr,sql_select)
importFrom(dplyr,src_desc)
importFrom(dplyr,src_translate_env)
importFrom(dplyr,tbl)
28 changes: 1 addition & 27 deletions R/DBConnection.R
Original file line number Diff line number Diff line change
Expand Up @@ -20,33 +20,7 @@ setClass("SQLServerConnection", contains = 'JDBCConnection')
#' @param drv An objected of class \code{\linkS4class{SQLServerDriver}}, or an
#' existing \code{\linkS4class{SQLServerConnection}}. If a connection,
#' the connection will be cloned.
#' @param server the server address or recognised alias thereof.
#' @param file defaults to using the server details file in
#' \code{$HOME/sql.yaml}. The server details including \code{type}, \code{port}
#' and any optional \code{properties} can be sourced from this file. If the
#' \code{server} name is found in \code{file}, the details therein are used
#' (and in particular, those provided in other arguments to this function are
#' ignored). The connection method prefers server details to be provided in
#' a \code{"sql.yaml"} file rather than provided as arguments to this function.
#' If you wish to specify the details as parameters, ensure that the \code{file}
#' argument is missing from the call.
#' @param type the server type. Must be either \code{"sqlserver"} or
#' \code{"sybase"}. Defaults to \code{"sqlserver"}.
#' @param port the TCP/IP default port. This will be coerced to a string. Defaults
#' to \code{1433} if an empty string.
#' @param database the name of the database hosted on the \code{server}. If an
#' empty string, a connection to the default database on \code{server} is
#' assumed.
#' @param properties One or more \href{http://jtds.sourceforge.net/faq.html}{optional connection properties.}
#' in a named list. Note if you intend to set the \code{useNTLMv2} property to \code{'true'}
#' from the default API value of \code{'false'}, you will need to make a specific
#' authentication driver available to the SQL Server driver, although this hasn't
#' worked particularly well in testing. See \code{\link{RSQLServer}} for more
#' details. Should you wish to use Windows authentication to connect to the server,
#' I recommend you set the following optional parameters: set \code{useNTLMv2} to
#' \code{'true'}, \code{domain} to your domain and \code{user} and
#' \code{password} to your username and password on \code{domain}. jTDS'
#' SSO functionality is flaky.
#' @template sqlserver-parameters
#' @return a \code{\linkS4class{SQLServerConnection}}
#' @examples
#' # View sql.yaml file bundled in package
Expand Down
Loading

0 comments on commit d7a3ff4

Please sign in to comment.