-
Notifications
You must be signed in to change notification settings - Fork 125
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
* Feature/support for truncate table query parsing (#1) * failing test for truncate table * fix failing truncate table test --------- Co-authored-by: Santos, Tyler (Boston) <[email protected]> * Update test/test_truncate_table.py Co-authored-by: Maciej Brencz <[email protected]> * Update test_truncate_table.py Add whitespace --------- Co-authored-by: Santos, Tyler (Boston) <[email protected]> Co-authored-by: Maciej Brencz <[email protected]>
- Loading branch information
1 parent
9a78fbc
commit 3713f14
Showing
3 changed files
with
12 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
from sql_metadata import Parser | ||
from sql_metadata.keywords_lists import QueryType | ||
|
||
|
||
def test_truncate_table(): | ||
parser = Parser("TRUNCATE TABLE foo") | ||
assert parser.query_type == QueryType.TRUNCATE | ||
assert parser.tables == ["foo"] | ||
assert parser.columns == [] |