Skip to Content.
Sympa Menu

devel - Re: [sympa-developpers] RDBMS

Subject: Developers of Sympa

List archive

Chronological Thread  
  • From: Guillaume Rousse <address@concealed>
  • To: address@concealed
  • Subject: Re: [sympa-developpers] RDBMS
  • Date: Thu, 27 Dec 2012 19:30:44 +0100

Le 18/12/2012 16:46, IKEDA Soji a écrit :
Hi developers,

By now, I am debugging Sympa with MySQL (mainly 5.5 and sometimes
earlier), Pg (only 9.1) and SQLite (3.7.7; current code won't
support SQLite 2.x). They are working nice or so.

Oracle, Sybase (and MS-SQL/ODBC and Informix and..., and..., more!)
has not been checked by me.

What kind of RDBMS(es) you are using for debugging and coding?
I just commited a bunch of tests for those different RDBMS in my branch.

Only mysql and sqlite do actual database interaction tests, whereas other just test the statement generation methods.I should add interactions test with postgresql quite easily soon, and eventually port the whole stuff to Test::Database rather than rely on environment vaariables.

Anyway, those tests quickly show than trying to produce specific SQL statement isn't enough to ensure complete transparency, as underlying features seems to differ quite a lot between various RDBMS. For instance, sqlite has very limited support for table modifications, meaning deleting fields or adding primary keys after table creation won't work...

So, rather than the current API granularity, allowing to create an empty table and populating it in a second time, it would seems safer and more portable to be able to passe a fields list definition to add_table() method. Additionaly, it would avoid the ugly 'temporary' field hack :)

And before Marc jumps on the subject, it may be interesting to look for already existing perl ORMs, rather than reinventing the wheel. Whereas Class::DBI or Class::DBIx are definitively overkill, lightweight alternatives as DBI::Skinny would seem a good compromise between additional dependencies and maintainance gain.

--
Guillaume Rousse
INRIA, Direction des systèmes d'information
Domaine de Voluceau
Rocquencourt - BP 105
78153 Le Chesnay
Tel: 01 39 63 58 31

Attachment: smime.p7s
Description: Signature cryptographique S/MIME




Archive powered by MHonArc 2.6.19+.

Top of Page