github r-dbi/DBI v1.4.0
DBI 1.4.0

35 minutes ago

Breaking changes

  • The default dbQuoteString() and dbQuoteLiteral() methods now keep the names of their input, as dbQuoteIdentifier() already did (#799).
    Named input gives named output, which can break downstream code or snapshot tests that compare the result with identical().
    The generated SQL is unchanged.

    names(dbQuoteString(ANSI(), c(a = "x")))
    # DBI 1.3.0: NULL
    # DBI 1.4.0: "a"

Features

  • New experimental dbClearArrowChunk() releases a chunk fetched with dbFetchArrowChunk() before the garbage collector does, for when memory is tight and chunks are large (#797).
    The caller owns each chunk.
    The default method releases nanoarrow arrays and does nothing for other objects, so backends need not implement it.

    rs <- dbSendQueryArrow(con, "SELECT * FROM mtcars")
    while (!dbHasCompleted(rs)) {
      chunk <- dbFetchArrowChunk(rs)
      df <- as.data.frame(chunk)
      dbClearArrowChunk(rs, chunk)
    }
    dbClearResult(rs)

Bug fixes

  • OpenTelemetry query span names stay a single string when the SQL has several FROM clauses (@federiva, #768).

Documentation

  • Update the specification from DBItest 1.9.0, which is now required in Suggests (#793).
    The schema of the results of dbGetQueryArrow() and dbFetchArrow() must be available before any batch is consumed.
    For dbGetQueryArrow(), it must be complete even if the result has zero rows.

  • Say that only the base classes for drivers, connections and results are virtual, instead of all classes (#798).

  • The README names the real driver generators RSQLite::SQLite(), RPostgres::Postgres() and RMariaDB::MariaDB(), linked to their packages' documentation (#760, #761), and uses pak::pak() for the development install (#747).

Don't miss a new DBI release

NewReleases is sending notifications on new releases.