Compare commits
1 Commits
1.1.1
...
1ad13ddd3f
| Author | SHA1 | Date | |
|---|---|---|---|
| 1ad13ddd3f |
@@ -4,6 +4,9 @@ declare(strict_types=1);
|
|||||||
|
|
||||||
namespace mirzaev\record\interfaces;
|
namespace mirzaev\record\interfaces;
|
||||||
|
|
||||||
|
// Baza database
|
||||||
|
use mirzaev\baza\record as baza;
|
||||||
|
|
||||||
// Built-in libraries
|
// Built-in libraries
|
||||||
use InvalidArgumentException as exception_invalid_argument;
|
use InvalidArgumentException as exception_invalid_argument;
|
||||||
|
|
||||||
@@ -16,6 +19,7 @@ use InvalidArgumentException as exception_invalid_argument;
|
|||||||
*
|
*
|
||||||
* @package mirzaev\record\interfaces
|
* @package mirzaev\record\interfaces
|
||||||
*
|
*
|
||||||
|
* @method void __construct(record|null $record) Constructor
|
||||||
* @method static|false read(callable $filter) Read from the database
|
* @method static|false read(callable $filter) Read from the database
|
||||||
* @method static|false update() Update the record in the database
|
* @method static|false update() Update the record in the database
|
||||||
*
|
*
|
||||||
@@ -31,7 +35,7 @@ interface record
|
|||||||
*
|
*
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function __construct();
|
public function __construct(?baza $record = null);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Read
|
* Read
|
||||||
|
|||||||
@@ -11,7 +11,6 @@ use svoboda\time\statement as svoboda;
|
|||||||
use mirzaev\baza\database,
|
use mirzaev\baza\database,
|
||||||
mirzaev\baza\column,
|
mirzaev\baza\column,
|
||||||
mirzaev\baza\record as baza,
|
mirzaev\baza\record as baza,
|
||||||
mirzaev\baza\enumerations\encoding,
|
|
||||||
mirzaev\baza\enumerations\type;
|
mirzaev\baza\enumerations\type;
|
||||||
|
|
||||||
// Built-in libraries
|
// Built-in libraries
|
||||||
@@ -48,6 +47,29 @@ trait record
|
|||||||
*/
|
*/
|
||||||
protected baza $record;
|
protected baza $record;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Constructor
|
||||||
|
*
|
||||||
|
* @method record|null $record The record
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
public function __construct(?record $record = null)
|
||||||
|
{
|
||||||
|
// Initializing the database
|
||||||
|
/* $this->database = new database()
|
||||||
|
->encoding(encoding::utf8)
|
||||||
|
->columns(
|
||||||
|
new column('identifier', type::long_long_unsigned),
|
||||||
|
new column('updated', type::integer_unsigned),
|
||||||
|
new column('created', type::integer_unsigned)
|
||||||
|
)
|
||||||
|
->connect($this->file); */
|
||||||
|
|
||||||
|
// Initializing the record
|
||||||
|
$record instanceof record and $this->record = $record;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Read
|
* Read
|
||||||
*
|
*
|
||||||
|
|||||||
Reference in New Issue
Block a user