[fdo-users] Sqlite and AutoGenerated
bscott at geomapgis.com
Fri Feb 22 08:50:22 PST 2013
I'm trying to figure out how FDO is determining if a column is AutoGenerated
Looking in the Code we find this first step
// if is PK and has NOT NULL constraint then the column is
if (i == pTable->iPKey && pTable->aCol[i].isPrimKey)
I don't understand the relation between NotNull and AutoGenerated
Next we find a second step
// in case we have a PK and we have a trigger
property could be autogenerated
// we can "detect" that only when we have FDO
if (!dpd->GetIsAutoGenerated() && pTable->pTrigger
!= NULL &&
(dt == FdoDataType_Int16 || dt ==
FdoDataType_Int32 || dt == FdoDataType_Int64))
if (dpd->GetReadOnly() && propMarkedAsReadOnly)
A primaryKey that is ReadOnly must be set by something, this is alright for
But there is a also a test on a trigger. Any trigger(update,insert,delete)
on any field.
this test is a little week.
In my test case a have a table with a primaryKey set as not null and with
the autoincrement flag.
And it never return the AutoGenerated flag to true.
View this message in context: http://osgeo-org.1560.n6.nabble.com/Sqlite-and-AutoGenerated-tp5036198.html
Sent from the FDO Users mailing list archive at Nabble.com.
More information about the fdo-users