Skip to content

Commit 60cc121

Browse files
author
Wazabii
committed
Structure
1 parent 55b0ee7 commit 60cc121

File tree

9 files changed

+41
-21
lines changed

9 files changed

+41
-21
lines changed

AbstractDB.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
namespace MaplePHP\Query;
55

6-
use MaplePHP\Query\Helpers\Attr;
6+
use MaplePHP\Query\Utility\Attr;
77
use MaplePHP\Query\Handlers\MySqliHandler;
88
use MaplePHP\Query\Interfaces\AttrInterface;
99
use MaplePHP\Query\Interfaces\MigrateInterface;

AbstractMigrate.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,8 +70,8 @@ public function getData(): array
7070
*/
7171
public function read(): string
7272
{
73+
$this->mig->auto();
7374
$this->buildTable();
74-
$this->mig->create();
7575
if (!$this->mig->getColumns()) {
7676
throw new \Exception("There is nothing to read in migration.", 1);
7777
}
@@ -84,7 +84,7 @@ public function read(): string
8484
*/
8585
public function create(): array
8686
{
87-
$this->mig->create();
87+
$this->mig->auto();
8888
$this->buildTable();
8989
if (!$this->mig->getColumns()) {
9090
throw new \Exception("There is nothing to commit in migration.", 1);

Connect.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
use MaplePHP\Query\Exceptions\ConnectException;
77
use MaplePHP\Query\Interfaces\AttrInterface;
8-
use MaplePHP\Query\Helpers\Attr;
8+
use MaplePHP\Query\Utility\Attr;
99
use mysqli;
1010

1111
class Connect

DB.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,8 @@
88
use MaplePHP\Query\Interfaces\DBInterface;
99
use MaplePHP\Query\Exceptions\DBValidationException;
1010
use MaplePHP\Query\Exceptions\DBQueryException;
11-
use MaplePHP\Query\Helpers\Attr;
11+
use MaplePHP\Query\Utility\Attr;
12+
use MaplePHP\Query\Utility\WhitelistMigration;
1213

1314
class DB extends AbstractDB
1415
{

Handler/MySQL.php

Lines changed: 0 additions & 11 deletions
This file was deleted.

README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
# MaplePHP - MySQL queries
2-
MaplePHP - MySQL queries is a powerful yet **user friendly** and **light weight** library for making **safe** database queries.
2+
MaplePHP - MySQL queries is a powerful yet **user-friendly** library for making **safe** database queries.
3+
4+
The guide is not complete; more content will be added soon.
35

46
### Select 1:
57
```php

Helpers/Attr.php renamed to Utility/Attr.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?php
22

3-
namespace MaplePHP\Query\Helpers;
3+
namespace MaplePHP\Query\Utility;
44

55
use MaplePHP\Query\Connect;
66
use MaplePHP\Query\Interfaces\AttrInterface;
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
11
<?php
22
declare(strict_types=1);
33

4-
namespace MaplePHP\Query;
4+
namespace MaplePHP\Query\Utility;
55

66
use MaplePHP\Query\Interfaces\AttrInterface;
77
use MaplePHP\Query\Interfaces\MigrateInterface;
8-
use MaplePHP\Query\Helpers\Attr;
8+
use MaplePHP\Query\Utility\Attr;
9+
use MaplePHP\Query\Connect;
910

1011
class WhitelistMigration
1112
{
@@ -26,7 +27,6 @@ class WhitelistMigration
2627
private $mig;
2728
private $data;
2829
private $message;
29-
//private $key;
3030

3131
/**
3232
* WhitelistMigration will take the migration files and use them to make a whitelist validation

composer.json

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
{
2+
"name": "maplephp/query",
3+
"type": "library",
4+
"description": "MaplePHP - MySQL queries is a powerful yet user-friendly library for making safe database queries",
5+
"keywords": ["database", "query", "fetch", "mysql", "mysqli"],
6+
"homepage": "https://wazabii.se",
7+
"license": "Apache-2.0",
8+
"authors": [
9+
{
10+
"name": "Daniel Ronkainen",
11+
"email": "[email protected]"
12+
},
13+
{
14+
"name": "MaplePHP",
15+
"homepage": "https://wazabii.se"
16+
}
17+
],
18+
"require": {
19+
"php": ">=8.0",
20+
"maplephp/dto": "^1.0"
21+
},
22+
"autoload": {
23+
"psr-4": {
24+
"MaplePHP\\Query\\": ""
25+
}
26+
},
27+
"minimum-stability": "dev"
28+
}

0 commit comments

Comments
 (0)