Commit Graph
8 Commits
Author SHA1 Message Date
Daniel Morgan 0410d300b8 2002-05-04 Daniel Morgan <[email protected]>
* System.Data.SqlClient/PostgresLibrary.cs
	* System.Data.SqlClient/SqlCommand.cs
	* System.Data.SqlClient/SqlConnection.cs
	* System.Data.SqlClient/SqlDataReader.cs
	oid should not be hard coded because they
	can change from one version of PostgreSQL
	to the next.  Use the typname's instead.
	The PostgreSQL type data retrieves
	at database connection time.  Any unimplemented
	types just default to string.  These were things
	suggested by Gonzalo.

	* Test/ReadPostgresData.cs - stuff
	* Test/TestSqlDataReader.cs - stuff

	* System.Data.SqlTypes/SqlInt32.cs - added a using

svn path=/trunk/mcs/; revision=4281
2002-05-04 20:23:29 +00:00
Daniel Morgan bf85f10d6b 2002-05-03 Daniel Morgan <[email protected]>
* System.Data.build: removed comments

	* System.Data.SqlClient/PostgresLibrary.cs: changed
	the hard-coded PostgreSQL oid type int's to using an
	enum.  Also, added PostgreSQL bpchar (character) type.

	* Test/TestSqlDataReader.cs: updated test
	to include new bpchar PostgreSQL type

svn path=/trunk/mcs/; revision=4260
2002-05-03 22:02:07 +00:00
Daniel Morgan 26625e0d8f 2002-05-03 Daniel Morgan <[email protected]>
* Test/TestExecuteScalar.cs: added test for
	method ExecuteScalar in class SqlCommand.

	* System.Data/DataColumnCollection.cs - it should
	inherit properties from base InternalDataCollectionBase
	and use them instead of overriding them, such as, List.

	* System.Data/DataColumn.cs
	* System.Data/DataTable.cs: tweaks to retrieve
	meta data from the database

	* System.Data.SqlClient/PostgresLibrary.cs -
	added method OidToType to convert PostgreSQL oid type
	to System.Type.  Renamed method OidTypeToSystem
	to ConvertPgTypeToSystem for converting the data value
	from a PostgreSQL type to a .NET System type.

	* System.Data.SqlClient/SqlCommand.cs: implemented
	method ExecuteReader which returns a SqlDataReader
	for a light forward only read only result set.
	It works on types int4 ==> Int32 and
	varchar ==> String.  Other types
	will come later.

	* System.Data.SqlClient/SqlConnection.cs: added comment

	* System.Data.SqlClient/SqlDataReader.cs: implemented
	class.  It works, but still lots to do.

	* Test/ReadPostgresData.cs: stuff

	* Test/TestSqlDataReader.cs: updated test for SqlDataReader
	to display meta data and the data

svn path=/trunk/mcs/; revision=4247
2002-05-03 05:16:20 +00:00
Daniel Morgan 1fee921ab8 2002-05-02 Daniel Morgan <[email protected]>
* 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
2002-05-02 07:23:41 +00:00
Daniel Morgan a9c683d500 2002-04-20 Daniel Morgan <[email protected]>
* System.Data.OleDb: added directory - for OleDb database
provider classes

* System.Data.SqlClient/SqlClientPermission.cs
* System.Data.SqlClient/SqlClientPermissionAttribute.cs
* System.Data.SqlClient/SqlCommandBuilder.cs
* System.Data.SqlClient/SqlInfoMessageEventHandler.cs
* System.Data.SqlClient/SqlRowUpdatedEventArgs.cs
* System.Data.SqlClient/SqlRowUpdatedEventHandler.cs
* System.Data.SqlClient/SqlRowUpdatingEventArgs.cs
* System.Data.SqlClient/SqlRowUpdatingEventHandler.cs
* Test/TestSqlException.cs
* Test/TestSqlIsolationLevel.cs: added - more tests

* System.Data.build: modified - added new files - excludes these too

* System.Data.SqlClient/PostgresLibrary.cs - modified - comment

* System.Data.SqlClient/SqlConnection.cs
* System.Data.SqlClient/SqlCommand.cs
* System.Data.SqlClient/SqlTransaction.cs
* System.Data.SqlClient/SqlException.cs
* System.Data.SqlClient/SqlErrorCollection.cs
* System.Data.SqlClient/SqlError.cs: modified - transaction and
  exception/error handling. SqlConnection(connectionString)
  constructor should not automatically connect.

* System.Data.SqlClient/SqlDataReader.cs
* System.Data.SqlClient/SqlDataAdapter.cs
* System.Data.SqlClient/SqlParameter.cs
* System.Data.SqlClient/SqlParameterCollection.cs: modified -
added using System.ComponentModel;

* Test/TestSqlInsert.cs: modified - to use transaction

svn path=/trunk/mcs/; revision=3933
2002-04-20 20:58:45 +00:00
Daniel Morgan 890650fbb5 2002-04-17 Daniel Morgan <[email protected]>
* Test/TestSqlInsert.cs: modified - do
	  a SQL DELETE before SQL INSERT of row so you can use this
	  test over and over.

	* System.Data.SqlClient/SqlTransaction.cs: modified - default
	  IsolationLevel for PostgreSQL is ReadCommitted.  However,
	  PostgreSQL allows Serializable as well.
      (Thanks to Gonzalo for that!)

	* System.Data.SqlClient/SqlConnection.cs: modified
	* System.Data.SqlClient/SqlCommand.cs: modified
	* System.Data.SqlClient/SqlTransaction.cs: modified - got transactions
	  working; however, we still need to implement SQL errors
	  and exceptions to properly handle transactions.  Also, added
	  status and error message support from the PostgreSQL database.
	  Currently, this does a Console.WriteLine() to display the
	  status and error messages, but this is a TODO
	  for SQL errors and exceptions.

	* System.Data/TODOAttribute.cs: added - needed MonoTODO
      attribute for System.Data.dll assembly

	* System.Data/IDbCommand.cs: modified - commented
	  overloaded method ExecuteReader
	  so System.Data.SqlClient.SqlCommand can compile

	* System.Data/IDbCommand.cs: modified
	* System.Data/IDbConnection.cs: modified - added using System;
	* System.Data/IDataParameter.cs

	* System.Data.build: modified - build classes
	  in System.Data.SqlClient and exclude others in System.Data

	* System.Data.SqlClient/PostgresLibrary.cs: modified - change
	  parameter data type from IntPtr to enum ExecStatusType

	* ChangeLog: modified - corrected previous entries in log

svn path=/trunk/mcs/; revision=3874
2002-04-17 10:57:14 +00:00
Daniel Morgan c1446e2b8d 2002-04-16 Daniel Morgan <[email protected]>
svn path=/trunk/mcs/; revision=3860
2002-04-16 13:02:57 +00:00
Rodrigo Moya 011da1207d 2002-04-14 Daniel Morgan <[email protected]>
* System.Data.SqlClient/PostgresLibrary.cs: new internal class, which
	contains all calls the the PostgreSQL client library, to be used
	everywhere in System.Data.SqlClient.

svn path=/trunk/mcs/; revision=3804
2002-04-14 12:12:45 +00:00