-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[update] - added database function declaration
- Loading branch information
Showing
7 changed files
with
101 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
<?php | ||
|
||
namespace Ilias\Maestro\Database; | ||
|
||
class DatabaseFunction | ||
{ | ||
private string $name; | ||
private string $returnType; | ||
private string $sqlDefinition; | ||
|
||
public function __construct(string $name, string $returnType, string $sqlDefinition) | ||
{ | ||
$this->name = $name; | ||
$this->returnType = $returnType; | ||
$this->sqlDefinition = $sqlDefinition; | ||
} | ||
|
||
public function getName(): string | ||
{ | ||
return $this->name; | ||
} | ||
|
||
public function getReturnType(): string | ||
{ | ||
return $this->returnType; | ||
} | ||
|
||
public function getSqlDefinition(): string | ||
{ | ||
return $this->sqlDefinition; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,14 @@ | ||
<?php | ||
|
||
use Ilias\Maestro\Core\Manager; | ||
use Ilias\Maestro\Types\Timestamp; | ||
use Maestro\Example\MaestroDb; | ||
use Maestro\Example\User; | ||
|
||
require_once("./vendor/autoload.php"); | ||
|
||
$coreDatabase = new Manager(); | ||
$agrofastDB = new MaestroDb(); | ||
// new User("nickname", "email", "password", true, new Timestamp()); | ||
|
||
print implode("\n", $coreDatabase->createDatabase($agrofastDB, false)) . "\n"; |