Add docs clarifying compatibility with MariaDB

Peewee is compatible with MariaDB Server. Add clarifying notes in the
documentation, including logo, etc.

Testing
```
docker run -d -p 3306:3306 --name mariadb_container -e MYSQL_ROOT_PASSWORD=password mariadb
```

```
>>> from peewee import MySQLDatabase
>>> database = MySQLDatabase('information_schema', user='root', password='password', host='127.0.0.1', port=3306)
>>> database.connect()
True
>>> version_query = database.execute_sql('SELECT VERSION()')
>>> print(version_query.fetchone()[0])
11.3.2-MariaDB-1:11.3.2+maria~ubu2204
>>> database.close()
True
```
This commit is contained in:
Robin Newhouse
2024-03-14 20:32:36 +00:00
committed by Robin Newhouse
parent 4d177b7a3e
commit 0b978aa8da
4 changed files with 21 additions and 9 deletions
+1 -1
View File
@@ -7,7 +7,7 @@ Peewee is a simple and small ORM. It has few (but expressive) concepts, making i
* a small, expressive ORM
* python 2.7+ and 3.4+
* supports sqlite, mysql, postgresql and cockroachdb
* supports sqlite, mysql, mariadb, postgresql and cockroachdb
* tons of `extensions <http://docs.peewee-orm.com/en/latest/peewee/playhouse.html>`_
New to peewee? These may help:
+5 -1
View File
@@ -13,7 +13,7 @@ it easy to learn and intuitive to use.
* a small, expressive ORM
* python 2.7+ and 3.4+
* supports sqlite, mysql, postgresql and cockroachdb
* supports sqlite, mysql, mariadb, postgresql and cockroachdb
* :ref:`tons of extensions <playhouse>`
.. image:: postgresql.png
@@ -24,6 +24,10 @@ it easy to learn and intuitive to use.
:target: peewee/database.html#using-mysql
:alt: mysql
.. image:: mariadb.png
:target: peewee/database.html#using-mariadb
:alt: mariadb
.. image:: sqlite.png
:target: peewee/database.html#using-sqlite
:alt: sqlite
BIN
View File
Binary file not shown.

After

Width:  |  Height:  |  Size: 664 B

+15 -7
View File
@@ -12,8 +12,8 @@ to open a connection to a database, and then can be used to:
* Manage transactions (and savepoints).
* Introspect tables, columns, indexes, and constraints.
Peewee comes with support for SQLite, MySQL and Postgres. Each database class
provides some basic, database-specific configuration options.
Peewee comes with support for SQLite, MySQL, MariaDB and Postgres. Each
database class provides some basic, database-specific configuration options.
.. code-block:: python
@@ -557,6 +557,14 @@ If you would like to use APSW, use the :py:class:`APSWDatabase` from the
apsw_db = APSWDatabase('my_app.db')
.. _using_mariadb:
Using MariaDB
-----------
Peewee supports MariaDB. To use MariaDB, use the MySQL backend, which is shared
between the two. See :ref:`"Using MySQL" <using_mysql>` for more details.
.. _using_mysql:
Using MySQL
@@ -1773,11 +1781,11 @@ handler.
Adding a new Database Driver
----------------------------
Peewee comes with built-in support for Postgres, MySQL and SQLite. These
databases are very popular and run the gamut from fast, embeddable databases to
heavyweight servers suitable for large-scale deployments. That being said,
there are a ton of cool databases out there and adding support for your
database-of-choice should be really easy, provided the driver supports the
Peewee comes with built-in support for Postgres, MySQL, MariaDB and SQLite.
These databases are very popular and run the gamut from fast, embeddable
databases to heavyweight servers suitable for large-scale deployments. That
being said, there are a ton of cool databases out there and adding support for
your database-of-choice should be really easy, provided the driver supports the
`DB-API 2.0 spec <http://www.python.org/dev/peps/pep-0249/>`_.
.. warning::