[Gambas-user] Embedded Database
Benoit Minisini
gambas at ...2...
Wed Jul 9 19:55:04 CEST 2003
Le Mercredi 9 Juillet 2003 04:24, Philip A. Chapman a écrit :
> Everyone,
>
> As promised when I first brought up SQLite, I have been working on the
> ability to use the SQLite library through Gambas' db library. However,
> going has been slow for two reasons. One, my C skills are not as
> advanced as my VB and Java :-) Two, I've got some paying work which is
> taking up a lot of my time.
>
> The typelessness of SQLite is an interesting item. The exception to
> typlessness is when there is a primary key of type integer. The SQLite
> library reports the type as whatever the user specified in the CREATE
> TABLE statement; which can be anything. Therefore, I think that the
> driver should only report two data types: varchar and integer (for
> primary keys which are integer). How to determine when it should report
> the data type as integer is a problem I have not yet solved. The driver
> may have to report everything as a varchar.
Gambas database drivers NEED datatypes.
Hopefully, I think there is a workaround :
Datatypes are specified in the CREATE TABLE statement, even if they are
ignored by SQLite.
The description of the table is stored in a SQLite system table WITH the
original SQL statement that created the table.
So, by analyzing the statement, we can deduce the type of each field. This
analyze could be cached by the driver to speed things.
>
> I will continue as I can. However, if anyone with more skill in the C
> language and/or more time wants to take the lead on this, I certainly
> would not be offended!
>
It is an excellent way to learn C. But I must admit writing a database driver
for Gambas needs a good understanding of what you do ! So be careful... And
ask me all the questions you need.
Regards,
--
Benoit Minisini
mailto:gambas at ...1...
More information about the User
mailing list