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)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)docdb_update()
for
src_couchdb()
docdb_create()
if a data frame has
column names with a dot(s) since dots in nodbi
are used for
JSON
dot pathsduckdb
1.11.0 for refactoring of
docdb_query()
, accelerating queriesdocdb_query()
, accelerating
queries up to 20-fold for SQLite, DuckDB, and accelerating
listfields = TRUE
several times for DuckDBdocdb_query()
not working for cases when dot
paths had no counts between fields$regex
in docdb_query()
is
case-sensitivedocdb_query(src, key, query, listfields = TRUE, limit = <integer>)
limit
in
docdb_query(src, key, query, listfields = TRUE, limit = <integer>)
and speed updocdb_query
and
docdb_update
NULL
also for all MongoDB returnsJSON
with Elasticsearch in
docdb_update
docdb_query
docdb_get()
work again for
src_sqlite()
by casting JSONB
back to
JSON
query
now triggers a warning as it
should be a valid JSON string; change query = ""
into
query = "{}"
JSONB
functions in
SQLite
3.45.0 (RSQLite
>= 2.3.4.9005)docdb_create()
to speed up handling
large data frames and listsdocdb_create()
and other functionsdocdb_update()
now reports which records failed to
update and then continuesdocdb_delete()
now returns harmonised success logical
value across backendsdocdb_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 helperfields
can now be nested fields (e.g.,
friends.name
) to directly return values lifted from the
nested fieldlistfields
parameter newly implemented to return dot
paths for all fields of all or selected documents in collectionjq
via jqr
for mangling
parameters, selecting documents, filtering fields and lifting nested
field valuesNULL
(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
scr_postgres
, only fewer than 50 fields if any can
be specified in fields
src_sqlite
, minimise the use of the time-costly
json_tree
docdb_query()
docdb_*()
functionsdocdb_update()
to directly use NDJSON from file
for duckdbdocdb_create()
src_duckdb()
docdb_query()
docdb_query.src_duckdb()
httpbin
with
webfakes
docdb_query()
docdb_query()
with
src_duckdb()
docdb_update()
now can do bulk updates when _id’s are
in value
(for SQLite, DuckDB, PostgreSQL, MongoDB; not yet
for CouchDB and Elastic)src_duckdb()
handles when json_type returns NULL for
non-existing pathsrc_sqlite()
handles when text includes double
quotation marksdocdb_exists()
for
src_mongo()
, and of docdb_query()
for SQL
databasesdocdb_query()
isa()
as not available with R version 3.xdocdb_update.src_couchdb()
to use
jqr
docdb_create
to accept jsonlite
,
jsonify
, jqr
JSONdocdb_query()
to account for change in SQLite
3.38.3 adding quotation of labels (closes issue #44), test addeddocdb_query()
work for PostgreSQL when a string
used with the $in
operator has a comma(s), test addeddocdb_create()
now supports file names and http urls as
argument value
for importing datadocdb_create()
(and thus docdb_update()
)
now supports quantifiers (e.g., ‘[a-z]{2,3}’) in regular
expressionsFALSE
like other backends when using
docdb_delete()
for a non-existing container (table, in the
case of SQLite)docdb_*()
functions so that
query
and fields
parameters can be used across
database backendsdocdb_list()
added as function to list container in
databasedocdb_*()
functions return a logical
indicating the success of the function (docdb_create
,
docdb_delete
), or a data frame (docdb_get
,
docdb_query
), or the number of documents affected by the
function (docdb_update
)docdb_get()
to not return ’_id’ field for
src_{sqlite,mongo}
since already used for row namesdocdb_query.src_sqlite()
now handles JSON objects,
returning nested lists (#40)src_sqlite()
now uses transactions for relevant
functions (#39)docdb_update.src_mongo()
now returns the number of
upserted or matched documents, irrespective of whether they were updated
or notdocdb_get()
to not return ’_id’ field for
src_{sqlite,mongo}
since already used for row namessrc_couchdb()
: we were not setting user and
password correctly internally, was causing issues in CouchDB v3 (#35)
thanks to @drtagkim
for the pull requestdocdb_query()
and docdb_get()
, for
sqlite source, use a connection instead of a regular file path to avoid
certain errors on Windows (#33) work by @rfhbdocdb_query()
and docdb_create()
for
sqlite source, fix to handle mixed values of different types (#34) work
by @rfhbsrc_sqlite
,
print.src_sqlite
, docdb_create.src_sqlite
,
docdb_delete.src_sqlite
,
docdb_exists.src_sqlite
, docdb_get.src_sqlite
,
docdb_query.src_sqlite
, and
docdb_update.src_sqlite
. includes new dataset
contacts
(#25) (#27) (#28) (#29) (#30) (#31)docdb_update
gains method for working with MongoDB, via
(#27).github
files in the source repository to
facilitate contributionssrc_mongo
changes, improved behavior, via (#27)etcd
(via the etseed
package) integration
has been removed from this package as etcd doesn’t really fit the main
goal of the pkg. functions now defunct are: src_etcd
,
docdb_create.src_etcd
, docdb_delete.src_etcd
,
docdb_exists.src_etcd
, docdb_get.src_etcd
, and
print.src_etcd
(#26)docdb_get()
gains limit
parameter to do
pagination, for CouchDB, Elasticsearch and MongoDB only (#17) (#23)docdb_query()
to send queries to each
backend (#18) (#22)docdb_exists()
to check if a database or
equivalent exists (#21) (#22)elastic
, which has
slightly different setup for connecting to the Elasticsearch instance
(#20)