Skip to content

Commit 9ea9e1b

Browse files
committed
docs: improve expressions
1 parent 78ffaae commit 9ea9e1b

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

user_guide_src/source/database/query_builder.rst

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -27,20 +27,22 @@ You can generate SQL statements quite safely with the Query Builder. However,
2727
it is not designed to prevent SQL injection no matter what data you pass.
2828

2929
Arguments passed to the Query Builder can be:
30-
1. **identifiers** such as field or table names
30+
1. **identifiers** such as field (or table) names
3131
2. their **values**
3232
3. a part of **SQL strings**
3333

3434
The Query Builder will escape all **values** by default.
3535

36-
It will also try its best to properly protect **identifiers**
37-
and identifiers in **SQL strings** by default.
38-
However, flexibility is a priority and is far from perfect.
36+
It will also try to properly protect **identifiers** and identifiers in
37+
**SQL strings** by default.
38+
However, it is implemented to work well in many use cases and
39+
is not designed to prevent all attacks.
3940
Therefore, you should never feed in user input to them without proper validation.
4041

4142
Also, many methods have the ``$escape`` parameter that can be set to disable escaping.
42-
If ``$escape`` is set to false, no protection is provided, so you must ensure that
43-
they are properly escaped or protected by yourself.
43+
If ``$escape`` is set to false, no protection is provided by the Query Builder,
44+
so you must ensure by yourself that
45+
they are properly escaped or protected before passing it to the Query Builder.
4446
The same is true when using ``RawSql``, which specifies a raw SQL statement.
4547

4648
*************************

0 commit comments

Comments
 (0)