Update of /cvsroot/pgsqlclient/pgsqlclient/PostgreSql.Data.PGSqlClient/source
In directory sc8-pr-cvs1:/tmp/cvs-serv13574
Modified Files:
PGDataReader.cs
Log Message:
Improved GetSchemaTable.
Index: PGDataReader.cs
===================================================================
RCS file: /cvsroot/pgsqlclient/pgsqlclient/PostgreSql.Data.PGSqlClient/source/PGDataReader.cs,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** PGDataReader.cs 14 Jul 2003 10:28:49 -0000 1.4
--- PGDataReader.cs 14 Jul 2003 11:58:44 -0000 1.5
***************
*** 256,260 ****
{
schemaRow["IsKey"] = isPrimaryKey(pKeyInfo, (short)columnInfo[6]);
! schemaRow["AllowDBNull"] = columnInfo[9];
schemaRow["BaseSchemaName"] = columnInfo[0].ToString();
schemaRow["BaseTableName"] = columnInfo[1].ToString();
--- 256,260 ----
{
schemaRow["IsKey"] = isPrimaryKey(pKeyInfo, (short)columnInfo[6]);
! schemaRow["AllowDBNull"] = ((bool)columnInfo[9]) ? false : true;
schemaRow["BaseSchemaName"] = columnInfo[0].ToString();
schemaRow["BaseTableName"] = columnInfo[1].ToString();
***************
*** 683,689 ****
private bool isReadOnly(int i)
! {
! /* TODO: Add implementation */
! return false;
}
--- 683,690 ----
private bool isReadOnly(int i)
! {
! PGType type = command.Statement.RowDescriptor.Fields[i].DataType;
!
! return type.IsSerial ? true : false;
}
***************
*** 694,708 ****
throw new IndexOutOfRangeException("Could not find specified column in results.");
}
! bool returnValue = false;
!
! PGFieldDescriptor field = command.Statement.RowDescriptor.Fields[i];
!
! if (field.DataType.Name.StartsWith("serial"))
! {
! returnValue = true;
! }
!
! return returnValue;
}
--- 695,702 ----
throw new IndexOutOfRangeException("Could not find specified column in results.");
}
+
+ PGType type = command.Statement.RowDescriptor.Fields[i].DataType;
! return type.IsSerial ? true : false;
}
|