pgsqlclient-checkins Mailing List for PostgreSqlClient (Page 53)
Status: Inactive
Brought to you by:
carlosga_fb
You can subscribe to this list here.
| 2003 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
(120) |
Aug
(95) |
Sep
(95) |
Oct
(213) |
Nov
(114) |
Dec
(64) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2004 |
Jan
(6) |
Feb
(134) |
Mar
(88) |
Apr
(28) |
May
(22) |
Jun
(15) |
Jul
(23) |
Aug
(2) |
Sep
(15) |
Oct
(2) |
Nov
(6) |
Dec
|
| 2005 |
Jan
(8) |
Feb
(6) |
Mar
|
Apr
(42) |
May
(3) |
Jun
|
Jul
|
Aug
|
Sep
(84) |
Oct
|
Nov
|
Dec
|
| 2006 |
Jan
|
Feb
|
Mar
(84) |
Apr
(46) |
May
(40) |
Jun
(8) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
|
From: <car...@us...> - 2003-07-22 09:35:15
|
Update of /cvsroot/pgsqlclient/pgsqlclient
In directory sc8-pr-cvs1:/tmp/cvs-serv19538
Modified Files:
PGSqlClient.build
Log Message:
Changed build file for use new NUnit v2.1.
Index: PGSqlClient.build
===================================================================
RCS file: /cvsroot/pgsqlclient/pgsqlclient/PGSqlClient.build,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** PGSqlClient.build 19 Jul 2003 10:13:50 -0000 1.3
--- PGSqlClient.build 22 Jul 2003 09:35:10 -0000 1.4
***************
*** 36,40 ****
<ifnot propertyexists="nunit.framework.dll">
<sysinfo />
! <property name="nunit.framework.dll" value="${sys.os.folder.programfiles}\NUnit V2.0\bin\nunit.framework.dll"
readonly="false" />
</ifnot>
--- 36,40 ----
<ifnot propertyexists="nunit.framework.dll">
<sysinfo />
! <property name="nunit.framework.dll" value="${sys.os.folder.programfiles}\NUnit V2.1\bin\nunit.framework.dll"
readonly="false" />
</ifnot>
|
|
From: <car...@us...> - 2003-07-21 19:56:04
|
Update of /cvsroot/pgsqlclient/pgsqlclient In directory sc8-pr-cvs1:/tmp/cvs-serv23142 Modified Files: changelog.txt Log Message: Minor changes to db schema support Index: changelog.txt =================================================================== RCS file: /cvsroot/pgsqlclient/pgsqlclient/changelog.txt,v retrieving revision 1.19 retrieving revision 1.20 diff -C2 -d -r1.19 -r1.20 *** changelog.txt 20 Jul 2003 10:00:42 -0000 1.19 --- changelog.txt 21 Jul 2003 19:56:01 -0000 1.20 *************** *** 2,5 **** --- 2,9 ---- ------------------------------------------------------- + 2003-07-21 Carlos Guzmán Álvarez <car...@te...> + + * Minor changes to db schema support + 2003-07-20 Carlos Guzmán Álvarez <car...@te...> |
Update of /cvsroot/pgsqlclient/pgsqlclient/PostgreSql.Data.PGSqlClient/source/DbSchema
In directory sc8-pr-cvs1:/tmp/cvs-serv22922
Modified Files:
PGAggregatesSchema.cs PGCastsSchema.cs PGCheckConstraints.cs
PGColumnsSchema.cs PGDatabaseSchema.cs
Log Message:
Minor changes to db schema support
Index: PGAggregatesSchema.cs
===================================================================
RCS file: /cvsroot/pgsqlclient/pgsqlclient/PostgreSql.Data.PGSqlClient/source/DbSchema/PGAggregatesSchema.cs,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -C2 -d -r1.1.1.1 -r1.2
*** PGAggregatesSchema.cs 12 Jul 2003 08:11:22 -0000 1.1.1.1
--- PGAggregatesSchema.cs 21 Jul 2003 19:54:22 -0000 1.2
***************
*** 47,54 ****
public override void AddDataColumns()
{
! AddDataColumn("pg_aggregate.aggtransfn", "TRANSITION_FUNCTION");
! AddDataColumn("pg_aggregate.aggfinalfn", "FINAL_FUNCTION");
! AddDataColumn("pg_aggregate.agginitval", "INITIAL_VALUE");
! AddDataColumn("pg_type.typname", "BASE_TYPE");
}
--- 47,54 ----
public override void AddDataColumns()
{
! AddDataColumn("pg_aggregate.aggtransfn" , "TRANSITION_FUNCTION");
! AddDataColumn("pg_aggregate.aggfinalfn" , "FINAL_FUNCTION");
! AddDataColumn("pg_aggregate.agginitval" , "INITIAL_VALUE");
! AddDataColumn("pg_type.typname" , "BASE_TYPE");
}
Index: PGCastsSchema.cs
===================================================================
RCS file: /cvsroot/pgsqlclient/pgsqlclient/PostgreSql.Data.PGSqlClient/source/DbSchema/PGCastsSchema.cs,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -C2 -d -r1.1.1.1 -r1.2
*** PGCastsSchema.cs 12 Jul 2003 08:11:22 -0000 1.1.1.1
--- PGCastsSchema.cs 21 Jul 2003 19:54:22 -0000 1.2
***************
*** 46,53 ****
public override void AddDataColumns()
{
! AddDataColumn("pg_typesrc.typname", "SOURCE_TYPE");
! AddDataColumn("pg_typetgt.typname", "TARGET_TYPE");
AddDataColumn("pg_namespace.nspname", "FUNCTION_SCHEMA");
! AddDataColumn("pg_proc.proname", "FUNCTION_NAME");
AddDataColumn(getContextExpression("pg_cast.castcontext"), "CAST_CONTEXT");
}
--- 46,53 ----
public override void AddDataColumns()
{
! AddDataColumn("pg_typesrc.typname" , "SOURCE_TYPE");
! AddDataColumn("pg_typetgt.typname" , "TARGET_TYPE");
AddDataColumn("pg_namespace.nspname", "FUNCTION_SCHEMA");
! AddDataColumn("pg_proc.proname" , "FUNCTION_NAME");
AddDataColumn(getContextExpression("pg_cast.castcontext"), "CAST_CONTEXT");
}
***************
*** 57,62 ****
AddJoin("left join", "pg_type as pg_typesrc", "pg_cast.castsource = pg_typesrc.oid");
AddJoin("left join", "pg_type as pg_typetgt", "pg_cast.casttarget = pg_typetgt.oid");
! AddJoin("left join", "pg_proc", "pg_cast.castfunc = pg_proc.oid");
! AddJoin("left join", "pg_namespace", "pg_proc.pronamespace = pg_namespace.oid");
}
--- 57,62 ----
AddJoin("left join", "pg_type as pg_typesrc", "pg_cast.castsource = pg_typesrc.oid");
AddJoin("left join", "pg_type as pg_typetgt", "pg_cast.casttarget = pg_typetgt.oid");
! AddJoin("left join", "pg_proc" , "pg_cast.castfunc = pg_proc.oid");
! AddJoin("left join", "pg_namespace" , "pg_proc.pronamespace = pg_namespace.oid");
}
Index: PGCheckConstraints.cs
===================================================================
RCS file: /cvsroot/pgsqlclient/pgsqlclient/PostgreSql.Data.PGSqlClient/source/DbSchema/PGCheckConstraints.cs,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -C2 -d -r1.1.1.1 -r1.2
*** PGCheckConstraints.cs 12 Jul 2003 08:11:22 -0000 1.1.1.1
--- PGCheckConstraints.cs 21 Jul 2003 19:54:22 -0000 1.2
***************
*** 44,52 ****
AddRestrictionColumn("pg_namespace.nspname", "CONSTRAINT_SCHEMA", null);
AddRestrictionColumn("pg_constraint.conname", "CONSTRAINT_NAME", null);
- AddRestrictionColumn("pg_get_constraintdef(pg_constraint.oid)", "CHECK_CLAUSULE", null);
}
public override void AddDataColumns()
{
AddDataColumn("pg_description.description", "DESCRIPTION");
}
--- 44,52 ----
AddRestrictionColumn("pg_namespace.nspname", "CONSTRAINT_SCHEMA", null);
AddRestrictionColumn("pg_constraint.conname", "CONSTRAINT_NAME", null);
}
public override void AddDataColumns()
{
+ AddDataColumn("pg_get_constraintdef(pg_constraint.oid)", "CHECK_CLAUSULE");
AddDataColumn("pg_description.description", "DESCRIPTION");
}
***************
*** 54,60 ****
public override void AddJoins()
{
! AddJoin("left join", "pg_class", "pg_class.oid = pg_constraint.conrelid");
! AddJoin("left join", "pg_namespace", "pg_class.relnamespace = pg_namespace.oid");
! AddJoin("left join", "pg_description", "pg_constraint.oid = pg_description.objoid");
}
--- 54,60 ----
public override void AddJoins()
{
! AddJoin("left join", "pg_class" , "pg_class.oid = pg_constraint.conrelid");
! AddJoin("left join", "pg_namespace" , "pg_class.relnamespace = pg_namespace.oid");
! AddJoin("left join", "pg_description" , "pg_constraint.oid = pg_description.objoid");
}
Index: PGColumnsSchema.cs
===================================================================
RCS file: /cvsroot/pgsqlclient/pgsqlclient/PostgreSql.Data.PGSqlClient/source/DbSchema/PGColumnsSchema.cs,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -C2 -d -r1.1.1.1 -r1.2
*** PGColumnsSchema.cs 12 Jul 2003 08:11:22 -0000 1.1.1.1
--- PGColumnsSchema.cs 21 Jul 2003 19:54:22 -0000 1.2
***************
*** 42,59 ****
public override void AddRestrictionColumns()
{
! AddRestrictionColumn("pg_namespace.nspname", "TABLE_SCHEMA", null);
! AddRestrictionColumn("pg_class.relname", "TABLE_NAME", null);
! AddRestrictionColumn("pg_attribute.attname", "COLUMN_NAME", null);
}
public override void AddDataColumns()
{
! AddDataColumn("pg_attribute.atttypid", "DATA_TYPE");
! AddDataColumn("pg_attribute.attlen", "COLUMN_SIZE");
! AddDataColumn("pg_attribute.attndims", "COLUMN_DIMENSIONS");
! AddDataColumn("pg_attribute.attnum", "ORDINAL_POSITION");
! AddDataColumn("pg_attribute.atthasdef", "HAS_DEFAULT");
! AddDataColumn("pg_attrdef.adsrc", "COLUMN_DEFAULT");
! AddDataColumn("pg_attribute.attnotnull", "IS_NOT_NULL");
AddDataColumn(getStorageExpression("pg_attribute.attstorage"), "STORAGE");
AddDataColumn("pg_description.description", "DESCRIPTION");
--- 42,59 ----
public override void AddRestrictionColumns()
{
! AddRestrictionColumn("pg_namespace.nspname" , "TABLE_SCHEMA", null);
! AddRestrictionColumn("pg_class.relname" , "TABLE_NAME", null);
! AddRestrictionColumn("pg_attribute.attname" , "COLUMN_NAME", null);
}
public override void AddDataColumns()
{
! AddDataColumn("pg_attribute.atttypid" , "DATA_TYPE");
! AddDataColumn("pg_attribute.attlen" , "COLUMN_SIZE");
! AddDataColumn("pg_attribute.attndims" , "COLUMN_DIMENSIONS");
! AddDataColumn("pg_attribute.attnum" , "ORDINAL_POSITION");
! AddDataColumn("pg_attribute.atthasdef" , "HAS_DEFAULT");
! AddDataColumn("pg_attrdef.adsrc" , "COLUMN_DEFAULT");
! AddDataColumn("pg_attribute.attnotnull" , "IS_NOT_NULL");
AddDataColumn(getStorageExpression("pg_attribute.attstorage"), "STORAGE");
AddDataColumn("pg_description.description", "DESCRIPTION");
***************
*** 62,68 ****
public override void AddJoins()
{
! AddJoin("left join", "pg_class", "pg_attribute.attrelid = pg_class.oid");
! AddJoin("left join", "pg_namespace", "pg_class.relnamespace = pg_namespace.oid");
! AddJoin("left join", "pg_attrdef", "pg_class.oid = pg_attrdef.adrelid AND pg_attribute.attnum = pg_attrdef.adnum");
AddJoin("left join", "pg_description", "pg_attribute.attrelid = pg_description.objoid AND pg_attribute.attnum = pg_description.objsubid");
}
--- 62,68 ----
public override void AddJoins()
{
! AddJoin("left join", "pg_class" , "pg_attribute.attrelid = pg_class.oid");
! AddJoin("left join", "pg_namespace" , "pg_class.relnamespace = pg_namespace.oid");
! AddJoin("left join", "pg_attrdef" , "pg_class.oid = pg_attrdef.adrelid AND pg_attribute.attnum = pg_attrdef.adnum");
AddJoin("left join", "pg_description", "pg_attribute.attrelid = pg_description.objoid AND pg_attribute.attnum = pg_description.objsubid");
}
Index: PGDatabaseSchema.cs
===================================================================
RCS file: /cvsroot/pgsqlclient/pgsqlclient/PostgreSql.Data.PGSqlClient/source/DbSchema/PGDatabaseSchema.cs,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -C2 -d -r1.1.1.1 -r1.2
*** PGDatabaseSchema.cs 12 Jul 2003 08:11:22 -0000 1.1.1.1
--- PGDatabaseSchema.cs 21 Jul 2003 19:54:22 -0000 1.2
***************
*** 47,53 ****
public override void AddDataColumns()
{
! AddDataColumn("pg_database.datistemplate", "IS_TEMPLATE");
! AddDataColumn("pg_database.datallowconn", "ALLOW_CONNECTION");
! AddDataColumn("pg_database.datconfig", "DATABASE_CONFIG");
}
--- 47,53 ----
public override void AddDataColumns()
{
! AddDataColumn("pg_database.datistemplate" , "IS_TEMPLATE");
! AddDataColumn("pg_database.datallowconn" , "ALLOW_CONNECTION");
! AddDataColumn("pg_database.datconfig" , "DATABASE_CONFIG");
}
|
Update of /cvsroot/pgsqlclient/pgsqlclient/PostgreSql.Data.PGSqlClient/source/DbSchema
In directory sc8-pr-cvs1:/tmp/cvs-serv22809
Modified Files:
PGDomainsSchema.cs PGForeignKeysSchema.cs PGFunctionsSchema.cs
PGIndexesSchema.cs PGPrimaryKeysSchema.cs
Log Message:
Minor changes to db schema support
Index: PGDomainsSchema.cs
===================================================================
RCS file: /cvsroot/pgsqlclient/pgsqlclient/PostgreSql.Data.PGSqlClient/source/DbSchema/PGDomainsSchema.cs,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -C2 -d -r1.1.1.1 -r1.2
*** PGDomainsSchema.cs 12 Jul 2003 08:11:22 -0000 1.1.1.1
--- PGDomainsSchema.cs 21 Jul 2003 19:53:35 -0000 1.2
***************
*** 42,58 ****
public override void AddRestrictionColumns()
{
! AddRestrictionColumn("pg_namespace.nspname", "DOMAIN_SCHEMA", null);
! AddRestrictionColumn("pg_type.typname", "DOMAIN_NAME", null);
! AddRestrictionColumn("pg_type.oid", "DATA_TYPE", null);
}
public override void AddDataColumns()
{
! AddDataColumn("pg_type.typlen", "COLUMN_SIZE");
! AddDataColumn("pg_type.typnotnull", "IS_NOT_NULL");
! AddDataColumn("pg_type.typndims", "ARRAY_DIMENSIONS");
! AddDataColumn("pg_type.typelem", "ELEMENT_TYPE");
! AddDataColumn("pg_type.typbasetype", "BASE_TYPE");
! AddDataColumn("pg_type.typtypmod", "BASE_TYPE_MODIFIER");
AddDataColumn("pg_description.description", "DESCRIPTION");
}
--- 42,58 ----
public override void AddRestrictionColumns()
{
! AddRestrictionColumn("pg_namespace.nspname" , "DOMAIN_SCHEMA", null);
! AddRestrictionColumn("pg_type.typname" , "DOMAIN_NAME", null);
! AddRestrictionColumn("pg_type.oid" , "DATA_TYPE", null);
}
public override void AddDataColumns()
{
! AddDataColumn("pg_type.typlen" , "COLUMN_SIZE");
! AddDataColumn("pg_type.typnotnull" , "IS_NOT_NULL");
! AddDataColumn("pg_type.typndims" , "ARRAY_DIMENSIONS");
! AddDataColumn("pg_type.typelem" , "ELEMENT_TYPE");
! AddDataColumn("pg_type.typbasetype" , "BASE_TYPE");
! AddDataColumn("pg_type.typtypmod" , "BASE_TYPE_MODIFIER");
AddDataColumn("pg_description.description", "DESCRIPTION");
}
***************
*** 60,65 ****
public override void AddJoins()
{
! AddJoin("left join", "pg_namespace", "pg_type.typnamespace = pg_namespace.oid");
! AddJoin("left join", "pg_description", "pg_type.oid = pg_description.objoid");
}
--- 60,65 ----
public override void AddJoins()
{
! AddJoin("left join", "pg_namespace" , "pg_type.typnamespace = pg_namespace.oid");
! AddJoin("left join", "pg_description" , "pg_type.oid = pg_description.objoid");
}
Index: PGForeignKeysSchema.cs
===================================================================
RCS file: /cvsroot/pgsqlclient/pgsqlclient/PostgreSql.Data.PGSqlClient/source/DbSchema/PGForeignKeysSchema.cs,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -C2 -d -r1.1.1.1 -r1.2
*** PGForeignKeysSchema.cs 12 Jul 2003 08:11:22 -0000 1.1.1.1
--- PGForeignKeysSchema.cs 21 Jul 2003 19:53:35 -0000 1.2
***************
*** 42,69 ****
public override void AddRestrictionColumns()
{
! AddRestrictionColumn("pg_namespace.nspname", "PK_TABLE_SCHEMA", null);
! AddRestrictionColumn("pk_table.relname", "PK_TABLE_NAME", null);
! AddRestrictionColumn("pg_namespace.nspname", "FK_TABLE_SCHEMA", null);
! AddRestrictionColumn("fk_table.relname", "FK_TABLE_NAME", null);
}
public override void AddDataColumns()
{
! AddDataColumn("pg_constraint.conkey", "PK_COLUMNS");
! AddDataColumn("pg_constraint.confkey", "FK_COLUMNS");
AddDataColumn(getRuleExpression("pg_constraint.confupdtype"), "UPDATE_RULE");
AddDataColumn(getRuleExpression("pg_constraint.confdeltype"), "DELETE_RULE");
! AddDataColumn("pg_constraint.conname", "FK_NAME");
! AddDataColumn("pg_constraint.condeferrable", "DEFERRABILITY");
! AddDataColumn("pg_constraint.condeferred", "IS_DEFERRED");
! AddDataColumn("pg_description.description", "DESCRIPTION");
}
public override void AddJoins()
{
! AddJoin("left join", "pg_namespace", "pg_constraint.connamespace = pg_namespace.oid");
! AddJoin("left join", "pg_class as pk_table", "pg_constraint.conrelid = pk_table.oid");
AddJoin("right join", "pg_class as fk_table", "pg_constraint.confrelid = fk_table.oid");
! AddJoin("left join", "pg_description", "pg_constraint.oid = pg_description.objoid");
}
--- 42,69 ----
public override void AddRestrictionColumns()
{
! AddRestrictionColumn("pg_namespace.nspname" , "PK_TABLE_SCHEMA", null);
! AddRestrictionColumn("pk_table.relname" , "PK_TABLE_NAME", null);
! AddRestrictionColumn("pg_namespace.nspname" , "FK_TABLE_SCHEMA", null);
! AddRestrictionColumn("fk_table.relname" , "FK_TABLE_NAME", null);
}
public override void AddDataColumns()
{
! AddDataColumn("pg_constraint.conkey" , "PK_COLUMNS");
! AddDataColumn("pg_constraint.confkey" , "FK_COLUMNS");
AddDataColumn(getRuleExpression("pg_constraint.confupdtype"), "UPDATE_RULE");
AddDataColumn(getRuleExpression("pg_constraint.confdeltype"), "DELETE_RULE");
! AddDataColumn("pg_constraint.conname" , "FK_NAME");
! AddDataColumn("pg_constraint.condeferrable" , "DEFERRABILITY");
! AddDataColumn("pg_constraint.condeferred" , "IS_DEFERRED");
! AddDataColumn("pg_description.description" , "DESCRIPTION");
}
public override void AddJoins()
{
! AddJoin("left join" , "pg_namespace", "pg_constraint.connamespace = pg_namespace.oid");
! AddJoin("left join" , "pg_class as pk_table", "pg_constraint.conrelid = pk_table.oid");
AddJoin("right join", "pg_class as fk_table", "pg_constraint.confrelid = fk_table.oid");
! AddJoin("left join" , "pg_description", "pg_constraint.oid = pg_description.objoid");
}
Index: PGFunctionsSchema.cs
===================================================================
RCS file: /cvsroot/pgsqlclient/pgsqlclient/PostgreSql.Data.PGSqlClient/source/DbSchema/PGFunctionsSchema.cs,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -C2 -d -r1.1.1.1 -r1.2
*** PGFunctionsSchema.cs 12 Jul 2003 08:11:22 -0000 1.1.1.1
--- PGFunctionsSchema.cs 21 Jul 2003 19:53:35 -0000 1.2
***************
*** 42,56 ****
public override void AddRestrictionColumns()
{
! AddRestrictionColumn("pg_namespace.nspname", "PROCEDURE_SCHEMA", null);
! AddRestrictionColumn("pg_proc.proname", "PROCEDURE_NAME", null);
}
public override void AddDataColumns()
{
! AddDataColumn("pg_language.lanname", "PROCEDURE_LANGUAGE");
! AddDataColumn("pg_proc.proisagg", "IS_AGGREGATE");
! AddDataColumn("pg_proc.prosecdef", "IS_SECURITY_DEFINER");
! AddDataColumn("pg_proc.proisstrict", "IS_STRICT");
! AddDataColumn("pg_proc.proretset", "RETURNS_SET");
AddDataColumn("pg_description.description", "DESCRIPTION");
}
--- 42,56 ----
public override void AddRestrictionColumns()
{
! AddRestrictionColumn("pg_namespace.nspname" , "PROCEDURE_SCHEMA", null);
! AddRestrictionColumn("pg_proc.proname" , "PROCEDURE_NAME", null);
}
public override void AddDataColumns()
{
! AddDataColumn("pg_language.lanname" , "PROCEDURE_LANGUAGE");
! AddDataColumn("pg_proc.proisagg" , "IS_AGGREGATE");
! AddDataColumn("pg_proc.prosecdef" , "IS_SECURITY_DEFINER");
! AddDataColumn("pg_proc.proisstrict" , "IS_STRICT");
! AddDataColumn("pg_proc.proretset" , "RETURNS_SET");
AddDataColumn("pg_description.description", "DESCRIPTION");
}
***************
*** 58,63 ****
public override void AddJoins()
{
! AddJoin("left join", "pg_namespace", "pg_proc.pronamespace = pg_namespace.oid");
! AddJoin("left join", "pg_language", "pg_proc.prolang = pg_language.oid");
AddJoin("left join", "pg_description", "pg_proc.oid = pg_description.objoid");
}
--- 58,63 ----
public override void AddJoins()
{
! AddJoin("left join", "pg_namespace" , "pg_proc.pronamespace = pg_namespace.oid");
! AddJoin("left join", "pg_language" , "pg_proc.prolang = pg_language.oid");
AddJoin("left join", "pg_description", "pg_proc.oid = pg_description.objoid");
}
Index: PGIndexesSchema.cs
===================================================================
RCS file: /cvsroot/pgsqlclient/pgsqlclient/PostgreSql.Data.PGSqlClient/source/DbSchema/PGIndexesSchema.cs,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -C2 -d -r1.1.1.1 -r1.2
*** PGIndexesSchema.cs 12 Jul 2003 08:11:22 -0000 1.1.1.1
--- PGIndexesSchema.cs 21 Jul 2003 19:53:35 -0000 1.2
***************
*** 42,61 ****
public override void AddRestrictionColumns()
{
! AddRestrictionColumn("pg_namespace.nspname", "TABLE_SCHEMA", null);
! AddRestrictionColumn("pg_class.relname", "TABLE_NAME", null);
! AddRestrictionColumn("pg_classidx.relname", "INDEX_NAME", null);
}
public override void AddDataColumns()
{
! AddDataColumn("pgnamespidx.nspname", "INDEX_SCHEMA");
! AddDataColumn("pg_am.amname", "TYPE");
! AddDataColumn("pg_index.indkey", "INDEX_KEY");
! AddDataColumn("pg_index.indisclustered", "CLUSTERED");
! AddDataColumn("pg_index.indisunique", "UNIQUE");
! AddDataColumn("pg_index.indisprimary", "PRIMARY");
! AddDataColumn("pg_am.amindexnulls", "ALLOW_NULLS");
! AddDataColumn("pg_am.amcanmulticol", "MULTICOLUMN");
! AddDataColumn("pg_am.amconcurrent", "CONCURRENT");
AddDataColumn("pg_description.description", "DESCRIPTION");
}
--- 42,61 ----
public override void AddRestrictionColumns()
{
! AddRestrictionColumn("pg_namespace.nspname" , "TABLE_SCHEMA", null);
! AddRestrictionColumn("pg_class.relname" , "TABLE_NAME", null);
! AddRestrictionColumn("pg_classidx.relname" , "INDEX_NAME", null);
}
public override void AddDataColumns()
{
! AddDataColumn("pgnamespidx.nspname" , "INDEX_SCHEMA");
! AddDataColumn("pg_am.amname" , "TYPE");
! AddDataColumn("pg_index.indkey" , "INDEX_KEY");
! AddDataColumn("pg_index.indisclustered" , "CLUSTERED");
! AddDataColumn("pg_index.indisunique" , "UNIQUE");
! AddDataColumn("pg_index.indisprimary" , "PRIMARY");
! AddDataColumn("pg_am.amindexnulls" , "ALLOW_NULLS");
! AddDataColumn("pg_am.amcanmulticol" , "MULTICOLUMN");
! AddDataColumn("pg_am.amconcurrent" , "CONCURRENT");
AddDataColumn("pg_description.description", "DESCRIPTION");
}
Index: PGPrimaryKeysSchema.cs
===================================================================
RCS file: /cvsroot/pgsqlclient/pgsqlclient/PostgreSql.Data.PGSqlClient/source/DbSchema/PGPrimaryKeysSchema.cs,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -C2 -d -r1.1.1.1 -r1.2
*** PGPrimaryKeysSchema.cs 12 Jul 2003 08:11:22 -0000 1.1.1.1
--- PGPrimaryKeysSchema.cs 21 Jul 2003 19:53:35 -0000 1.2
***************
*** 42,53 ****
public override void AddRestrictionColumns()
{
! AddRestrictionColumn("pg_namespace.nspname", "TABLE_SCHEMA", null);
! AddRestrictionColumn("pg_class.relname", "TABLE_NAME", null);
}
public override void AddDataColumns()
{
! AddDataColumn("pg_constraint.conname", "PK_NAME");
! AddDataColumn("pg_constraint.conkey", "PK_COLUMNS");
AddDataColumn("pg_description.description", "DESCRIPTION");
}
--- 42,53 ----
public override void AddRestrictionColumns()
{
! AddRestrictionColumn("pg_namespace.nspname" , "TABLE_SCHEMA", null);
! AddRestrictionColumn("pg_class.relname" , "TABLE_NAME", null);
}
public override void AddDataColumns()
{
! AddDataColumn("pg_constraint.conname" , "PK_NAME");
! AddDataColumn("pg_constraint.conkey" , "PK_COLUMNS");
AddDataColumn("pg_description.description", "DESCRIPTION");
}
|
|
From: <car...@us...> - 2003-07-20 10:17:55
|
Update of /cvsroot/pgsqlclient/pgsqlclient In directory sc8-pr-cvs1:/tmp/cvs-serv30551 Modified Files: changelog.txt Log Message: Updated CHANGELOG.TXT Index: changelog.txt =================================================================== RCS file: /cvsroot/pgsqlclient/pgsqlclient/changelog.txt,v retrieving revision 1.18 retrieving revision 1.19 diff -C2 -d -r1.18 -r1.19 *** changelog.txt 19 Jul 2003 10:13:50 -0000 1.18 --- changelog.txt 20 Jul 2003 10:00:42 -0000 1.19 *************** *** 3,6 **** --- 3,13 ---- + 2003-07-20 Carlos Guzmán Álvarez <car...@te...> + + * Added new test case for money fields. + + * Fixed money datatype handling. + + 2003-07-19 Carlos Guzmán Álvarez <car...@te...> |
|
From: <car...@us...> - 2003-07-20 10:01:22
|
Update of /cvsroot/pgsqlclient/pgsqlclient/PostgreSql.Data.PGSqlClient.UnitTests/source
In directory sc8-pr-cvs1:/tmp/cvs-serv30632
Modified Files:
PGBaseTest.cs PGCommandTest.cs PGDataAdapterTest.cs
Log Message:
* Added new test case for money fields.
* Fixed money datatype handling.
Index: PGBaseTest.cs
===================================================================
RCS file: /cvsroot/pgsqlclient/pgsqlclient/PostgreSql.Data.PGSqlClient.UnitTests/source/PGBaseTest.cs,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** PGBaseTest.cs 18 Jul 2003 22:46:04 -0000 1.5
--- PGBaseTest.cs 20 Jul 2003 10:01:19 -0000 1.6
***************
*** 130,134 ****
commandText.Append("CREATE TABLE public.test_table(");
! commandText.Append("int_field int4 NOT NULL,");
commandText.Append("char_field char(10),");
commandText.Append("varchar_field varchar(30),");
--- 130,134 ----
commandText.Append("CREATE TABLE public.test_table(");
! commandText.Append("int4_field int4 NOT NULL,");
commandText.Append("char_field char(10),");
commandText.Append("varchar_field varchar(30),");
***************
*** 141,149 ****
commandText.Append("blob_field bytea,");
commandText.Append("bool_field bool,");
! commandText.Append("bigint_field int8,");
! commandText.Append("decimal_field decimal(8,2),");
! commandText.Append("smallint_field int2,");
commandText.Append("array_int int2[],");
! commandText.Append("CONSTRAINT test_table_pkey PRIMARY KEY (int_field)");
commandText.Append(") WITH OIDS;");
--- 141,150 ----
commandText.Append("blob_field bytea,");
commandText.Append("bool_field bool,");
! commandText.Append("int2_field int2,");
! commandText.Append("int8_field int8,");
! commandText.Append("money_field money,");
! commandText.Append("numeric_field numeric(8,2),");
commandText.Append("array_int int2[],");
! commandText.Append("CONSTRAINT test_table_pkey PRIMARY KEY (int4_field)");
commandText.Append(") WITH OIDS;");
***************
*** 157,161 ****
private void insertTestData()
{
! string commandText = "insert into public.test_table values(@int_field, @char_field, @varchar_field, @single_field, @double_field, @date_Field, @time_field, @timestamp_field)";
PGTransaction transaction = connection.BeginTransaction();
--- 158,162 ----
private void insertTestData()
{
! string commandText = "insert into public.test_table values(@int4_field, @char_field, @varchar_field, @single_field, @double_field, @date_Field, @time_field, @timestamp_field)";
PGTransaction transaction = connection.BeginTransaction();
***************
*** 165,169 ****
{
// Add command parameters
! command.Parameters.Add("@int_field", PGDbType.Int4);
command.Parameters.Add("@char_field", PGDbType.Char);
command.Parameters.Add("@varchar_field", PGDbType.VarChar);
--- 166,170 ----
{
// Add command parameters
! command.Parameters.Add("@int4_field", PGDbType.Int4);
command.Parameters.Add("@char_field", PGDbType.Char);
command.Parameters.Add("@varchar_field", PGDbType.VarChar);
***************
*** 176,180 ****
for (int i = 0; i < 100; i++)
{
! command.Parameters["@int_field"].Value = i;
command.Parameters["@char_field"].Value = "IRow " + i.ToString();
command.Parameters["@varchar_field"].Value = "IRow Number" + i.ToString();
--- 177,181 ----
for (int i = 0; i < 100; i++)
{
! command.Parameters["@int4_field"].Value = i;
command.Parameters["@char_field"].Value = "IRow " + i.ToString();
command.Parameters["@varchar_field"].Value = "IRow Number" + i.ToString();
Index: PGCommandTest.cs
===================================================================
RCS file: /cvsroot/pgsqlclient/pgsqlclient/PostgreSql.Data.PGSqlClient.UnitTests/source/PGCommandTest.cs,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** PGCommandTest.cs 19 Jul 2003 10:12:29 -0000 1.5
--- PGCommandTest.cs 20 Jul 2003 10:01:19 -0000 1.6
***************
*** 32,36 ****
Console.WriteLine("\r\nPGCommandTest.ExecuteNonQueryTest");
! string commandText = "update public.test_table set char_field = @char_field, varchar_field = @varchar_field where int_field = @int_field";
PGTransaction transaction = Connection.BeginTransaction();
--- 32,36 ----
Console.WriteLine("\r\nPGCommandTest.ExecuteNonQueryTest");
! string commandText = "update public.test_table set char_field = @char_field, varchar_field = @varchar_field where int4_field = @int4_field";
PGTransaction transaction = Connection.BeginTransaction();
***************
*** 42,46 ****
command.Parameters.Add("@char_field", PGDbType.Char);
command.Parameters.Add("@varchar_field", PGDbType.VarChar);
! command.Parameters.Add("@int_field", PGDbType.Int4);
for (int i = 0; i < 100; i++)
--- 42,46 ----
command.Parameters.Add("@char_field", PGDbType.Char);
command.Parameters.Add("@varchar_field", PGDbType.VarChar);
! command.Parameters.Add("@int4_field", PGDbType.Int4);
for (int i = 0; i < 100; i++)
***************
*** 101,105 ****
PGCommand command = Connection.CreateCommand();
! command.CommandText = "SELECT char_field FROM public.test_table where int_field = @int_field";
command.Parameters.Add("@int_Field", 2);
--- 101,105 ----
PGCommand command = Connection.CreateCommand();
! command.CommandText = "SELECT char_field FROM public.test_table where int4_field = @int4_field";
command.Parameters.Add("@int_Field", 2);
***************
*** 117,123 ****
PGCommand command = Connection.CreateCommand();
! command.CommandText = "SELECT char_field FROM public.test_table where int_field = @int_field";
! command.Parameters.Add("@int_field", 2);
command.Prepare();
command.Dispose();
--- 117,123 ----
PGCommand command = Connection.CreateCommand();
! command.CommandText = "SELECT char_field FROM public.test_table where int4_field = @int4_field";
! command.Parameters.Add("@int4_field", 2);
command.Prepare();
command.Dispose();
***************
*** 129,135 ****
PGCommand command = Connection.CreateCommand();
! command.CommandText = "SELECT char_field FROM public.test_table where int_field = @int_field or char_field = @char_field";
! command.Parameters.Add("@int_field", 2);
command.Parameters.Add("@char_field", "IRow 20");
--- 129,135 ----
PGCommand command = Connection.CreateCommand();
! command.CommandText = "SELECT char_field FROM public.test_table where int4_field = @int4_field or char_field = @char_field";
! command.Parameters.Add("@int4_field", 2);
command.Parameters.Add("@char_field", "IRow 20");
***************
*** 159,163 ****
{
// Execute a SELECT command
! PGCommand selectCommand = new PGCommand("SELECT * FROM public.test_table WHERE int_field = 100", Connection);
int recordsAffected = selectCommand.ExecuteNonQuery();
Console.WriteLine("\r\nRecords Affected by SELECT command: {0}", recordsAffected);
--- 159,163 ----
{
// Execute a SELECT command
! PGCommand selectCommand = new PGCommand("SELECT * FROM public.test_table WHERE int4_field = 100", Connection);
int recordsAffected = selectCommand.ExecuteNonQuery();
Console.WriteLine("\r\nRecords Affected by SELECT command: {0}", recordsAffected);
***************
*** 167,171 ****
// Execute a DELETE command
! PGCommand deleteCommand = new PGCommand("DELETE FROM public.test_table WHERE int_field = 45", Connection);
recordsAffected = deleteCommand.ExecuteNonQuery();
Console.WriteLine("\r\nRecords Affected by DELETE command: {0}", recordsAffected);
--- 167,171 ----
// Execute a DELETE command
! PGCommand deleteCommand = new PGCommand("DELETE FROM public.test_table WHERE int4_field = 45", Connection);
recordsAffected = deleteCommand.ExecuteNonQuery();
Console.WriteLine("\r\nRecords Affected by DELETE command: {0}", recordsAffected);
Index: PGDataAdapterTest.cs
===================================================================
RCS file: /cvsroot/pgsqlclient/pgsqlclient/PostgreSql.Data.PGSqlClient.UnitTests/source/PGDataAdapterTest.cs,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** PGDataAdapterTest.cs 18 Jul 2003 22:46:04 -0000 1.3
--- PGDataAdapterTest.cs 20 Jul 2003 10:01:19 -0000 1.4
***************
*** 103,111 ****
DataRow newRow = ds.Tables["public.test_table"].NewRow();
! newRow["int_field"] = 100;
newRow["char_field"] = "PostgreSQL";
newRow["varchar_field"] = "PostgreSQL CLient";
! newRow["bigint_field"] = 100000;
! newRow["smallint_field"] = 100;
newRow["double_field"] = 100.01;
newRow["date_field"] = DateTime.Now;
--- 103,111 ----
DataRow newRow = ds.Tables["public.test_table"].NewRow();
! newRow["int4_field"] = 100;
newRow["char_field"] = "PostgreSQL";
newRow["varchar_field"] = "PostgreSQL CLient";
! newRow["int8_field"] = 100000;
! newRow["int2_field"] = 100;
newRow["double_field"] = 100.01;
newRow["date_field"] = DateTime.Now;
***************
*** 127,134 ****
{
PGTransaction transaction = Connection.BeginTransaction();
! PGCommand command = new PGCommand("SELECT * FROM public.test_table WHERE int_field = @int_field", Connection, transaction);
PGDataAdapter adapter = new PGDataAdapter(command);
! adapter.SelectCommand.Parameters.Add("@int_field", PGDbType.Int4, "int_field").Value = 1;
PGCommandBuilder builder = new PGCommandBuilder(adapter);
--- 127,134 ----
{
PGTransaction transaction = Connection.BeginTransaction();
! PGCommand command = new PGCommand("SELECT * FROM public.test_table WHERE int4_field = @int4_field", Connection, transaction);
PGDataAdapter adapter = new PGDataAdapter(command);
! adapter.SelectCommand.Parameters.Add("@int4_field", PGDbType.Int4, "int4_field").Value = 1;
PGCommandBuilder builder = new PGCommandBuilder(adapter);
***************
*** 151,158 ****
{
PGTransaction transaction = Connection.BeginTransaction();
! PGCommand command = new PGCommand("SELECT * FROM public.test_table WHERE int_field = @int_field", Connection, transaction);
PGDataAdapter adapter = new PGDataAdapter(command);
! adapter.SelectCommand.Parameters.Add("@int_field", PGDbType.Int4, "int_field").Value = 10;
PGCommandBuilder builder = new PGCommandBuilder(adapter);
--- 151,158 ----
{
PGTransaction transaction = Connection.BeginTransaction();
! PGCommand command = new PGCommand("SELECT * FROM public.test_table WHERE int4_field = @int4_field", Connection, transaction);
PGDataAdapter adapter = new PGDataAdapter(command);
! adapter.SelectCommand.Parameters.Add("@int4_field", PGDbType.Int4, "int4_field").Value = 10;
PGCommandBuilder builder = new PGCommandBuilder(adapter);
***************
*** 175,182 ****
{
PGTransaction transaction = Connection.BeginTransaction();
! PGCommand command = new PGCommand("SELECT * FROM public.test_table WHERE int_field = @int_field", Connection, transaction);
PGDataAdapter adapter = new PGDataAdapter(command);
! adapter.SelectCommand.Parameters.Add("@int_field", PGDbType.Int4, "int_field").Value = 40;
PGCommandBuilder builder = new PGCommandBuilder(adapter);
--- 175,182 ----
{
PGTransaction transaction = Connection.BeginTransaction();
! PGCommand command = new PGCommand("SELECT * FROM public.test_table WHERE int4_field = @int4_field", Connection, transaction);
PGDataAdapter adapter = new PGDataAdapter(command);
! adapter.SelectCommand.Parameters.Add("@int4_field", PGDbType.Int4, "int4_field").Value = 40;
PGCommandBuilder builder = new PGCommandBuilder(adapter);
***************
*** 185,189 ****
adapter.Fill(ds, "public.test_table");
! ds.Tables["public.test_table"].Rows[0]["smallint_field"] = System.Int16.MaxValue;
adapter.Update(ds, "public.test_table");
--- 185,189 ----
adapter.Fill(ds, "public.test_table");
! ds.Tables["public.test_table"].Rows[0]["int2_field"] = System.Int16.MaxValue;
adapter.Update(ds, "public.test_table");
***************
*** 194,203 ****
transaction.Commit();
! command = new PGCommand("SELECT smallint_field FROM public.test_table WHERE int_field = @int_field", Connection);
! command.Parameters.Add("@int_field", PGDbType.Int4, "int_field").Value = 40;
short val = (short)command.ExecuteScalar();
! Assertion.AssertEquals("smallint_field has not correct value", System.Int16.MaxValue, val);
}
--- 194,203 ----
transaction.Commit();
! command = new PGCommand("SELECT int2_field FROM public.test_table WHERE int4_field = @int4_field", Connection);
! command.Parameters.Add("@int4_field", PGDbType.Int4, "int4_field").Value = 40;
short val = (short)command.ExecuteScalar();
! Assertion.AssertEquals("int2_field has not correct value", System.Int16.MaxValue, val);
}
***************
*** 206,213 ****
{
PGTransaction transaction = Connection.BeginTransaction();
! PGCommand command = new PGCommand("SELECT * FROM public.test_table WHERE int_field = @int_field", Connection, transaction);
PGDataAdapter adapter = new PGDataAdapter(command);
! adapter.SelectCommand.Parameters.Add("@int_field", PGDbType.Int4, "int_field").Value = 20;
PGCommandBuilder builder = new PGCommandBuilder(adapter);
--- 206,213 ----
{
PGTransaction transaction = Connection.BeginTransaction();
! PGCommand command = new PGCommand("SELECT * FROM public.test_table WHERE int4_field = @int4_field", Connection, transaction);
PGDataAdapter adapter = new PGDataAdapter(command);
! adapter.SelectCommand.Parameters.Add("@int4_field", PGDbType.Int4, "int4_field").Value = 20;
PGCommandBuilder builder = new PGCommandBuilder(adapter);
***************
*** 216,220 ****
adapter.Fill(ds, "public.test_table");
! ds.Tables["public.test_table"].Rows[0]["bigint_field"] = System.Int32.MaxValue;
adapter.Update(ds, "public.test_table");
--- 216,220 ----
adapter.Fill(ds, "public.test_table");
! ds.Tables["public.test_table"].Rows[0]["int8_field"] = System.Int32.MaxValue;
adapter.Update(ds, "public.test_table");
***************
*** 225,234 ****
transaction.Commit();
! command = new PGCommand("SELECT bigint_field FROM public.test_table WHERE int_field = @int_field", Connection);
! command.Parameters.Add("@int_field", PGDbType.Int4, "int_field").Value = 20;
long val = (long)command.ExecuteScalar();
! Assertion.AssertEquals("bigint_field has not correct value", System.Int32.MaxValue, val);
}
--- 225,234 ----
transaction.Commit();
! command = new PGCommand("SELECT int8_field FROM public.test_table WHERE int4_field = @int4_field", Connection);
! command.Parameters.Add("@int4_field", PGDbType.Int4, "int4_field").Value = 20;
long val = (long)command.ExecuteScalar();
! Assertion.AssertEquals("int8_field has not correct value", System.Int32.MaxValue, val);
}
***************
*** 237,244 ****
{
PGTransaction transaction = Connection.BeginTransaction();
! PGCommand command = new PGCommand("SELECT * FROM public.test_table WHERE int_field = @int_field", Connection, transaction);
PGDataAdapter adapter = new PGDataAdapter(command);
! adapter.SelectCommand.Parameters.Add("@int_field", PGDbType.Int4, "int_field").Value = 50;
PGCommandBuilder builder = new PGCommandBuilder(adapter);
--- 237,244 ----
{
PGTransaction transaction = Connection.BeginTransaction();
! PGCommand command = new PGCommand("SELECT * FROM public.test_table WHERE int4_field = @int4_field", Connection, transaction);
PGDataAdapter adapter = new PGDataAdapter(command);
! adapter.SelectCommand.Parameters.Add("@int4_field", PGDbType.Int4, "int4_field").Value = 50;
PGCommandBuilder builder = new PGCommandBuilder(adapter);
***************
*** 256,261 ****
transaction.Commit();
! command = new PGCommand("SELECT double_field FROM public.test_table WHERE int_field = @int_field", Connection);
! command.Parameters.Add("@int_field", PGDbType.Int4, "int_field").Value = 50;
double val = (double)command.ExecuteScalar();
--- 256,261 ----
transaction.Commit();
! command = new PGCommand("SELECT double_field FROM public.test_table WHERE int4_field = @int4_field", Connection);
! command.Parameters.Add("@int4_field", PGDbType.Int4, "int4_field").Value = 50;
double val = (double)command.ExecuteScalar();
***************
*** 265,275 ****
[Test]
! public void UpdateDecimalTest()
{
PGTransaction transaction = Connection.BeginTransaction();
! PGCommand command = new PGCommand("SELECT * FROM public.test_table WHERE int_field = @int_field", Connection, transaction);
PGDataAdapter adapter = new PGDataAdapter(command);
! adapter.SelectCommand.Parameters.Add("@int_field", PGDbType.Int4, "int_field").Value = 60;
PGCommandBuilder builder = new PGCommandBuilder(adapter);
--- 265,275 ----
[Test]
! public void UpdateMoneyField()
{
PGTransaction transaction = Connection.BeginTransaction();
! PGCommand command = new PGCommand("SELECT * FROM public.test_table WHERE int4_field = @int4_field", Connection, transaction);
PGDataAdapter adapter = new PGDataAdapter(command);
! adapter.SelectCommand.Parameters.Add("@int4_field", PGDbType.Int4, "int4_field").Value = 27;
PGCommandBuilder builder = new PGCommandBuilder(adapter);
***************
*** 278,282 ****
adapter.Fill(ds, "public.test_table");
! ds.Tables["public.test_table"].Rows[0]["decimal_field"] = System.Int16.MaxValue;
adapter.Update(ds, "public.test_table");
--- 278,282 ----
adapter.Fill(ds, "public.test_table");
! ds.Tables["public.test_table"].Rows[0]["money_field"] = 200.20;
adapter.Update(ds, "public.test_table");
***************
*** 287,296 ****
transaction.Commit();
! command = new PGCommand("SELECT decimal_field FROM public.test_table WHERE int_field = @int_field", Connection);
! command.Parameters.Add("@int_field", PGDbType.Int4, "int_field").Value = 60;
decimal val = (decimal)command.ExecuteScalar();
! Assertion.AssertEquals("decimal_field has not correct value", System.Int16.MaxValue, val);
}
--- 287,327 ----
transaction.Commit();
! command = new PGCommand("SELECT money_field FROM public.test_table WHERE int4_field = @int4_field", Connection);
! command.Parameters.Add("@int4_field", PGDbType.Int4, "int4_field").Value = 27;
!
! float val = (float)command.ExecuteScalar();
!
! Assertion.AssertEquals("money_field has not correct value", 200.20, val);
! }
!
! [Test]
! public void UpdateNumericTest()
! {
! PGTransaction transaction = Connection.BeginTransaction();
! PGCommand command = new PGCommand("SELECT * FROM public.test_table WHERE int4_field = @int4_field", Connection, transaction);
! PGDataAdapter adapter = new PGDataAdapter(command);
!
! adapter.SelectCommand.Parameters.Add("@int4_field", PGDbType.Int4, "int4_field").Value = 60;
!
! PGCommandBuilder builder = new PGCommandBuilder(adapter);
!
! DataSet ds = new DataSet();
! adapter.Fill(ds, "public.test_table");
!
! ds.Tables["public.test_table"].Rows[0]["numeric_field"] = System.Int16.MaxValue;
!
! adapter.Update(ds, "public.test_table");
!
! adapter.Dispose();
! builder.Dispose();
! command.Dispose();
! transaction.Commit();
!
! command = new PGCommand("SELECT numeric_field FROM public.test_table WHERE int4_field = @int4_field", Connection);
! command.Parameters.Add("@int4_field", PGDbType.Int4, "int4_field").Value = 60;
decimal val = (decimal)command.ExecuteScalar();
! Assertion.AssertEquals("numeric_field has not correct value", System.Int16.MaxValue, val);
}
***************
*** 299,306 ****
{
PGTransaction transaction = Connection.BeginTransaction();
! PGCommand command = new PGCommand("SELECT * FROM public.test_table WHERE int_field = @int_field", Connection, transaction);
PGDataAdapter adapter = new PGDataAdapter(command);
! adapter.SelectCommand.Parameters.Add("@int_field", PGDbType.Int4, "int_field").Value = 70;
PGCommandBuilder builder = new PGCommandBuilder(adapter);
--- 330,337 ----
{
PGTransaction transaction = Connection.BeginTransaction();
! PGCommand command = new PGCommand("SELECT * FROM public.test_table WHERE int4_field = @int4_field", Connection, transaction);
PGDataAdapter adapter = new PGDataAdapter(command);
! adapter.SelectCommand.Parameters.Add("@int4_field", PGDbType.Int4, "int4_field").Value = 70;
PGCommandBuilder builder = new PGCommandBuilder(adapter);
***************
*** 320,325 ****
transaction.Commit();
! command = new PGCommand("SELECT date_field FROM public.test_table WHERE int_field = @int_field", Connection);
! command.Parameters.Add("@int_field", PGDbType.Int4, "int_field").Value = 70;
DateTime val = (DateTime)command.ExecuteScalar();
--- 351,356 ----
transaction.Commit();
! command = new PGCommand("SELECT date_field FROM public.test_table WHERE int4_field = @int4_field", Connection);
! command.Parameters.Add("@int4_field", PGDbType.Int4, "int4_field").Value = 70;
DateTime val = (DateTime)command.ExecuteScalar();
***************
*** 334,341 ****
{
PGTransaction transaction = Connection.BeginTransaction();
! PGCommand command = new PGCommand("SELECT * FROM public.test_table WHERE int_field = @int_field", Connection, transaction);
PGDataAdapter adapter = new PGDataAdapter(command);
! adapter.SelectCommand.Parameters.Add("@int_field", PGDbType.Int4, "int_field").Value = 80;
PGCommandBuilder builder = new PGCommandBuilder(adapter);
--- 365,372 ----
{
PGTransaction transaction = Connection.BeginTransaction();
! PGCommand command = new PGCommand("SELECT * FROM public.test_table WHERE int4_field = @int4_field", Connection, transaction);
PGDataAdapter adapter = new PGDataAdapter(command);
! adapter.SelectCommand.Parameters.Add("@int4_field", PGDbType.Int4, "int4_field").Value = 80;
PGCommandBuilder builder = new PGCommandBuilder(adapter);
***************
*** 355,360 ****
transaction.Commit();
! command = new PGCommand("SELECT time_field FROM public.test_table WHERE int_field = @int_field", Connection);
! command.Parameters.Add("@int_field", PGDbType.Int4, "int_field").Value = 80;
DateTime val = (DateTime)command.ExecuteScalar();
--- 386,391 ----
transaction.Commit();
! command = new PGCommand("SELECT time_field FROM public.test_table WHERE int4_field = @int4_field", Connection);
! command.Parameters.Add("@int4_field", PGDbType.Int4, "int4_field").Value = 80;
DateTime val = (DateTime)command.ExecuteScalar();
***************
*** 369,376 ****
{
PGTransaction transaction = Connection.BeginTransaction();
! PGCommand command = new PGCommand("SELECT * FROM public.test_table WHERE int_field = @int_field", Connection, transaction);
PGDataAdapter adapter = new PGDataAdapter(command);
! adapter.SelectCommand.Parameters.Add("@int_field", PGDbType.Int4, "int_field").Value = 90;
PGCommandBuilder builder = new PGCommandBuilder(adapter);
--- 400,407 ----
{
PGTransaction transaction = Connection.BeginTransaction();
! PGCommand command = new PGCommand("SELECT * FROM public.test_table WHERE int4_field = @int4_field", Connection, transaction);
PGDataAdapter adapter = new PGDataAdapter(command);
! adapter.SelectCommand.Parameters.Add("@int4_field", PGDbType.Int4, "int4_field").Value = 90;
PGCommandBuilder builder = new PGCommandBuilder(adapter);
***************
*** 390,395 ****
transaction.Commit();
! command = new PGCommand("SELECT timestamp_field FROM public.test_table WHERE int_field = @int_field", Connection);
! command.Parameters.Add("@int_field", PGDbType.Int4, "int_field").Value = 90;
DateTime val = (DateTime)command.ExecuteScalar();
--- 421,426 ----
transaction.Commit();
! command = new PGCommand("SELECT timestamp_field FROM public.test_table WHERE int4_field = @int4_field", Connection);
! command.Parameters.Add("@int4_field", PGDbType.Int4, "int4_field").Value = 90;
DateTime val = (DateTime)command.ExecuteScalar();
***************
*** 407,414 ****
{
PGTransaction transaction = Connection.BeginTransaction();
! PGCommand command = new PGCommand("SELECT * FROM public.test_table WHERE int_field = @int_field", Connection, transaction);
PGDataAdapter adapter = new PGDataAdapter(command);
! adapter.SelectCommand.Parameters.Add("@int_field", PGDbType.Int4, "int_field").Value = 35;
PGCommandBuilder builder = new PGCommandBuilder(adapter);
--- 438,445 ----
{
PGTransaction transaction = Connection.BeginTransaction();
! PGCommand command = new PGCommand("SELECT * FROM public.test_table WHERE int4_field = @int4_field", Connection, transaction);
PGDataAdapter adapter = new PGDataAdapter(command);
! adapter.SelectCommand.Parameters.Add("@int4_field", PGDbType.Int4, "int4_field").Value = 35;
PGCommandBuilder builder = new PGCommandBuilder(adapter);
|
|
From: <car...@us...> - 2003-07-20 09:59:32
|
Update of /cvsroot/pgsqlclient/pgsqlclient/PostgreSql.Data.PGSqlClient/source/NPGClient
In directory sc8-pr-cvs1:/tmp/cvs-serv30290
Modified Files:
PGOutputPacket.cs PGResponsePacket.cs
Log Message:
* Added new test case for money fields.
* Fixed money datatype handling.
Index: PGOutputPacket.cs
===================================================================
RCS file: /cvsroot/pgsqlclient/pgsqlclient/PostgreSql.Data.PGSqlClient/source/NPGClient/PGOutputPacket.cs,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** PGOutputPacket.cs 18 Jul 2003 22:46:22 -0000 1.3
--- PGOutputPacket.cs 20 Jul 2003 09:59:28 -0000 1.4
***************
*** 206,212 ****
case DbType.Single:
- case DbType.Currency:
WriteInt(size);
WriteFloat(Convert.ToSingle(parameter.Value));
break;
--- 206,216 ----
case DbType.Single:
WriteInt(size);
WriteFloat(Convert.ToSingle(parameter.Value));
+ break;
+
+ case DbType.Currency:
+ WriteInt(size);
+ WriteInt(Convert.ToInt32(Convert.ToSingle(parameter.Value)*100));
break;
Index: PGResponsePacket.cs
===================================================================
RCS file: /cvsroot/pgsqlclient/pgsqlclient/PostgreSql.Data.PGSqlClient/source/NPGClient/PGResponsePacket.cs,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** PGResponsePacket.cs 17 Jul 2003 21:13:05 -0000 1.4
--- PGResponsePacket.cs 20 Jul 2003 09:59:28 -0000 1.5
***************
*** 127,138 ****
}
! public decimal ReadMoney()
{
FloatLayout floatValue = new FloatLayout();
floatValue.f = base.ReadSingle();
floatValue.i0 = IPAddress.HostToNetworkOrder(floatValue.i0);
! return Convert.ToDecimal(floatValue.i0)/100;
}
--- 127,141 ----
}
! public float ReadMoney()
{
+ /*
FloatLayout floatValue = new FloatLayout();
floatValue.f = base.ReadSingle();
floatValue.i0 = IPAddress.HostToNetworkOrder(floatValue.i0);
+ */
+ float val = (float)ReadInt();
! return val/100;
}
|
|
From: <car...@us...> - 2003-07-20 09:59:00
|
Update of /cvsroot/pgsqlclient/pgsqlclient/PostgreSql.Data.PGSqlClient/source
In directory sc8-pr-cvs1:/tmp/cvs-serv30233
Modified Files:
PGConnectionPool.cs
Log Message:
Minor change
Index: PGConnectionPool.cs
===================================================================
RCS file: /cvsroot/pgsqlclient/pgsqlclient/PostgreSql.Data.PGSqlClient/source/PGConnectionPool.cs,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -C2 -d -r1.1.1.1 -r1.2
*** PGConnectionPool.cs 12 Jul 2003 08:11:21 -0000 1.1.1.1
--- PGConnectionPool.cs 20 Jul 2003 09:58:57 -0000 1.2
***************
*** 21,24 ****
--- 21,25 ----
using System.Collections;
using System.Threading;
+ using PostgreSql.Data.NPGClient;
namespace PostgreSql.Data.PGSqlClient
***************
*** 173,177 ****
return connection;
}
! catch (Exception ex)
{
throw ex;
--- 174,178 ----
return connection;
}
! catch (PGClientException ex)
{
throw ex;
|
|
From: <car...@us...> - 2003-07-19 10:20:34
|
Update of /cvsroot/pgsqlclient/pgsqlclient In directory sc8-pr-cvs1:/tmp/cvs-serv31348 Modified Files: readme.txt Log Message: Prepare for Alpha 1 Index: readme.txt =================================================================== RCS file: /cvsroot/pgsqlclient/pgsqlclient/readme.txt,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** readme.txt 12 Jul 2003 08:11:20 -0000 1.1.1.1 --- readme.txt 19 Jul 2003 10:20:32 -0000 1.2 *************** *** 19,21 **** PGSqlClient - ADO.NET Data Provider for PostgreSQL 7.4+ ! ------------------------------------------------------- \ No newline at end of file --- 19,70 ---- PGSqlClient - ADO.NET Data Provider for PostgreSQL 7.4+ ! ------------------------------------------------------- ! ! ! Developement list ! ----------------- ! ! You can subscribe to the developement list at: ! ! http://lists.sourceforge.net/lists/listinfo/pgsqlclient-devel ! ! ! You can see the archives here: ! ! http://sourceforge.net/mailarchive/forum.php?forum=pgsqlclient-devel ! ! ! Users support list ! ----------------- ! ! You can subscribe to the users support list at: ! ! http://lists.sourceforge.net/lists/listinfo/pgsqlclient-users ! ! ! You can see the archives here: ! ! http://sourceforge.net/mailarchive/forum.php?forum=pgsqlclient-users ! ! ! CVS access ! --- ------ ! ! You can see instructions for CVS access here: ! ! https://sourceforge.net/cvs/?group_id=85397 ! ! ! ! Reporting Bugs ! -------------- ! ! For bug reporting you can: ! ! 1. Send it to the developement list. ! ! 2. Send it to the user support list. ! ! 3. Using the project bug tracker ( You need a Sourceforge ID ). ! ! https://sourceforge.net/tracker/?group_id=85397&atid=576060 |
|
From: <car...@us...> - 2003-07-19 10:13:53
|
Update of /cvsroot/pgsqlclient/pgsqlclient In directory sc8-pr-cvs1:/tmp/cvs-serv30439 Modified Files: changelog.txt PGSqlClient.build Log Message: Prepare for Alpha 1 release. Index: changelog.txt =================================================================== RCS file: /cvsroot/pgsqlclient/pgsqlclient/changelog.txt,v retrieving revision 1.17 retrieving revision 1.18 diff -C2 -d -r1.17 -r1.18 *** changelog.txt 18 Jul 2003 22:47:13 -0000 1.17 --- changelog.txt 19 Jul 2003 10:13:50 -0000 1.18 *************** *** 5,8 **** --- 5,10 ---- 2003-07-19 Carlos Guzmán Álvarez <car...@te...> + * Prepare for Alpha 1 release. + * Improved NUnit test Suite. Index: PGSqlClient.build =================================================================== RCS file: /cvsroot/pgsqlclient/pgsqlclient/PGSqlClient.build,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** PGSqlClient.build 15 Jul 2003 19:12:18 -0000 1.2 --- PGSqlClient.build 19 Jul 2003 10:13:50 -0000 1.3 *************** *** 1,4 **** <?xml version="1.0" ?> ! <project name="PGSqlClient" default="release" basedir="." xmlnds="http://tempuri.org/nant-vs.xsd"> <!-- Project properties --> <property name="project.name" value="PGSqlClient" /> --- 1,4 ---- <?xml version="1.0" ?> ! <project name="PGSqlClient" default="build-all" basedir="." xmlnds="http://tempuri.org/nant-vs.xsd"> <!-- Project properties --> <property name="project.name" value="PGSqlClient" /> *************** *** 16,19 **** --- 16,20 ---- <property name="nunit.test.dir" value="PostgreSql.Data.PGSqlClient.UnitTests\source"/> <property name="resources.dir" value="${src.dir}\Resources" /> + <property name="distribution.dir" value="${build.dir}\distribution" /> <!-- Check for Html Help Compiler --> *************** *** 32,36 **** <!-- Check for NUnit --> ! <target name="check-nunit-framework"> <ifnot propertyexists="nunit.framework.dll"> <sysinfo /> --- 33,37 ---- <!-- Check for NUnit --> ! <target name="check-nunit-framework" depends="check-htmlhelp-compiler"> <ifnot propertyexists="nunit.framework.dll"> <sysinfo /> *************** *** 40,47 **** </target> <!-- Target for check build configuration --> <target name="check-build-config" depends="clean"> ! <call target="check-htmlhelp-compiler" /> ! <call target="check-nunit-framework" /> </target> --- 41,116 ---- </target> + <!-- Displays configuration info, usefull for working out why PGSqlClient doesn't build --> + <target name="display-setup" depends="check-nunit-framework"> + <!-- .NET Framework 1.0 --> + <available type="Framework" resource="net-1.0" property="temp.framework.available" /> + <ifnot propertytrue="temp.framework.available"> + <echo message=".NET Framework 1.0 runtime is not available." /> + </ifnot> + <if propertytrue="temp.framework.available"> + <property name="nant.settings.currentframework" value="net-1.0" /> + <call target="display-current-runtime" force="true" /> + </if> + <!-- .NET Framework 1.1 --> + <available type="Framework" resource="net-1.1" property="temp.framework.available" /> + <ifnot propertytrue="temp.framework.available"> + <echo message=".NET Framework 1.1 runtime is not available." /> + </ifnot> + <if propertytrue="temp.framework.available"> + <property name="nant.settings.currentframework" value="net-1.1" /> + <call target="display-current-runtime" force="true" /> + </if> + <!-- Mono 1.0 --> + <available type="Framework" resource="mono-1.0" property="temp.framework.available" /> + <ifnot propertytrue="temp.framework.available"> + <echo message="Mono 1.0 runtime is not available." /> + </ifnot> + <if propertytrue="temp.framework.available"> + <property name="nant.settings.currentframework" value="mono-1.0" /> + <call target="display-current-runtime" force="true" /> + </if> + <!-- SSCLI 1.0 --> + <available type="Framework" resource="sscli-1.0" property="temp.framework.available" /> + <ifnot propertytrue="temp.framework.available"> + <echo message="SSCLI 1.0 runtime is not available." /> + </ifnot> + <if propertytrue="temp.framework.available"> + <property name="nant.settings.currentframework" value="sscli-1.0" /> + <call target="display-current-runtime" force="true" /> + </if> + <!-- HTML Help Compiler --> + <echo message="" /> + <echo message="----------------------------------------------------------" /> + <echo message="" /> + <echo message="htmlhelp.compiler: ${htmlhelp.compiler}" /> + <echo message="" /> + </target> + + <target name="display-current-runtime"> + <echo message="" /> + <echo message="----------------------------------------------------------" /> + <echo message=" ${nant.settings.currentframework.description}" /> + <echo message="----------------------------------------------------------" /> + <echo message="" /> + <echo message="framework : ${nant.settings.currentframework}" /> + <echo message="description : ${nant.settings.currentframework.description}" /> + <if propertyexists="nant.settings.currentframework.sdkdirectory"> + <echo message="sdk directory : ${nant.settings.currentframework.sdkdirectory}" /> + </if> + <ifnot propertyexists="nant.settings.currentframework.sdkdirectory"> + <echo message="sdk directory : <not configured/available>" /> + </ifnot> + <echo message="framework directory : ${nant.settings.currentframework.frameworkdirectory}" /> + <echo message="assembly directory : ${nant.settings.currentframework.frameworkassemblydirectory}" /> + <if propertyexists="nant.settings.currentframework.runtimeengine"> + <echo message="runtime engine : ${nant.settings.currentframework.runtimeengine}" /> + </if> + <echo message="" /> + </target> + <!-- Target for check build configuration --> <target name="check-build-config" depends="clean"> ! <call target="display-setup" /> ! <!-- ${nant.settings.currentframework} --> </target> *************** *** 49,65 **** <target name="clean" description="cleans build directory"> <delete dir="${build.dir}" failonerror="false" verbose="true" /> ! </target> ! ! <!-- Target for build in DEBUG mode --> ! <target name="debug" depends="clean"> ! <property name="build.debug" value="true" /> ! <call target="build-all" /> ! </target> ! ! <!-- Target for build in RELEASE mode --> ! <target name="release" depends="clean"> ! <property name="build.debug" value="false" /> ! <property name="build.define" value="_RELEASE" /> ! <call target="build-all" /> </target> --- 118,122 ---- <target name="clean" description="cleans build directory"> <delete dir="${build.dir}" failonerror="false" verbose="true" /> ! <delete dir="${distribution.dir}" failonerror="false" verbose="true" /> </target> *************** *** 70,80 **** <call target="build-nunit-tests" /> </if> </target> <!-- Taget for build PGSqlClient .NET Data Provider Assembly --> <target name="build-pgsqlclient"> ! <mkdir dir="${build.dir}" /> <!-- compile PostgreSql.Data.PGSqlClient --> ! <csc output="${build.dir}\${project.FormalName}.dll" target="library" debug="${build.debug}" define="${build.define}"> <sources> <includes name="${src.dir}/**/*.cs" /> --- 127,139 ---- <call target="build-nunit-tests" /> </if> + <call target="distribution" /> </target> <!-- Taget for build PGSqlClient .NET Data Provider Assembly --> <target name="build-pgsqlclient"> ! <mkdir dir="${build.dir}" failonerror="false" /> ! <!-- compile PostgreSql.Data.PGSqlClient --> ! <csc output="${build.dir}\${project.FormalName}.dll" target="library" define="${build.define}"> <sources> <includes name="${src.dir}/**/*.cs" /> *************** *** 89,92 **** --- 148,152 ---- <arg value="/resource:${resources.dir}\Toolbox\PGCommand.bmp,PostgreSql.Data.PGSqlClient.Resources.ToolboxBitmaps.PGCommand.bmp" /> <arg value="/resource:${resources.dir}\Toolbox\PGDataAdapter.bmp,PostgreSql.Data.PGSqlClient.Resources.ToolboxBitmaps.PGDataAdapter.bmp" /> + <arg value="/optimize+" /> </csc> </target> *************** *** 111,115 **** <includes name="${build.dir}/${project.FormalName}.dll" /> </references> </csc> ! </target> </project> --- 171,193 ---- <includes name="${build.dir}/${project.FormalName}.dll" /> </references> + <arg value="/optimize+" /> </csc> ! </target> ! ! <!-- Target for distribution --> ! <target name="distribution"> ! <mkdir dir="${distribution.dir}" failonerror="false" /> ! <!-- Copy needed files to distribution directory --> ! <copy todir="${distribution.dir}"> ! <fileset basedir="${build.dir}"> ! <includes name="*.dll" /> ! <includes name="*.config" /> ! </fileset> ! </copy> ! <copy todir="${distribution.dir}"> ! <fileset basedir="."> ! <includes name="*.txt" /> ! </fileset> ! </copy> ! </target> </project> |
|
From: <car...@us...> - 2003-07-19 10:13:18
|
Update of /cvsroot/pgsqlclient/pgsqlclient
In directory sc8-pr-cvs1:/tmp/cvs-serv30364
Modified Files:
PGSqlClient_Mono.build.win32
Log Message:
Prepare for Alpha 1 release.
Index: PGSqlClient_Mono.build.win32
===================================================================
RCS file: /cvsroot/pgsqlclient/pgsqlclient/PGSqlClient_Mono.build.win32,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -C2 -d -r1.1.1.1 -r1.2
*** PGSqlClient_Mono.build.win32 12 Jul 2003 08:11:20 -0000 1.1.1.1
--- PGSqlClient_Mono.build.win32 19 Jul 2003 10:13:15 -0000 1.2
***************
*** 5,11 ****
--- 5,13 ----
<property name="project.FormalName" value="PostgreSql.Data.PGSqlClient" />
<property name="project.version" value="1.0" />
+
<!-- Build properties -->
<property name="build.debug" value="true" />
<property name="build.define" value="_DEBUG" />
+
<!-- Paths properties -->
<property name="base.dir" value="." />
***************
*** 14,21 ****
--- 16,25 ----
<property name="resources.dir" value="${src.dir}\Resources" />
<property name="csunit.dir" value="C:\Archivos de programa\csunit.org\csUnit 1.8.8" />
+
<!-- Target for clean destination directory -->
<target name="clean" description="cleans build directory">
<delete dir="${build.dir}" failonerror="false" verbose="true" />
</target>
+
<!-- Target for build in DEBUG mode -->
<target name="debug" depends="clean">
***************
*** 23,26 ****
--- 27,31 ----
<call target="build-all" />
</target>
+
<!-- Target for build in RELEASE mode -->
<target name="release" depends="clean">
***************
*** 29,32 ****
--- 34,38 ----
<call target="build-all" />
</target>
+
<!-- Target for check build configuration -->
<target name="build-all">
***************
*** 36,42 ****
</if>
</target>
<!-- Taget for build PGSqlClient .NET Data Provider Assembly -->
<target name="build-pgsqlclient">
! <mkdir dir="${build.dir}" />
<!-- compile PostgreSql.Data.PGSqlClient -->
<csc output="${build.dir}\${project.FormalName}.dll" target="library" debug="${build.debug}" define="${build.define}">
--- 42,50 ----
</if>
</target>
+
<!-- Taget for build PGSqlClient .NET Data Provider Assembly -->
<target name="build-pgsqlclient">
! <mkdir dir="${build.dir}" failonerror="false" />
!
<!-- compile PostgreSql.Data.PGSqlClient -->
<csc output="${build.dir}\${project.FormalName}.dll" target="library" debug="${build.debug}" define="${build.define}">
***************
*** 55,58 ****
--- 63,67 ----
</csc>
</target>
+
<!-- Target for build csUnit Tests -->
<target name="build-csnit-tests">
|
|
From: <car...@us...> - 2003-07-19 10:12:32
|
Update of /cvsroot/pgsqlclient/pgsqlclient/PostgreSql.Data.PGSqlClient.UnitTests/source
In directory sc8-pr-cvs1:/tmp/cvs-serv30246
Modified Files:
PGCommandTest.cs
Log Message:
Prepare for Alpha 1 release.
Index: PGCommandTest.cs
===================================================================
RCS file: /cvsroot/pgsqlclient/pgsqlclient/PostgreSql.Data.PGSqlClient.UnitTests/source/PGCommandTest.cs,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** PGCommandTest.cs 15 Jul 2003 19:11:39 -0000 1.4
--- PGCommandTest.cs 19 Jul 2003 10:12:29 -0000 1.5
***************
*** 158,179 ****
public void RecordsAffectedTest()
{
PGCommand selectCommand = new PGCommand("SELECT * FROM public.test_table WHERE int_field = 100", Connection);
int recordsAffected = selectCommand.ExecuteNonQuery();
Console.WriteLine("\r\nRecords Affected by SELECT command: {0}", recordsAffected);
- if (recordsAffected != -1)
- {
- throw new EvaluateException("Invalid RecordsAffected value for SELECT command");
- }
selectCommand.Dispose();
PGCommand deleteCommand = new PGCommand("DELETE FROM public.test_table WHERE int_field = 45", Connection);
recordsAffected = deleteCommand.ExecuteNonQuery();
! Console.WriteLine("\r\nRecords Affected by DELETE command: {0}", recordsAffected);
! if (recordsAffected != 1)
! {
! throw new EvaluateException("Invalid RecordsAffected value for DELETE command");
! }
! // Assertion.Assert(recordsAffected == 1);
deleteCommand.Dispose();
}
}
--- 158,176 ----
public void RecordsAffectedTest()
{
+ // Execute a SELECT command
PGCommand selectCommand = new PGCommand("SELECT * FROM public.test_table WHERE int_field = 100", Connection);
int recordsAffected = selectCommand.ExecuteNonQuery();
Console.WriteLine("\r\nRecords Affected by SELECT command: {0}", recordsAffected);
selectCommand.Dispose();
+
+ Assertion.Assert(recordsAffected == -1);
+ // Execute a DELETE command
PGCommand deleteCommand = new PGCommand("DELETE FROM public.test_table WHERE int_field = 45", Connection);
recordsAffected = deleteCommand.ExecuteNonQuery();
! Console.WriteLine("\r\nRecords Affected by DELETE command: {0}", recordsAffected);
deleteCommand.Dispose();
+
+ Assertion.Assert(recordsAffected == 1);
}
}
|
|
From: <car...@us...> - 2003-07-19 10:12:14
|
Update of /cvsroot/pgsqlclient/pgsqlclient/PostgreSql.Data.PGSqlClient/source/DbSchema In directory sc8-pr-cvs1:/tmp/cvs-serv30220 Modified Files: IDbSchema.cs Log Message: Prepare for Alpha 1 release. Index: IDbSchema.cs =================================================================== RCS file: /cvsroot/pgsqlclient/pgsqlclient/PostgreSql.Data.PGSqlClient/source/DbSchema/IDbSchema.cs,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** IDbSchema.cs 12 Jul 2003 08:11:22 -0000 1.1.1.1 --- IDbSchema.cs 19 Jul 2003 10:12:10 -0000 1.2 *************** *** 20,24 **** using System.Data; using System.Collections; - using PostgreSql.Data.PGSqlClient; --- 20,23 ---- |
|
From: <car...@us...> - 2003-07-19 10:11:41
|
Update of /cvsroot/pgsqlclient/pgsqlclient/PostgreSql.Data.PGSqlClient/source/NPGClient In directory sc8-pr-cvs1:/tmp/cvs-serv30138 Modified Files: PGType.cs Log Message: Prepare for Alpha 1 release. Index: PGType.cs =================================================================== RCS file: /cvsroot/pgsqlclient/pgsqlclient/PostgreSql.Data.PGSqlClient/source/NPGClient/PGType.cs,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** PGType.cs 14 Jul 2003 11:59:44 -0000 1.3 --- PGType.cs 19 Jul 2003 10:11:39 -0000 1.4 *************** *** 19,23 **** using System; using System.Data; - using PostgreSql.Data.PGSqlClient; --- 19,22 ---- |
|
From: <car...@us...> - 2003-07-18 22:47:16
|
Update of /cvsroot/pgsqlclient/pgsqlclient In directory sc8-pr-cvs1:/tmp/cvs-serv11206 Modified Files: changelog.txt Log Message: Updated CHANGELOG.TXT Index: changelog.txt =================================================================== RCS file: /cvsroot/pgsqlclient/pgsqlclient/changelog.txt,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -d -r1.16 -r1.17 *** changelog.txt 17 Jul 2003 21:14:14 -0000 1.16 --- changelog.txt 18 Jul 2003 22:47:13 -0000 1.17 *************** *** 3,6 **** --- 3,15 ---- + 2003-07-19 Carlos Guzmán Álvarez <car...@te...> + + * Improved NUnit test Suite. + + * source/NPGClient/PGOutputPacket.cs: + + - Fixed decimal datatype write. + + 2003-07-17 Carlos Guzmán Álvarez <car...@te...> |
|
From: <car...@us...> - 2003-07-18 22:46:25
|
Update of /cvsroot/pgsqlclient/pgsqlclient/PostgreSql.Data.PGSqlClient/source/NPGClient In directory sc8-pr-cvs1:/tmp/cvs-serv11033 Modified Files: PGOutputPacket.cs Log Message: Fixed decimal datatype write. Index: PGOutputPacket.cs =================================================================== RCS file: /cvsroot/pgsqlclient/pgsqlclient/PostgreSql.Data.PGSqlClient/source/NPGClient/PGOutputPacket.cs,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** PGOutputPacket.cs 17 Jul 2003 13:41:42 -0000 1.2 --- PGOutputPacket.cs 18 Jul 2003 22:46:22 -0000 1.3 *************** *** 195,200 **** */ string paramValue = parameter.Value.ToString(); ! WriteInt(encoding.GetByteCount(paramValue + PGCodes.NULL_TERMINATOR)); ! WriteString(paramValue); } break; --- 195,200 ---- */ string paramValue = parameter.Value.ToString(); ! WriteInt(encoding.GetByteCount(paramValue)); ! Write(paramValue.ToCharArray()); } break; |
|
From: <car...@us...> - 2003-07-18 22:46:10
|
Update of /cvsroot/pgsqlclient/pgsqlclient/PostgreSql.Data.PGSqlClient.UnitTests/source
In directory sc8-pr-cvs1:/tmp/cvs-serv10961
Modified Files:
PGBaseTest.cs PGDataAdapterTest.cs
Log Message:
Improved NUnit test suite
Index: PGBaseTest.cs
===================================================================
RCS file: /cvsroot/pgsqlclient/pgsqlclient/PostgreSql.Data.PGSqlClient.UnitTests/source/PGBaseTest.cs,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** PGBaseTest.cs 15 Jul 2003 19:11:39 -0000 1.4
--- PGBaseTest.cs 18 Jul 2003 22:46:04 -0000 1.5
***************
*** 142,146 ****
commandText.Append("bool_field bool,");
commandText.Append("bigint_field int8,");
! // commandText.Append("decimal_field decimal(8,2),");
commandText.Append("smallint_field int2,");
commandText.Append("array_int int2[],");
--- 142,146 ----
commandText.Append("bool_field bool,");
commandText.Append("bigint_field int8,");
! commandText.Append("decimal_field decimal(8,2),");
commandText.Append("smallint_field int2,");
commandText.Append("array_int int2[],");
Index: PGDataAdapterTest.cs
===================================================================
RCS file: /cvsroot/pgsqlclient/pgsqlclient/PostgreSql.Data.PGSqlClient.UnitTests/source/PGDataAdapterTest.cs,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** PGDataAdapterTest.cs 15 Jul 2003 19:11:39 -0000 1.2
--- PGDataAdapterTest.cs 18 Jul 2003 22:46:04 -0000 1.3
***************
*** 172,176 ****
[Test]
! public void UpdateBigIntTest()
{
PGTransaction transaction = Connection.BeginTransaction();
--- 172,176 ----
[Test]
! public void UpdateInt2Test()
{
PGTransaction transaction = Connection.BeginTransaction();
***************
*** 178,182 ****
PGDataAdapter adapter = new PGDataAdapter(command);
! adapter.SelectCommand.Parameters.Add("@int_field", PGDbType.Int4, "int_field").Value = 20;
PGCommandBuilder builder = new PGCommandBuilder(adapter);
--- 178,182 ----
PGDataAdapter adapter = new PGDataAdapter(command);
! adapter.SelectCommand.Parameters.Add("@int_field", PGDbType.Int4, "int_field").Value = 40;
PGCommandBuilder builder = new PGCommandBuilder(adapter);
***************
*** 185,189 ****
adapter.Fill(ds, "public.test_table");
! ds.Tables["public.test_table"].Rows[0]["bigint_field"] = System.Int32.MaxValue;
adapter.Update(ds, "public.test_table");
--- 185,189 ----
adapter.Fill(ds, "public.test_table");
! ds.Tables["public.test_table"].Rows[0]["smallint_field"] = System.Int16.MaxValue;
adapter.Update(ds, "public.test_table");
***************
*** 193,200 ****
command.Dispose();
transaction.Commit();
}
[Test]
! public void UpdateSmallIntTest()
{
PGTransaction transaction = Connection.BeginTransaction();
--- 193,207 ----
command.Dispose();
transaction.Commit();
+
+ command = new PGCommand("SELECT smallint_field FROM public.test_table WHERE int_field = @int_field", Connection);
+ command.Parameters.Add("@int_field", PGDbType.Int4, "int_field").Value = 40;
+
+ short val = (short)command.ExecuteScalar();
+
+ Assertion.AssertEquals("smallint_field has not correct value", System.Int16.MaxValue, val);
}
[Test]
! public void UpdateInt8Test()
{
PGTransaction transaction = Connection.BeginTransaction();
***************
*** 202,206 ****
PGDataAdapter adapter = new PGDataAdapter(command);
! adapter.SelectCommand.Parameters.Add("@int_field", PGDbType.Int4, "int_field").Value = 40;
PGCommandBuilder builder = new PGCommandBuilder(adapter);
--- 209,213 ----
PGDataAdapter adapter = new PGDataAdapter(command);
! adapter.SelectCommand.Parameters.Add("@int_field", PGDbType.Int4, "int_field").Value = 20;
PGCommandBuilder builder = new PGCommandBuilder(adapter);
***************
*** 209,213 ****
adapter.Fill(ds, "public.test_table");
! ds.Tables["public.test_table"].Rows[0]["smallint_field"] = System.Int16.MaxValue;
adapter.Update(ds, "public.test_table");
--- 216,220 ----
adapter.Fill(ds, "public.test_table");
! ds.Tables["public.test_table"].Rows[0]["bigint_field"] = System.Int32.MaxValue;
adapter.Update(ds, "public.test_table");
***************
*** 217,220 ****
--- 224,234 ----
command.Dispose();
transaction.Commit();
+
+ command = new PGCommand("SELECT bigint_field FROM public.test_table WHERE int_field = @int_field", Connection);
+ command.Parameters.Add("@int_field", PGDbType.Int4, "int_field").Value = 20;
+
+ long val = (long)command.ExecuteScalar();
+
+ Assertion.AssertEquals("bigint_field has not correct value", System.Int32.MaxValue, val);
}
***************
*** 233,237 ****
adapter.Fill(ds, "public.test_table");
! ds.Tables["public.test_table"].Rows[0]["double_field"] = System.Decimal.MaxValue;
adapter.Update(ds, "public.test_table");
--- 247,251 ----
adapter.Fill(ds, "public.test_table");
! ds.Tables["public.test_table"].Rows[0]["double_field"] = System.Int32.MaxValue;
adapter.Update(ds, "public.test_table");
***************
*** 241,248 ****
command.Dispose();
transaction.Commit();
}
[Test]
- [Ignore("Not implemented.")]
public void UpdateDecimalTest()
{
--- 255,268 ----
command.Dispose();
transaction.Commit();
+
+ command = new PGCommand("SELECT double_field FROM public.test_table WHERE int_field = @int_field", Connection);
+ command.Parameters.Add("@int_field", PGDbType.Int4, "int_field").Value = 50;
+
+ double val = (double)command.ExecuteScalar();
+
+ Assertion.AssertEquals("double_field has not correct value", System.Int32.MaxValue, val);
}
[Test]
public void UpdateDecimalTest()
{
***************
*** 258,262 ****
adapter.Fill(ds, "public.test_table");
! ds.Tables["public.test_table"].Rows[0]["decimal_field"] = System.Int32.MaxValue;
adapter.Update(ds, "public.test_table");
--- 278,282 ----
adapter.Fill(ds, "public.test_table");
! ds.Tables["public.test_table"].Rows[0]["decimal_field"] = System.Int16.MaxValue;
adapter.Update(ds, "public.test_table");
***************
*** 266,269 ****
--- 286,296 ----
command.Dispose();
transaction.Commit();
+
+ command = new PGCommand("SELECT decimal_field FROM public.test_table WHERE int_field = @int_field", Connection);
+ command.Parameters.Add("@int_field", PGDbType.Int4, "int_field").Value = 60;
+
+ decimal val = (decimal)command.ExecuteScalar();
+
+ Assertion.AssertEquals("decimal_field has not correct value", System.Int16.MaxValue, val);
}
***************
*** 282,286 ****
adapter.Fill(ds, "public.test_table");
! ds.Tables["public.test_table"].Rows[0]["date_field"] = DateTime.Now;
adapter.Update(ds, "public.test_table");
--- 309,315 ----
adapter.Fill(ds, "public.test_table");
! DateTime dt = DateTime.Now;
!
! ds.Tables["public.test_table"].Rows[0]["date_field"] = dt;
adapter.Update(ds, "public.test_table");
***************
*** 288,293 ****
adapter.Dispose();
builder.Dispose();
! command.Dispose();
transaction.Commit();
}
--- 317,331 ----
adapter.Dispose();
builder.Dispose();
! command.Dispose();
transaction.Commit();
+
+ command = new PGCommand("SELECT date_field FROM public.test_table WHERE int_field = @int_field", Connection);
+ command.Parameters.Add("@int_field", PGDbType.Int4, "int_field").Value = 70;
+
+ DateTime val = (DateTime)command.ExecuteScalar();
+
+ Assertion.AssertEquals("date_field has not correct day", dt.Day, val.Day);
+ Assertion.AssertEquals("date_field has not correct month", dt.Month, val.Month);
+ Assertion.AssertEquals("date_field has not correct year", dt.Year, val.Year);
}
***************
*** 306,310 ****
adapter.Fill(ds, "public.test_table");
! ds.Tables["public.test_table"].Rows[0]["time_field"] = DateTime.Now;
adapter.Update(ds, "public.test_table");
--- 344,350 ----
adapter.Fill(ds, "public.test_table");
! DateTime dt = DateTime.Now;
!
! ds.Tables["public.test_table"].Rows[0]["time_field"] = dt;
adapter.Update(ds, "public.test_table");
***************
*** 314,317 ****
--- 354,366 ----
command.Dispose();
transaction.Commit();
+
+ command = new PGCommand("SELECT time_field FROM public.test_table WHERE int_field = @int_field", Connection);
+ command.Parameters.Add("@int_field", PGDbType.Int4, "int_field").Value = 80;
+
+ DateTime val = (DateTime)command.ExecuteScalar();
+
+ Assertion.AssertEquals("time_field has not correct hour", dt.Hour, val.Hour);
+ Assertion.AssertEquals("time_field has not correct minute", dt.Minute, val.Minute);
+ Assertion.AssertEquals("time_field has not correct second", dt.Second, val.Second);
}
***************
*** 330,334 ****
adapter.Fill(ds, "public.test_table");
! ds.Tables["public.test_table"].Rows[0]["timestamp_field"] = DateTime.Now;
adapter.Update(ds, "public.test_table");
--- 379,385 ----
adapter.Fill(ds, "public.test_table");
! DateTime dt = DateTime.Now;
!
! ds.Tables["public.test_table"].Rows[0]["timestamp_field"] = dt;
adapter.Update(ds, "public.test_table");
***************
*** 338,341 ****
--- 389,404 ----
command.Dispose();
transaction.Commit();
+
+ command = new PGCommand("SELECT timestamp_field FROM public.test_table WHERE int_field = @int_field", Connection);
+ command.Parameters.Add("@int_field", PGDbType.Int4, "int_field").Value = 90;
+
+ DateTime val = (DateTime)command.ExecuteScalar();
+
+ Assertion.AssertEquals("timestamp_field has not correct day", dt.Day, val.Day);
+ Assertion.AssertEquals("timestamp_field has not correct month", dt.Month, val.Month);
+ Assertion.AssertEquals("timestamp_field has not correct year", dt.Year, val.Year);
+ Assertion.AssertEquals("timestamp_field has not correct hour", dt.Hour, val.Hour);
+ Assertion.AssertEquals("timestamp_field has not correct minute", dt.Minute, val.Minute);
+ Assertion.AssertEquals("timestamp_field has not correct second", dt.Second, val.Second);
}
|
|
From: <car...@us...> - 2003-07-17 21:14:18
|
Update of /cvsroot/pgsqlclient/pgsqlclient In directory sc8-pr-cvs1:/tmp/cvs-serv29598 Modified Files: changelog.txt Log Message: Updated CHANGELOG.TXT Index: changelog.txt =================================================================== RCS file: /cvsroot/pgsqlclient/pgsqlclient/changelog.txt,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -d -r1.15 -r1.16 *** changelog.txt 17 Jul 2003 13:42:04 -0000 1.15 --- changelog.txt 17 Jul 2003 21:14:14 -0000 1.16 *************** *** 9,17 **** * Added two new files for encode/decode datatype values. ! * source/NPGClient/PGResponsePAcket.cs: - Removed test code. - Added call to PGEncodeType.EncodeNumeric. --- 9,23 ---- * Added two new files for encode/decode datatype values. ! * source/NPGClient/PGResponsePacket.cs: - Removed test code. - Added call to PGEncodeType.EncodeNumeric. + + * source/NPGClient/PGEncodeType.cs: + * source/NPGClient/PGDecodeType.cs: + * source/NPGClient/PGResponsePacket.cs: + + - CleanUp. |
|
From: <car...@us...> - 2003-07-17 21:13:08
|
Update of /cvsroot/pgsqlclient/pgsqlclient/PostgreSql.Data.PGSqlClient/source/NPGClient
In directory sc8-pr-cvs1:/tmp/cvs-serv29383
Modified Files:
PGDecodeType.cs PGEncodeType.cs PGResponsePacket.cs
Log Message:
CleanUp
Index: PGDecodeType.cs
===================================================================
RCS file: /cvsroot/pgsqlclient/pgsqlclient/PostgreSql.Data.PGSqlClient/source/NPGClient/PGDecodeType.cs,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** PGDecodeType.cs 17 Jul 2003 09:50:40 -0000 1.1
--- PGDecodeType.cs 17 Jul 2003 21:13:05 -0000 1.2
***************
*** 23,29 ****
internal class PGDecodeType
{
- public static void DecodeNumeric()
- {
- }
}
}
--- 23,26 ----
Index: PGEncodeType.cs
===================================================================
RCS file: /cvsroot/pgsqlclient/pgsqlclient/PostgreSql.Data.PGSqlClient/source/NPGClient/PGEncodeType.cs,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** PGEncodeType.cs 17 Jul 2003 13:41:42 -0000 1.2
--- PGEncodeType.cs 17 Jul 2003 21:13:05 -0000 1.3
***************
*** 23,81 ****
internal class PGEncodeType
{
- public static Decimal EncodeNumeric(int ndigits, int weight, int sign, int dscale, short[] digits)
- {
- Decimal result = 0M;
-
- // This code was ported from PostgreSQL sources
- // src/Backend/utils/adt/numeric.c
- if (sign == PGCodes.NUMERIC_NAN)
- {
- result = (decimal)Single.NaN;
- }
- else
- {
- int n = ndigits - 1;
-
- // truncate leading zeroes
- while (n > 0 && digits[n] == 0)
- {
- weight--;
- n--;
- }
-
- // truncate trailing zeroes
- while (n > 0 && digits[n - 1] == 0)
- {
- n--;
- }
-
- // If zero result, force to weight=0 and positive sign
- if (n == 0)
- {
- weight = 0;
- sign = PGCodes.NUMERIC_POS;
- }
-
- // Build the result
- byte[] res = new Byte[PGCodes.NUMERIC_HDRSZ + n * 1];
-
- Buffer.BlockCopy(digits, 0, res, 0, res.Length);
-
- /*
- result = (Numeric) palloc(len);
- result->varlen = len;
- result->n_weight = weight;
- result->n_sign_dscale = sign | (var->dscale & NUMERIC_DSCALE_MASK);
-
- // Check for overflow of int16 fields
- if (result->n_weight != weight ||
- NUMERIC_DSCALE(result) != var->dscale)
- elog(ERROR, "Value overflows numeric format");
- */
-
- }
-
- return result;
- }
}
}
--- 23,26 ----
Index: PGResponsePacket.cs
===================================================================
RCS file: /cvsroot/pgsqlclient/pgsqlclient/PostgreSql.Data.PGSqlClient/source/NPGClient/PGResponsePacket.cs,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** PGResponsePacket.cs 17 Jul 2003 13:41:42 -0000 1.3
--- PGResponsePacket.cs 17 Jul 2003 21:13:05 -0000 1.4
***************
*** 127,146 ****
}
- public decimal ReadNumeric()
- {
- short ndigits = ReadShort();
- short weight = ReadShort();
- short sign = ReadShort();
- short dscale = ReadShort();
- short[] digits = new short[ndigits];
-
- for (int i = 0; i < digits.Length; i++)
- {
- digits[i] = ReadShort();
- }
-
- return PGEncodeType.EncodeNumeric(ndigits, weight, sign, dscale, digits);
- }
-
public decimal ReadMoney()
{
--- 127,130 ----
***************
*** 279,282 ****
--- 263,275 ----
case DbType.Decimal:
+ /*
+ Data sent by PostgreSQL In binary mode
+ short ndigits = ReadShort();
+ short weight = ReadShort();
+ short sign = ReadShort();
+ short dscale = ReadShort();
+ short[] digits = new short[ndigits];
+ */
+
string numericValue = ReadString(length);
return Decimal.Parse(numericValue, NumberFormatInfo.InvariantInfo);
|
|
From: <car...@us...> - 2003-07-17 13:42:07
|
Update of /cvsroot/pgsqlclient/pgsqlclient In directory sc8-pr-cvs1:/tmp/cvs-serv6420 Modified Files: changelog.txt Log Message: Updated CHANGELOG.TXT Index: changelog.txt =================================================================== RCS file: /cvsroot/pgsqlclient/pgsqlclient/changelog.txt,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** changelog.txt 17 Jul 2003 09:50:59 -0000 1.14 --- changelog.txt 17 Jul 2003 13:42:04 -0000 1.15 *************** *** 5,8 **** --- 5,10 ---- 2003-07-17 Carlos Guzmán Álvarez <car...@te...> + * Added decimal datatype support at this moment using text format ( Task 81641 ) + * Added two new files for encode/decode datatype values. |
Update of /cvsroot/pgsqlclient/pgsqlclient/PostgreSql.Data.PGSqlClient/source/NPGClient
In directory sc8-pr-cvs1:/tmp/cvs-serv6334
Modified Files:
PGCodes.cs PGDbClient.cs PGEncodeType.cs PGOutputPacket.cs
PGResponsePacket.cs
Log Message:
Added decimal datatype support at this moment using text format ( Task 81641 )
Index: PGCodes.cs
===================================================================
RCS file: /cvsroot/pgsqlclient/pgsqlclient/PostgreSql.Data.PGSqlClient/source/NPGClient/PGCodes.cs,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -C2 -d -r1.1.1.1 -r1.2
*** PGCodes.cs 12 Jul 2003 08:11:22 -0000 1.1.1.1
--- PGCodes.cs 17 Jul 2003 13:41:42 -0000 1.2
***************
*** 122,129 ****
--- 122,132 ----
// Numeric data type
+ public const int NUMERIC_SIGN_MASK = 0xC000;
public const int NUMERIC_POS = 0x0000;
public const int NUMERIC_NEG = 0x4000;
public const int NUMERIC_NAN = 0xC000;
public const int NUMERIC_MAX_PRECISION = 1000;
+ public const int NUMERIC_DSCALE_MASK = 0x3FFF;
+ public const int NUMERIC_HDRSZ = 10;
}
}
Index: PGDbClient.cs
===================================================================
RCS file: /cvsroot/pgsqlclient/pgsqlclient/PostgreSql.Data.PGSqlClient/source/NPGClient/PGDbClient.cs,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** PGDbClient.cs 14 Jul 2003 11:59:44 -0000 1.2
--- PGDbClient.cs 17 Jul 2003 13:41:42 -0000 1.3
***************
*** 548,552 ****
types.Add(1560 , "bit" , DbType.Byte , Type.GetType("System.Byte") , 0, 0, 1, false, false);
types.Add(1562 , "varbit" , DbType.Byte , Type.GetType("System.Byte") , 0, 1, 0, false, false);
! types.Add(1700 , "numeric" , DbType.Decimal , Type.GetType("System.Decimal") , 0, 1, 8, false, false);
types.Add(2277 , "anyarray", DbType.Object , Type.GetType("System.Array") , 0, 1, 8, false, false);
}
--- 548,552 ----
types.Add(1560 , "bit" , DbType.Byte , Type.GetType("System.Byte") , 0, 0, 1, false, false);
types.Add(1562 , "varbit" , DbType.Byte , Type.GetType("System.Byte") , 0, 1, 0, false, false);
! types.Add(1700 , "numeric" , DbType.Decimal , Type.GetType("System.Decimal") , 0, 0, 8, false, false);
types.Add(2277 , "anyarray", DbType.Object , Type.GetType("System.Array") , 0, 1, 8, false, false);
}
Index: PGEncodeType.cs
===================================================================
RCS file: /cvsroot/pgsqlclient/pgsqlclient/PostgreSql.Data.PGSqlClient/source/NPGClient/PGEncodeType.cs,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** PGEncodeType.cs 17 Jul 2003 09:50:40 -0000 1.1
--- PGEncodeType.cs 17 Jul 2003 13:41:42 -0000 1.2
***************
*** 23,29 ****
internal class PGEncodeType
{
! public static Decimal EncodeNumeric(short ndigits, short weight, short sign, short dscale, short[] digits)
{
! return 0;
}
}
--- 23,80 ----
internal class PGEncodeType
{
! public static Decimal EncodeNumeric(int ndigits, int weight, int sign, int dscale, short[] digits)
{
! Decimal result = 0M;
!
! // This code was ported from PostgreSQL sources
! // src/Backend/utils/adt/numeric.c
! if (sign == PGCodes.NUMERIC_NAN)
! {
! result = (decimal)Single.NaN;
! }
! else
! {
! int n = ndigits - 1;
!
! // truncate leading zeroes
! while (n > 0 && digits[n] == 0)
! {
! weight--;
! n--;
! }
!
! // truncate trailing zeroes
! while (n > 0 && digits[n - 1] == 0)
! {
! n--;
! }
!
! // If zero result, force to weight=0 and positive sign
! if (n == 0)
! {
! weight = 0;
! sign = PGCodes.NUMERIC_POS;
! }
!
! // Build the result
! byte[] res = new Byte[PGCodes.NUMERIC_HDRSZ + n * 1];
!
! Buffer.BlockCopy(digits, 0, res, 0, res.Length);
!
! /*
! result = (Numeric) palloc(len);
! result->varlen = len;
! result->n_weight = weight;
! result->n_sign_dscale = sign | (var->dscale & NUMERIC_DSCALE_MASK);
!
! // Check for overflow of int16 fields
! if (result->n_weight != weight ||
! NUMERIC_DSCALE(result) != var->dscale)
! elog(ERROR, "Value overflows numeric format");
! */
!
! }
!
! return result;
}
}
Index: PGOutputPacket.cs
===================================================================
RCS file: /cvsroot/pgsqlclient/pgsqlclient/PostgreSql.Data.PGSqlClient/source/NPGClient/PGOutputPacket.cs,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -C2 -d -r1.1.1.1 -r1.2
*** PGOutputPacket.cs 12 Jul 2003 08:11:23 -0000 1.1.1.1
--- PGOutputPacket.cs 17 Jul 2003 13:41:42 -0000 1.2
***************
*** 189,195 ****
case DbType.Decimal:
WriteInt(size);
Write(Convert.ToDecimal(parameter.Value));
! break;
case DbType.Double:
--- 189,202 ----
case DbType.Decimal:
+ {
+ /*
WriteInt(size);
Write(Convert.ToDecimal(parameter.Value));
! */
! string paramValue = parameter.Value.ToString();
! WriteInt(encoding.GetByteCount(paramValue + PGCodes.NULL_TERMINATOR));
! WriteString(paramValue);
! }
! break;
case DbType.Double:
Index: PGResponsePacket.cs
===================================================================
RCS file: /cvsroot/pgsqlclient/pgsqlclient/PostgreSql.Data.PGSqlClient/source/NPGClient/PGResponsePacket.cs,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** PGResponsePacket.cs 17 Jul 2003 09:50:40 -0000 1.2
--- PGResponsePacket.cs 17 Jul 2003 13:41:42 -0000 1.3
***************
*** 279,283 ****
case DbType.Decimal:
! return ReadNumeric();
case DbType.Currency:
--- 279,284 ----
case DbType.Decimal:
! string numericValue = ReadString(length);
! return Decimal.Parse(numericValue, NumberFormatInfo.InvariantInfo);
case DbType.Currency:
|
|
From: <car...@us...> - 2003-07-17 09:51:02
|
Update of /cvsroot/pgsqlclient/pgsqlclient In directory sc8-pr-cvs1:/tmp/cvs-serv2052 Modified Files: changelog.txt Log Message: Updated CHANGELOG.TXT Index: changelog.txt =================================================================== RCS file: /cvsroot/pgsqlclient/pgsqlclient/changelog.txt,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** changelog.txt 16 Jul 2003 20:18:14 -0000 1.13 --- changelog.txt 17 Jul 2003 09:50:59 -0000 1.14 *************** *** 3,6 **** --- 3,17 ---- + 2003-07-17 Carlos Guzmán Álvarez <car...@te...> + + * Added two new files for encode/decode datatype values. + + * source/NPGClient/PGResponsePAcket.cs: + + - Removed test code. + + - Added call to PGEncodeType.EncodeNumeric. + + 2003-07-16 Carlos Guzmán Álvarez <car...@te...> |
|
From: <car...@us...> - 2003-07-17 09:50:43
|
Update of /cvsroot/pgsqlclient/pgsqlclient/PostgreSql.Data.PGSqlClient/source/NPGClient
In directory sc8-pr-cvs1:/tmp/cvs-serv2003
Modified Files:
PGResponsePacket.cs
Added Files:
PGDecodeType.cs PGEncodeType.cs
Log Message:
* Added two new files for encode/decode datatype values.
* source/NPGClient/PGResponsePAcket.cs:
- Removed test code.
- Added call to PGEncodeType.EncodeNumeric.
--- NEW FILE: PGDecodeType.cs ---
(This appears to be a binary file; contents omitted.)
--- NEW FILE: PGEncodeType.cs ---
(This appears to be a binary file; contents omitted.)
Index: PGResponsePacket.cs
===================================================================
RCS file: /cvsroot/pgsqlclient/pgsqlclient/PostgreSql.Data.PGSqlClient/source/NPGClient/PGResponsePacket.cs,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -C2 -d -r1.1.1.1 -r1.2
*** PGResponsePacket.cs 12 Jul 2003 08:11:23 -0000 1.1.1.1
--- PGResponsePacket.cs 17 Jul 2003 09:50:40 -0000 1.2
***************
*** 138,148 ****
{
digits[i] = ReadShort();
- if (i == 0)
- {
- digits[i] *= (short)(100*weight);
- }
}
! return 0;
}
--- 138,144 ----
{
digits[i] = ReadShort();
}
! return PGEncodeType.EncodeNumeric(ndigits, weight, sign, dscale, digits);
}
|
|
From: <car...@us...> - 2003-07-16 20:18:18
|
Update of /cvsroot/pgsqlclient/pgsqlclient In directory sc8-pr-cvs1:/tmp/cvs-serv11344 Modified Files: changelog.txt Log Message: Updated CHANGELOG.TXT Index: changelog.txt =================================================================== RCS file: /cvsroot/pgsqlclient/pgsqlclient/changelog.txt,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** changelog.txt 16 Jul 2003 19:34:21 -0000 1.12 --- changelog.txt 16 Jul 2003 20:18:14 -0000 1.13 *************** *** 18,23 **** --- 18,31 ---- * source/PGDataReader.cs: * source/PGDataAdapter.cs: + * source/PGCommandBuilder.cs: + * source/PGErrorCollection.cs: + * source/PGParameterAdapter.cs: + * source/PGException.cs: - Added better use of design time attributes. + + * source/PGParameterAdapter.cs: + + - Added default constructor as internal. |
Update of /cvsroot/pgsqlclient/pgsqlclient/PostgreSql.Data.PGSqlClient/source
In directory sc8-pr-cvs1:/tmp/cvs-serv11253
Modified Files:
PGCommandBuilder.cs PGDataAdapter.cs PGErrorCollection.cs
PGException.cs PGParameterCollection.cs
Log Message:
* source/PGConnection.cs:
* source/PGDataReader.cs:
* source/PGDataAdapter.cs:
* source/PGCommandBuilder.cs:
* source/PGErrorCollection.cs:
* source/PGParameterAdapter.cs:
* source/PGException.cs:
- Added better use of design time attributes.
* source/PGParameterAdapter.cs:
- Added default constructor as internal.
Index: PGCommandBuilder.cs
===================================================================
RCS file: /cvsroot/pgsqlclient/pgsqlclient/PostgreSql.Data.PGSqlClient/source/PGCommandBuilder.cs,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** PGCommandBuilder.cs 14 Jul 2003 11:57:25 -0000 1.3
--- PGCommandBuilder.cs 16 Jul 2003 20:17:49 -0000 1.4
***************
*** 52,55 ****
--- 52,56 ----
#region PROPERTIES
+ [DefaultValue(null)]
public PGDataAdapter DataAdapter
{
***************
*** 68,71 ****
--- 69,74 ----
}
+ [Browsable(false),
+ DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public string QuotePrefix
{
***************
*** 82,85 ****
--- 85,90 ----
}
+ [Browsable(false),
+ DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public string QuoteSuffix
{
Index: PGDataAdapter.cs
===================================================================
RCS file: /cvsroot/pgsqlclient/pgsqlclient/PostgreSql.Data.PGSqlClient/source/PGDataAdapter.cs,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** PGDataAdapter.cs 16 Jul 2003 19:33:21 -0000 1.3
--- PGDataAdapter.cs 16 Jul 2003 20:17:49 -0000 1.4
***************
*** 33,38 ****
#endregion
! [ToolboxBitmap(typeof(PGDataAdapter), "Resources.ToolboxBitmaps.PGDataAdapter.bmp"),
! DesignerCategory("Component"),
DefaultEvent("RowUpdated")]
public sealed class PGDataAdapter : DbDataAdapter, IDbDataAdapter
--- 33,37 ----
#endregion
! [ToolboxBitmap(typeof(PGDataAdapter), "Resources.ToolboxBitmaps.PGDataAdapter.bmp"),
DefaultEvent("RowUpdated")]
public sealed class PGDataAdapter : DbDataAdapter, IDbDataAdapter
Index: PGErrorCollection.cs
===================================================================
RCS file: /cvsroot/pgsqlclient/pgsqlclient/PostgreSql.Data.PGSqlClient/source/PGErrorCollection.cs,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -C2 -d -r1.1.1.1 -r1.2
*** PGErrorCollection.cs 12 Jul 2003 08:11:21 -0000 1.1.1.1
--- PGErrorCollection.cs 16 Jul 2003 20:17:49 -0000 1.2
***************
*** 19,27 ****
using System;
using System.Collections;
using System.Globalization;
namespace PostgreSql.Data.PGSqlClient
{
! [Serializable]
public sealed class PGErrorCollection : ICollection, IEnumerable
{
--- 19,29 ----
using System;
using System.Collections;
+ using System.ComponentModel;
using System.Globalization;
namespace PostgreSql.Data.PGSqlClient
{
! [Serializable,
! ListBindable(false)]
public sealed class PGErrorCollection : ICollection, IEnumerable
{
Index: PGException.cs
===================================================================
RCS file: /cvsroot/pgsqlclient/pgsqlclient/PostgreSql.Data.PGSqlClient/source/PGException.cs,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** PGException.cs 13 Jul 2003 13:54:02 -0000 1.3
--- PGException.cs 16 Jul 2003 20:17:49 -0000 1.4
***************
*** 19,24 ****
using System;
using System.Text;
using System.Runtime.Serialization;
-
using PostgreSql.Data.NPGClient;
--- 19,24 ----
using System;
using System.Text;
+ using System.ComponentModel;
using System.Runtime.Serialization;
using PostgreSql.Data.NPGClient;
***************
*** 36,39 ****
--- 36,40 ----
#region PROPERTIES
+ [DesignerSerializationVisibility(DesignerSerializationVisibility.Content)]
public PGErrorCollection Errors
{
Index: PGParameterCollection.cs
===================================================================
RCS file: /cvsroot/pgsqlclient/pgsqlclient/PostgreSql.Data.PGSqlClient/source/PGParameterCollection.cs,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -C2 -d -r1.1.1.1 -r1.2
*** PGParameterCollection.cs 12 Jul 2003 08:11:21 -0000 1.1.1.1
--- PGParameterCollection.cs 16 Jul 2003 20:17:49 -0000 1.2
***************
*** 19,22 ****
--- 19,23 ----
using System;
using System.Data;
+ using System.ComponentModel;
using System.Collections;
using System.Globalization;
***************
*** 24,27 ****
--- 25,29 ----
namespace PostgreSql.Data.PGSqlClient
{
+ [ListBindable(false)]
public sealed class PGParameterCollection : MarshalByRefObject, IDataParameterCollection, IList, ICollection, IEnumerable
{
***************
*** 40,43 ****
--- 42,47 ----
}
+ [Browsable(false),
+ DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public PGParameter this[string parameterName]
{
***************
*** 52,55 ****
--- 56,61 ----
}
+ [Browsable(false),
+ DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public PGParameter this[int parameterIndex]
{
***************
*** 60,63 ****
--- 66,77 ----
#endregion
+ #region CONSTRUCTORS
+
+ internal PGParameterCollection()
+ {
+ }
+
+ #endregion
+
#region ILIST_PROPERTIES
***************
*** 76,79 ****
--- 90,95 ----
#region ICOLLECTION_PROPERTIES
+ [Browsable(false),
+ DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public int Count
{
|