2002-05-02 Daniel Morgan <danmorg@sc.rr.com>
authorDaniel Morgan <monodanmorg@yahoo.com>
Thu, 2 May 2002 07:23:41 +0000 (07:23 -0000)
committerDaniel Morgan <monodanmorg@yahoo.com>
Thu, 2 May 2002 07:23:41 +0000 (07:23 -0000)
commit1fee921ab84301aa9a287de5ffa0333f64e338e7
tree56ab156d899c969bdcd8701b832b8730859c1478
parent614477fa7c560cfe7b0b536f40c19d173cc39b96
2002-05-02  Daniel Morgan <danmorg@sc.rr.com>

* System.Data.SqlClient/PostgresLibrary.cs: included new
internal class that will be a helper class in using
PostgreSQL.  PostgresLibrary is used for the
pinvoke methods to the PostgreSQL Client
native C library libpq while the class PostgresHelper
is used for wrapper or helper methods.  It currently only
has one static method OidTypeToSystem in converting
PostgreSQL types to .NET System.<type>s, such as,
a PostgreSQL int8 becomes a .NET System.Int64.
Only a few types have been added, such as, int2,
int4, int8, varchar, text, bool, and char.  Other types
will come later.

* System.Data.SqlClient/SqlCommand.cs: implemented
method ExecuteScalar which allows us to do aggregate
functions, such as, count, avg, min, max, and sum.  We
also are able to retrieve the result, convert it to the .NET type
as an object.  The user of the returned object must explicitly cast.

* Test/ReadPostgresData.cs: updated sample
to help us learn to retrieve data in System.Data.SqlClient
classes

svn path=/trunk/mcs/; revision=4217
mcs/class/Mono.Data.PostgreSqlClient/Mono.Data.PostgreSqlClient/PgSqlCommand.cs
mcs/class/Mono.Data.PostgreSqlClient/Mono.Data.PostgreSqlClient/PostgresLibrary.cs
mcs/class/Mono.Data.PostgreSqlClient/PgSqlCommand.cs
mcs/class/Mono.Data.PostgreSqlClient/PostgresLibrary.cs
mcs/class/System.Data/ChangeLog
mcs/class/System.Data/System.Data.SqlClient/PostgresLibrary.cs
mcs/class/System.Data/System.Data.SqlClient/SqlCommand.cs
mcs/class/System.Data/Test/ReadPostgresData.cs