Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dbDataType tests based on dispatch on driver #69

Closed
imanuelcostigan opened this issue Apr 3, 2016 · 1 comment
Closed

dbDataType tests based on dispatch on driver #69

imanuelcostigan opened this issue Apr 3, 2016 · 1 comment

Comments

@imanuelcostigan
Copy link
Contributor

The dbDataType tests are included in the test_driver set rather than in the test_connection set. I can see how this works for RMySQL and RSQLite. However:

  1. The DBI vignette seems to suggest to define this method for a Connection. This doesn't preclude the Connection method simply wrapping the Driver method - as is the case for RMySQL and RSQLite.
  2. It makes this difficult for some DBI backends where the connection definitively establishes what SQL types are available. For example, the DATE T-SQL type is not available in versions of SQL Server earlier than SQL Server 2008. The driver doesn't know about this, but the connection does (because you can determine the version number associated with SQL Server.

It is possible to skip the test_driver tests and it might be the case that for most SQL backends, the Driver does specify what SQL backend types are available. However, I am wondering if putting these in the Driver section of the test harness is the natural home for this.

@krlmlr
Copy link
Member

krlmlr commented Apr 4, 2016

This is an omission, dbDataType() should also be tested for a connection. (Drivers are free to skip the driver-based tests if the connection is necessary, or perhaps we add a tweak that governs this.) Happy to review a PR.

Note that dbDataType() should return an SQL object (#65), but this isn't tested yet.

imanuelcostigan added a commit to imanuelcostigan/DBItest that referenced this issue Jun 4, 2016
krlmlr added a commit that referenced this issue Jun 8, 2016
@krlmlr krlmlr closed this as completed Jun 8, 2016
krlmlr pushed a commit that referenced this issue Jun 20, 2016
- Test on AppVeyor (#73).
- Check returned strings for UTF-8 encoding (#72).
- Test `dbDataType()` on connections (#69, #75, @imanuelcostigan).
krlmlr pushed a commit that referenced this issue Jul 7, 2016
Bug fixes
---------

- Fix `read_table` test when the backend actually returns the data in a different order.

New tests
---------

- Test `dbDataType()` on connections (#69, #75, @imanuelcostigan).
- Check returned strings for UTF-8 encoding (#72).
- Repeated `dbBind()` + `dbFetch()` on the same result set (#51).

Features
--------

- `tweaks()` gains an `...` as first argument to support future/deprecated tweaks (with a warning), and also to avoid unnamed arguments (#83).
- `testthat` now shows a more accurate location for the source of errors, failures, and skips (#78).
- Aggregate skipped tests, only one `skip()` call per test function.
- Indicate that some tests are optional in documentation (#15).

Internal
--------

- New `constructor_relax_args` tweak, currently not queried.
- The `ctx` argument is now explicit in the test functions.
- Change underscores to dashes in file names.
- Remove `testthat` compatibility hack.
- New `all_have_utf8_or_ascii_encoding()` which vectorizes `has_utf8_or_ascii_encoding()`.
- Test on AppVeyor (#73).
- Work around regression in R 3.3.0 (fix scheduled for R 3.3.1) which affected stress tests.
@github-actions github-actions bot locked and limited conversation to collaborators Dec 6, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants