dm 0.1.5 Unreleased

Features

  • dm_paste() generates self-contained code (#401).
  • Errors regarding cycles in the relationship graph now show the shortest cycle (#405).
  • Implement rows_truncate() for databases.
  • collect() works on a zoomed dm, with a message.
  • The data model is drawn in a more compact way if it comprises of multiple connected components.
  • dm_add_pk(check = TRUE) gives a better error message.

Bug fixes

  • rows_insert() works if column names consist of SQL keywords (#409).
  • Cycles in other connected components don’t affect filtering in a cycle-free component.
  • Avoid src_sqlite() in examples (#372).

Internal

  • Testing SQLite, Postgres and SQL Server on GitHub Actions (#408, @pat-s).

dm 0.1.4.9000 Unreleased

  • Same as previous version.

dm 0.1.4 2020-06-07

Features

Documentation

Internal

  • Require dplyr >= 1.0.0.

  • Use GitHub Actions (#369, @pat-s).

dm 0.1.3 2020-05-25

  • Avoid src_sqlite() in vignettes (#372).
  • Rename vignettes (#349).
  • Rename error class "dm_error_tables_not_neighbours" to "dm_error_tables_not_neighbors".
  • Shortened README and intro article (#192, @jawond).
  • Better testing for MSSQL (#339).
  • Fix compatibility with dplyr 1.0.0.

dm 0.1.2 2020-05-04

Features

  • dm_from_src() now works for databases other than Postgres and MSSQL (#288), gives a warning if tables cannot be accessed with table_name = NULL (#348), and gains learn_keys argument to control querying of primary and foreign keys from the database (#340).
  • dm_examine_constraints() now prints a different message if a dm has no constraints defined.
  • Disambiguation message now only lists column names for easier copy-pasting.
  • New methods for "zoomed_dm": head(), tail(), pull(), group_data(), group_indices(), group_vars(), group_keys() and groups() (#236, #203).
  • dm_paste() supports writing colors and the table definition via the new options argument. The definition can be written to a file via the new path argument. The select argument is soft-deprecated (#218, #302).
  • dm_add_tbl() uses rlang::list2() internally, now accepts := to specify table names.
  • New dm_ptype() (#301).
  • New dm_financial() and dm_financial_sqlite().
  • Printing dm objects from database sources with many tables is now faster (#308, @gadenbuie).
  • check_key() now also works on a zoomed dm.
  • Key columns are always selected in a join operation, with a message (#153).
  • Support alpha colors for the table colors (#279).

Bug fixes

Compatibility

  • Remove use of deprecated src_df() (#336).
  • Fix compatibility with dplyr 1.0.0 (#203).

Documentation

Internal

  • Testing on local data frames (by default), optionally also SQLite, Postgres, RMariaDB, and SQL Server. Currently requires development versions and various pull requests (#334, #327, #312, #76).
  • dm_nycflights13(subset = TRUE) memoizes subset and also reduces the size of the weather table.
  • Expand definitions of deprecated functions (#204).

dm 0.1.1 2020-03-12

  • Implement format.dm().
  • Adapt to tidyselect 1.0.0 (#257).
  • Zooming and unzooming is now faster if no columns are removed.
  • Table names must be unique.
  • dm_examine_constraints() formats the problems nicely.
  • New class for prettier printing of keys (#244).
  • Add experimental schema support for dm_from_src() for Postgres through the new schema and table_type arguments (#256).

dm 0.1.0 Unreleased

dm 0.0.6 Unreleased

dm 0.0.5 Unreleased

Features

Documentation

  • New demo.
  • Add explanation for empty dm (#100).

Bug fixes

  • Avoid asterisk when printing local zoomed_dm (#131).
  • cdm_select_tbl() works again when multiple foreign keys are defined between two tables (#122).

dm 0.0.4 Unreleased

dm 0.0.3 Unreleased

dm 0.0.2.9003 Unreleased

  • Fix R CMD check.

dm 0.0.2.9002 Unreleased

dm 0.0.2.9001 Unreleased

  • Remove the src component from dm (#38).
  • Internal: Add function checking if all tables have same src.
  • Internal: Add 2 classed errors.
  • cdm_get_src() for local dm always returns a src based on .GlobalEnv.
  • cdm_flatten() gains ... argument to specify which tables to include. Currently, all tables must form a connected subtree rooted at start. Disambiguation of column names now happens after selecting relevant tables. The resulting SQL query is more efficient for inner and outer joins if filtering is applied. Flattening with a right_join with more than two tables is not well-defined and gives an error (#62).
  • Add a vignette for joining functions (#60, @cutterkom).
  • Shorten message in cdm_disambiguate_cols().

dm 0.0.2.9000 Unreleased

  • cdm_flatten_to_tbl() disambiguates only the necessary columns.
  • When flattening, the column name of the LHS (child) table is used (#52).
  • Fix formatting in enum_pk_candidates() for character data.
  • cdm_add_pk() and cdm_add_fk() no longer check data integrity by default.
  • Explicitly checking that the join argument is a function, to avoid surprises when the caller passes data.
  • cdm_copy_to() works correctly with filtered dm objects.
  • cdm_apply_filters() actually resets the filter conditions.
  • A more detailed README file and a vignette for filtering (#29, @cutterkom).
  • cdm_draw() no longer supports the table_names argument, use cdm_select_tbl().
  • Copying a dm to a database now creates indexes for all primary and foreign keys.

dm 0.0.2 Unreleased

Breaking changes

Performance

New functions

Minor changes

Documentation

  • Add setup article (#7).

Internal

  • Using simpler internal data structure to store primary and foreign key relations (#26).
  • New nse_function() replaces h() for marking functions as NSE to avoid R CMD check warnings.
  • Simplified internal data structure so that creation of new operations that update a dm becomes easier.
  • When copying a dm to a database, NOT NULL constraints are set at creation of the table. This removes the necessity to store column types.
  • Using {RPostgres} instead of {RPostgreSQL} for testing.

dm 0.0.1 Unreleased

Initial GitHub release.

Creating dm objects and basic functions:

Primary keys

Foreign keys

Flattening

  • cdm_join_tbl()

Filtering

Interaction with DBs

Utilizing foreign key relations

Miscellaneous