[pgsqlclient-checkins] pgsqlclient/PostgreSql.Data.PGSqlClient/source AssemblyInfo.cs,1.1.1.1,1.2 PG
Status: Inactive
Brought to you by:
carlosga_fb
Update of /cvsroot/pgsqlclient/pgsqlclient/PostgreSql.Data.PGSqlClient/source In directory sc8-pr-cvs1:/tmp/cvs-serv1215 Modified Files: AssemblyInfo.cs PGCommand.cs PGCommandBuilder.cs PGConnection.cs PGConnectionPool.cs PGDataAdapter.cs PGDataReader.cs PGDbConnection.cs PGDbSchemaType.cs PGDbType.cs PGError.cs PGErrorCollection.cs PGException.cs PGInfoMessageEventArgs.cs PGNotificationEventArgs.cs PGParameter.cs PGParameterCollection.cs PGRowUpdatedEventArgs.cs PGRowUpdatingEventArgs.cs PGTransaction.cs Log Message: * Changed casing of all classes from PGXXX to PgXXX to follow MS guidelines. Index: AssemblyInfo.cs =================================================================== RCS file: /cvsroot/pgsqlclient/pgsqlclient/PostgreSql.Data.PGSqlClient/source/AssemblyInfo.cs,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** AssemblyInfo.cs 12 Jul 2003 08:11:20 -0000 1.1.1.1 --- AssemblyInfo.cs 2 Aug 2003 19:13:09 -0000 1.2 *************** *** 1,3 **** ! /* PGSqlClient - ADO.NET Data Provider for PostgreSQL 7.4+ * Copyright (C) 2003 Carlos Guzmán Álvarez * --- 1,3 ---- ! /* PgSqlClient - ADO.NET Data Provider for PostgreSQL 7.4+ * Copyright (C) 2003 Carlos Guzmán Álvarez * *************** *** 26,30 **** [assembly: AssemblyConfiguration("")] [assembly: AssemblyCompany("")] ! [assembly: AssemblyProduct("PGSqlClient - ADO.NET Data provider for PostgreSQL 7.4+")] [assembly: AssemblyCopyright("2003 - Carlos Guzmán Álvarez")] [assembly: AssemblyTrademark("")] --- 26,30 ---- [assembly: AssemblyConfiguration("")] [assembly: AssemblyCompany("")] ! [assembly: AssemblyProduct("PgSqlClient - ADO.NET Data provider for PostgreSQL 7.4+")] [assembly: AssemblyCopyright("2003 - Carlos Guzmán Álvarez")] [assembly: AssemblyTrademark("")] *************** *** 32,36 **** [assembly: AssemblyVersion("1.0.*")] [assembly: AssemblyDelaySign(false)] ! [assembly: AssemblyKeyFile("PostgreSql.Data.PGSqlClient.snk")] [assembly: AssemblyKeyName("")] [assembly: CLSCompliant(true)] --- 32,36 ---- [assembly: AssemblyVersion("1.0.*")] [assembly: AssemblyDelaySign(false)] ! [assembly: AssemblyKeyFile("PostgreSql.Data.PgSqlClient.snk")] [assembly: AssemblyKeyName("")] [assembly: CLSCompliant(true)] Index: PGCommand.cs =================================================================== RCS file: /cvsroot/pgsqlclient/pgsqlclient/PostgreSql.Data.PGSqlClient/source/PGCommand.cs,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** PGCommand.cs 31 Jul 2003 10:54:40 -0000 1.7 --- PGCommand.cs 2 Aug 2003 19:13:09 -0000 1.8 *************** *** 1,3 **** ! /* PGSqlClient - ADO.NET Data Provider for PostgreSQL 7.4+ * Copyright (C) 2003 Carlos Guzmán Álvarez * --- 1,3 ---- ! /* PgSqlClient - ADO.NET Data Provider for PostgreSQL 7.4+ * Copyright (C) 2003 Carlos Guzmán Álvarez * *************** *** 24,39 **** using System.Text.RegularExpressions; ! using PostgreSql.Data.NPGClient; ! namespace PostgreSql.Data.PGSqlClient { ! [ToolboxBitmap(typeof(PGCommand), "Resources.ToolBox.PGCommand.bmp")] ! public sealed class PGCommand : Component, IDbCommand, ICloneable { #region FIELDS ! private PGConnection connection; ! private PGTransaction transaction; ! private PGParameterCollection parameters; private UpdateRowSource updatedRowSource; private CommandBehavior commandBehavior; --- 24,39 ---- using System.Text.RegularExpressions; ! using PostgreSql.Data.NPgClient; ! namespace PostgreSql.Data.PgSqlClient { ! [ToolboxBitmap(typeof(PgCommand), "Resources.ToolBox.PgCommand.bmp")] ! public sealed class PgCommand : Component, IDbCommand, ICloneable { #region FIELDS ! private PgConnection connection; ! private PgTransaction transaction; ! private PgParameterCollection parameters; private UpdateRowSource updatedRowSource; private CommandBehavior commandBehavior; *************** *** 46,50 **** private MatchCollection namedParameters; ! private PGStatement statement; #endregion --- 46,50 ---- private MatchCollection namedParameters; ! private PgStatement statement; #endregion *************** *** 99,107 **** { get { return Connection; } ! set { Connection = (PGConnection)value; } } [Category("Behavior"), DefaultValue(null)] ! public PGConnection Connection { get { return connection; } --- 99,107 ---- { get { return Connection; } ! set { Connection = (PgConnection)value; } } [Category("Behavior"), DefaultValue(null)] ! public PgConnection Connection { get { return connection; } *************** *** 142,146 **** [Category("Data"), DesignerSerializationVisibility(DesignerSerializationVisibility.Content)] ! public PGParameterCollection Parameters { get { return parameters; } --- 142,146 ---- [Category("Data"), DesignerSerializationVisibility(DesignerSerializationVisibility.Content)] ! public PgParameterCollection Parameters { get { return parameters; } *************** *** 150,154 **** { get { return Transaction; } ! set { Transaction = (PGTransaction)value; } } --- 150,154 ---- { get { return Transaction; } ! set { Transaction = (PgTransaction)value; } } *************** *** 156,160 **** DataSysDescription("Tansaction context used by the command."), DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)] ! public PGTransaction Transaction { get { return transaction; } --- 156,160 ---- DataSysDescription("Tansaction context used by the command."), DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)] ! public PgTransaction Transaction { get { return transaction; } *************** *** 184,188 **** } ! internal PGStatement Statement { get { return statement; } --- 184,188 ---- } ! internal PgStatement Statement { get { return statement; } *************** *** 198,202 **** #region CONSTRUCTORS ! public PGCommand() { commandText = String.Empty; --- 198,202 ---- #region CONSTRUCTORS ! public PgCommand() { commandText = String.Empty; *************** *** 206,222 **** commandBehavior = CommandBehavior.Default; designTimeVisible = true; ! parameters = new PGParameterCollection(); search = new Regex("(@([a-zA-Z-$][a-zA-Z0-9_$]*))"); } ! public PGCommand(string cmdText) : this(cmdText, null, null) { } ! public PGCommand(string cmdText, PGConnection connection) : this(cmdText, connection, null) { } ! public PGCommand(string cmdText, PGConnection connection, PGTransaction transaction) : this() { CommandText = cmdText; --- 206,222 ---- commandBehavior = CommandBehavior.Default; designTimeVisible = true; ! parameters = new PgParameterCollection(); search = new Regex("(@([a-zA-Z-$][a-zA-Z0-9_$]*))"); } ! public PgCommand(string cmdText) : this(cmdText, null, null) { } ! public PgCommand(string cmdText, PgConnection connection) : this(cmdText, connection, null) { } ! public PgCommand(string cmdText, PgConnection connection, PgTransaction transaction) : this() { CommandText = cmdText; *************** *** 268,272 **** object ICloneable.Clone() { ! PGCommand command = new PGCommand(CommandText, Connection, Transaction); command.CommandType = commandType; --- 268,272 ---- object ICloneable.Clone() { ! PgCommand command = new PgCommand(CommandText, Connection, Transaction); command.CommandType = commandType; *************** *** 288,294 **** } ! public PGParameter CreateParameter() { ! return new PGParameter(); } --- 288,294 ---- } ! public PgParameter CreateParameter() { ! return new PgParameter(); } *************** *** 332,341 **** } ! public PGDataReader ExecuteReader() { return ExecuteReader(CommandBehavior.Default); } ! public PGDataReader ExecuteReader(CommandBehavior behavior) { if (Connection == null || Connection.State != ConnectionState.Open) --- 332,341 ---- } ! public PgDataReader ExecuteReader() { return ExecuteReader(CommandBehavior.Default); } ! public PgDataReader ExecuteReader(CommandBehavior behavior) { if (Connection == null || Connection.State != ConnectionState.Open) *************** *** 370,374 **** } ! return new PGDataReader(this); } --- 370,374 ---- } ! return new PgDataReader(this); } *************** *** 442,448 **** } } ! catch (PGClientException ex) { ! throw new PGException(ex.Message, ex); } --- 442,448 ---- } } ! catch (PgClientException ex) { ! throw new PgException(ex.Message, ex); } *************** *** 458,463 **** try { ! if (statement == null || statement.Status == PGStatementStatus.Initial || ! statement.Status == PGStatementStatus.Error) { if (commandType == CommandType.StoredProcedure && --- 458,463 ---- try { ! if (statement == null || statement.Status == PgStatementStatus.Initial || ! statement.Status == PgStatementStatus.Error) { if (commandType == CommandType.StoredProcedure && *************** *** 493,499 **** } } ! catch (PGClientException ex) { ! throw new PGException(ex.Message, ex); } } --- 493,499 ---- } } ! catch (PgClientException ex) { ! throw new PgException(ex.Message, ex); } } *************** *** 515,521 **** statement.Execute(); } ! catch (PGClientException ex) { ! throw new PGException(ex.Message, ex); } } --- 515,521 ---- statement.Execute(); } ! catch (PgClientException ex) { ! throw new PgException(ex.Message, ex); } } *************** *** 528,534 **** statement.Query(); } ! catch (PGClientException ex) { ! throw new PGException(ex.Message, ex); } } --- 528,534 ---- statement.Query(); } ! catch (PgClientException ex) { ! throw new PgException(ex.Message, ex); } } *************** *** 544,550 **** statement = null; } ! catch (PGClientException ex) { ! throw new PGException(ex.Message, ex); } } --- 544,550 ---- statement = null; } ! catch (PgClientException ex) { ! throw new PgException(ex.Message, ex); } } *************** *** 569,576 **** while (paramEnumerator.MoveNext()) { ! if (((PGParameter)paramEnumerator.Current).Direction == ParameterDirection.Output || ! ((PGParameter)paramEnumerator.Current).Direction == ParameterDirection.ReturnValue) { ! ((PGParameter)paramEnumerator.Current).Value = values[i]; i++; } --- 569,576 ---- while (paramEnumerator.MoveNext()) { ! if (((PgParameter)paramEnumerator.Current).Direction == ParameterDirection.Output || ! ((PgParameter)paramEnumerator.Current).Direction == ParameterDirection.ReturnValue) { ! ((PgParameter)paramEnumerator.Current).Value = values[i]; i++; } Index: PGCommandBuilder.cs =================================================================== RCS file: /cvsroot/pgsqlclient/pgsqlclient/PostgreSql.Data.PGSqlClient/source/PGCommandBuilder.cs,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** PGCommandBuilder.cs 30 Jul 2003 18:54:56 -0000 1.6 --- PGCommandBuilder.cs 2 Aug 2003 19:13:09 -0000 1.7 *************** *** 1,3 **** ! /* PGSqlClient - ADO.NET Data Provider for PostgreSQL 7.4+ * Copyright (C) 2003 Carlos Guzmán Álvarez * --- 1,3 ---- ! /* PgSqlClient - ADO.NET Data Provider for PostgreSQL 7.4+ * Copyright (C) 2003 Carlos Guzmán Álvarez * *************** *** 23,41 **** using System.ComponentModel; ! using PostgreSql.Data.NPGClient; ! namespace PostgreSql.Data.PGSqlClient { ! public sealed class PGCommandBuilder : Component { #region FIELDS ! private PGDataAdapter dataAdapter; private string sqlInsert; private string sqlUpdate; private string sqlDelete; ! private PGCommand insertCommand; ! private PGCommand updateCommand; ! private PGCommand deleteCommand; private string whereClausule; private string setClausule; --- 23,41 ---- using System.ComponentModel; ! using PostgreSql.Data.NPgClient; ! namespace PostgreSql.Data.PgSqlClient { ! public sealed class PgCommandBuilder : Component { #region FIELDS ! private PgDataAdapter dataAdapter; private string sqlInsert; private string sqlUpdate; private string sqlDelete; ! private PgCommand insertCommand; ! private PgCommand updateCommand; ! private PgCommand deleteCommand; private string whereClausule; private string setClausule; *************** *** 53,57 **** [DefaultValue(null)] ! public PGDataAdapter DataAdapter { get { return dataAdapter; } --- 53,57 ---- [DefaultValue(null)] ! public PgDataAdapter DataAdapter { get { return dataAdapter; } *************** *** 61,68 **** // Registers the CommandBuilder as a listener for RowUpdating events that are ! // generated by the PGDataAdapter specified in this property. if (dataAdapter != null) { ! dataAdapter.RowUpdating += new PGRowUpdatingEventHandler(rowUpdatingHandler); } } --- 61,68 ---- // Registers the CommandBuilder as a listener for RowUpdating events that are ! // generated by the PgDataAdapter specified in this property. if (dataAdapter != null) { ! dataAdapter.RowUpdating += new PgRowUpdatingEventHandler(rowUpdatingHandler); } } *************** *** 101,105 **** } ! private PGCommand selectCommand { get --- 101,105 ---- } ! private PgCommand selectCommand { get *************** *** 118,122 **** #region CONSTRUCTORS ! public PGCommandBuilder() { sqlInsert = "INSERT INTO {0} ({1}) VALUES ({2})"; --- 118,122 ---- #region CONSTRUCTORS ! public PgCommandBuilder() { sqlInsert = "INSERT INTO {0} ({1}) VALUES ({2})"; *************** *** 129,133 **** } ! public PGCommandBuilder(PGDataAdapter adapter) : this() { this.DataAdapter = adapter; --- 129,133 ---- } ! public PgCommandBuilder(PgDataAdapter adapter) : this() { this.DataAdapter = adapter; *************** *** 138,142 **** #region DESTRUCTORS ! ~PGCommandBuilder() { Dispose(false); --- 138,142 ---- #region DESTRUCTORS ! ~PgCommandBuilder() { Dispose(false); *************** *** 184,188 **** #region STATIC_METHODS ! public static void DeriveParameters(PGCommand command) { if (command.CommandType != CommandType.StoredProcedure) --- 184,188 ---- #region STATIC_METHODS ! public static void DeriveParameters(PgCommand command) { if (command.CommandType != CommandType.StoredProcedure) *************** *** 201,207 **** for (int i = 0; i < command.Statement.Parameters.Length; i++) { ! PGType type = command.Statement.Parameters[i].DataType; ! PGParameter parameter = new PGParameter(); parameter.ParameterName = "@ip" + i.ToString(); parameter.DbType = type.DbType; --- 201,207 ---- for (int i = 0; i < command.Statement.Parameters.Length; i++) { ! PgType type = command.Statement.Parameters[i].DataType; ! PgParameter parameter = new PgParameter(); parameter.ParameterName = "@ip" + i.ToString(); parameter.DbType = type.DbType; *************** *** 218,224 **** for (int i = 0; i < command.Statement.RowDescriptor.Fields.Length; i++) { ! PGType type = command.Statement.RowDescriptor.Fields[i].DataType; ! PGParameter parameter = new PGParameter(); parameter.ParameterName = "@ip" + i.ToString(); parameter.DbType = type.DbType; --- 218,224 ---- for (int i = 0; i < command.Statement.RowDescriptor.Fields.Length; i++) { ! PgType type = command.Statement.RowDescriptor.Fields[i].DataType; ! PgParameter parameter = new PgParameter(); parameter.ParameterName = "@ip" + i.ToString(); parameter.DbType = type.DbType; *************** *** 235,239 **** #region METHODS ! public PGCommand GetInsertCommand() { if (insertCommand == null) --- 235,239 ---- #region METHODS ! public PgCommand GetInsertCommand() { if (insertCommand == null) *************** *** 246,250 **** } ! public PGCommand GetUpdateCommand() { if (updateCommand == null) --- 246,250 ---- } ! public PgCommand GetUpdateCommand() { if (updateCommand == null) *************** *** 257,261 **** } ! public PGCommand GetDeleteCommand() { if (deleteCommand == null) --- 257,261 ---- } ! public PgCommand GetDeleteCommand() { if (deleteCommand == null) *************** *** 280,284 **** #region BUILD_COMMAND_METHODS ! private PGCommand buildInsertCommand(DataRow row, DataTableMapping tableMapping) { StringBuilder sql = new StringBuilder(); --- 280,284 ---- #region BUILD_COMMAND_METHODS ! private PgCommand buildInsertCommand(DataRow row, DataTableMapping tableMapping) { StringBuilder sql = new StringBuilder(); *************** *** 287,291 **** string dsColumnName = String.Empty; ! insertCommand = new PGCommand(sql.ToString(), selectCommand.Connection, selectCommand.Transaction); int i = 0; --- 287,291 ---- string dsColumnName = String.Empty; ! insertCommand = new PgCommand(sql.ToString(), selectCommand.Connection, selectCommand.Transaction); int i = 0; *************** *** 309,313 **** values.Append("@param_" + i.ToString()); ! PGParameter parameter = createParameter(schemaRow, i, false); if (tableMapping != null) --- 309,313 ---- values.Append("@param_" + i.ToString()); ! PgParameter parameter = createParameter(schemaRow, i, false); if (tableMapping != null) *************** *** 348,352 **** } ! private PGCommand buildUpdateCommand(DataRow row, DataTableMapping tableMapping) { StringBuilder sql = new StringBuilder(); --- 348,352 ---- } ! private PgCommand buildUpdateCommand(DataRow row, DataTableMapping tableMapping) { StringBuilder sql = new StringBuilder(); *************** *** 360,364 **** } ! updateCommand = new PGCommand(sql.ToString(), selectCommand.Connection, selectCommand.Transaction); int i = 0; --- 360,364 ---- } ! updateCommand = new PgCommand(sql.ToString(), selectCommand.Connection, selectCommand.Transaction); int i = 0; *************** *** 377,381 **** "@param_" + i.ToString()); ! PGParameter parameter = createParameter(schemaRow, i, false); if (tableMapping != null) --- 377,381 ---- "@param_" + i.ToString()); ! PgParameter parameter = createParameter(schemaRow, i, false); if (tableMapping != null) *************** *** 420,424 **** "@param_" + i.ToString()); ! PGParameter parameter = createParameter(schemaRow, i, true); if (tableMapping != null) --- 420,424 ---- "@param_" + i.ToString()); ! PgParameter parameter = createParameter(schemaRow, i, true); if (tableMapping != null) *************** *** 459,463 **** } ! private PGCommand buildDeleteCommand(DataRow row, DataTableMapping tableMapping) { StringBuilder sql = new StringBuilder(); --- 459,463 ---- } ! private PgCommand buildDeleteCommand(DataRow row, DataTableMapping tableMapping) { StringBuilder sql = new StringBuilder(); *************** *** 470,474 **** } ! deleteCommand = new PGCommand(sql.ToString(), selectCommand.Connection, selectCommand.Transaction); // Build where clausule --- 470,474 ---- } ! deleteCommand = new PgCommand(sql.ToString(), selectCommand.Connection, selectCommand.Transaction); // Build where clausule *************** *** 487,491 **** "@param_" + i.ToString()); ! PGParameter parameter = createParameter(schemaRow, i, true); if (tableMapping != null) --- 487,491 ---- "@param_" + i.ToString()); ! PgParameter parameter = createParameter(schemaRow, i, true); if (tableMapping != null) *************** *** 526,532 **** } ! private PGParameter createParameter(DataRow schemaRow, int index, bool isWhereParameter) { ! PGParameter parameter = new PGParameter(String.Format("@param_{0}", index), (PGDbType)schemaRow["ProviderType"]); parameter.Size = Convert.ToInt32(schemaRow["ColumnSize"]); --- 526,532 ---- } ! private PgParameter createParameter(DataRow schemaRow, int index, bool isWhereParameter) { ! PgParameter parameter = new PgParameter(String.Format("@param_{0}", index), (PgDbType)schemaRow["ProviderType"]); parameter.Size = Convert.ToInt32(schemaRow["ColumnSize"]); *************** *** 625,629 **** if (schemaTable == null) { ! PGDataReader reader = selectCommand.ExecuteReader(CommandBehavior.SchemaOnly); schemaTable = reader.GetSchemaTable(); reader.Close(); --- 625,629 ---- if (schemaTable == null) { ! PgDataReader reader = selectCommand.ExecuteReader(CommandBehavior.SchemaOnly); schemaTable = reader.GetSchemaTable(); reader.Close(); *************** *** 670,674 **** #region EVENT_HANDLER ! private void rowUpdatingHandler(object sender, PGRowUpdatingEventArgs e) { if (e.Status != UpdateStatus.Continue) --- 670,674 ---- #region EVENT_HANDLER ! private void rowUpdatingHandler(object sender, PgRowUpdatingEventArgs e) { if (e.Status != UpdateStatus.Continue) Index: PGConnection.cs =================================================================== RCS file: /cvsroot/pgsqlclient/pgsqlclient/PostgreSql.Data.PGSqlClient/source/PGConnection.cs,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** PGConnection.cs 1 Aug 2003 17:51:19 -0000 1.6 --- PGConnection.cs 2 Aug 2003 19:13:09 -0000 1.7 *************** *** 1,3 **** ! /* PGSqlClient - ADO.NET Data Provider for PostgreSQL 7.4+ * Copyright (C) 2003 Carlos Guzmán Álvarez * --- 1,3 ---- ! /* PgSqlClient - ADO.NET Data Provider for PostgreSQL 7.4+ * Copyright (C) 2003 Carlos Guzmán Álvarez * *************** *** 23,40 **** using System.Collections; using System.ComponentModel; ! using PostgreSql.Data.NPGClient; ! using PostgreSql.Data.PGSqlClient.DbSchema; ! namespace PostgreSql.Data.PGSqlClient { ! [ToolboxBitmap(typeof(PGConnection), "Resources.ToolBox.PGConnection.bmp")] [DefaultEvent("InfoMessage")] ! public sealed class PGConnection : Component, IDbConnection, ICloneable { #region EVENTS public event StateChangeEventHandler StateChange; ! public event PGInfoMessageEventHandler InfoMessage; ! public event PGNotificationEventHandler Notification; #endregion --- 23,40 ---- using System.Collections; using System.ComponentModel; ! using PostgreSql.Data.NPgClient; ! using PostgreSql.Data.PgSqlClient.DbSchema; ! namespace PostgreSql.Data.PgSqlClient { ! [ToolboxBitmap(typeof(PgConnection), "Resources.ToolBox.PgConnection.bmp")] [DefaultEvent("InfoMessage")] ! public sealed class PgConnection : Component, IDbConnection, ICloneable { #region EVENTS public event StateChangeEventHandler StateChange; ! public event PgInfoMessageEventHandler InfoMessage; ! public event PgNotificationEventHandler Notification; #endregion *************** *** 42,55 **** #region FIELDS ! private PGDbConnection dbConnection; private ConnectionState state; private bool disposed; private string connectionString; ! private PGDataReader dataReader; ! private PGTransaction activeTxn; private ArrayList activeCommands; ! private PGClientMessageEventHandler infoMessageHandler; ! private PGClientNotificationEventHandler notificationHandler; #endregion --- 42,55 ---- #region FIELDS ! private PgDbConnection dbConnection; private ConnectionState state; private bool disposed; private string connectionString; ! private PgDataReader dataReader; ! private PgTransaction activeTxn; private ArrayList activeCommands; ! private PgClientMessageEventHandler infoMessageHandler; ! private PgClientNotificationEventHandler notificationHandler; #endregion *************** *** 69,73 **** if (state == ConnectionState.Closed) { ! PGDbConnection tmpConn = new PGDbConnection(value); connectionString = value; tmpConn = null; --- 69,73 ---- if (state == ConnectionState.Closed) { ! PgDbConnection tmpConn = new PgDbConnection(value); connectionString = value; tmpConn = null; *************** *** 168,172 **** } ! internal PGDataReader DataReader { get { return dataReader; } --- 168,172 ---- } ! internal PgDataReader DataReader { get { return dataReader; } *************** *** 174,178 **** } ! internal PGDbConnection DbConnection { get { return dbConnection; } --- 174,178 ---- } ! internal PgDbConnection DbConnection { get { return dbConnection; } *************** *** 184,188 **** #region CONSTRUCTORS ! public PGConnection() { state = ConnectionState.Closed; --- 184,188 ---- #region CONSTRUCTORS ! public PgConnection() { state = ConnectionState.Closed; *************** *** 190,194 **** } ! public PGConnection(string connString) : this() { this.ConnectionString = connString; --- 190,194 ---- } ! public PgConnection(string connString) : this() { this.ConnectionString = connString; *************** *** 236,240 **** object ICloneable.Clone() { ! return new PGConnection(ConnectionString); } --- 236,240 ---- object ICloneable.Clone() { ! return new PgConnection(ConnectionString); } *************** *** 253,257 **** } ! public PGTransaction BeginTransaction() { if (state == ConnectionState.Closed) --- 253,257 ---- } ! public PgTransaction BeginTransaction() { if (state == ConnectionState.Closed) *************** *** 272,281 **** try { ! activeTxn = new PGTransaction(this); activeTxn.InternalBeginTransaction(); } ! catch (PGClientException ex) { ! throw new PGException(ex.Message, ex); } --- 272,281 ---- try { ! activeTxn = new PgTransaction(this); activeTxn.InternalBeginTransaction(); } ! catch (PgClientException ex) { ! throw new PgException(ex.Message, ex); } *************** *** 283,287 **** } ! public PGTransaction BeginTransaction(IsolationLevel level) { if (state == ConnectionState.Closed) --- 283,287 ---- } ! public PgTransaction BeginTransaction(IsolationLevel level) { if (state == ConnectionState.Closed) *************** *** 302,311 **** try { ! activeTxn = new PGTransaction(this, level); activeTxn.InternalBeginTransaction(); } ! catch (PGClientException ex) { ! throw new PGException(ex.Message, ex); } --- 302,311 ---- try { ! activeTxn = new PgTransaction(this, level); activeTxn.InternalBeginTransaction(); } ! catch (PgClientException ex) { ! throw new PgException(ex.Message, ex); } *************** *** 343,347 **** this.Open(); } ! catch (PGException ex) { this.dbConnection.Settings.Database = oldDb; --- 343,347 ---- this.Open(); } ! catch (PgException ex) { this.dbConnection.Settings.Database = oldDb; *************** *** 361,369 **** state = ConnectionState.Connecting; ! dbConnection = new PGDbConnection(connectionString); if (dbConnection.Settings.Pooling) { ! dbConnection = PGConnectionPool.GetConnection(connectionString); } else --- 361,369 ---- state = ConnectionState.Connecting; ! dbConnection = new PgDbConnection(connectionString); if (dbConnection.Settings.Pooling) { ! dbConnection = PgConnectionPool.GetConnection(connectionString); } else *************** *** 384,398 **** // Add Info message event handler ! infoMessageHandler = new PGClientMessageEventHandler(OnInfoMessage); dbConnection.DB.InfoMessage += infoMessageHandler; // Add notification event handler ! notificationHandler = new PGClientNotificationEventHandler(OnNotification); dbConnection.DB.Notification += notificationHandler; } ! catch (PGClientException ex) { state = ConnectionState.Closed; ! throw new PGException(ex.Message, ex); } } --- 384,398 ---- // Add Info message event handler ! infoMessageHandler = new PgClientMessageEventHandler(OnInfoMessage); dbConnection.DB.InfoMessage += infoMessageHandler; // Add notification event handler ! notificationHandler = new PgClientNotificationEventHandler(OnNotification); dbConnection.DB.Notification += notificationHandler; } ! catch (PgClientException ex) { state = ConnectionState.Closed; ! throw new PgException(ex.Message, ex); } } *************** *** 432,436 **** if (dbConnection.Pooled) { ! PGConnectionPool.FreeConnection(dbConnection); } else --- 432,436 ---- if (dbConnection.Pooled) { ! PgConnectionPool.FreeConnection(dbConnection); } else *************** *** 450,456 **** } } ! catch (PGClientException ex) { ! throw new PGException(ex.Message, ex); } } --- 450,456 ---- } } ! catch (PgClientException ex) { ! throw new PgException(ex.Message, ex); } } *************** *** 462,468 **** } ! public PGCommand CreateCommand() { ! PGCommand command = new PGCommand(); command.Connection = this; --- 462,468 ---- } ! public PgCommand CreateCommand() { ! PgCommand command = new PgCommand(); command.Connection = this; *************** *** 477,484 **** if (activeCommands.Count > 0) { ! PGCommand[] commands = new PGCommand[activeCommands.Count]; activeCommands.CopyTo(0, commands, 0, commands.Length); ! foreach (PGCommand command in commands) { command.Dispose(); --- 477,484 ---- if (activeCommands.Count > 0) { ! PgCommand[] commands = new PgCommand[activeCommands.Count]; activeCommands.CopyTo(0, commands, 0, commands.Length); ! foreach (PgCommand command in commands) { command.Dispose(); *************** *** 493,497 **** } ! public DataTable GetDbSchemaTable(PGDbSchemaType schema, object[] restrictions) { if (DataReader != null) --- 493,497 ---- } ! public DataTable GetDbSchemaTable(PgDbSchemaType schema, object[] restrictions) { if (DataReader != null) *************** *** 500,504 **** } ! IDbSchema dbSchema = PGDbSchemaFactory.GetSchema(schema); if (dbSchema == null) --- 500,504 ---- } ! IDbSchema dbSchema = PgDbSchemaFactory.GetSchema(schema); if (dbSchema == null) *************** *** 561,589 **** // Create database ! PGCommand command = new PGCommand(commandText.ToString(), this); command.ExecuteNonQuery(); command.Dispose(); } } ! catch (PGClientException ex) { ! throw new PGException(ex.Message, ex); } } ! private void OnInfoMessage(object sender, PGClientMessageEventArgs e) { if (InfoMessage != null) { ! InfoMessage(this, new PGInfoMessageEventArgs(e.Exception)); } } ! private void OnNotification(object sender, PGClientNotificationEventArgs e) { if (Notification != null) { Notification(this, ! new PGNotificationEventArgs( e.ProcessID, e.Condition, --- 561,589 ---- // Create database ! PgCommand command = new PgCommand(commandText.ToString(), this); command.ExecuteNonQuery(); command.Dispose(); } } ! catch (PgClientException ex) { ! throw new PgException(ex.Message, ex); } } ! private void OnInfoMessage(object sender, PgClientMessageEventArgs e) { if (InfoMessage != null) { ! InfoMessage(this, new PgInfoMessageEventArgs(e.Exception)); } } ! private void OnNotification(object sender, PgClientNotificationEventArgs e) { if (Notification != null) { Notification(this, ! new PgNotificationEventArgs( e.ProcessID, e.Condition, Index: PGConnectionPool.cs =================================================================== RCS file: /cvsroot/pgsqlclient/pgsqlclient/PostgreSql.Data.PGSqlClient/source/PGConnectionPool.cs,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** PGConnectionPool.cs 20 Jul 2003 09:58:57 -0000 1.2 --- PGConnectionPool.cs 2 Aug 2003 19:13:09 -0000 1.3 *************** *** 1,3 **** ! /* PGSqlClient - ADO.NET Data Provider for PostgreSQL 7.4+ * Copyright (C) 2003 Carlos Guzmán Álvarez * --- 1,3 ---- ! /* PgSqlClient - ADO.NET Data Provider for PostgreSQL 7.4+ * Copyright (C) 2003 Carlos Guzmán Álvarez * *************** *** 21,33 **** using System.Collections; using System.Threading; ! using PostgreSql.Data.NPGClient; ! namespace PostgreSql.Data.PGSqlClient { ! internal class PGConnectionPool : MarshalByRefObject { #region FIELDS ! private static PGPoolManager pool = null; #endregion --- 21,33 ---- using System.Collections; using System.Threading; ! using PostgreSql.Data.NPgClient; ! namespace PostgreSql.Data.PgSqlClient { ! internal class PgConnectionPool : MarshalByRefObject { #region FIELDS ! private static PgPoolManager pool = null; #endregion *************** *** 39,54 **** if (pool == null) { ! pool = new PGPoolManager(); } } ! public static PGDbConnection GetConnection(string connectionString) { Initialize(); ! return ((PGDbConnection)pool.CheckOut(connectionString)); } ! public static void FreeConnection(PGDbConnection c) { pool.CheckIn(c); --- 39,54 ---- if (pool == null) { ! pool = new PgPoolManager(); } } ! public static PgDbConnection GetConnection(string connectionString) { Initialize(); ! return ((PgDbConnection)pool.CheckOut(connectionString)); } ! public static void FreeConnection(PgDbConnection c) { pool.CheckIn(c); *************** *** 58,62 **** } ! internal class PGPoolManager { #region FIELDS --- 58,62 ---- } ! internal class PgPoolManager { #region FIELDS *************** *** 70,74 **** #region CONSTRUCTORS ! public PGPoolManager() { locked = ArrayList.Synchronized(new ArrayList()); --- 70,74 ---- #region CONSTRUCTORS ! public PgPoolManager() { locked = ArrayList.Synchronized(new ArrayList()); *************** *** 85,101 **** #region METHODS ! public PGDbConnection CheckOut(string connectionString) { ! PGDbConnection newConnection = null; long now = System.DateTime.Now.Ticks; ! lock (typeof(PGConnectionPool)) { if (unlocked.Count > 0) { ! PGDbConnection[] list = new PGDbConnection[unlocked.Count]; unlocked.CopyTo(0, list, 0, list.Length); ! foreach(PGDbConnection connection in list) { if (Validate(connection, connectionString)) --- 85,101 ---- #region METHODS ! public PgDbConnection CheckOut(string connectionString) { ! PgDbConnection newConnection = null; long now = System.DateTime.Now.Ticks; ! lock (typeof(PgConnectionPool)) { if (unlocked.Count > 0) { ! PgDbConnection[] list = new PgDbConnection[unlocked.Count]; unlocked.CopyTo(0, list, 0, list.Length); ! foreach(PgDbConnection connection in list) { if (Validate(connection, connectionString)) *************** *** 141,147 **** } ! public void CheckIn(PGDbConnection connection) { ! lock (typeof(PGDbConnection)) { connection.Created = System.DateTime.Now.Ticks; --- 141,147 ---- } ! public void CheckIn(PgDbConnection connection) { ! lock (typeof(PgDbConnection)) { connection.Created = System.DateTime.Now.Ticks; *************** *** 164,172 **** } ! private PGDbConnection Create(string connectionString) { try { ! PGDbConnection connection = new PGDbConnection(connectionString); connection.Connect(); connection.Pooled = true; --- 164,172 ---- } ! private PgDbConnection Create(string connectionString) { try { ! PgDbConnection connection = new PgDbConnection(connectionString); connection.Connect(); connection.Pooled = true; *************** *** 174,178 **** return connection; } ! catch (PGClientException ex) { throw ex; --- 174,178 ---- return connection; } ! catch (PgClientException ex) { throw ex; *************** *** 180,184 **** } ! private bool Validate(PGDbConnection connection, string connectionString) { try --- 180,184 ---- } ! private bool Validate(PgDbConnection connection, string connectionString) { try *************** *** 193,197 **** } ! private void Expire(PGDbConnection connection) { try --- 193,197 ---- } ! private void Expire(PgDbConnection connection) { try *************** *** 204,208 **** catch (Exception) { ! throw new PGException("Error closing database connection."); } } --- 204,208 ---- catch (Exception) { ! throw new PgException("Error closing database connection."); } } *************** *** 216,223 **** if (unlocked.Count > 0) { ! PGDbConnection[] list = new PGDbConnection[unlocked.Count]; unlocked.CopyTo(0, list, 0, list.Length); ! foreach (PGDbConnection connection in list) { if (connection.Lifetime != 0) --- 216,223 ---- if (unlocked.Count > 0) { ! PgDbConnection[] list = new PgDbConnection[unlocked.Count]; unlocked.CopyTo(0, list, 0, list.Length); ! foreach (PgDbConnection connection in list) { if (connection.Lifetime != 0) Index: PGDataAdapter.cs =================================================================== RCS file: /cvsroot/pgsqlclient/pgsqlclient/PostgreSql.Data.PGSqlClient/source/PGDataAdapter.cs,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** PGDataAdapter.cs 31 Jul 2003 10:54:40 -0000 1.5 --- PGDataAdapter.cs 2 Aug 2003 19:13:09 -0000 1.6 *************** *** 1,3 **** ! /* PGSqlClient - ADO.NET Data Provider for PostgreSQL 7.4+ * Copyright (C) 2003 Carlos Guzmán Álvarez * --- 1,3 ---- ! /* PgSqlClient - ADO.NET Data Provider for PostgreSQL 7.4+ * Copyright (C) 2003 Carlos Guzmán Álvarez * *************** *** 24,39 **** using System.ComponentModel.Design; ! namespace PostgreSql.Data.PGSqlClient { #region DELEGATES ! public delegate void PGRowUpdatedEventHandler(object sender, PGRowUpdatedEventArgs e); ! public delegate void PGRowUpdatingEventHandler(object sender, PGRowUpdatingEventArgs e); #endregion ! [ToolboxBitmap(typeof(PGDataAdapter), "Resources.ToolBox.PGDataAdapter.bmp"), DefaultEvent("RowUpdated")] ! public sealed class PGDataAdapter : DbDataAdapter, IDbDataAdapter { #region EVENTS --- 24,39 ---- using System.ComponentModel.Design; ! namespace PostgreSql.Data.PgSqlClient { #region DELEGATES ! public delegate void PgRowUpdatedEventHandler(object sender, PgRowUpdatedEventArgs e); ! public delegate void PgRowUpdatingEventHandler(object sender, PgRowUpdatingEventArgs e); #endregion ! [ToolboxBitmap(typeof(PgDataAdapter), "Resources.ToolBox.PgDataAdapter.bmp"), DefaultEvent("RowUpdated")] ! public sealed class PgDataAdapter : DbDataAdapter, IDbDataAdapter { #region EVENTS *************** *** 46,53 **** #region FIELDS ! private PGCommand selectCommand; ! private PGCommand insertCommand; ! private PGCommand updateCommand; ! private PGCommand deleteCommand; private bool disposed; --- 46,53 ---- #region FIELDS ! private PgCommand selectCommand; ! private PgCommand insertCommand; ! private PgCommand updateCommand; ! private PgCommand deleteCommand; private bool disposed; *************** *** 59,63 **** { get { return selectCommand; } ! set { selectCommand = (PGCommand)value; } } --- 59,63 ---- { get { return selectCommand; } ! set { selectCommand = (PgCommand)value; } } *************** *** 65,69 **** { get { return insertCommand; } ! set { insertCommand = (PGCommand)value; } } --- 65,69 ---- { get { return insertCommand; } ! set { insertCommand = (PgCommand)value; } } *************** *** 71,75 **** { get { return updateCommand; } ! set { updateCommand = (PGCommand)value; } } --- 71,75 ---- { get { return updateCommand; } ! set { updateCommand = (PgCommand)value; } } *************** *** 77,85 **** { get { return deleteCommand; } ! set { deleteCommand = (PGCommand)value; } } [Category("DataCategory_Update"), DefaultValue(null)] ! public PGCommand SelectCommand { get { return selectCommand; } --- 77,85 ---- { get { return deleteCommand; } ! set { deleteCommand = (PgCommand)value; } } [Category("DataCategory_Update"), DefaultValue(null)] ! public PgCommand SelectCommand { get { return selectCommand; } *************** *** 88,92 **** [Category("DataCategory_Update"), DefaultValue(null)] ! public PGCommand InsertCommand { get { return insertCommand; } --- 88,92 ---- [Category("DataCategory_Update"), DefaultValue(null)] ! public PgCommand InsertCommand { get { return insertCommand; } *************** *** 95,99 **** [Category("DataCategory_Fill"), DefaultValue(null)] ! public PGCommand UpdateCommand { get { return updateCommand; } --- 95,99 ---- [Category("DataCategory_Fill"), DefaultValue(null)] ! public PgCommand UpdateCommand { get { return updateCommand; } *************** *** 102,106 **** [Category("DataCategory_Update"), DefaultValue(null)] ! public PGCommand DeleteCommand { get { return deleteCommand; } --- 102,106 ---- [Category("DataCategory_Update"), DefaultValue(null)] ! public PgCommand DeleteCommand { get { return deleteCommand; } *************** *** 112,132 **** #region CONSTRUCTORS ! public PGDataAdapter() { } ! public PGDataAdapter(PGCommand selectCommand) : this() { this.selectCommand = selectCommand; } ! public PGDataAdapter(string commandText, PGConnection connection) : this() { ! this.selectCommand = new PGCommand(commandText, connection); } ! public PGDataAdapter(string commandText, string connectionString) : this() { ! this.selectCommand = new PGCommand(commandText, new PGConnection(connectionString)); } --- 112,132 ---- #region CONSTRUCTORS ! public PgDataAdapter() { } ! public PgDataAdapter(PgCommand selectCommand) : this() { this.selectCommand = selectCommand; } ! public PgDataAdapter(string commandText, PgConnection connection) : this() { ! this.selectCommand = new PgCommand(commandText, connection); } ! public PgDataAdapter(string commandText, string connectionString) : this() { ! this.selectCommand = new PgCommand(commandText, new PgConnection(connectionString)); } *************** *** 172,176 **** #region METHODS ! public event PGRowUpdatedEventHandler RowUpdated { add { Events.AddHandler(EventRowUpdated, value); } --- 172,176 ---- #region METHODS ! public event PgRowUpdatedEventHandler RowUpdated { add { Events.AddHandler(EventRowUpdated, value); } *************** *** 179,183 **** [Category("DataCategory_Update")] ! public event PGRowUpdatingEventHandler RowUpdating { add { Events.AddHandler(EventRowUpdating, value); } --- 179,183 ---- [Category("DataCategory_Update")] ! public event PgRowUpdatingEventHandler RowUpdating { add { Events.AddHandler(EventRowUpdating, value); } *************** *** 191,203 **** protected override RowUpdatedEventArgs CreateRowUpdatedEvent(DataRow dataRow, IDbCommand command, StatementType statementType, DataTableMapping tableMapping) { ! return new PGRowUpdatedEventArgs(dataRow, command, statementType, tableMapping); } protected override void OnRowUpdated(RowUpdatedEventArgs value) { ! PGRowUpdatedEventHandler handler = (PGRowUpdatedEventHandler) Events[EventRowUpdated]; ! if ((null != handler) && (value is PGRowUpdatedEventArgs)) { ! handler(this, (PGRowUpdatedEventArgs) value); } } --- 191,203 ---- protected override RowUpdatedEventArgs CreateRowUpdatedEvent(DataRow dataRow, IDbCommand command, StatementType statementType, DataTableMapping tableMapping) { ! return new PgRowUpdatedEventArgs(dataRow, command, statementType, tableMapping); } protected override void OnRowUpdated(RowUpdatedEventArgs value) { ! PgRowUpdatedEventHandler handler = (PgRowUpdatedEventHandler) Events[EventRowUpdated]; ! if ((null != handler) && (value is PgRowUpdatedEventArgs)) { ! handler(this, (PgRowUpdatedEventArgs) value); } } *************** *** 205,217 **** protected override RowUpdatingEventArgs CreateRowUpdatingEvent(DataRow dataRow, IDbCommand command, StatementType statementType, DataTableMapping tableMapping) { ! return new PGRowUpdatingEventArgs(dataRow, command, statementType, tableMapping); } protected override void OnRowUpdating(RowUpdatingEventArgs value) { ! PGRowUpdatingEventHandler handler = (PGRowUpdatingEventHandler) Events[EventRowUpdating]; ! if ((null != handler) && (value is PGRowUpdatingEventArgs)) { ! handler(this, (PGRowUpdatingEventArgs) value); } } --- 205,217 ---- protected override RowUpdatingEventArgs CreateRowUpdatingEvent(DataRow dataRow, IDbCommand command, StatementType statementType, DataTableMapping tableMapping) { ! return new PgRowUpdatingEventArgs(dataRow, command, statementType, tableMapping); } protected override void OnRowUpdating(RowUpdatingEventArgs value) { ! PgRowUpdatingEventHandler handler = (PgRowUpdatingEventHandler) Events[EventRowUpdating]; ! if ((null != handler) && (value is PgRowUpdatingEventArgs)) { ! handler(this, (PgRowUpdatingEventArgs) value); } } Index: PGDataReader.cs =================================================================== RCS file: /cvsroot/pgsqlclient/pgsqlclient/PostgreSql.Data.PGSqlClient/source/PGDataReader.cs,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** PGDataReader.cs 29 Jul 2003 10:14:53 -0000 1.10 --- PGDataReader.cs 2 Aug 2003 19:13:09 -0000 1.11 *************** *** 1,3 **** ! /* PGSqlClient - ADO.NET Data Provider for PostgreSQL 7.4+ * Copyright (C) 2003 Carlos Guzmán Álvarez * --- 1,3 ---- ! /* PgSqlClient - ADO.NET Data Provider for PostgreSQL 7.4+ * Copyright (C) 2003 Carlos Guzmán Álvarez * *************** *** 24,33 **** using System.Reflection; using System.ComponentModel; ! using PostgreSql.Data.NPGClient; ! using PostgreSql.Data.PGSqlClient.DbSchema; ! namespace PostgreSql.Data.PGSqlClient { ! public sealed class PGDataReader : MarshalByRefObject, IEnumerable, IDataReader, IDisposable, IDataRecord { #region FIELDS --- 24,33 ---- using System.Reflection; using System.ComponentModel; ! using PostgreSql.Data.NPgClient; ! using PostgreSql.Data.PgSqlClient.DbSchema; ! namespace PostgreSql.Data.PgSqlClient { ! public sealed class PgDataReader : MarshalByRefObject, IEnumerable, IDataReader, IDisposable, IDataRecord { #region FIELDS *************** *** 40,44 **** private int fieldCount; private DataTable schemaTable; ! private PGCommand command; private object[] row; --- 40,44 ---- private int fieldCount; private DataTable schemaTable; ! private PgCommand command; private object[] row; *************** *** 47,51 **** #region CONSTRUCTORS ! private PGDataReader() { open = true; --- 47,51 ---- #region CONSTRUCTORS ! private PgDataReader() { open = true; *************** *** 55,59 **** } ! internal PGDataReader(PGCommand command) : this() { command.Connection.DataReader = this; --- 55,59 ---- } ! internal PgDataReader(PgCommand command) : this() { command.Connection.DataReader = this; *************** *** 66,70 **** #region DESTRUCTORS ! ~PGDataReader() { Dispose(false); --- 66,70 ---- #region DESTRUCTORS ! ~PgDataReader() { Dispose(false); *************** *** 201,207 **** read = (row == null) ? false : true; } ! catch (PGClientException ex) { ! throw new PGException(ex.Message, ex); } } --- 201,207 ---- read = (row == null) ? false : true; } ! catch (PgClientException ex) { ! throw new PgException(ex.Message, ex); } } *************** *** 282,295 **** } ! private object[] getColumnInfo(PGFieldDescriptor field) { object[] columnInfo = null; ! IDbSchema dbSchema = PGDbSchemaFactory.GetSchema(PGDbSchemaType.Columns); ! dbSchema.AddWhereFilter("pg_attribute.attnum = " + field.OidNumber); ! dbSchema.AddWhereFilter("pg_attribute.attrelid = " + field.OidTable); ! PGCommand schemaCmd = new PGCommand(dbSchema.GetCommandText(null), command.Connection); schemaCmd.InternalPrepare(); schemaCmd.InternalExecute(); --- 282,295 ---- } ! private object[] getColumnInfo(PgFieldDescriptor field) { object[] columnInfo = null; ! IDbSchema dbSchema = PgDbSchemaFactory.GetSchema(PgDbSchemaType.Columns); ! dbSchema.AddWhereFilter("Pg_attribute.attnum = " + field.OidNumber); ! dbSchema.AddWhereFilter("Pg_attribute.attrelid = " + field.OidTable); ! PgCommand schemaCmd = new PgCommand(dbSchema.GetCommandText(null), command.Connection); schemaCmd.InternalPrepare(); schemaCmd.InternalExecute(); *************** *** 306,318 **** } ! private System.Array getPrimaryKeyInfo(PGFieldDescriptor field) { System.Array columnInfo = null; ! IDbSchema dbSchema = PGDbSchemaFactory.GetSchema(PGDbSchemaType.Primary_Keys); ! dbSchema.AddWhereFilter("pg_class.oid = " + field.OidTable); ! PGCommand schemaCmd = new PGCommand(dbSchema.GetCommandText(null), command.Connection); schemaCmd.InternalPrepare(); schemaCmd.InternalExecute(); --- 306,318 ---- } ! private System.Array getPrimaryKeyInfo(PgFieldDescriptor field) { System.Array columnInfo = null; ! IDbSchema dbSchema = PgDbSchemaFactory.GetSchema(PgDbSchemaType.Primary_Keys); ! dbSchema.AddWhereFilter("Pg_class.oid = " + field.OidTable); ! PgCommand schemaCmd = new PgCommand(dbSchema.GetCommandText(null), command.Connection); schemaCmd.InternalPrepare(); schemaCmd.InternalExecute(); *************** *** 627,631 **** } ! private PGDbType getProviderType(int i) { return command.Statement.RowDescriptor.Fields[i].DataType.ProviderType; --- 627,631 ---- } ! private PgDbType getProviderType(int i) { return command.Statement.RowDescriptor.Fields[i].DataType.ProviderType; *************** *** 689,693 **** private bool isReadOnly(int i) { ! PGType type = command.Statement.RowDescriptor.Fields[i].DataType; return type.IsSerial ? true : false; --- 689,693 ---- private bool isReadOnly(int i) { ! PgType type = command.Statement.RowDescriptor.Fields[i].DataType; return type.IsSerial ? true : false; *************** *** 701,705 **** } ! PGType type = command.Statement.RowDescriptor.Fields[i].DataType; return type.IsSerial ? true : false; --- 701,705 ---- } ! PgType type = command.Statement.RowDescriptor.Fields[i].DataType; return type.IsSerial ? true : false; Index: PGDbConnection.cs =================================================================== RCS file: /cvsroot/pgsqlclient/pgsqlclient/PostgreSql.Data.PGSqlClient/source/PGDbConnection.cs,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** PGDbConnection.cs 12 Jul 2003 21:36:27 -0000 1.2 --- PGDbConnection.cs 2 Aug 2003 19:13:09 -0000 1.3 *************** *** 1,3 **** ! /* PGSqlClient - ADO.NET Data Provider for PostgreSQL 7.4+ * Copyright (C) 2003 Carlos Guzmán Álvarez * --- 1,3 ---- ! /* PgSqlClient - ADO.NET Data Provider for PostgreSQL 7.4+ * Copyright (C) 2003 Carlos Guzmán Álvarez * *************** *** 22,36 **** using System.Text.RegularExpressions; ! using PostgreSql.Data.NPGClient; ! namespace PostgreSql.Data.PGSqlClient { ! internal sealed class PGDbConnection : MarshalByRefObject { #region FIELDS ! private PGDbClient db; private string connectionString; ! private PGConnectionParams settings; private long created; private long lifetime; --- 22,36 ---- using System.Text.RegularExpressions; ! using PostgreSql.Data.NPgClient; ! namespace PostgreSql.Data.PgSqlClient { ! internal sealed class PgDbConnection : MarshalByRefObject { #region FIELDS ! private PgDbClient db; private string connectionString; ! private PgConnectionParams settings; private long created; private long lifetime; *************** *** 43,47 **** #region PROPERTIES ! public PGDbClient DB { get { return db; } --- 43,47 ---- #region PROPERTIES ! public PgDbClient DB { get { return db; } *************** *** 69,73 **** } ! public PGConnectionParams Settings { get { return settings; } --- 69,73 ---- } ! public PgConnectionParams Settings { get { return settings; } *************** *** 78,84 **** #region CONSTRUCTORS ! private PGDbConnection() { ! settings = new PGConnectionParams(); // search = new Regex(@"([\w\s\d]*)\s*=\s*([\w\s\d]*)"); search = new Regex(@"([\w\s\d]*)\s*=\s*([^;]*)"); --- 78,84 ---- #region CONSTRUCTORS ! private PgDbConnection() { ! settings = new PgConnectionParams(); // search = new Regex(@"([\w\s\d]*)\s*=\s*([\w\s\d]*)"); search = new Regex(@"([\w\s\d]*)\s*=\s*([^;]*)"); *************** *** 90,94 **** } ! public PGDbConnection(string connectionString) : this() { this.connectionString = connectionString; --- 90,94 ---- } ! public PgDbConnection(string connectionString) : this() { this.connectionString = connectionString; *************** *** 104,113 **** try { ! db = new PGDbClient(settings); db.Connect(); } ! catch (PGClientException ex) { ! throw new PGException(ex.Message, ex); } } --- 104,113 ---- try { ! db = new PgDbClient(settings); db.Connect(); } ! catch (PgClientException ex) { ! throw new PgException(ex.Message, ex); } } *************** *** 119,125 **** db.Disconnect(); } ! catch (PGClientException ex) { ! throw new PGException(ex.Message, ex); } } --- 119,125 ---- db.Disconnect(); } ! catch (PgClientException ex) { ! throw new PgException(ex.Message, ex); } } Index: PGDbSchemaType.cs =================================================================== RCS file: /cvsroot/pgsqlclient/pgsqlclient/PostgreSql.Data.PGSqlClient/source/PGDbSchemaType.cs,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** PGDbSchemaType.cs 22 Jul 2003 17:22:20 -0000 1.2 --- PGDbSchemaType.cs 2 Aug 2003 19:13:09 -0000 1.3 *************** *** 1,3 **** ! /* PGSqlClient - ADO.NET Data Provider for PostgreSQL 7.4+ * Copyright (C) 2003 Carlos Guzmán Álvarez * --- 1,3 ---- ! /* PgSqlClient - ADO.NET Data Provider for PostgreSQL 7.4+ * Copyright (C) 2003 Carlos Guzmán Álvarez * *************** *** 19,25 **** using System; ! namespace PostgreSql.Data.PGSqlClient { ! public enum PGDbSchemaType { Aggregates, --- 19,25 ---- using System; ! namespace PostgreSql.Data.PgSqlClient { ! public enum PgDbSchemaType { Aggregates, Index: PGDbType.cs =================================================================== RCS file: /cvsroot/pgsqlclient/pgsqlclient/PostgreSql.Data.PGSqlClient/source/PGDbType.cs,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** PGDbType.cs 14 Jul 2003 10:28:49 -0000 1.2 --- PGDbType.cs 2 Aug 2003 19:13:09 -0000 1.3 *************** *** 1,3 **** ! /* PGSqlClient - ADO.NET Data Provider for PostgreSQL 7.4+ * Copyright (C) 2003 Carlos Guzmán Álvarez * --- 1,3 ---- ! /* PgSqlClient - ADO.NET Data Provider for PostgreSQL 7.4+ * Copyright (C) 2003 Carlos Guzmán Álvarez * *************** *** 19,26 **** using System; ! namespace PostgreSql.Data.PGSqlClient { [Serializable] ! public enum PGDbType { Binary , --- 19,26 ---- using System; ! namespace PostgreSql.Data.PgSqlClient { [Serializable] ! public enum PgDbType { Binary , Index: PGError.cs =================================================================== RCS file: /cvsroot/pgsqlclient/pgsqlclient/PostgreSql.Data.PGSqlClient/source/PGError.cs,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** PGError.cs 12 Jul 2003 08:11:21 -0000 1.1.1.1 --- PGError.cs 2 Aug 2003 19:13:09 -0000 1.2 *************** *** 1,3 **** ! /* PGSqlClient - ADO.NET Data Provider for PostgreSQL 7.4+ * Copyright (C) 2003 Carlos Guzmán Álvarez * --- 1,3 ---- ! /* PgSqlClient - ADO.NET Data Provider for PostgreSQL 7.4+ * Copyright (C) 2003 Carlos Guzmán Álvarez * *************** *** 19,26 **** using System; ! namespace PostgreSql.Data.PGSqlClient { [Serializable] ! public sealed class PGError { #region FIELDS --- 19,26 ---- using System; ! namespace PostgreSql.Data.PgSqlClient { [Serializable] ! public sealed class PgError { #region FIELDS *************** *** 105,118 **** #region CONSTRUCTORS ! internal PGError() { } ! internal PGError(string message) { this.message = message; } ! internal PGError(string severity, string code, string message) { this.severity = severity; --- 105,118 ---- #region CONSTRUCTORS ! internal PgError() { } ! internal PgError(string message) { this.message = message; } ! internal PgError(string severity, string code, string message) { this.severity = severity; Index: PGErrorCollection.cs ==============================================================... [truncated message content] |