From 0b978aa8da564c864d71a737d51ec2009504b65e Mon Sep 17 00:00:00 2001 From: Robin Newhouse Date: Thu, 14 Mar 2024 20:32:36 +0000 Subject: [PATCH] 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 ``` --- README.rst | 2 +- docs/index.rst | 6 +++++- docs/mariadb.png | Bin 0 -> 664 bytes docs/peewee/database.rst | 22 +++++++++++++++------- 4 files changed, 21 insertions(+), 9 deletions(-) create mode 100644 docs/mariadb.png diff --git a/README.rst b/README.rst index 86b274baf..5feee1128 100644 --- a/README.rst +++ b/README.rst @@ -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 `_ New to peewee? These may help: diff --git a/docs/index.rst b/docs/index.rst index 5cbd59226..44d7ae8b4 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -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 ` .. 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 diff --git a/docs/mariadb.png b/docs/mariadb.png new file mode 100644 index 0000000000000000000000000000000000000000..809868a5d1c39054ae578a18f5774e7b086175c2 GIT binary patch literal 664 zcmV;J0%!e+P)+QD2%KH2JS$u{cPF(Hr@&GkO05e10<>xeBYZXRR2|PVGW^&Be z+HsGVD_3NZsIPpOpuo-1tiHpBpQoF!w?!izN!!WrFmJ7@n3R14R~G>xzbV+@)2>Y~K2%$TnPBSVsfHFK#7iZeYJOB2+lxs+@gEM>gzPD4=eYx2fPlx|>jl1Xb`SMwhlhUzcln;p7CUgt#wQ0ZZh=I=- z3vqegwz(n|V8${;JAx_=av=EgYL`SN?-cWPa4vD`xMxgqN@R>$kxiq4d$BwQ7A)s$ z^eIMewNj5prCjnf44x;F1dUbdod+dmr=n%HB)5pfqjIx36L1}yw=Lj(T#Kx6)3R!6 zuqiVp1nd@(Vs67kc@f0I<6RVc_RgzWiAS{ yR$2<`W;{0&g0e!l8e+&Hti` 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 `_. .. warning::