#1 2023-02-21 09:02:41

squirrel
Member
Registered: 2015-08-13
Posts: 146

Using LibMysql directly

I'm planning to start migrating one of my larger projects to mORMot 2 later this year.  Since that will be a fairly big change anyway, the plan is to put the project on a diet and reduce the number of third party libraries it uses.

While looking at the tfb benchmarks for mORMot (seriously seriously impressive - thanks guys!!!), I was wondering if it would be possible to do something similar to mormot.db.raw.postgres and create mormot.db.raw.mysql to directly use libmysql.dll?  That would remove the need for using firedac (and its quirks) in order to use libmysql.

Does anybody with more knowledge of libmysql know how do-able this would be?

Offline

#2 2023-02-21 10:02:21

ab
Administrator
From: France
Registered: 2010-06-21
Posts: 14,280
Website

Re: Using LibMysql directly

I looked at the MySQL native client with FPC/Lazarus and it seems to be fairly limited: no mysql_bind_param() support for instance.

I would first try with Zeos - its ZDBC layer is thinner than FireDAC so I guess it could be a good start.

Offline

#3 2023-02-21 10:51:06

squirrel
Member
Registered: 2015-08-13
Posts: 146

Re: Using LibMysql directly

Thanks @ab.  I'll take a look.

Re the parameter binding, is this what you are referring to? https://dev.mysql.com/doc/c-api/5.6/en/ … param.html

Offline

#4 2023-02-21 10:55:03

ab
Administrator
From: France
Registered: 2010-06-21
Posts: 14,280
Website

Re: Using LibMysql directly

Indeed.

smile

Offline

#5 2023-02-21 16:01:01

mpv
Member
From: Ukraine
Registered: 2012-03-24
Posts: 1,550
Website

Re: Using LibMysql directly

@squirrel - take a look into Postgre, really.  It's faster, better supported by mORMot and  have some KILLER features (mostly because of very extendable architecture), missed in other DB's. I use FTS (ts_vector), trigrams, PostGIS, timescaleDB  with great success...

Offline

#6 2023-02-23 08:46:58

squirrel
Member
Registered: 2015-08-13
Posts: 146

Re: Using LibMysql directly

@mpv thanks that is a good suggestion.  I'm a huge fan of postgresql.  Unfortunately Mysql is mandated for this project.

Off topic: I really miss PGAdmin3.  The web based tools always feel like swimming in syrup.  I know there are lots of db tools for pg that works great, but typing in pgadmin3 always brought a smile to my face  smile

Offline

#7 2023-02-23 11:45:13

mpv
Member
From: Ukraine
Registered: 2012-03-24
Posts: 1,550
Website

Re: Using LibMysql directly

For a long time I use DBeaver as a DB tool (I works with many different RDBMS), but last 3 years I use DataGrip (as a plugin for WebStorm where I spend a lot of time with JS). As all JetBrains products it's very very good and 100% worth the money. 3 years ago it cost me 27$, now price is high.
Can't help with mysql because do not use it..

Offline

Board footer

Powered by FluxBB