MySQL Extensions
Peewee provides an alternate database implementation for using the mysql-connector driver. The implementation can be found in playhouse.mysql_ext
.
Example usage:
from playhouse.mysql_ext import MySQLConnectorDatabase
# MySQL database implementation that utilizes mysql-connector driver.
db = MySQLConnectorDatabase('my_database', host='1.2.3.4', user='mysql')
Additional MySQL-specific helpers:
class JSONField
Extends TextField
and implements transparent JSON encoding and decoding in Python.
Match
(columns, expr[, modifier=None])
Parameters: |
|
---|
Helper class for constructing MySQL full-text search queries of the form:
MATCH (columns, ...) AGAINST (expr[ modifier])