[Gambas-devel] Database Updates

Benoit Minisini gambas at ...1...
Sun Jul 4 13:33:08 CEST 2004


On Monday 28 June 2004 20:59, Nigel Gerrard wrote:
> Benoit,
>
> Everything compiles ok for me.  Here is a tar of my complete db
> structure.
>
> Perhaps I have missed one of the changed files in the sqlite driver.
> Please try comparing with what I have here.
>
> Nigel
>

Hi, Nigel

I took your sqlite directory, and now everything compiles. :-)

I saw in Changelog that you added the possibility to open a memory-only 
database. Interesting!

I have just fixed a problem in Gambas, that concerns the database drivers: 
strcasecmp() and strncasecmp() use the local encoding, and so, if your 
language is turkish, then you have problems, because toupper('i') <> 'I' !
So if you strcasecmp() a field named "myfield" with "MYFIELD", it does not 
match.

The workaround I choosed is to rewrite strcasecmp() and strncasecmp() so that 
they always use US encoding, and to add the rewrited function to the GB 
interface. The tolower() and toupper() functions are concerned too.

I will replace in the database drivers every occurrence of strcasecmp() and 
strncasecmp() by GB.strcasecmp() and GB.strncasecmp().

Well. Finally, I think I will rework the database component after the 1.0.

I think we should use C++ instead of C for writing database drivers, because 
of the code each driver shares. Each driver will inherits a common virtual 
driver class.

And here are the things I want to modify in the database component:

* Adding an option string when connecting to a database.

* Replace "virtual" collections by true collections when getting databases, 
users, tables, fields, ...

* Merge user security properties of postgresql and mysql in a unique 
interface. If possible. Anyway, the current User class is too simple.

* Add an ODBC driver (by reading the ODBC driver source code of Qt).

What do you think about that ? What features should we add too ?

Thanks in advance for your answers.

Regards,

-- 
Benoit Minisini
mailto:gambas at ...1...




More information about the Devel mailing list