Skip to content
New issue

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

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

Already on GitHub? # to your account

Fix so that Ignored properties are not included in parameters #267

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

balchen
Copy link
Contributor

@balchen balchen commented Aug 9, 2021

See #266 for details

balchen added 2 commits August 9, 2021 18:31
… is mapped so that it will properly ignore properties that are mapped using Map().Ignore(),
…fail (without the fix from the previous commit)
@valfrid-ly
Copy link
Collaborator

I saw your changes and they are working but to approve your PR you need to add tests for all the supported databases not only SQL Server.

The tests are using databases on docker and the docker compose file is in the project to help getting them up.

Please include tests for the other databases.

Copy link
Collaborator

@valfrid-ly valfrid-ly left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please include tests for the other databases.

@balchen
Copy link
Contributor Author

balchen commented Aug 10, 2021

Please include tests for the other databases.

Will do.

Before I commit, here's a rundown of how the unit tests worked.

I've started the different databases in Docker. StartDatabase.ps1 fails with "no such user" from wsl when I try to run it, so I had to use "docker compose up". StartDatabase.ps1 might not be ready yet, from the looks of it.

The setup scripts for SQL Server don't work out of the box if the "dapper" database doesn't already exist and Setup.sql needs to run. "USE dapper" fails because SQL Server executes every statement in the batch simultaneously, so CREATE DATABASE hasn't finished yet. Just so you know.

Otherwise SQL Server tests run fine. Oracle tests also run fine. So do Sqlite tests.

DB2 hangs indefinitely on connect. I don't have any other DB2 clients to test with, so I can't tell yet why it hangs.

MySQL/MariaDB fails with the below message and stack trace.

Is this normal?

Message:
System.Collections.Generic.KeyNotFoundException : The given key '12545' was not present in the dictionary.

Stack Trace:
Dictionary2.get_Item(TKey key) MySqlField.SetFieldEncoding() MySqlField.set_CharacterSetIndex(Int32 value) NativeDriver.GetColumnData(MySqlField field) NativeDriver.GetColumnsData(MySqlField[] columns) Driver.GetColumns(Int32 count) ResultSet.LoadColumns(Int32 numCols) ResultSet.ctor(Driver d, Int32 statementId, Int32 numCols) Driver.NextResult(Int32 statementId, Boolean force) MySqlDataReader.NextResult() MySqlDataReader.Close() MySqlDataReader.Dispose(Boolean disposing) MySqlDataReader.Dispose() MySqlCommand.ExecuteNonQuery() SqlMapper.ExecuteCommand(IDbConnection cnn, CommandDefinition& command, Action2 paramReader) line 2813
SqlMapper.ExecuteImpl(IDbConnection cnn, CommandDefinition& command) line 572
SqlMapper.Execute(IDbConnection cnn, String sql, Object param, IDbTransaction transaction, Nullable1 commandTimeout, Nullable1 commandType) line 443
DatabaseTestsFixture.ExecuteScripts(IDbConnection connection, Boolean abortOnError, String[] scripts) line 120
MySqlBaseAsyncFixture.Setup() line 17

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
2 participants