diff --git a/DESCRIPTION b/DESCRIPTION index 7e0b5f6fb0d7c753f0fceff79fe8fb335971c829..f2c022763a3870868c8a6e4b1c2e2c3a93409791 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,6 +1,6 @@ Package: datalibaba Title: Interface De Connexion a Une Base Posgres Postgis -Version: 0.0.0.9008 +Version: 0.0.0.9009 Authors@R: c(person(given = "Maël", family = "Theulière", diff --git a/NEWS.md b/NEWS.md index 3172aab5a63671765a81ea5616845734fe682b25..71b35298933f26247d87c6c77f904acea54524ce 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,3 +1,7 @@ +## datalibaba 0.0.0.9009 +- Gestion des tables non géo dans la fonction `importer_data` : Ajoute d'une ligne pour définir explicitement `query_sql_limit` dans la fonction importer_data (cas table non géo). + + # datalibaba 0.0.0.9008 - Ajout d'un paramètre booleen `ecoSQL` à la fonction `connect_to_db` pour switcher de driver (passage du `DBI::dbDriver("PostgreSQL")` si `EcoSQL = FALSE`, à `RPostgres::Postgres()` si `ecoSQL = TRUE` adapté à l'usage de l'offre d'hébergement de base EcoSQL) diff --git a/R/get_data.R b/R/get_data.R index 0f4b142c6cbe0b2d2fdc2438e527d810ba6052c3..cda29320b6a2587faa3989e3189595942e39d570 100644 --- a/R/get_data.R +++ b/R/get_data.R @@ -85,6 +85,7 @@ importer_data <- function(table = NULL, schema = NULL, db = "public", server = if(limit == 0) { data <- DBI::dbReadTable(con, name) } else { + query_sql_limit <- paste0("SELECT * FROM ", schema, ".", table, " LIMIT ", limit) data <- DBI::dbGetQuery(con, query_sql_limit) }