R/onLoad.R

Defines functions .onLoad

# ---------------------------------------------------------------------------
# ------------------------------- sqlparseR ---------------------------------
# ---------------------------------------------------------------------------

.onLoad <- function(libname, pkgname) {

  # try() because if a Python version is already initialized
  # delay_load will be ignored causing an error if sqlparse is missing

  try(

    assign(".sqlparse",
           reticulate::import("sqlparse", delay_load = TRUE),
           envir = parent.env(environment())),

    silent = TRUE

    )

  }

Try the sqlparseR package in your browser

Any scripts or data that you put into this service are public.

sqlparseR documentation built on Sept. 20, 2019, 5:05 p.m.