Skip to content
/ MkSQL Public

MkSQL is my own DBAL and ORM i wrote before i knew that much better ORMs and DBALs already existed...

License

Notifications You must be signed in to change notification settings

Zrnik/MkSQL

Repository files navigation

MkSQL

GitHub PHP Version Packagist Downloads Packagist Version

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 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.

{
    "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 page.

Supported Drivers:

This package contains a Tracy panel

Add this to your bootstrap file:

Tracy\Debugger::getBar()->addPanel(new \Zrnik\MkSQL\Tracy\Panel());

Or, if you are using Nette Framework, register it in your configuration file:

tracy: 
    bar: 
        - Zrnik\MkSQL\Tracy\Panel

About

MkSQL is my own DBAL and ORM i wrote before i knew that much better ORMs and DBALs already existed...

Topics

Resources

License

Stars

Watchers

Forks

Languages