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

SQL Server incorrect hash #129

Closed
pachadotdev opened this issue Aug 20, 2020 · 1 comment
Closed

SQL Server incorrect hash #129

pachadotdev opened this issue Aug 20, 2020 · 1 comment

Comments

@pachadotdev
Copy link
Collaborator

Hi Jonathan

When you use start_db_capturing() with SQL Server it works flawlessy. However, the with_mock_db() function cannot recognize the mocked queries because the hashes are wrong.

See this example where devtools::test() fails just with SQL Server but works with MySQL and PostgreSQL: https://github.com/pachamaltese/pointblank/blob/master/tests/testthat/test-sqlserver.R

Here is the error message:

test-sqlserver.R:4: error: pointblank agent works with dittodb-mocked SQL Server database connection
Couldn't find the file dbo/SELECT-ad1f87.R in any of the mock directories.
Backtrace:
  1. dittodb::with_mock_db(...) tests/testthat/test-sqlserver.R:4:2
  2. dplyr::tbl(con, "planes")
  9. pointblank::create_agent(...)
 13. pointblank::get_tbl_information(tbl = tbl) R/create_agent.R:229:2
 14. pointblank::get_r_column_names_types(tbl) R/utils.R:303:4
  6. utils::head(., 1)
 13. dplyr::collect(.)
 27. dbplyr:::db_collect.DBIConnection(x$src$con, sql, n = n, warn_incomplete = warn_incomplete)
 31. dittodb::dbFetch(res, n = n)
 34. dittodb:::find_file(path)****
@jonkeane
Copy link
Collaborator

Is this still an issue? If so, please re-open

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants