I'm currently writing a PostgreSQL library for neko (and haxe), I hope
to finish it soon. Of course it's mainly based on the MySQL lib, and
must be compliant with neko's db API.
Is there a particular reason for having two different functions for
creating a connection and selecting a db? I see that in mysql.c the call
to mysql_real_connect is made with NULL for database, you have to select
the database by calling select_db after the connection has been created.
You're right.
While it makes sense to have the mysql Neko Api be able to change
database, it shouldn't affect the haxe Connection API. I will remove the
selectDB method from neko.db.Connection and add one database parameter
to neko.db.Mysql.connect.
I don't think there is a separate command for selecting a db in the
PostgreSQL API, and I don't know the rationale behind this (optional)
behavior with MySQL. Right now it's not a big problem, but it gives me
the impression that the db API is very mySQL centric.
Neko and haXe were only supporting MySQL just a few days ago. It's a
pretty recent change for instance to have an Connection being an interface.
Best,
Nicolas
--
Neko : One VM to run them all
(http://nekovm.org)