emmett-framework / emmett

The web framework for inventors
BSD 3-Clause "New" or "Revised" License
1.09k stars 72 forks source link

Support MariaDB Connector #440

Closed tweenietomatoes closed 2 years ago

tweenietomatoes commented 2 years ago

Currently we can't use MariaDB connector with emmett orm. Is it possible to add mariadb support?

gi0baro commented 2 years ago

@tweenietomatoes you should be able to use the mysql driver and adapter with MariaDB

tweenietomatoes commented 2 years ago

Well i am trying this: results = Data.all().select(paginate=1)

However i'm getting all result instead of single result.

gi0baro commented 2 years ago

@tweenietomatoes as explained in the documentation, paginate=1 will simply return the first page, if you want a single record you should use paginate=(1,1) or limitby=(0,1).

Also, selection always returns a Rows object, you may want to use the .first() method in case you want a single record.