On Tue, 05 Oct 2004 19:03:33 +0100, Eddy Macnaghten <[EMAIL PROTECTED]> wrote:
> 
> 
> rowid is alsways an alias for the primary key whether an "integer
> primary key" field was specified or not

But is there a way to get the name of that field?

I have a object/relational modelling library that is database
agnostic.  It, however, currently has an issue with SQLite because the
driver for sqlite doesn't return any info on what the primary key is. 
If this is a limitation of the API, and there is no way to determine
that in a table with fields X, Y, and Z, the one named Z, for
instance, is the primary key, then I can work around that with a
little documentation and some enforcement of convention (i.e. always
name the primary key 'id') or by make sure that SQLite users know that
if the primary key on a table is something else, they need to let the
ORM package know.

If, however, there is a way to get the name of the field from the API,
then the driver could simply be patched to pass this info, like most
of the drivers do, and then most of the time things should just work,
without having to take extra steps.


Thanks,

Kirk Haines

Reply via email to