Skip to content

Commit 539ce3d

Browse files
committed
Add more poe commands to README.md
1 parent cfa11be commit 539ce3d

File tree

1 file changed

+14
-3
lines changed

1 file changed

+14
-3
lines changed

cratedb_sqlparse_py/README.md

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ query = """
2727
SELECT * FROM SYS.SHARDS;
2828
INSERT INTO doc.tbl VALUES (1);
2929
"""
30-
statements = sqlparse(query)
30+
statements = sqlparse(query, raise_exception=True)
3131

3232
print(len(statements))
3333
# 2
@@ -43,17 +43,28 @@ print(select_query.type)
4343
print(select_query.tree)
4444
# (statement (query (queryNoWith (queryTerm (querySpec SELECT (selectItem *) FROM (relation (aliasedRelation (relationPrimary (table (qname (ident (unquotedIdent SYS)) . (ident (unquotedIdent (nonReserved SHARDS)))))))))))))
4545

46-
sqlparse('SUUULECT * FROM sys.shards')
47-
# cratedb_sqlparse.parser.parser.ParsingException: line1:0 mismatched input 'SUUULECT' expecting {'SELECT', 'DEALLOCATE', ...}
46+
sqlparse('SEEELECT * FROM sys.shards')
47+
# cratedb_sqlparse.parser.parser.ParsingException: line1:0 mismatched input 'SEEELECT' expecting {'SELECT', 'DEALLOCATE', ...}
4848
```
4949

5050

5151
## Development
5252
```shell
5353
git clone https://github.com/crate/cratedb-sqlparse
54+
5455
cd cratedb-sqlparse/cratedb_sqlparse_py
5556
python3 -m venv .venv
5657
source .venv/bin/activate
5758
pip install --editable='.[develop,generate,release,test]'
5859
poe check
5960
```
61+
62+
### Run only tests
63+
```shell
64+
poe test
65+
```
66+
67+
### Run only one test
68+
```shell
69+
poe test -k test_sqlparse_collects_exceptions_2
70+
```

0 commit comments

Comments
 (0)