[Project_owners] Lezardilla and SQL databases

Neil Deakin enndeakin at sympatico.ca
Tue Jun 8 18:07:19 EDT 2004


> The problem is precisely that. SQL Component on mozilla site have to 
> be compiled on my Linux and Mozilla 1.6, never i have successfully use 
> it without errors... more than it, only postgres is usable, and i need 
> to contact mysql...
> I wonder if there is'nt a way to create a generic component wich can 
> get a library given... and to the developper to interface every 
> functions.
>
> I see it as a dll or an so call in C++... imaginate this kind of code:
> var los = 
> Components.classes["@mozilla.org/extension/dl"].createInstances(nsIOSLib); 
>
> los.init('mysql.so');
>
> And afterward, create mysql_connect, mysql_fetch etc...
> This could be nice...
>
>

You should be able to add mysql support by creating a component with the 
id '@mozilla.org/sql/connection;1?type=mysql' and which implements 
mozISqlConnection and then just stick it in the components directory.

It would be nice if you or anyone did that though to just copy the 
structure from the postgres one so that it can be added to the mozilla 
tree. The postgres implementation is only about 20K of code, so it's 
relatively little work to port to a new database.

/ Neil




More information about the Project_owners mailing list