Skip to content

Commit 26a310b

Browse files
committed
update README
1 parent 584d265 commit 26a310b

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

README.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -43,10 +43,10 @@ pip install https://github.com/co0lc0der/simple-query-builder-python/archive/mai
4343
- `reset()` resets state to default values
4444
- `all()` executes SQL query and returns all rows of result (`fetchall()`)
4545
- `one()` executes SQL query and returns the first row of result (`fetchone()`)
46-
- `column(col_index)` executes SQL query and returns the needed column of result, `col_index` is `0` by default
47-
- `pluck(key_index, col_index)` executes SQL query and returns a list of tuples (the key (usually ID) and the needed column of result), `key_index` is `0` and `col_index` is `1` by default
46+
- `column(col)` executes SQL query and returns the needed column of result by its index or name, `col` is `0` by default
47+
- `pluck(key, col)` executes SQL query and returns a list of tuples/dicts (the key (usually ID) and the needed column of result) by its indexes or names, `key` is `0` and `col` is `1` by default
4848
- `go()` this method is for non `SELECT` queries. it executes SQL query and returns nothing (but returns the last inserted row ID for `INSERT` method)
49-
- `exists()` returns `True` if SQL query has a row
49+
- `exists()` returns `True` if SQL query has a row and `False` if it hasn't
5050
- `count()` prepares a query with SQL `COUNT(*)` function and executes it
5151
- `query(sql, params, fetch_type, col_index)` executes prepared `sql` with `params`, it can be used for custom queries
5252
- 'SQL' methods are presented in [Usage section](#usage-examples)

0 commit comments

Comments
 (0)