Skip to content

Releases: ropensci/nodbi

nodbi 0.11.0

10 Nov 17:23
Compare
Choose a tag to compare

Potentially breaking changes

  • docdb_query() modified so that it returns a data frame, in which each column has just one type (atomic or list) across all the rows of the respective column (previously, e.g. a mix of single-item lists simplified to atomic values and of multi-item lists were returned)

Changes

  • docdb_create() and docdb_update() for SQLite and PostgreSQL (only if on localhost) now import directly and fast from ndjson files, in analogy to DuckDB (needs RSQLite >= 2.3.7.9014)
  • Refactored docdb_update() for src_couchdb()
  • Add message from docdb_create() if a data frame has column names with a dot(s) since dots in nodbi are used for JSON dot paths
  • Add code to check database backend version requirements
  • Adding info if PostgreSQL database is not yet created
  • Factored out further code

nodbi 0.10.7

30 Sep 04:54
Compare
Choose a tag to compare
  • uses new features of duckdb 1.11.0 for refactoring of docdb_query(), accelerating queries
  • accelerated creating and updating from file

nodbi 0.10.6

26 Jul 04:55
Compare
Choose a tag to compare

Changes

  • partial refactoring of docdb_query(), accelerating queries up to 20-fold for SQLite, DuckDB, and accelerating listfields = TRUE several times for DuckDB

Bug fix

  • address docdb_query() not working for cases when dot paths had no counts between fields
  • address wrong database size printing

nodbi 0.10.5

30 Jun 14:47
Compare
Choose a tag to compare

Bug fix

  • stop if query is invalid even though JSON is valid
  • print information also for MongoDB connection object

Changes

  • code cleaning, parameters checking
  • document that $regex in docdb_query() is case-sensitive

nodbi v0.10.4

08 Mar 23:03
Compare
Choose a tag to compare

Bug fix

  • re-adding field formatting for docdb_query(src, key, query, listfields = TRUE, limit = <integer>)

nodbi v0.10.3

03 Mar 20:00
Compare
Choose a tag to compare

Bug fix

  • minor fixes to limit in docdb_query(src, key, query, listfields = TRUE, limit = <integer>) and speed up

nodbi v0.10.2

24 Feb 22:13
Compare
Choose a tag to compare

Changes

  • added vignette
  • added tests internal functions, verbose option
  • added caching to GitHub action workflow
  • added missing fields validity check for duckdb
  • more robust parameter checks in docdb_query and docdb_update
  • ensure NULL also for all MongoDB returns

Bug fixes

  • docTyp'ed src.R
  • minify JSON with Elasticsearch in docdb_update
  • moved local variable out of UseMethod in docdb_query

nodbi v0.10.1

05 Feb 16:59
Compare
Choose a tag to compare

Bug fix

  • make docdb_get() work again for src_sqlite() by casting JSONB back to JSON

nodbi v0.10.0

21 Jan 22:18
Compare
Choose a tag to compare

Deprecated

  • empty parameter query now triggers a warning as it should be a valid JSON string; change query = "" into query = "{}"

Changes

  • adapted to use new, faster JSONB functions in SQLite 3.45.0 (RSQLite >= 2.3.4.9005)
  • refactored parts of docdb_create() to speed up handling large data frames and lists
  • made Elasticsearch to immediately refresh index after docdb_create() and other functions
  • docdb_update() now reports which records failed to update and then continues
  • docdb_delete() now returns harmonised success logical value across backends

Potentially breaking change

docdb_query() reimplementation to have the same functionality across all databases (DuckDB, SQLite, PostgreSQL, MongoDB, Elasticsearch, CouchDB); even though the API and unit tests remained, user provisions may break e.g. to handle return values of databases that previously were incompletely implemented (in particular Elasticsearch and CouchDB). Details:

  • query can now be complex (nested, various operators) and is digested with a Javascript helper
  • fields can now be nested fields (e.g., friends.name) to directly return values lifted from the nested field
  • listfields parameter newly implemented to return dot paths for all fields of all or selected documents in collection
  • expanded use of jq via jqr for mangling parameters, selecting documents, filtering fields and lifting nested field values
  • if no data are found, returns NULL (previously some backends returned an empty data frame)
  • docdb_query(src, key, query = "{}", fields = "{}") now delegates to docdb_get(src, key)
  • _id is always returned, unless specified with "_id": 0 in parameter fields
  • for scr_postgres, only fewer than 50 fields if any can be specified in fields
  • for src_sqlite, minimise the use of the time-costly json_tree
  • workaround for path collisions of MongoDB
  • some acceleration of docdb_query()
  • factored out common code
  • expanded testing
  • updated docs

nodbi v0.9.8

24 Sep 06:25
Compare
Choose a tag to compare
  • escaping newline character within a JSON value, in docdb_*() functions