Skip to content

Releases: cynkra/dm

dm 0.2.0

04 May 02:07
Compare
Choose a tag to compare

Breaking changes

  • Deprecate dm_get_src() tbl.dm(), src_tbls.dm(), copy_to.dm(). These functions have better alternatives and use the notion of a "data source" which is being phased out of dplyr (#527).
  • *_pk() and *_fk() functions gain an ellipsis argument that comes before check, force and rm_referencing_fks arguments (#520).

Features

  • dm_add_pk() and dm_add_fk() support compound keys via the c() notation, e.g. dm_add_pk(dm, table, c(col1, col2)). dm_nycflights13() returns a data model with compound keys by default. Use compound = FALSE to return the data model from dm v0.1.13 or earlier (#3).
  • dm_get_all_fks() includes parent_pk_cols column that describes the primary key columns of the parent table (#335).
  • dm_from_src() supports the schema argument also for MariaDB and MySQL databases (#516).
  • dm objects now inherit from "dm_v1" in addition to "dm", to allow backward-compatible changes of the internal format (#521).
  • Use hack to create compound primary keys on the database (#522).
  • dm_examine_constraints() and other check functions count the number of rows that violate constraints for primary and foreign keys (#335).
  • copy_dm_to(set_key_constraints = FALSE) downgrades unique indexes to regular indexes (#335).
  • rows_truncate() implemented for data frames (#335).
  • dm_enum_fk_candidates() enumerates column in the order they apper in the table (#335).

dm 0.1.13

26 Apr 01:58
Compare
Choose a tag to compare

Features

  • dm_draw() gains column_types argument, if TRUE the column type is shown for each displayed column (#444, @samssann).
  • copy_dm_to() gains schema argument (#432).
  • dm_from_src() gains dbname argument for MSSQL (#472).

Bug fixes

  • Fix rows_update() when multiple columns are updated (#488, @samssann).

Performance

  • enum_fk_candidates() now only checks distinct values, this improves performance for large tables. As a consequence, only the number of distinct values is reported for mismatches, not the number of mismatching rows/entries (#494).

Documentation

  • Fix description of filtering behavior in ?dm_zoom_to (#403).

Internal

dm 0.1.12

19 Feb 10:30
Compare
Choose a tag to compare
  • dm_from_src() gains dbname argument for MSSQL (#472).
  • Implement count() and tally() for dplyr 1.0.3 compatibility (#475).
  • Use databases.pacha.dev instead of db-edu.pacha.dev (#478, @pachamaltese).

dm 0.1.10

07 Jan 16:41
Compare
Choose a tag to compare
  • Columns with missing values are no longer primary keys (#469).
  • Fix dm_from_src() for MSSQL when learn_keys = FALSE (#427).
  • Tests use expect_snapshot() everywhere (#456).
  • Fix compatibility with testthat 3.0.1 (#457).

dm 0.1.9

19 Nov 05:42
Compare
Choose a tag to compare
  • New vignette("howto-dm-copy", package = "dm") and vignette("howto-dm-rows", package = "dm") discuss updating data on the database. In part derived from vignette("howto-dm-db", package = "dm") (#411, @jawond).
  • New dm_mutate_tbl() (#448).
  • dm_financial() falls back to db-edu.pacha.dev if relational.fit.cvut.cz is unavailable (#446, @pachamaltese).
  • Use testthat 3e (#455).

dm 0.1.7

09 Sep 09:27
Compare
Choose a tag to compare
  • Bump RMariaDB required version to 1.0.10 to work around timeout with R CMD check.
  • dm_from_src() accepts schema argument for MSSQL databases (#367).

dm 0.1.6

30 Jul 16:55
Compare
Choose a tag to compare

Breaking changes

  • dm_get_src() returns NULL for local data sources (#394).
  • Local target in copy_dm_to() gives a deprecation message (#395).

Features

  • copy_dm_to() gives a better error message for bad table_names (#397).
  • dm objects with local data sources no longer show the "Table source" part in the output.
  • Error messages now refer to "tables", not "elements" (#413).
  • New dm_bind() for binding two or more 'dm' objects together (#417).

Bug fixes

  • For databases, the underlying SQL table names are quoted early to avoid later SQL syntax errors (#419).
  • dm_financial() no longer prints message about learn_keys = FALSE.
  • dm_rows_update() and related functions now use the primary keys defined in x for establishing matching rows.

Internal

  • Use withCallingHandlers() where appropriate (#422).
  • Consistent definition of .dm and .zoomed_dm methods (#300).
  • Examples involving dm_financial() are not run if connection can't be established (#418).
  • Fix database tests on CI (#416).

dm 0.1.5

20 Jul 05:25
Compare
Choose a tag to compare

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).
  • Testing packages with all "Suggests" uninstalled.

dm 0.1.4

07 Jun 16:59
Compare
Choose a tag to compare

Features

  • New dm_rows_insert(), dm_rows_update(), dm_rows_patch(), dm_rows_upsert(), dm_rows_delete() and dm_rows_truncate(), calling the corresponding rows_*() method for every table (#319).

  • New rows_truncate() (#319).

  • Added rows_insert() and rows_update() methods for SQLite, Postgres, MariaDB and MSSQL (#319).

  • Missing arguments now give a better error message (#388).

  • Empty dm object prints as dm() (#386).

  • copy_dm_to() also accepts a function as the table_names argument. The unique_table_names() argument is deprecated (#80).

Documentation

Internal

  • Require dplyr >= 1.0.0.

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

dm 0.1.3

26 May 03:17
Compare
Choose a tag to compare
  • 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.