Skip to content

Commit c8a0788

Browse files
authored
Merge pull request #17 from lsteinmann/v0.3.x closes #16
V0.3.6
2 parents 49fdb09 + 9d7d119 commit c8a0788

4 files changed

Lines changed: 10 additions & 5 deletions

File tree

DESCRIPTION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
Type: Package
22
Package: idaifieldR
33
Title: Importing Data from Field Desktop / iDAI.field into R
4-
Version: 0.3.5
4+
Version: 0.3.6
55
Authors@R:
66
person("Lisa", "Steinmann", , "lisa.steinmann@rub.de", role = c("aut", "cre"),
77
comment = c(ORCID = "0000-0002-2215-1243"))

NEWS.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
# idaifieldR 0.3.6 _2025-11-29_
2+
* Quick and dirty fix to get around the default limit of 25 for the `_find` enpoint of PouchDB since Field Desktop v3.6.0
3+
14
# idaifieldR 0.3.5 _2025-03-08_
25
* Some minor fixes:
36
* checks if project exists in `simplify_idaifield()`

R/connect_idaifield.R

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -322,7 +322,8 @@ idf_ping <- function(conn) {
322322

323323
#' Add limit to JSON query
324324
#'
325-
#' This function adds a limit of the max db docs to a query.
325+
#' This is a helper function that adds a limit of the max db docs to a query.
326+
#' It is not great.
326327
#'
327328
#' @param conn A connection object returned by [connect_idaifield()].
328329
#' @param query A MongoDB JSON-query as used in this package.
@@ -340,7 +341,7 @@ idf_ping <- function(conn) {
340341
#' }
341342
add_limit_to_query <- function(query, conn) {
342343
if(!jsonlite::validate(query)) {
343-
stop("Something went wrong. Could not validate JSON structure of query.")
344+
stop("Something went wrong. Could not validate JSON structure of query before adding limit.")
344345
}
345346
conn$settings$limit <- NA
346347
if (is.na(conn$settings$limit) && suppressMessages(idf_ping(conn))) {
@@ -357,7 +358,7 @@ add_limit_to_query <- function(query, conn) {
357358
new_query <- gsub("}$", limit, query)
358359

359360
if(!jsonlite::validate(query)) {
360-
stop("Something went wrong. Could not validate JSON structure of query.")
361+
stop("Something went wrong. Could not validate JSON structure of query after adding limit.")
361362
}
362363
return(new_query)
363364
}

man/add_limit_to_query.Rd

Lines changed: 2 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)