<commit_before># Yet Another Simple PDO Class
Database persistence made it very simple task

#### Require the class in your project
```php
<?php
require("Db.class.php");
```
#### Create the instance
```php
<?php
// The instance
$db = new Db();
```
#### Select all from table
```
<?php
$db->setTable('example_table');
return $db->findAll();
```
#### Select all from table with search parameters
```
<?php
$db->setTable('example_table');
return $db->findAll(array('column1' => 'column1 value', 'column2' => 'column2 value'));
```
#### Select object
```
$db->setTable('example_table');
return $db->findOne(array('column1' => 'column1 value'));
```
#### Insert into database
```
<?php
$db->setTable('example_table');
$db->insert(
    array(
            'column1' => 'column1 value',
            'column2' => 'column2 value',
            'column3' => $object->property,
        )
    );
```
#### Update
```
<?php
$db->setTable('example_table');
$db->update(
    array(
            'column1' => 'column1 value',
            'column2' => 'column2 value',
            'column3' => $object->property,
        ),
        array('id' => $id)
    );
```
#### Delete
```
$db->setTable('example_table');
$db->delete(array('column1' => 'column1 value'));
```
#### Custom Query
```
$result = $db->->getInstance()->prepare('Custom Query like JOIN WHERE column = ?');
$result->execute(array('value'));
return $result->fetchAll(PDO::FETCH_OBJ);
```<commit_msg>Readme tags<commit_after># Yet Another Simple PDO Class
Database persistence made it very simple task

#### Require the class in your project
```php
<?php
require("Db.class.php");
```
#### Create the instance
```php
<?php
// The instance
$db = new Db();
```
#### Select all from table
```php
<?php
$db->setTable('example_table');
return $db->findAll();
```
#### Select all from table with search parameters
```php
<?php
$db->setTable('example_table');
return $db->findAll(array('column1' => 'column1 value', 'column2' => 'column2 value'));
```
#### Select object
```php
$db->setTable('example_table');
return $db->findOne(array('column1' => 'column1 value'));
```
#### Insert into database
```php
<?php
$db->setTable('example_table');
$db->insert(
    array(
            'column1' => 'column1 value',
            'column2' => 'column2 value',
            'column3' => $object->property,
        )
    );
```
#### Update
```php
<?php
$db->setTable('example_table');
$db->update(
    array(
            'column1' => 'column1 value',
            'column2' => 'column2 value',
            'column3' => $object->property,
        ),
        array('id' => $id)
    );
```
#### Delete
```php
$db->setTable('example_table');
$db->delete(array('column1' => 'column1 value'));
```
#### Custom Query
```php
$result = $db->->getInstance()->prepare('Custom Query like JOIN WHERE column = ?');
$result->execute(array('value'));
return $result->fetchAll(PDO::FETCH_OBJ);
```
{'fraction_non_alphanumeric': 0.22559503276992066, 'fraction_numerical': 0.012418075198344257, 'mean_word_length': 3.9828178694158076, 'pattern_counts': {'":': 0, '<': 15, '<?xml version=': 0, '>': 63, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2417181', 'n_tokens_mistral': 952, 'n_tokens_neox': 903, 'n_words': 228}