9 Commits
3.0.0 ... 3.0.1

2 changed files with 25 additions and 19 deletions

6
.editorconfig Normal file
View File

@@ -0,0 +1,6 @@
root = true
[README.md]
charset = utf-8
indent_style = tab
tab_width = 2

View File

@@ -2,8 +2,8 @@
Lightweight binary database by pure PHP<br>
## Dependencies
1. ![PHP 8.4](https://www.php.net/releases/8.4/en.php)
2. ![Composer](https://getcomposer.org/) (php package manager)
1. [PHP 8.4](https://www.php.net/releases/8.4/en.php)
2. [Composer](https://getcomposer.org/) (php package manager)
## Installation
`composer require mirzaev/baza`
@@ -12,29 +12,29 @@ Lightweight binary database by pure PHP<br>
```php
<?php
use use mirzaev\baza\database,
mirzaev\baza\column,
mirzaev\baza\record,
mirzaev\baza\enumerations\encoding,
mirzaev\baza\enumerations\type;
use mirzaev\baza\database,
mirzaev\baza\column,
mirzaev\baza\record,
mirzaev\baza\enumerations\encoding,
mirzaev\baza\enumerations\type;
// Initializing the database
$database = new database()
->encoding(encoding::utf8)
->columns(
new column('name', type::string, ['length' => 32]),
new column('second_name', type::string, ['length' => 64]),
new column('age', type::integer),
new column('height', type::float)
)
->connect(__DIR__ . DIRECTORY_SEPARATOR . 'database.ba');
->encoding(encoding::utf8)
->columns(
new column('name', type::string, ['length' => 32]),
new column('second_name', type::string, ['length' => 64]),
new column('age', type::integer),
new column('height', type::float)
)
->connect(__DIR__ . DIRECTORY_SEPARATOR . 'database.ba');
// Initializing the record
$record = $database->record(
'Arsen',
'Mirzaev',
23,
(float) 165
'Arsen',
'Mirzaev',
23,
(float) 165
);
if ($database->write($record)) {