[pgsqlclient-checkins] pgsqlclient/PostgreSql.Data.PGSqlClient/source/NPGClient PGAuthMethods.cs,1.1
Status: Inactive
Brought to you by:
carlosga_fb
Update of /cvsroot/pgsqlclient/pgsqlclient/PostgreSql.Data.PGSqlClient/source/NPGClient In directory sc8-pr-cvs1:/tmp/cvs-serv1321 Modified Files: PGAuthMethods.cs PGCharSet.cs PGCharSetCollection.cs PGClientError.cs PGClientErrorCollection.cs PGClientException.cs PGClientMessageEventArgs.cs PGClientNotificationEventArgs.cs PGCodes.cs PGConnectionParams.cs PGDbClient.cs PGDecodeType.cs PGEncodeType.cs PGFieldDescriptor.cs PGInetReader.cs PGInetWriter.cs PGLayouts.cs PGOutputPacket.cs PGParameter.cs PGResponsePacket.cs PGRowDescriptor.cs PGStatement.cs PGType.cs PGTypeCollection.cs Log Message: * Changed casing of all classes from PGXXX to PgXXX to follow MS guidelines. Index: PGAuthMethods.cs =================================================================== RCS file: /cvsroot/pgsqlclient/pgsqlclient/PostgreSql.Data.PGSqlClient/source/NPGClient/PGAuthMethods.cs,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** PGAuthMethods.cs 12 Jul 2003 08:11:22 -0000 1.1.1.1 --- PGAuthMethods.cs 2 Aug 2003 19:13:49 -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 * *************** *** 21,25 **** using System.Security.Cryptography; ! namespace PostgreSql.Data.NPGClient { internal class MD5Authentication --- 21,25 ---- using System.Security.Cryptography; ! namespace PostgreSql.Data.NPgClient { internal class MD5Authentication Index: PGCharSet.cs =================================================================== RCS file: /cvsroot/pgsqlclient/pgsqlclient/PostgreSql.Data.PGSqlClient/source/NPGClient/PGCharSet.cs,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** PGCharSet.cs 12 Jul 2003 08:11:22 -0000 1.1.1.1 --- PGCharSet.cs 2 Aug 2003 19:13:49 -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 * *************** *** 20,26 **** using System.Text; ! namespace PostgreSql.Data.NPGClient { ! internal class PGCharSet { #region FIELDS --- 20,26 ---- using System.Text; ! namespace PostgreSql.Data.NPgClient { ! internal class PgCharSet { #region FIELDS *************** *** 47,55 **** #region CONSTRUCTORS ! public PGCharSet() { } ! public PGCharSet(string charSet, string systemCharSet) { this.charSet = charSet; --- 47,55 ---- #region CONSTRUCTORS ! public PgCharSet() { } ! public PgCharSet(string charSet, string systemCharSet) { this.charSet = charSet; *************** *** 57,61 **** } ! public PGCharSet(string charSet, int cp) { this.charSet = charSet; --- 57,61 ---- } ! public PgCharSet(string charSet, int cp) { this.charSet = charSet; Index: PGCharSetCollection.cs =================================================================== RCS file: /cvsroot/pgsqlclient/pgsqlclient/PostgreSql.Data.PGSqlClient/source/NPGClient/PGCharSetCollection.cs,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** PGCharSetCollection.cs 29 Jul 2003 10:15:08 -0000 1.2 --- PGCharSetCollection.cs 2 Aug 2003 19:13:49 -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,41 **** using System.Globalization; ! namespace PostgreSql.Data.NPGClient { ! internal class PGCharSetCollection : ArrayList { #region PROPERTIES ! public new PGCharSet this[int index] { ! get { return (PGCharSet)base[index]; } ! set { base[index] = (PGCharSet)value; } } ! public PGCharSet this[string name] { ! get { return (PGCharSet)this[IndexOf(name)]; } ! set { this[IndexOf(name)] = (PGCharSet)value; } } --- 22,41 ---- using System.Globalization; ! namespace PostgreSql.Data.NPgClient { ! internal class PgCharSetCollection : ArrayList { #region PROPERTIES ! public new PgCharSet this[int index] { ! get { return (PgCharSet)base[index]; } ! set { base[index] = (PgCharSet)value; } } ! public PgCharSet this[string name] { ! get { return (PgCharSet)this[IndexOf(name)]; } ! set { this[IndexOf(name)] = (PgCharSet)value; } } *************** *** 52,56 **** { int index = 0; ! foreach(PGCharSet item in this) { if (cultureAwareCompare(item.CharSet, charset)) --- 52,56 ---- { int index = 0; ! foreach(PgCharSet item in this) { if (cultureAwareCompare(item.CharSet, charset)) *************** *** 68,72 **** } ! public PGCharSet Add(PGCharSet charset) { base.Add(charset); --- 68,72 ---- } ! public PgCharSet Add(PgCharSet charset) { base.Add(charset); *************** *** 75,81 **** } ! public PGCharSet Add(string charset, string systemCharset) { ! PGCharSet charSet = new PGCharSet(charset, systemCharset); base.Add(charSet); --- 75,81 ---- } ! public PgCharSet Add(string charset, string systemCharset) { ! PgCharSet charSet = new PgCharSet(charset, systemCharset); base.Add(charSet); *************** *** 84,90 **** } ! public PGCharSet Add(string charset, int cp) { ! PGCharSet charSet = new PGCharSet(charset, cp); base.Add(charSet); --- 84,90 ---- } ! public PgCharSet Add(string charset, int cp) { ! PgCharSet charSet = new PgCharSet(charset, cp); base.Add(charSet); Index: PGClientError.cs =================================================================== RCS file: /cvsroot/pgsqlclient/pgsqlclient/PostgreSql.Data.PGSqlClient/source/NPGClient/PGClientError.cs,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** PGClientError.cs 12 Jul 2003 08:11:22 -0000 1.1.1.1 --- PGClientError.cs 2 Aug 2003 19:13:49 -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,25 **** using System; ! namespace PostgreSql.Data.NPGClient { ! internal sealed class PGClientError { #region FIELDS --- 19,25 ---- using System; ! namespace PostgreSql.Data.NPgClient { ! internal sealed class PgClientError { #region FIELDS *************** *** 104,117 **** #region CONSTRUCTORS ! public PGClientError() { } ! public PGClientError(string message) { this.message = message; } ! public PGClientError(string severity, string code, string message) { this.severity = severity; --- 104,117 ---- #region CONSTRUCTORS ! public PgClientError() { } ! public PgClientError(string message) { this.message = message; } ! public PgClientError(string severity, string code, string message) { this.severity = severity; Index: PGClientErrorCollection.cs =================================================================== RCS file: /cvsroot/pgsqlclient/pgsqlclient/PostgreSql.Data.PGSqlClient/source/NPGClient/PGClientErrorCollection.cs,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** PGClientErrorCollection.cs 29 Jul 2003 10:15:08 -0000 1.2 --- PGClientErrorCollection.cs 2 Aug 2003 19:13:49 -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,40 **** using System.Globalization; ! namespace PostgreSql.Data.NPGClient { ! internal sealed class PGClientErrorCollection : ArrayList { #region PROPERTIES ! public PGClientError this[string errorMessage] { ! get { return (PGClientError)this[IndexOf(errorMessage)]; } ! set { this[IndexOf(errorMessage)] = (PGClientError)value; } } ! public new PGClientError this[int errorIndex] { ! get { return (PGClientError)base[errorIndex]; } ! set { base[errorIndex] = (PGClientError)value; } } --- 21,40 ---- using System.Globalization; ! namespace PostgreSql.Data.NPgClient { ! internal sealed class PgClientErrorCollection : ArrayList { #region PROPERTIES ! public PgClientError this[string errorMessage] { ! get { return (PgClientError)this[IndexOf(errorMessage)]; } ! set { this[IndexOf(errorMessage)] = (PgClientError)value; } } ! public new PgClientError this[int errorIndex] { ! get { return (PgClientError)base[errorIndex]; } ! set { base[errorIndex] = (PgClientError)value; } } *************** *** 51,55 **** { int index = 0; ! foreach(PGClientError item in this) { if (cultureAwareCompare(item.Message, errorMessage)) --- 51,55 ---- { int index = 0; ! foreach(PgClientError item in this) { if (cultureAwareCompare(item.Message, errorMessage)) *************** *** 67,71 **** } ! public PGClientError Add(PGClientError error) { base.Add(error); --- 67,71 ---- } ! public PgClientError Add(PgClientError error) { base.Add(error); *************** *** 74,80 **** } ! public PGClientError Add(string severity, string message, string code) { ! PGClientError error = new PGClientError(severity, code, message); return Add(error); --- 74,80 ---- } ! public PgClientError Add(string severity, string message, string code) { ! PgClientError error = new PgClientError(severity, code, message); return Add(error); Index: PGClientException.cs =================================================================== RCS file: /cvsroot/pgsqlclient/pgsqlclient/PostgreSql.Data.PGSqlClient/source/NPGClient/PGClientException.cs,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** PGClientException.cs 12 Jul 2003 08:11:22 -0000 1.1.1.1 --- PGClientException.cs 2 Aug 2003 19:13:49 -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 * *************** *** 20,31 **** using System.Text; ! namespace PostgreSql.Data.NPGClient { ! internal class PGClientException : Exception { #region FIELDS private string message; ! private PGClientErrorCollection errors; #endregion --- 20,31 ---- using System.Text; ! namespace PostgreSql.Data.NPgClient { ! internal class PgClientException : Exception { #region FIELDS private string message; ! private PgClientErrorCollection errors; #endregion *************** *** 38,42 **** } ! public PGClientErrorCollection Errors { get { return errors; } --- 38,42 ---- } ! public PgClientErrorCollection Errors { get { return errors; } *************** *** 47,56 **** #region CONSTRUCTORS ! public PGClientException() : base() { ! errors = new PGClientErrorCollection(); } ! public PGClientException(string message) : this() { this.message = message; --- 47,56 ---- #region CONSTRUCTORS ! public PgClientException() : base() { ! errors = new PgClientErrorCollection(); } ! public PgClientException(string message) : this() { this.message = message; Index: PGClientMessageEventArgs.cs =================================================================== RCS file: /cvsroot/pgsqlclient/pgsqlclient/PostgreSql.Data.PGSqlClient/source/NPGClient/PGClientMessageEventArgs.cs,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** PGClientMessageEventArgs.cs 1 Aug 2003 17:51:58 -0000 1.1 --- PGClientMessageEventArgs.cs 2 Aug 2003 19:13:49 -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 * *************** *** 18,38 **** using System; ! using PostgreSql.Data.NPGClient; ! using PostgreSql.Data.PGSqlClient.DbSchema; ! namespace PostgreSql.Data.NPGClient { ! internal delegate void PGClientMessageEventHandler(object sender, PGClientMessageEventArgs e); ! internal sealed class PGClientMessageEventArgs : EventArgs { ! private PGClientException exception; ! public PGClientException Exception { get { return exception; } } ! public PGClientMessageEventArgs(PGClientException exception) { this.exception = exception; --- 18,38 ---- using System; ! using PostgreSql.Data.NPgClient; ! using PostgreSql.Data.PgSqlClient.DbSchema; ! namespace PostgreSql.Data.NPgClient { ! internal delegate void PgClientMessageEventHandler(object sender, PgClientMessageEventArgs e); ! internal sealed class PgClientMessageEventArgs : EventArgs { ! private PgClientException exception; ! public PgClientException Exception { get { return exception; } } ! public PgClientMessageEventArgs(PgClientException exception) { this.exception = exception; Index: PGClientNotificationEventArgs.cs =================================================================== RCS file: /cvsroot/pgsqlclient/pgsqlclient/PostgreSql.Data.PGSqlClient/source/NPGClient/PGClientNotificationEventArgs.cs,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** PGClientNotificationEventArgs.cs 1 Aug 2003 17:51:58 -0000 1.1 --- PGClientNotificationEventArgs.cs 2 Aug 2003 19:13:49 -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 * *************** *** 18,29 **** using System; ! using PostgreSql.Data.NPGClient; ! using PostgreSql.Data.PGSqlClient.DbSchema; ! namespace PostgreSql.Data.NPGClient { ! internal delegate void PGClientNotificationEventHandler(object sender, PGClientNotificationEventArgs e); ! internal sealed class PGClientNotificationEventArgs : EventArgs { private int processID; --- 18,29 ---- using System; ! using PostgreSql.Data.NPgClient; ! using PostgreSql.Data.PgSqlClient.DbSchema; ! namespace PostgreSql.Data.NPgClient { ! internal delegate void PgClientNotificationEventHandler(object sender, PgClientNotificationEventArgs e); ! internal sealed class PgClientNotificationEventArgs : EventArgs { private int processID; *************** *** 46,50 **** } ! public PGClientNotificationEventArgs(int processID, string condition, string addtional) { this.processID = processID; --- 46,50 ---- } ! public PgClientNotificationEventArgs(int processID, string condition, string addtional) { this.processID = processID; Index: PGCodes.cs =================================================================== RCS file: /cvsroot/pgsqlclient/pgsqlclient/PostgreSql.Data.PGSqlClient/source/NPGClient/PGCodes.cs,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** PGCodes.cs 17 Jul 2003 13:41:42 -0000 1.2 --- PGCodes.cs 2 Aug 2003 19:13:49 -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.NPGClient { ! internal class PGBackendCodes { // Backend Message Formats --- 19,25 ---- using System; ! namespace PostgreSql.Data.NPgClient { ! internal class PgBackendCodes { // Backend Message Formats *************** *** 46,50 **** } ! internal class PGFrontEndCodes { public const char BIND = 'B'; --- 46,50 ---- } ! internal class PgFrontEndCodes { public const char BIND = 'B'; *************** *** 62,66 **** } ! internal class PGErrorCodes { public const char SEVERITY = 'S'; --- 62,66 ---- } ! internal class PgErrorCodes { public const char SEVERITY = 'S'; *************** *** 77,81 **** } ! internal class PGCodes { // Protocol version 3.0 --- 77,81 ---- } ! internal class PgCodes { // Protocol version 3.0 Index: PGConnectionParams.cs =================================================================== RCS file: /cvsroot/pgsqlclient/pgsqlclient/PostgreSql.Data.PGSqlClient/source/NPGClient/PGConnectionParams.cs,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** PGConnectionParams.cs 12 Jul 2003 08:11:22 -0000 1.1.1.1 --- PGConnectionParams.cs 2 Aug 2003 19:13:49 -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 * *************** *** 20,26 **** using System.Text; ! namespace PostgreSql.Data.NPGClient { ! internal class PGConnectionParams { #region FIELDS --- 20,26 ---- using System.Text; ! namespace PostgreSql.Data.NPgClient { ! internal class PgConnectionParams { #region FIELDS *************** *** 98,102 **** #region CONSTRUCTORS ! public PGConnectionParams() { serverName = "localhost"; --- 98,102 ---- #region CONSTRUCTORS ! public PgConnectionParams() { serverName = "localhost"; Index: PGDbClient.cs =================================================================== RCS file: /cvsroot/pgsqlclient/pgsqlclient/PostgreSql.Data.PGSqlClient/source/NPGClient/PGDbClient.cs,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** PGDbClient.cs 1 Aug 2003 17:51:58 -0000 1.4 --- PGDbClient.cs 2 Aug 2003 19:13:49 -0000 1.5 *************** *** 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 * *************** *** 25,36 **** using System.Text; ! namespace PostgreSql.Data.NPGClient { ! internal class PGDbClient { #region EVENTS ! public event PGClientMessageEventHandler InfoMessage; ! public event PGClientNotificationEventHandler Notification; #endregion --- 25,36 ---- using System.Text; ! namespace PostgreSql.Data.NPgClient { ! internal class PgDbClient { #region EVENTS ! public event PgClientMessageEventHandler InfoMessage; ! public event PgClientNotificationEventHandler Notification; #endregion *************** *** 38,43 **** #region STATIC_FIELDS ! private static PGTypeCollection types; ! private static PGCharSetCollection charSets; #endregion --- 38,43 ---- #region STATIC_FIELDS ! private static PgTypeCollection types; ! private static PgCharSetCollection charSets; #endregion *************** *** 50,56 **** private Socket socket; private NetworkStream networkStream; ! private PGInetWriter send; ! private PGInetReader receive; ! private PGConnectionParams settings; private char transactionStatus; --- 50,56 ---- private Socket socket; private NetworkStream networkStream; ! private PgInetWriter send; ! private PgInetReader receive; ! private PgConnectionParams settings; private char transactionStatus; *************** *** 59,63 **** #region STATIC_PROPERTIES ! public static PGTypeCollection Types { get { return types; } --- 59,63 ---- #region STATIC_PROPERTIES ! public static PgTypeCollection Types { get { return types; } *************** *** 65,69 **** } ! public static PGCharSetCollection CharSets { get { return charSets; } --- 65,69 ---- } ! public static PgCharSetCollection CharSets { get { return charSets; } *************** *** 98,112 **** } ! public PGInetReader Receive { get { return receive; } } ! public PGInetWriter Send { get { return send; } } ! public PGConnectionParams Settings { get { return settings; } --- 98,112 ---- } ! public PgInetReader Receive { get { return receive; } } ! public PgInetWriter Send { get { return send; } } ! public PgConnectionParams Settings { get { return settings; } *************** *** 118,127 **** #region CONSTRUCTORS ! public PGDbClient() { parameterStatus = new Hashtable(); } ! public PGDbClient(PGConnectionParams settings) : this() { this.settings = settings; --- 118,127 ---- #region CONSTRUCTORS ! public PgDbClient() { parameterStatus = new Hashtable(); } ! public PgDbClient(PgConnectionParams settings) : this() { this.settings = settings; *************** *** 136,141 **** try { ! PGDbClient.InitializeTypes(); ! PGDbClient.InitializeCharSets(); InitializeSocket(); --- 136,141 ---- try { ! PgDbClient.InitializeTypes(); ! PgDbClient.InitializeCharSets(); InitializeSocket(); *************** *** 143,149 **** lock (this) { ! PGOutputPacket packet = new PGOutputPacket(4, settings.Encoding); ! packet.WriteInt(PGCodes.PROTOCOL_VERSION3); packet.WriteString("user"); packet.WriteString(settings.UserName); --- 143,149 ---- lock (this) { ! PgOutputPacket packet = new PgOutputPacket(4, settings.Encoding); ! packet.WriteInt(PgCodes.PROTOCOL_VERSION3); packet.WriteString("user"); packet.WriteString(settings.UserName); *************** *** 157,164 **** send.WriteSimplePacket(packet); ! PGResponsePacket response = new PGResponsePacket(); // Check if the is ready for Query ! while (response.Message != PGBackendCodes.READY_FOR_QUERY) { response = ReceiveResponsePacket(); --- 157,164 ---- send.WriteSimplePacket(packet); ! PgResponsePacket response = new PgResponsePacket(); // Check if the is ready for Query ! while (response.Message != PgBackendCodes.READY_FOR_QUERY) { response = ReceiveResponsePacket(); *************** *** 167,171 **** } } ! catch (PGClientException ex) { throw ex; --- 167,171 ---- } } ! catch (PgClientException ex) { throw ex; *************** *** 178,183 **** { // Send packet to the server ! PGOutputPacket packet = new PGOutputPacket(); ! send.WritePacket(PGFrontEndCodes.TERMINATE, packet); // Close all streams --- 178,183 ---- { // Send packet to the server ! PgOutputPacket packet = new PgOutputPacket(); ! send.WritePacket(PgFrontEndCodes.TERMINATE, packet); // Close all streams *************** *** 186,190 **** socket.Close(); } ! catch (PGClientException ex) { throw ex; --- 186,190 ---- socket.Close(); } ! catch (PgClientException ex) { throw ex; *************** *** 196,204 **** #region RESPONSE_METHODS ! public PGResponsePacket ReceiveResponsePacket() { char type; int length; ! PGResponsePacket responsePacket; lock (this) --- 196,204 ---- #region RESPONSE_METHODS ! public PgResponsePacket ReceiveResponsePacket() { char type; int length; ! PgResponsePacket responsePacket; lock (this) *************** *** 209,217 **** if (length != 0) { ! responsePacket = new PGResponsePacket(type, receive.ReadBytes(length)); } else { ! responsePacket = new PGResponsePacket(type, new byte[0]); } --- 209,217 ---- if (length != 0) { ! responsePacket = new PgResponsePacket(type, receive.ReadBytes(length)); } else { ! responsePacket = new PgResponsePacket(type, new byte[0]); } *************** *** 221,242 **** switch (type) { ! case PGBackendCodes.ERROR_RESPONSE: { // Read the error message and trow the exception ! PGClientException ex = processErrorPacket(responsePacket); throw ex; } ! case PGBackendCodes.NOTICE_RESPONSE: { // Read the notice message and raise an InfoMessage event ! PGClientException ex = processErrorPacket(responsePacket); ! this.InfoMessage(this, new PGClientMessageEventArgs(ex)); } break; ! case PGBackendCodes.NOTIFICATION_RESPONSE: { processNotificationResponse(responsePacket); --- 221,242 ---- switch (type) { ! case PgBackendCodes.ERROR_RESPONSE: { // Read the error message and trow the exception ! PgClientException ex = processErrorPacket(responsePacket); throw ex; } ! case PgBackendCodes.NOTICE_RESPONSE: { // Read the notice message and raise an InfoMessage event ! PgClientException ex = processErrorPacket(responsePacket); ! this.InfoMessage(this, new PgClientMessageEventArgs(ex)); } break; ! case PgBackendCodes.NOTIFICATION_RESPONSE: { processNotificationResponse(responsePacket); *************** *** 251,271 **** } ! private void processResponsePacket(PGResponsePacket packet) { switch (packet.Message) { ! case PGBackendCodes.AUTHENTICATION: processAuthPacket(packet); break; ! case PGBackendCodes.PARAMETER_STATUS: processParameterStatus(packet); break; ! case PGBackendCodes.READY_FOR_QUERY: transactionStatus = packet.ReadChar(); break; ! case PGBackendCodes.BACKEND_KEY_DATA: // BackendKeyData Handle = packet.ReadInt(); --- 251,271 ---- } ! private void processResponsePacket(PgResponsePacket packet) { switch (packet.Message) { ! case PgBackendCodes.AUTHENTICATION: processAuthPacket(packet); break; ! case PgBackendCodes.PARAMETER_STATUS: processParameterStatus(packet); break; ! case PgBackendCodes.READY_FOR_QUERY: transactionStatus = packet.ReadChar(); break; ! case PgBackendCodes.BACKEND_KEY_DATA: // BackendKeyData Handle = packet.ReadInt(); *************** *** 275,279 **** } ! private void processParameterStatus(PGResponsePacket packet) { string parameterName = packet.ReadNullString(); --- 275,279 ---- } ! private void processParameterStatus(PgResponsePacket packet) { string parameterName = packet.ReadNullString(); *************** *** 290,324 **** } ! private void processAuthPacket(PGResponsePacket packet) { // Authentication response int authType = packet.ReadInt(); ! PGOutputPacket outPacket = new PGOutputPacket(settings.Encoding); switch (authType) { ! case PGCodes.AUTH_OK: // Authentication successful return; ! case PGCodes.AUTH_KERBEROS_V4: // Kerberos V4 authentication is required break; ! case PGCodes.AUTH_KERBEROS_V5: // Kerberos V5 authentication is required break; ! case PGCodes.AUTH_CLEARTEXT_PASSWORD: // Cleartext password is required outPacket.WriteString(settings.UserPassword); break; ! case PGCodes.AUTH_CRYPT_PASSWORD: // crypt()-encrypted password is required break; ! case PGCodes.AUTH_MD5_PASSWORD: // MD5-encrypted password is required --- 290,324 ---- } ! private void processAuthPacket(PgResponsePacket packet) { // Authentication response int authType = packet.ReadInt(); ! PgOutputPacket outPacket = new PgOutputPacket(settings.Encoding); switch (authType) { ! case PgCodes.AUTH_OK: // Authentication successful return; ! case PgCodes.AUTH_KERBEROS_V4: // Kerberos V4 authentication is required break; ! case PgCodes.AUTH_KERBEROS_V5: // Kerberos V5 authentication is required break; ! case PgCodes.AUTH_CLEARTEXT_PASSWORD: // Cleartext password is required outPacket.WriteString(settings.UserPassword); break; ! case PgCodes.AUTH_CRYPT_PASSWORD: // crypt()-encrypted password is required break; ! case PgCodes.AUTH_MD5_PASSWORD: // MD5-encrypted password is required *************** *** 335,342 **** // Finally write the md5 hash to the packet ! outPacket.WriteString(PGCodes.MD5_PREFIX + hash); break; ! case PGCodes.AUTH_SCM_CREDENTIAL: // SCM credentials message is required break; --- 335,342 ---- // Finally write the md5 hash to the packet ! outPacket.WriteString(PgCodes.MD5_PREFIX + hash); break; ! case PgCodes.AUTH_SCM_CREDENTIAL: // SCM credentials message is required break; *************** *** 344,397 **** // Send the packet to the server ! send.WritePacket(PGFrontEndCodes.PASSWORD_MESSAGE, outPacket); } ! private PGClientException processErrorPacket(PGResponsePacket packet) { char type = ' '; ! PGClientError error = new PGClientError(); ! while (type != PGErrorCodes.END) { type = packet.ReadChar(); switch (type) { ! case PGErrorCodes.SEVERITY: error.Severity = packet.ReadNullString(); break; ! case PGErrorCodes.CODE: error.Code = packet.ReadNullString(); break; ! case PGErrorCodes.MESSAGE: error.Message = packet.ReadNullString(); break; ! case PGErrorCodes.DETAIL: error.Detail = packet.ReadNullString(); break; ! case PGErrorCodes.HINT: error.Hint = packet.ReadNullString(); break; ! case PGErrorCodes.POSITION: error.Position = packet.ReadNullString(); break; ! case PGErrorCodes.WHERE: error.Where = packet.ReadNullString(); break; ! case PGErrorCodes.FILE: error.File = packet.ReadNullString(); break; ! case PGErrorCodes.LINE: error.Line = Convert.ToInt32(packet.ReadNullString()); break; ! case PGErrorCodes.ROUTINE: error.Routine = packet.ReadNullString(); break; --- 344,397 ---- // Send the packet to the server ! send.WritePacket(PgFrontEndCodes.PASSWORD_MESSAGE, outPacket); } ! private PgClientException processErrorPacket(PgResponsePacket packet) { char type = ' '; ! PgClientError error = new PgClientError(); ! while (type != PgErrorCodes.END) { type = packet.ReadChar(); switch (type) { ! case PgErrorCodes.SEVERITY: error.Severity = packet.ReadNullString(); break; ! case PgErrorCodes.CODE: error.Code = packet.ReadNullString(); break; ! case PgErrorCodes.MESSAGE: error.Message = packet.ReadNullString(); break; ! case PgErrorCodes.DETAIL: error.Detail = packet.ReadNullString(); break; ! case PgErrorCodes.HINT: error.Hint = packet.ReadNullString(); break; ! case PgErrorCodes.POSITION: error.Position = packet.ReadNullString(); break; ! case PgErrorCodes.WHERE: error.Where = packet.ReadNullString(); break; ! case PgErrorCodes.FILE: error.File = packet.ReadNullString(); break; ! case PgErrorCodes.LINE: error.Line = Convert.ToInt32(packet.ReadNullString()); break; ! case PgErrorCodes.ROUTINE: error.Routine = packet.ReadNullString(); break; *************** *** 399,403 **** } ! PGClientException exception = new PGClientException(error.Message); exception.Errors.Add(error); --- 399,403 ---- } ! PgClientException exception = new PgClientException(error.Message); exception.Errors.Add(error); *************** *** 406,410 **** } ! private void processNotificationResponse(PGResponsePacket packet) { int processID = packet.ReadInt(); --- 406,410 ---- } ! private void processNotificationResponse(PgResponsePacket packet) { int processID = packet.ReadInt(); *************** *** 413,417 **** // Raise an event as an InfoMessage ! Notification(this, new PGClientNotificationEventArgs(processID, condition, additional)); } --- 413,417 ---- // Raise an event as an InfoMessage ! Notification(this, new PgClientNotificationEventArgs(processID, condition, additional)); } *************** *** 441,450 **** } ! PGStatement stmt = CreateStatement(sql); stmt.Query(); if (stmt.Tag != "START TRANSACTION") { ! throw new PGClientException("A transaction is currently active. Parallel transactions are not supported."); } --- 441,450 ---- } ! PgStatement stmt = CreateStatement(sql); stmt.Query(); if (stmt.Tag != "START TRANSACTION") { ! throw new PgClientException("A transaction is currently active. Parallel transactions are not supported."); } *************** *** 454,463 **** public void CommitTransaction() { ! PGStatement stmt = CreateStatement("COMMIT TRANSACTION"); stmt.Query(); if (stmt.Tag != "COMMIT") { ! throw new PGClientException("There are no transaction for commit."); } --- 454,463 ---- public void CommitTransaction() { ! PgStatement stmt = CreateStatement("COMMIT TRANSACTION"); stmt.Query(); if (stmt.Tag != "COMMIT") { ! throw new PgClientException("There are no transaction for commit."); } *************** *** 467,476 **** public void RollbackTransction() { ! PGStatement stmt = CreateStatement("ROLLBACK TRANSACTION"); stmt.Query(); if (stmt.Tag != "ROLLBACK") { ! throw new PGClientException("There are no transaction for rollback."); } --- 467,476 ---- public void RollbackTransction() { ! PgStatement stmt = CreateStatement("ROLLBACK TRANSACTION"); stmt.Query(); if (stmt.Tag != "ROLLBACK") { ! throw new PgClientException("There are no transaction for rollback."); } *************** *** 488,495 **** try { ! PGOutputPacket packet = new PGOutputPacket(Settings.Encoding); // Send packet to the server ! send.WritePacket(PGFrontEndCodes.FLUSH, packet); } catch (Exception ex) --- 488,495 ---- try { ! PgOutputPacket packet = new PgOutputPacket(Settings.Encoding); // Send packet to the server ! send.WritePacket(PgFrontEndCodes.FLUSH, packet); } catch (Exception ex) *************** *** 506,513 **** try { ! PGOutputPacket packet = new PGOutputPacket(Settings.Encoding); // Send packet to the server ! send.WritePacket(PGFrontEndCodes.SYNC, packet); } catch (Exception ex) --- 506,513 ---- try { ! PgOutputPacket packet = new PgOutputPacket(Settings.Encoding); // Send packet to the server ! send.WritePacket(PgFrontEndCodes.SYNC, packet); } catch (Exception ex) *************** *** 524,530 **** try { ! PGOutputPacket packet = new PGOutputPacket(0); ! packet.WriteInt(PGCodes.CANCEL_REQUEST); packet.WriteInt(Handle); packet.WriteInt(SecretKey); --- 524,530 ---- try { ! PgOutputPacket packet = new PgOutputPacket(0); ! packet.WriteInt(PgCodes.CANCEL_REQUEST); packet.WriteInt(Handle); packet.WriteInt(SecretKey); *************** *** 551,555 **** } ! types = new PGTypeCollection(); types.Add(-2 , "serial8" , DbType.Int64 , Type.GetType("System.Int64") , 0, 1, 8, false, true); --- 551,555 ---- } ! types = new PgTypeCollection(); types.Add(-2 , "serial8" , DbType.Int64 , Type.GetType("System.Int64") , 0, 1, 8, false, true); *************** *** 597,601 **** } ! charSets = new PGCharSetCollection(); charSets.Add("SQL_ASCII", "ascii"); // ASCII --- 597,601 ---- } ! charSets = new PgCharSetCollection(); charSets.Add("SQL_ASCII", "ascii"); // ASCII *************** *** 620,649 **** #region METHODS ! public void SendInfoMessage(PGClientException exception) { if (InfoMessage != null) { ! InfoMessage(this, new PGClientMessageEventArgs(exception)); } } ! public PGStatement CreateStatement() { ! return new PGStatement(this); } ! public PGStatement CreateStatement(string stmtText) { ! return new PGStatement(this, stmtText); } ! public PGStatement CreateStatement(string parseName, string portalName) { ! return new PGStatement(this, parseName, portalName); } ! public PGStatement CreateStatement(string parseName, string portalName, string stmtText) { ! return new PGStatement(this, parseName, portalName, stmtText); } --- 620,649 ---- #region METHODS ! public void SendInfoMessage(PgClientException exception) { if (InfoMessage != null) { ! InfoMessage(this, new PgClientMessageEventArgs(exception)); } } ! public PgStatement CreateStatement() { ! return new PgStatement(this); } ! public PgStatement CreateStatement(string stmtText) { ! return new PgStatement(this, stmtText); } ! public PgStatement CreateStatement(string parseName, string portalName) { ! return new PgStatement(this, parseName, portalName); } ! public PgStatement CreateStatement(string parseName, string portalName, string stmtText) { ! return new PgStatement(this, parseName, portalName, stmtText); } *************** *** 661,666 **** networkStream = new NetworkStream(socket, true); ! send = new PGInetWriter(new BufferedStream(networkStream)); ! receive = new PGInetReader(new BufferedStream(networkStream)); } --- 661,666 ---- networkStream = new NetworkStream(socket, true); ! send = new PgInetWriter(new BufferedStream(networkStream)); ! receive = new PgInetReader(new BufferedStream(networkStream)); } Index: PGDecodeType.cs =================================================================== RCS file: /cvsroot/pgsqlclient/pgsqlclient/PostgreSql.Data.PGSqlClient/source/NPGClient/PGDecodeType.cs,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** PGDecodeType.cs 17 Jul 2003 21:13:05 -0000 1.2 --- PGDecodeType.cs 2 Aug 2003 19:13:49 -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.NPGClient { ! internal class PGDecodeType { } --- 19,25 ---- using System; ! namespace PostgreSql.Data.NPgClient { ! internal class PgDecodeType { } Index: PGEncodeType.cs =================================================================== RCS file: /cvsroot/pgsqlclient/pgsqlclient/PostgreSql.Data.PGSqlClient/source/NPGClient/PGEncodeType.cs,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** PGEncodeType.cs 17 Jul 2003 21:13:05 -0000 1.3 --- PGEncodeType.cs 2 Aug 2003 19:13:49 -0000 1.4 *************** *** 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.NPGClient { ! internal class PGEncodeType { } --- 19,25 ---- using System; ! namespace PostgreSql.Data.NPgClient { ! internal class PgEncodeType { } Index: PGFieldDescriptor.cs =================================================================== RCS file: /cvsroot/pgsqlclient/pgsqlclient/PostgreSql.Data.PGSqlClient/source/NPGClient/PGFieldDescriptor.cs,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** PGFieldDescriptor.cs 12 Jul 2003 08:11:23 -0000 1.1.1.1 --- PGFieldDescriptor.cs 2 Aug 2003 19:13:49 -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,25 **** using System; ! namespace PostgreSql.Data.NPGClient { ! internal class PGFieldDescriptor { #region FIELDS --- 19,25 ---- using System; ! namespace PostgreSql.Data.NPgClient { ! internal class PgFieldDescriptor { #region FIELDS *************** *** 28,32 **** private int oidTable; private short oidNumber; ! private PGType dataType; private short dataTypeSize; private int typeModifier; --- 28,32 ---- private int oidTable; private short oidNumber; ! private PgType dataType; private short dataTypeSize; private int typeModifier; *************** *** 55,59 **** } ! public PGType DataType { get { return dataType; } --- 55,59 ---- } ! public PgType DataType { get { return dataType; } *************** *** 83,87 **** #region CONSTRUCTORS ! public PGFieldDescriptor() { } --- 83,87 ---- #region CONSTRUCTORS ! public PgFieldDescriptor() { } Index: PGInetReader.cs =================================================================== RCS file: /cvsroot/pgsqlclient/pgsqlclient/PostgreSql.Data.PGSqlClient/source/NPGClient/PGInetReader.cs,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** PGInetReader.cs 12 Jul 2003 08:11:23 -0000 1.1.1.1 --- PGInetReader.cs 2 Aug 2003 19:13:49 -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 * *************** *** 22,32 **** using System.Net; ! namespace PostgreSql.Data.NPGClient { ! internal class PGInetReader : BinaryReader { #region CONTRUCTORS ! public PGInetReader(Stream input) : base(input) { } --- 22,32 ---- using System.Net; ! namespace PostgreSql.Data.NPgClient { ! internal class PgInetReader : BinaryReader { #region CONTRUCTORS ! public PgInetReader(Stream input) : base(input) { } Index: PGInetWriter.cs =================================================================== RCS file: /cvsroot/pgsqlclient/pgsqlclient/PostgreSql.Data.PGSqlClient/source/NPGClient/PGInetWriter.cs,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** PGInetWriter.cs 12 Jul 2003 08:11:23 -0000 1.1.1.1 --- PGInetWriter.cs 2 Aug 2003 19:13:49 -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 * *************** *** 22,32 **** using System.Net; ! namespace PostgreSql.Data.NPGClient { ! internal class PGInetWriter : BinaryWriter { #region CONSTRUCTORS ! public PGInetWriter(Stream output) : base(output) { } --- 22,32 ---- using System.Net; ! namespace PostgreSql.Data.NPgClient { ! internal class PgInetWriter : BinaryWriter { #region CONSTRUCTORS ! public PgInetWriter(Stream output) : base(output) { } *************** *** 36,40 **** #region METHODS ! public void WriteSimplePacket(PGOutputPacket packet) { // Write packet contents --- 36,40 ---- #region METHODS ! public void WriteSimplePacket(PgOutputPacket packet) { // Write packet contents *************** *** 46,50 **** } ! public void WritePacket(char format, PGOutputPacket packet) { // Update packet Length --- 46,50 ---- } ! public void WritePacket(char format, PgOutputPacket packet) { // Update packet Length Index: PGLayouts.cs =================================================================== RCS file: /cvsroot/pgsqlclient/pgsqlclient/PostgreSql.Data.PGSqlClient/source/NPGClient/PGLayouts.cs,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** PGLayouts.cs 12 Jul 2003 08:11:23 -0000 1.1.1.1 --- PGLayouts.cs 2 Aug 2003 19:13:49 -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 * *************** *** 20,24 **** using System.Runtime.InteropServices; ! namespace PostgreSql.Data.NPGClient { [StructLayout(LayoutKind.Explicit)] --- 20,24 ---- using System.Runtime.InteropServices; ! namespace PostgreSql.Data.NPgClient { [StructLayout(LayoutKind.Explicit)] Index: PGOutputPacket.cs =================================================================== RCS file: /cvsroot/pgsqlclient/pgsqlclient/PostgreSql.Data.PGSqlClient/source/NPGClient/PGOutputPacket.cs,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** PGOutputPacket.cs 20 Jul 2003 09:59:28 -0000 1.4 --- PGOutputPacket.cs 2 Aug 2003 19:13:49 -0000 1.5 *************** *** 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,30 **** using System.Globalization; ! namespace PostgreSql.Data.NPGClient { ! internal class PGOutputPacket : BinaryWriter { #region FIELDS --- 24,30 ---- using System.Globalization; ! namespace PostgreSql.Data.NPgClient { ! internal class PgOutputPacket : BinaryWriter { #region FIELDS *************** *** 46,50 **** #region CONSTRUCTORS ! public PGOutputPacket() : base(new MemoryStream()) { this.encoding = Encoding.Default; --- 46,50 ---- #region CONSTRUCTORS ! public PgOutputPacket() : base(new MemoryStream()) { this.encoding = Encoding.Default; *************** *** 52,56 **** } ! public PGOutputPacket(Encoding encoding) : base(new MemoryStream(), encoding) { this.encoding = encoding; --- 52,56 ---- } ! public PgOutputPacket(Encoding encoding) : base(new MemoryStream(), encoding) { this.encoding = encoding; *************** *** 58,62 **** } ! public PGOutputPacket(int length) : base(new MemoryStream()) { this.encoding = Encoding.Default; --- 58,62 ---- } ! public PgOutputPacket(int length) : base(new MemoryStream()) { this.encoding = Encoding.Default; *************** *** 64,68 **** } ! public PGOutputPacket(int length, Encoding encoding) : base(new MemoryStream(), encoding) { this.encoding = encoding; --- 64,68 ---- } ! public PgOutputPacket(int length, Encoding encoding) : base(new MemoryStream(), encoding) { this.encoding = encoding; *************** *** 77,81 **** { Write(data.ToCharArray()); ! Write(PGCodes.NULL_TERMINATOR); } --- 77,81 ---- { Write(data.ToCharArray()); ! Write(PgCodes.NULL_TERMINATOR); } *************** *** 123,127 **** public void WriteDate(DateTime date) { ! TimeSpan days = date.Subtract(PGCodes.BASE_DATE); WriteInt(days.Days); --- 123,127 ---- public void WriteDate(DateTime date) { ! TimeSpan days = date.Subtract(PgCodes.BASE_DATE); WriteInt(days.Days); *************** *** 130,134 **** public void WriteTimestamp(DateTime timestamp) { ! TimeSpan days = timestamp.Subtract(PGCodes.BASE_DATE); WriteDouble(days.TotalSeconds); --- 130,134 ---- public void WriteTimestamp(DateTime timestamp) { ! TimeSpan days = timestamp.Subtract(PgCodes.BASE_DATE); WriteDouble(days.TotalSeconds); *************** *** 137,143 **** public void WriteTime(DateTime time) { ! DateTime realTime = new DateTime(PGCodes.BASE_DATE.Year, ! PGCodes.BASE_DATE.Month, ! PGCodes.BASE_DATE.Day, time.Hour, time.Minute, --- 137,143 ---- public void WriteTime(DateTime time) { ! DateTime realTime = new DateTime(PgCodes.BASE_DATE.Year, ! PgCodes.BASE_DATE.Month, ! PgCodes.BASE_DATE.Day, time.Hour, time.Minute, *************** *** 145,154 **** time.Millisecond); ! TimeSpan seconds = realTime.Subtract(PGCodes.BASE_DATE); WriteDouble(seconds.TotalSeconds); } ! public void WriteParameter(PGParameter parameter) { int size = parameter.DataType.Size; --- 145,154 ---- time.Millisecond); ! TimeSpan seconds = realTime.Subtract(PgCodes.BASE_DATE); WriteDouble(seconds.TotalSeconds); } ! public void WriteParameter(PgParameter parameter) { int size = parameter.DataType.Size; *************** *** 234,238 **** { string paramValue = parameter.Value.ToString(); ! WriteInt(encoding.GetByteCount(paramValue + PGCodes.NULL_TERMINATOR)); WriteString(paramValue); } --- 234,238 ---- { string paramValue = parameter.Value.ToString(); ! WriteInt(encoding.GetByteCount(paramValue + PgCodes.NULL_TERMINATOR)); WriteString(paramValue); } Index: PGParameter.cs =================================================================== RCS file: /cvsroot/pgsqlclient/pgsqlclient/PostgreSql.Data.PGSqlClient/source/NPGClient/PGParameter.cs,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** PGParameter.cs 12 Jul 2003 08:11:23 -0000 1.1.1.1 --- PGParameter.cs 2 Aug 2003 19:13:49 -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,29 **** using System; ! namespace PostgreSql.Data.NPGClient { ! internal class PGParameter { #region FIELDS ! private PGType dataType; private object data; --- 19,29 ---- using System; ! namespace PostgreSql.Data.NPgClient { ! internal class PgParameter { #region FIELDS ! private PgType dataType; private object data; *************** *** 32,36 **** #region PARAMETERS ! public PGType DataType { get { return dataType; } --- 32,36 ---- #region PARAMETERS ! public PgType DataType { get { return dataType; } *************** *** 48,61 **** #region CONSTRUCTORS ! public PGParameter() { } ! public PGParameter(int dataType) { ! this.dataType = PGDbClient.Types[dataType]; } ! public PGParameter(int dataType, object data) : this(dataType) { this.data = data; --- 48,61 ---- #region CONSTRUCTORS ! public PgParameter() { } ! public PgParameter(int dataType) { ! this.dataType = PgDbClient.Types[dataType]; } ! public PgParameter(int dataType, object data) : this(dataType) { this.data = data; Index: PGResponsePacket.cs =================================================================== RCS file: /cvsroot/pgsqlclient/pgsqlclient/PostgreSql.Data.PGSqlClient/source/NPGClient/PGResponsePacket.cs,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** PGResponsePacket.cs 20 Jul 2003 09:59:28 -0000 1.5 --- PGResponsePacket.cs 2 Aug 2003 19:13:49 -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,30 **** using System.Net; ! namespace PostgreSql.Data.NPGClient { ! internal class PGResponsePacket : BinaryReader { #region FIELDS --- 24,30 ---- using System.Net; ! namespace PostgreSql.Data.NPgClient { ! internal class PgResponsePacket : BinaryReader { #region FIELDS *************** *** 53,61 **** #region CONSTRUCTORS ! public PGResponsePacket() : base(new MemoryStream()) { } ! public PGResponsePacket(char message, byte[] contents) : base(new MemoryStream(contents)) { this.message = message; --- 53,61 ---- #region CONSTRUCTORS ! public PgResponsePacket() : base(new MemoryStream()) { } ! public PgResponsePacket(char message, byte[] contents) : base(new MemoryStream(contents)) { this.message = message; *************** *** 71,75 **** char c; ! while ((c = ReadChar()) != PGCodes.NULL_TERMINATOR ) { cString.Append(c); --- 71,75 ---- char c; ! while ((c = ReadChar()) != PgCodes.NULL_TERMINATOR ) { cString.Append(c); *************** *** 162,166 **** DateTime date = new DateTime(days); ! return PGCodes.BASE_DATE.AddDays(days); } --- 162,166 ---- DateTime date = new DateTime(days); ! return PgCodes.BASE_DATE.AddDays(days); } *************** *** 169,173 **** double seconds = ReadDouble(); ! return PGCodes.BASE_DATE.AddSeconds(seconds); } --- 169,173 ---- double seconds = ReadDouble(); ! return PgCodes.BASE_DATE.AddSeconds(seconds); } *************** *** 176,185 **** double seconds = ReadDouble(); ! return PGCodes.BASE_DATE.AddSeconds(seconds); } ! public Array ReadPrimitiveArray(PGType type, int length) { ! PGType elementType = type; Array data = null; --- 176,185 ---- double seconds = ReadDouble(); ! return PgCodes.BASE_DATE.AddSeconds(seconds); } ! public Array ReadPrimitiveArray(PgType type, int length) { ! PgType elementType = type; Array data = null; *************** *** 197,201 **** throw new NotSupportedException("Invalid flags value"); } ! elementType = PGDbClient.Types[ReadInt()]; for (int i = 0; i < ndims; i++) { --- 197,201 ---- throw new NotSupportedException("Invalid flags value"); } ! elementType = PgDbClient.Types[ReadInt()]; for (int i = 0; i < ndims; i++) { *************** *** 213,219 **** } ! public Array ReadStringArray(PGType type, int length) { ! PGType elementType = PGDbClient.Types[type.ArrayType]; Array data = null; --- 213,219 ---- } ! public Array ReadStringArray(PgType type, int length) { ! PgType elementType = PgDbClient.Types[type.ArrayType]; Array data = null; *************** *** 233,242 **** } ! public Array ReadVector(PGType type, int length) { ! PGType elementType = PGDbClient.Types[type.ArrayType]; Array data = null; ! data = Array.CreateInstance(elementType.SystemType, PGCodes.INDEX_MAX_KEYS); for (int i = 0; i < data.Length; i++ ) --- 233,242 ---- } ! public Array ReadVector(PgType type, int length) { ! PgType elementType = PgDbClient.Types[type.ArrayType]; Array data = null; ! data = Array.CreateInstance(elementType.SystemType, PgCodes.INDEX_MAX_KEYS); for (int i = 0; i < data.Length; i++ ) *************** *** 249,253 **** } ! public object ReadValue(PGType type, int length) { switch (type.DbType) --- 249,253 ---- } ! public object ReadValue(PgType type, int length) { switch (type.DbType) *************** *** 340,344 **** #region PRIVATE_METHODS ! private byte[] decodeArrayData(PGType type, int elementCount, int length) { byte[] data = new byte[length]; --- 340,344 ---- #region PRIVATE_METHODS ! private byte[] decodeArrayData(PgType type, int elementCount, int length) { byte[] data = new byte[length]; Index: PGRowDescriptor.cs =================================================================== RCS file: /cvsroot/pgsqlclient/pgsqlclient/PostgreSql.Data.PGSqlClient/source/NPGClient/PGRowDescriptor.cs,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** PGRowDescriptor.cs 12 Jul 2003 08:11:23 -0000 1.1.1.1 --- PGRowDescriptor.cs 2 Aug 2003 19:13:49 -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,29 **** using System; ! namespace PostgreSql.Data.NPGClient { ! internal class PGRowDescriptor { #region FIELDS ! private PGFieldDescriptor[] fields; #endregion --- 19,29 ---- using System; ! namespace PostgreSql.Data.NPgClient { ! internal class PgRowDescriptor { #region FIELDS ! private PgFieldDescriptor[] fields; #endregion *************** *** 31,35 **** #region PROPERTIES ! public PGFieldDescriptor[] Fields { get { return fields; } --- 31,35 ---- #region PROPERTIES ! public PgFieldDescriptor[] Fields { get { return fields; } *************** *** 41,51 **** #region CONSTRUCTORS ! public PGRowDescriptor() { } ! public PGRowDescriptor(int count) { ! fields = new PGFieldDescriptor[count]; } --- 41,51 ---- #region CONSTRUCTORS ! public PgRowDescriptor() { } ! public PgRowDescriptor(int count) { ! fields = new PgFieldDescriptor[count]; } Index: PGStatement.cs =================================================================== RCS file: /cvsroot/pgsqlclient/pgsqlclient/PostgreSql.Data.PGSqlClient/source/NPGClient/PGStatement.cs,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** PGStatement.cs 1 Aug 2003 17:51:58 -0000 1.2 --- PGStatement.cs 2 Aug 2003 19:13:49 -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,30 **** using System.Collections; ! namespace PostgreSql.Data.NPGClient { #region ENUMS ! internal enum PGStatementStatus { Initial, --- 22,30 ---- using System.Collections; ! namespace PostgreSql.Data.NPgClient { #region ENUMS ! internal enum PgStatementStatus { I... [truncated message content] |