Skip to content

Commit 348c46e

Browse files
committed
update README
1 parent c8d1edd commit 348c46e

File tree

1 file changed

+8
-7
lines changed

1 file changed

+8
-7
lines changed

README.md

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
# QueryBuilder python module
22

33
![PyPI](https://img.shields.io/pypi/v/simple-query-builder?color=yellow&style=flat-square)
4+
![PyPI - Downloads](https://img.shields.io/pypi/dm/simple-query-builder?color=darkgreen&style=flat-square)
45
[![Latest Version](https://img.shields.io/github/release/co0lc0der/simple-query-builder-python?color=orange&style=flat-square)](https://github.com/co0lc0der/simple-query-builder-python/release)
56
![GitHub repo size](https://img.shields.io/github/repo-size/co0lc0der/simple-query-builder-python?label=size&style=flat-square)
67
![Python 3.7, 3.8, 3.9, 3.10](https://img.shields.io/pypi/pyversions/simple-query-builder?color=blueviolet&style=flat-square)
@@ -32,19 +33,19 @@ pip install https://github.com/co0lc0der/simple-query-builder-python/archive/mai
3233
### Main public methods
3334
- `get_sql()` returns SQL query string which will be executed
3435
- `get_params()` returns an array of parameters for a query
35-
- `get_result()` returns query's results
36-
- `get_count()` returns results' rows count
36+
- `get_result()` returns query's result
37+
- `get_count()` returns result's rows count
3738
- `get_error()` returns `True` if an error is had
3839
- `get_error_message()` returns an error message if an error is had
3940
- `set_error(message)` sets `_error` to `True` and `_error_essage`
4041
- `get_first()` returns the first item of results
4142
- `get_last()` returns the last item of results
4243
- `reset()` resets state to default values (except PDO property)
43-
- `all()` executes SQL query and return all rows of result (`fetchall()`)
44-
- `one()` executes SQL query and return the first row of result (`fetchone()`)
45-
- `column(col_index)` executes SQL query and return the first column of result, `col_index` is `0` by default
46-
- `go()` this method is for non `SELECT` queries. it executes SQL query and return nothing (but returns the last inserted row ID for `INSERT` method)
47-
- `count()` prepares a query with SQL `COUNT()` function
44+
- `all()` executes SQL query and returns all rows of result (`fetchall()`)
45+
- `one()` executes SQL query and returns the first row of result (`fetchone()`)
46+
- `column(col_index)` executes SQL query and returns the first column of result, `col_index` is `0` by default
47+
- `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)
48+
- `count()` prepares a query with SQL `COUNT(*)` function and executes it
4849
- `query(sql, params, fetch_type, col_index)` executes prepared `sql` with `params`, it can be used for custom queries
4950
- 'SQL' methods are presented in [Usage section](#usage-examples)
5051

0 commit comments

Comments
 (0)