Update of /cvsroot/pgsqlclient/pgsqlclient_10/PostgreSql.Data.PgSqlClient/source
In directory sc8-pr-cvs1:/tmp/cvs-serv20587
Modified Files:
PgDataReader.cs
Log Message:
* source/PgDataReader.cs:
- Finished initial implementation for autoincrement fields ( serial ) at
PgDataReader.GetSchemaTable method (#).
- Improved primary key handling.
* source/DbSchema/PgColumnsSchema.cs:
- Finished implementation for autoincrement fields ( serial ) support (#).
Index: PgDataReader.cs
===================================================================
RCS file: /cvsroot/pgsqlclient/pgsqlclient_10/PostgreSql.Data.PgSqlClient/source/PgDataReader.cs,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** PgDataReader.cs 2 Aug 2003 23:43:50 -0000 1.3
--- PgDataReader.cs 3 Aug 2003 10:21:25 -0000 1.4
***************
*** 248,261 ****
schemaRow["IsRowVersion"] = false;
schemaRow["IsUnique"] = false;
! if ((bool)columnInfo[10])
! {
! schemaRow["IsReadOnly"] = true;
! schemaRow["IsAutoIncrement"] = true;
! }
! else
! {
! schemaRow["IsReadOnly"] = false;
! schemaRow["IsAutoIncrement"] = false;
! }
schemaRow["IsAliased"] = isAliased(i);
schemaRow["IsExpression"] = isExpression(i);
--- 248,253 ----
schemaRow["IsRowVersion"] = false;
schemaRow["IsUnique"] = false;
! schemaRow["IsReadOnly"] = (bool)columnInfo[10];
! schemaRow["IsAutoIncrement"] = (bool)columnInfo[10];
schemaRow["IsAliased"] = isAliased(i);
schemaRow["IsExpression"] = isExpression(i);
***************
*** 337,347 ****
private bool isPrimaryKey(System.Array pKeyInfo, short ordinal)
{
! for (int i = pKeyInfo.GetLowerBound(0); i <= pKeyInfo.GetUpperBound(0); i++)
{
! if ((short)pKeyInfo.GetValue(i) == ordinal)
{
! return true;
}
}
return false;
}
--- 329,343 ----
private bool isPrimaryKey(System.Array pKeyInfo, short ordinal)
{
! if (pKeyInfo != null)
{
! for (int i = pKeyInfo.GetLowerBound(0); i <= pKeyInfo.GetUpperBound(0); i++)
{
! if ((short)pKeyInfo.GetValue(i) == ordinal)
! {
! return true;
! }
}
}
+
return false;
}
|