https://github.com/zrnik/mksql
MkSQL is my own DBAL and ORM i wrote before i knew that much better ORMs and DBALs already existed...
https://github.com/zrnik/mksql
dbal mysql orm php sql sql-tables-autoupdater sqlite tracy-panel
Last synced: 2 months ago
JSON representation
MkSQL is my own DBAL and ORM i wrote before i knew that much better ORMs and DBALs already existed...
- Host: GitHub
- URL: https://github.com/zrnik/mksql
- Owner: Zrnik
- License: mit
- Created: 2020-07-20T13:05:42.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2023-02-12T12:22:50.000Z (over 3 years ago)
- Last Synced: 2025-02-02T03:27:41.619Z (over 1 year ago)
- Topics: dbal, mysql, orm, php, sql, sql-tables-autoupdater, sqlite, tracy-panel
- Language: PHP
- Homepage:
- Size: 1.48 MB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# MkSQL




# Do not use this!
Use doctrine instead!
### What is it?
*So, I just found out that the thing I created is usually called an ORM and DBAL.*
**MkSQL** is a tool for keeping your tables up to date with PHP code. It aims for a simple use cases, so it cannot
handle very complex stuff. Explore the docs to see what is possible.
This package simply allows you to define entities, that represent your database tables, and automatically creates them
for you.
You can also skip the `ORM` part and use `Updater` class to create your database without any entities, instead of
creating them with Adminer *(or PHPMyAdmin)*.
Documentation index is in [docs/index.md](docs/index.md) file.
#### Requirements
This package **requires** you to run it with PHP 8+, as it uses the new stuff this version delivers. Mainly attributes
and promoted constructor properties.
```json
{
"PHP": ">= 8",
"ext-pdo": "*",
"nette/utils": "^3.0",
"zrnik/enum": "^1",
"ext-iconv": "*",
"ext-intl": "*"
}
```
#### Installation
`composer require zrnik/mksql`
Read more at [Installation and Configuration](docs/install-and-config.md) page.
#### Supported Drivers:
- [✅ MySQL](https://www.mysql.com)
- [✅ SQLite 3](https://www.sqlite.org/index.html)
#### This package contains a [Tracy](https://tracy.nette.org/en/) panel
Add this to your bootstrap file:
```php
Tracy\Debugger::getBar()->addPanel(new \Zrnik\MkSQL\Tracy\Panel());
```
Or, if you are using [Nette Framework](https://nette.org/en/), register it in your configuration file:
```neon
tracy:
bar:
- Zrnik\MkSQL\Tracy\Panel
```