Compare commits
9 Commits
Author | SHA1 | Date | |
---|---|---|---|
d7e3a61e63 | |||
1ea9c1f41f | |||
273cc1ac2d | |||
6d332c7cf9 | |||
19978574a3 | |||
c6fd8cf9f9 | |||
00e4b256f7 | |||
54b7ab07f1 | |||
a9f90966e0 |
6
.editorconfig
Normal file
6
.editorconfig
Normal file
@@ -0,0 +1,6 @@
|
||||
root = true
|
||||
|
||||
[README.md]
|
||||
charset = utf-8
|
||||
indent_style = tab
|
||||
tab_width = 2
|
38
README.md
38
README.md
@@ -2,8 +2,8 @@
|
||||
Lightweight binary database by pure PHP<br>
|
||||
|
||||
## Dependencies
|
||||
1. 
|
||||
2.  (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)) {
|
||||
|
Reference in New Issue
Block a user