Skip to content

Commit 72cff94

Browse files
committed
IMP README readability
1 parent 4f80fbc commit 72cff94

File tree

1 file changed

+23
-21
lines changed

1 file changed

+23
-21
lines changed

README.md

Lines changed: 23 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,12 @@ SQL Builder
22
=======================================
33

44
![Packagist](https://img.shields.io/packagist/v/francerz/sql-builder)
5+
![License](https://img.shields.io/github/license/francerz/php-sql-builder?color=%230078D0)
6+
![Packagist Downloads](https://img.shields.io/packagist/dt/francerz/sql-builder?color=%23E0B000)
57
![Build Status](https://github.com/francerz/php-sql-builder/workflows/PHP%20Unit%20Tests/badge.svg)
6-
![Packagist Downloads](https://img.shields.io/packagist/dt/francerz/sql-builder)
7-
![License](https://img.shields.io/github/license/francerz/php-sql-builder?color=%230080FF)
88

9-
A query builder that allows optimal performance object based query construction.
9+
A PHP SQL query builder that prioritizes readability and optimal performance
10+
with object based construction.
1011

1112
Table of contents
1213
---------------------------------------
@@ -19,14 +20,14 @@ Table of contents
1920
- [Insert query ↑](#insert-query-)
2021
- [Update query ↑](#update-query-)
2122
- [Delete query ↑](#delete-query-)
22-
- [Build SELECT with WHERE or HAVING clause ](#build-select-with-where-or-having-clause--)
23+
- [Build SELECT with WHERE or HAVING clause ↑](#build-select-with-where-or-having-clause-)
2324
- [List of operators ↑](#list-of-operators-)
24-
- [Building SELECT with JOIN ](#building-select-with-join--)
25+
- [Building SELECT with JOIN ↑](#building-select-with-join-)
2526
- [SUPPORTED JOIN TYPES](#supported-join-types)
2627
- [Examples](#examples)
27-
- [SELECT nesting ](#select-nesting--)
28+
- [SELECT nesting ↑](#select-nesting-)
2829
- [Transactions ↑](#transactions-)
29-
- [Executing Stored Procedures ](#executing-stored-procedures--)
30+
- [Executing Stored Procedures ↑](#executing-stored-procedures-)
3031

3132
Installation [](#table-of-contents)
3233
---------------------------------------
@@ -60,8 +61,6 @@ $_ENV['DATABASE_SCHOOL_PSWD_FILE'] = '/run/secrets/db_school_password';
6061
$db = DatabaseManager::connect('school');
6162
```
6263

63-
64-
6564
Basic common usage syntax [](#table-of-contents)
6665
---------------------------------------
6766
```php
@@ -120,7 +119,7 @@ $result = $db->executeDelete($query);
120119

121120
---
122121

123-
Build SELECT with WHERE or HAVING clause [](#table-of-contents)
122+
Build SELECT with WHERE or HAVING clause [](#table-of-contents)
124123
---------------------------------------
125124

126125
Bellow are examples of using `WHERE` clause which aplies to `SELECT`, `UPDATE`
@@ -210,13 +209,16 @@ $query->where(function(ConditionList $subwhere) {
210209
});
211210
```
212211

213-
Parenthesis anonymous function only works in the following syntax.
214-
- `$query->where(function)`
215-
- `$query->where()->not(function)`
216-
- `$query->where()->and(function)`
217-
- `$query->where()->or(function)`
218-
- `$query->where()->andNot(function)`
219-
- `$query->where()->orNot(function)`
212+
> Parenthesis anonymous function works in the following syntax.
213+
>
214+
> ```php
215+
> $query->where(function($subwhere) { });
216+
> $query->where->not(function($subwhere) { });
217+
> $query->where->and(function($subwhere) { });
218+
> $query->where->or(function($subwhere) { });
219+
> $query->where->andNot(function($subwhere) { });
220+
> $query->where->orNot(function($subwhere) { });
221+
> ```
220222
221223
---
222224
@@ -226,7 +228,7 @@ The library has a complete list of operators that are mostly common to every SQL
226228
database engine and to facilitate reading, also prefixes the `and` and `or`
227229
logical operators.
228230
229-
| Operator | Regular (AND) | AND | OR |
231+
| SQL Operator | Regular (AND) | AND | OR |
230232
| ------------- | ----------------------------- | -------------------------------- | ------------------------------- |
231233
| `=` | `equals($op1, $op2)` | `andEquals($op1, $op2)` | `orEquals($op1, $op2)` |
232234
| `<>` or `!=` | `notEquals($op1, $op2)` | `andNotEquals($op1, $op2)` | `orNotEquals($op1, $op2)` |
@@ -250,7 +252,7 @@ logical operators.
250252
251253
---
252254
253-
Building SELECT with JOIN [](#table-of-contents)
255+
Building SELECT with JOIN [↑](#table-of-contents)
254256
---------------------------------------
255257
256258
One of the most common operations in relational databases is merging and
@@ -401,7 +403,7 @@ $query->columns([
401403
]);
402404
```
403405

404-
SELECT nesting [](#table-of-contents)
406+
SELECT nesting [](#table-of-contents)
405407
---------------------------------------
406408

407409
Sometimes database table joining might not be enought for all the data requirements.
@@ -491,7 +493,7 @@ try {
491493
```
492494

493495

494-
Executing Stored Procedures [](#table-of-contents)
496+
Executing Stored Procedures [](#table-of-contents)
495497
---------------------------------------
496498

497499
```php

0 commit comments

Comments
 (0)