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

ClearTable doesn't handle tables with spaces in their names properly #51

Closed
darrencomeau opened this issue Jan 19, 2019 · 3 comments
Closed
Assignees
Labels
bug Something isn't working

Comments

@darrencomeau
Copy link
Member

Does appear to work in many cases but when there is another table which matches the first part of the table name.

            dbTester.ClearTable("Weather", "Observation");
            dbTester.ClearTable("Weather", "ICAO Aerodrome"); //Fine
            dbTester.ClearTable("Weather", "Filtered Aerodrome"); // Fine
            dbTester.ClearTable("Weather", "Filter");
            dbTester.ClearTable("Weather", "Aerodrome");
            dbTester.ClearTable("Weather", "Observation Source"); //Problem because of earlier table

image

Work Around

Use square brackets to quote the table

            dbTester.ClearTable("Weather", "[Observation Source]"); //Problem because of earlier table
@darrencomeau darrencomeau added the bug Something isn't working label Jan 19, 2019
@darrencomeau darrencomeau added this to To do in Version 1.n.n via automation Jan 19, 2019
@darrencomeau
Copy link
Member Author

NB work around doesn't work in 1.0.0.Beta! While the code executes without error it doesn't actually do anything.

Method in 1.0.0.Beta2 uses different approach and correctly deletes data from the table with the work around.

@darrencomeau darrencomeau moved this from To do to In progress in Version 1.n.n Jan 28, 2019
@darrencomeau
Copy link
Member Author

New test scenario Will_Clear_Data_From_Table_With_Foreign_Key_And_Space_In_Object_Name replicates the error
image

@darrencomeau
Copy link
Member Author

Fixed and ready for release in 1.0.0-beta3

Version 1.n.n automation moved this from In progress to Done Jan 28, 2019
@darrencomeau darrencomeau self-assigned this Jan 28, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Version 1.n.n
  
Done
Development

No branches or pull requests

1 participant