pgsqlclient-checkins Mailing List for PostgreSqlClient (Page 28)
Status: Inactive
Brought to you by:
carlosga_fb
You can subscribe to this list here.
| 2003 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
(120) |
Aug
(95) |
Sep
(95) |
Oct
(213) |
Nov
(114) |
Dec
(64) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2004 |
Jan
(6) |
Feb
(134) |
Mar
(88) |
Apr
(28) |
May
(22) |
Jun
(15) |
Jul
(23) |
Aug
(2) |
Sep
(15) |
Oct
(2) |
Nov
(6) |
Dec
|
| 2005 |
Jan
(8) |
Feb
(6) |
Mar
|
Apr
(42) |
May
(3) |
Jun
|
Jul
|
Aug
|
Sep
(84) |
Oct
|
Nov
|
Dec
|
| 2006 |
Jan
|
Feb
|
Mar
(84) |
Apr
(46) |
May
(40) |
Jun
(8) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
|
From: <car...@us...> - 2003-12-21 14:42:19
|
Update of /cvsroot/pgsqlclient/pgsqlclient_10/Mono.Security.Protocol.Tls/Mono.Security.Protocol.Tls/Mono.Math.Prime
In directory sc8-pr-cvs1:/tmp/cvs-serv2701
Added Files:
ConfidenceFactor.cs PrimalityTests.cs
Log Message:
2003-12-21 Carlos Guzmán Álvarez <car...@te...>
* Added files from mono:: project that are going to be needed
for client authentication:
Mono.Math/*
Mono.Math.Prime/*
Mono.Math.Prime.Generator/*
Mono.Security.Cryptography/RSAManaged.cs
--- NEW FILE: ConfidenceFactor.cs ---
//
// Mono.Math.Prime.ConfidenceFactor.cs - Confidence factor for prime generation
//
// Authors:
// Ben Maurer
//
// Copyright (c) 2003 Ben Maurer. All rights reserved
//
using System;
namespace Mono.Math.Prime {
/// <summary>
/// A factor of confidence.
/// </summary>
internal enum ConfidenceFactor {
/// <summary>
/// Only suitable for development use, probability of failure may be greater than 1/2^20.
/// </summary>
ExtraLow,
/// <summary>
/// Suitable only for transactions which do not require forward secrecy. Probability of failure about 1/2^40
/// </summary>
Low,
/// <summary>
/// Designed for production use. Probability of failure about 1/2^80.
/// </summary>
Medium,
/// <summary>
/// Suitable for sensitive data. Probability of failure about 1/2^160.
/// </summary>
High,
/// <summary>
/// Use only if you have lots of time! Probability of failure about 1/2^320.
/// </summary>
ExtraHigh,
/// <summary>
/// Only use methods which generate provable primes. Not yet implemented.
/// </summary>
Provable
}
}
--- NEW FILE: PrimalityTests.cs ---
//
// Mono.Math.Prime.PrimalityTests.cs - Test for primality
//
// Authors:
// Ben Maurer
//
// Copyright (c) 2003 Ben Maurer. All rights reserved
//
using System;
using System.Security.Cryptography;
namespace Mono.Math.Prime {
[CLSCompliant(false)]
internal delegate bool PrimalityTest (BigInteger bi, ConfidenceFactor confidence);
[CLSCompliant(false)]
internal sealed class PrimalityTests {
#region SPP Test
private static int GetSPPRounds (BigInteger bi, ConfidenceFactor confidence)
{
int bc = bi.bitCount();
int Rounds;
// Data from HAC, 4.49
if (bc <= 100 ) Rounds = 27;
else if (bc <= 150 ) Rounds = 18;
else if (bc <= 200 ) Rounds = 15;
else if (bc <= 250 ) Rounds = 12;
else if (bc <= 300 ) Rounds = 9;
else if (bc <= 350 ) Rounds = 8;
else if (bc <= 400 ) Rounds = 7;
else if (bc <= 500 ) Rounds = 6;
else if (bc <= 600 ) Rounds = 5;
else if (bc <= 800 ) Rounds = 4;
else if (bc <= 1250) Rounds = 3;
else Rounds = 2;
switch (confidence) {
case ConfidenceFactor.ExtraLow:
Rounds >>= 2;
return Rounds != 0 ? Rounds : 1;
case ConfidenceFactor.Low:
Rounds >>= 1;
return Rounds != 0 ? Rounds : 1;
case ConfidenceFactor.Medium:
return Rounds;
case ConfidenceFactor.High:
return Rounds <<= 1;
case ConfidenceFactor.ExtraHigh:
return Rounds <<= 2;
case ConfidenceFactor.Provable:
throw new Exception ("The Rabin-Miller test can not be executed in a way such that its results are provable");
default:
throw new ArgumentOutOfRangeException ("confidence");
}
}
/// <summary>
/// Probabilistic prime test based on Rabin-Miller's test
/// </summary>
/// <param name="bi" type="BigInteger.BigInteger">
/// <para>
/// The number to test.
/// </para>
/// </param>
/// <param name="confidence" type="int">
/// <para>
/// The number of chosen bases. The test has at least a
/// 1/4^confidence chance of falsely returning True.
/// </para>
/// </param>
/// <returns>
/// <para>
/// True if "this" is a strong pseudoprime to randomly chosen bases.
/// </para>
/// <para>
/// False if "this" is definitely NOT prime.
/// </para>
/// </returns>
public static bool RabinMillerTest (BigInteger bi, ConfidenceFactor confidence)
{
int Rounds = GetSPPRounds (bi, confidence);
// calculate values of s and t
BigInteger p_sub1 = bi - 1;
int s = p_sub1.LowestSetBit ();
BigInteger t = p_sub1 >> s;
int bits = bi.bitCount ();
BigInteger a = null;
RandomNumberGenerator rng = RandomNumberGenerator.Create ();
BigInteger.ModulusRing mr = new BigInteger.ModulusRing (bi);
for (int round = 0; round < Rounds; round++) {
while (true) { // generate a < n
a = BigInteger.genRandom (bits, rng);
// make sure "a" is not 0
if (a > 1 && a < bi)
break;
}
if (a.gcd (bi) != 1) return false;
BigInteger b = mr.Pow (a, t);
if (b == 1) continue; // a^t mod p = 1
bool result = false;
for (int j = 0; j < s; j++) {
if (b == p_sub1) { // a^((2^j)*t) mod p = p-1 for some 0 <= j <= s-1
result = true;
break;
}
b = (b * b) % bi;
}
if (result == false)
return false;
}
return true;
}
public static bool SmallPrimeSppTest (BigInteger bi, ConfidenceFactor confidence)
{
int Rounds = GetSPPRounds (bi, confidence);
// calculate values of s and t
BigInteger p_sub1 = bi - 1;
int s = p_sub1.LowestSetBit ();
BigInteger t = p_sub1 >> s;
BigInteger.ModulusRing mr = new BigInteger.ModulusRing (bi);
for (int round = 0; round < Rounds; round++) {
BigInteger b = mr.Pow (BigInteger.smallPrimes [round], t);
if (b == 1) continue; // a^t mod p = 1
bool result = false;
for (int j = 0; j < s; j++) {
if (b == p_sub1) { // a^((2^j)*t) mod p = p-1 for some 0 <= j <= s-1
result = true;
break;
}
b = (b * b) % bi;
}
if (result == false)
return false;
}
return true;
}
#endregion
// TODO: Implement the Lucus test
// TODO: Implement other new primality tests
// TODO: Implement primality proving
}
}
|
|
From: <car...@us...> - 2003-12-21 14:41:50
|
Update of /cvsroot/pgsqlclient/pgsqlclient_10/Mono.Security.Protocol.Tls/Mono.Security.Protocol.Tls/Mono.Math In directory sc8-pr-cvs1:/tmp/cvs-serv2614 Added Files: BigInteger.cs Log Message: 2003-12-21 Carlos Guzmán Álvarez <car...@te...> * Added files from mono:: project that are going to be needed for client authentication: Mono.Math/* Mono.Math.Prime/* Mono.Math.Prime.Generator/* Mono.Security.Cryptography/RSAManaged.cs --- NEW FILE: BigInteger.cs --- (This appears to be a binary file; contents omitted.) |
|
From: <car...@us...> - 2003-12-21 14:40:07
|
Update of /cvsroot/pgsqlclient/pgsqlclient_10/Mono.Security.Protocol.Tls/Mono.Security.Protocol.Tls/Mono.Math.Prime.Generator In directory sc8-pr-cvs1:/tmp/cvs-serv2443/Mono.Math.Prime.Generator Log Message: Directory /cvsroot/pgsqlclient/pgsqlclient_10/Mono.Security.Protocol.Tls/Mono.Security.Protocol.Tls/Mono.Math.Prime.Generator added to the repository |
|
From: <car...@us...> - 2003-12-21 14:39:57
|
Update of /cvsroot/pgsqlclient/pgsqlclient_10/Mono.Security.Protocol.Tls/Mono.Security.Protocol.Tls
In directory sc8-pr-cvs1:/tmp/cvs-serv2382
Modified Files:
CipherSuite.cs
Log Message:
2003-12-21 Carlos Guzmán Álvarez <car...@te...>
* Mono.Security.Protocol.Tls/RSASslSignatureFormatter.cs:
- Create RSA as an RSAManaged instance.
Index: CipherSuite.cs
===================================================================
RCS file: /cvsroot/pgsqlclient/pgsqlclient_10/Mono.Security.Protocol.Tls/Mono.Security.Protocol.Tls/CipherSuite.cs,v
retrieving revision 1.11
retrieving revision 1.12
diff -C2 -d -r1.11 -r1.12
*** CipherSuite.cs 14 Dec 2003 14:59:39 -0000 1.11
--- CipherSuite.cs 21 Dec 2003 14:39:54 -0000 1.12
***************
*** 236,240 ****
public RSA CertificateRSA()
{
! return this.Context.ServerSettings.Certificates[0].RSA;
}
--- 236,245 ----
public RSA CertificateRSA()
{
! RSA rsaCert = this.Context.ServerSettings.Certificates[0].RSA;
! RSA rsa = new RSAManaged(rsaCert.KeySize);
!
! rsa.ImportParameters(rsaCert.ExportParameters(false));
!
! return rsa;
}
|
|
From: <car...@us...> - 2003-12-21 14:38:30
|
Update of /cvsroot/pgsqlclient/pgsqlclient_10/Mono.Security.Protocol.Tls/Mono.Security.Protocol.Tls In directory sc8-pr-cvs1:/tmp/cvs-serv2192 Modified Files: TlsCipherSuiteFactory.cs Log Message: Minor change Index: TlsCipherSuiteFactory.cs =================================================================== RCS file: /cvsroot/pgsqlclient/pgsqlclient_10/Mono.Security.Protocol.Tls/Mono.Security.Protocol.Tls/TlsCipherSuiteFactory.cs,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** TlsCipherSuiteFactory.cs 18 Dec 2003 10:09:45 -0000 1.14 --- TlsCipherSuiteFactory.cs 21 Dec 2003 14:38:27 -0000 1.15 *************** *** 50,54 **** TlsCipherSuiteCollection scs = new TlsCipherSuiteCollection(SecurityProtocolType.Tls); ! // Supported ciphers scs.Add((0x00 << 0x08) | 0x35, "TLS_RSA_WITH_AES_256_CBC_SHA", CipherAlgorithmType.Rijndael, HashAlgorithmType.Sha1, ExchangeAlgorithmType.RsaSign, false, true, 32, 32, 256, 16, 16); scs.Add((0x00 << 0x08) | 0x2F, "TLS_RSA_WITH_AES_128_CBC_SHA", CipherAlgorithmType.Rijndael, HashAlgorithmType.Sha1, ExchangeAlgorithmType.RsaSign, false, true, 16, 16, 128, 16, 16); --- 50,55 ---- TlsCipherSuiteCollection scs = new TlsCipherSuiteCollection(SecurityProtocolType.Tls); ! // Supported ciphers ! scs.Add((0x00 << 0x08) | 0x35, "TLS_RSA_WITH_AES_256_CBC_SHA", CipherAlgorithmType.Rijndael, HashAlgorithmType.Sha1, ExchangeAlgorithmType.RsaSign, false, true, 32, 32, 256, 16, 16); scs.Add((0x00 << 0x08) | 0x2F, "TLS_RSA_WITH_AES_128_CBC_SHA", CipherAlgorithmType.Rijndael, HashAlgorithmType.Sha1, ExchangeAlgorithmType.RsaSign, false, true, 16, 16, 128, 16, 16); |
|
From: <car...@us...> - 2003-12-21 14:37:47
|
Update of /cvsroot/pgsqlclient/pgsqlclient_10/Mono.Security.Protocol.Tls/Mono.Security.Protocol.Tls/Mono.Math.Prime In directory sc8-pr-cvs1:/tmp/cvs-serv1909/Mono.Math.Prime Log Message: Directory /cvsroot/pgsqlclient/pgsqlclient_10/Mono.Security.Protocol.Tls/Mono.Security.Protocol.Tls/Mono.Math.Prime added to the repository |
|
From: <car...@us...> - 2003-12-21 14:36:18
|
Update of /cvsroot/pgsqlclient/pgsqlclient_10/Mono.Security.Protocol.Tls/Mono.Security.Protocol.Tls In directory sc8-pr-cvs1:/tmp/cvs-serv1765 Modified Files: SslClientStream.cs Log Message: Minor change Index: SslClientStream.cs =================================================================== RCS file: /cvsroot/pgsqlclient/pgsqlclient_10/Mono.Security.Protocol.Tls/Mono.Security.Protocol.Tls/SslClientStream.cs,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** SslClientStream.cs 14 Dec 2003 14:59:39 -0000 1.10 --- SslClientStream.cs 21 Dec 2003 14:36:14 -0000 1.11 *************** *** 910,914 **** break; } ! break; } } --- 910,914 ---- break; } ! break; } } |
|
From: <car...@us...> - 2003-12-21 14:33:17
|
Update of /cvsroot/pgsqlclient/pgsqlclient_10/Mono.Security.Protocol.Tls/Mono.Security.Protocol.Tls/Mono.Math In directory sc8-pr-cvs1:/tmp/cvs-serv1339/Mono.Math Log Message: Directory /cvsroot/pgsqlclient/pgsqlclient_10/Mono.Security.Protocol.Tls/Mono.Security.Protocol.Tls/Mono.Math added to the repository |
|
From: <car...@us...> - 2003-12-21 14:33:07
|
Update of /cvsroot/pgsqlclient/pgsqlclient_10/Mono.Security.Protocol.Tls/Mono.Security.Protocol.Tls In directory sc8-pr-cvs1:/tmp/cvs-serv1287 Modified Files: RSASslSignatureDeformatter.cs RSASslSignatureFormatter.cs Log Message: Changed field key to be RSA Index: RSASslSignatureDeformatter.cs =================================================================== RCS file: /cvsroot/pgsqlclient/pgsqlclient_10/Mono.Security.Protocol.Tls/Mono.Security.Protocol.Tls/RSASslSignatureDeformatter.cs,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** RSASslSignatureDeformatter.cs 14 Dec 2003 15:06:04 -0000 1.1 --- RSASslSignatureDeformatter.cs 21 Dec 2003 14:33:04 -0000 1.2 *************** *** 32,37 **** #region Fields ! private AsymmetricAlgorithm key; ! private HashAlgorithm hash; #endregion --- 32,37 ---- #region Fields ! private RSA key; ! private HashAlgorithm hash; #endregion *************** *** 70,74 **** return Mono.Security.Cryptography.PKCS1.Verify_v15( ! (RSA)this.key, this.hash, rgbHash, --- 70,74 ---- return Mono.Security.Cryptography.PKCS1.Verify_v15( ! this.key, this.hash, rgbHash, *************** *** 97,101 **** } ! this.key = key; } --- 97,101 ---- } ! this.key = key as RSA; } Index: RSASslSignatureFormatter.cs =================================================================== RCS file: /cvsroot/pgsqlclient/pgsqlclient_10/Mono.Security.Protocol.Tls/Mono.Security.Protocol.Tls/RSASslSignatureFormatter.cs,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** RSASslSignatureFormatter.cs 14 Dec 2003 15:06:04 -0000 1.1 --- RSASslSignatureFormatter.cs 21 Dec 2003 14:33:04 -0000 1.2 *************** *** 32,37 **** #region Fields ! private AsymmetricAlgorithm key; ! private HashAlgorithm hash; #endregion --- 32,37 ---- #region Fields ! private RSA key; ! private HashAlgorithm hash; #endregion *************** *** 68,72 **** return Mono.Security.Cryptography.PKCS1.Sign_v15( ! (RSA)this.key, this.hash, rgbHash); --- 68,72 ---- return Mono.Security.Cryptography.PKCS1.Sign_v15( ! this.key, this.hash, rgbHash); *************** *** 94,98 **** } ! this.key = key; } --- 94,98 ---- } ! this.key = key as RSA; } |
|
From: <car...@us...> - 2003-12-19 11:51:26
|
Update of /cvsroot/pgsqlclient/pgsqlclient_10/PostgreSql.Data.PgSqlClient/source
In directory sc8-pr-cvs1:/tmp/cvs-serv25048
Modified Files:
PgConnectionPool.cs PgDbConnection.cs
Log Message:
Fixed bug in Connection Pooling
Index: PgConnectionPool.cs
===================================================================
RCS file: /cvsroot/pgsqlclient/pgsqlclient_10/PostgreSql.Data.PgSqlClient/source/PgConnectionPool.cs,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** PgConnectionPool.cs 14 Dec 2003 15:06:50 -0000 1.2
--- PgConnectionPool.cs 19 Dec 2003 11:51:23 -0000 1.3
***************
*** 223,227 ****
if (connection.Lifetime != 0)
{
! if ((now - connection.Created) > connection.Lifetime)
{
unlocked.Remove(connection);
--- 223,227 ----
if (connection.Lifetime != 0)
{
! if ((now - connection.Created) >= connection.Lifetime)
{
unlocked.Remove(connection);
Index: PgDbConnection.cs
===================================================================
RCS file: /cvsroot/pgsqlclient/pgsqlclient_10/PostgreSql.Data.PgSqlClient/source/PgDbConnection.cs,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** PgDbConnection.cs 14 Dec 2003 15:06:50 -0000 1.4
--- PgDbConnection.cs 19 Dec 2003 11:51:23 -0000 1.5
***************
*** 159,162 ****
--- 159,163 ----
case "connection lifetime":
lifetime = Int32.Parse(element.Groups[2].Value.Trim());
+ lifetime *= TimeSpan.TicksPerSecond;
break;
|
Update of /cvsroot/pgsqlclient/pgsqlclient_10/PostgreSql.Data.PgSqlClient/source/PgTypes In directory sc8-pr-cvs1:/tmp/cvs-serv22448 Modified Files: PgBox.cs PgCircle.cs PgLine.cs PgLSeg.cs PgPath.cs PgPoint.cs PgPolygon.cs PgTimeSpan.cs Log Message: Changed #region names Index: PgBox.cs =================================================================== RCS file: /cvsroot/pgsqlclient/pgsqlclient_10/PostgreSql.Data.PgSqlClient/source/PgTypes/PgBox.cs,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** PgBox.cs 14 Dec 2003 15:07:55 -0000 1.7 --- PgBox.cs 18 Dec 2003 11:47:05 -0000 1.8 *************** *** 61,65 **** #endregion ! #region OPERATORS public static bool operator ==(PgBox left, PgBox right) --- 61,65 ---- #endregion ! #region Operators public static bool operator ==(PgBox left, PgBox right) *************** *** 91,95 **** #endregion ! #region OVERRIDEN_METHODS public override string ToString() --- 91,95 ---- #endregion ! #region Overriden Methods public override string ToString() Index: PgCircle.cs =================================================================== RCS file: /cvsroot/pgsqlclient/pgsqlclient_10/PostgreSql.Data.PgSqlClient/source/PgTypes/PgCircle.cs,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** PgCircle.cs 14 Dec 2003 15:07:55 -0000 1.5 --- PgCircle.cs 18 Dec 2003 11:47:05 -0000 1.6 *************** *** 61,65 **** #endregion ! #region OPERATORS public static bool operator ==(PgCircle left, PgCircle right) --- 61,65 ---- #endregion ! #region Operators public static bool operator ==(PgCircle left, PgCircle right) *************** *** 89,93 **** #endregion ! #region OVERRIDEN_METHODS public override string ToString() --- 89,93 ---- #endregion ! #region Overriden Methods public override string ToString() Index: PgLine.cs =================================================================== RCS file: /cvsroot/pgsqlclient/pgsqlclient_10/PostgreSql.Data.PgSqlClient/source/PgTypes/PgLine.cs,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** PgLine.cs 14 Dec 2003 15:07:55 -0000 1.5 --- PgLine.cs 18 Dec 2003 11:47:05 -0000 1.6 *************** *** 61,65 **** #endregion ! #region OPERATORS public static bool operator ==(PgLine left, PgLine right) --- 61,65 ---- #endregion ! #region Operators public static bool operator ==(PgLine left, PgLine right) *************** *** 91,95 **** #endregion ! #region OVERRIDEN_METHODS public override string ToString() --- 91,95 ---- #endregion ! #region Overriden Methods public override string ToString() Index: PgLSeg.cs =================================================================== RCS file: /cvsroot/pgsqlclient/pgsqlclient_10/PostgreSql.Data.PgSqlClient/source/PgTypes/PgLSeg.cs,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** PgLSeg.cs 14 Dec 2003 15:07:55 -0000 1.6 --- PgLSeg.cs 18 Dec 2003 11:47:05 -0000 1.7 *************** *** 61,65 **** #endregion ! #region OPERATORS public static bool operator ==(PgLSeg left, PgLSeg right) --- 61,65 ---- #endregion ! #region Operators public static bool operator ==(PgLSeg left, PgLSeg right) *************** *** 91,95 **** #endregion ! #region OVERRIDEN_METHODS public override string ToString() --- 91,95 ---- #endregion ! #region Overriden Methods public override string ToString() Index: PgPath.cs =================================================================== RCS file: /cvsroot/pgsqlclient/pgsqlclient_10/PostgreSql.Data.PgSqlClient/source/PgTypes/PgPath.cs,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** PgPath.cs 14 Dec 2003 15:07:55 -0000 1.5 --- PgPath.cs 18 Dec 2003 11:47:05 -0000 1.6 *************** *** 55,59 **** #endregion ! #region OPERATORS public static bool operator ==(PgPath left, PgPath right) --- 55,59 ---- #endregion ! #region Operators public static bool operator ==(PgPath left, PgPath right) *************** *** 99,103 **** #endregion ! #region OVERRIDEN_METHODS public override string ToString() --- 99,103 ---- #endregion ! #region Overriden Methods public override string ToString() Index: PgPoint.cs =================================================================== RCS file: /cvsroot/pgsqlclient/pgsqlclient_10/PostgreSql.Data.PgSqlClient/source/PgTypes/PgPoint.cs,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** PgPoint.cs 14 Dec 2003 15:07:55 -0000 1.5 --- PgPoint.cs 18 Dec 2003 11:47:05 -0000 1.6 *************** *** 55,59 **** #endregion ! #region OPERATORS public static bool operator ==(PgPoint left, PgPoint right) --- 55,59 ---- #endregion ! #region Operators public static bool operator ==(PgPoint left, PgPoint right) *************** *** 83,87 **** #endregion ! #region OVERRIDEN_METHODS public override string ToString() --- 83,87 ---- #endregion ! #region Overriden Methods public override string ToString() Index: PgPolygon.cs =================================================================== RCS file: /cvsroot/pgsqlclient/pgsqlclient_10/PostgreSql.Data.PgSqlClient/source/PgTypes/PgPolygon.cs,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** PgPolygon.cs 14 Dec 2003 15:07:55 -0000 1.6 --- PgPolygon.cs 18 Dec 2003 11:47:05 -0000 1.7 *************** *** 48,52 **** #endregion ! #region OPERATORS public static bool operator ==(PgPolygon left, PgPolygon right) --- 48,52 ---- #endregion ! #region Operators public static bool operator ==(PgPolygon left, PgPolygon right) *************** *** 92,96 **** #endregion ! #region OVERRIDEN_METHODS public override string ToString() --- 92,96 ---- #endregion ! #region Overriden Methods public override string ToString() Index: PgTimeSpan.cs =================================================================== RCS file: /cvsroot/pgsqlclient/pgsqlclient_10/PostgreSql.Data.PgSqlClient/source/PgTypes/PgTimeSpan.cs,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** PgTimeSpan.cs 18 Dec 2003 10:27:33 -0000 1.4 --- PgTimeSpan.cs 18 Dec 2003 11:47:05 -0000 1.5 *************** *** 124,128 **** #endregion ! #region OPERATORS public static bool operator ==(PgTimeSpan left, PgTimeSpan right) --- 124,128 ---- #endregion ! #region Operators public static bool operator ==(PgTimeSpan left, PgTimeSpan right) *************** *** 210,214 **** #endregion ! #region OVERRIDEN_METHODS public override string ToString() --- 210,214 ---- #endregion ! #region Overriden Methods public override string ToString() |
Update of /cvsroot/pgsqlclient/pgsqlclient_10/PostgreSql.Data.PgSqlClient/source/DbSchema
In directory sc8-pr-cvs1:/tmp/cvs-serv22370
Modified Files:
PgAbstractDbSchema.cs PgAggregatesSchema.cs PgCastsSchema.cs
PgCheckConstraints.cs PgCheckConstraintsByTable.cs
PgColumnsSchema.cs PgDatabaseSchema.cs PgDomainsSchema.cs
PgForeignKeysSchema.cs PgFunctionPrivilegesSchema.cs
PgFunctionsSchema.cs PgGroupsSchema.cs PgIndexesSchema.cs
PgPrimaryKeysSchema.cs PgProviderTypesSchema.cs
PgSchemataSchema.cs PgSqlLanguagesSchema.cs
PgTableConstraintsSchema.cs PgTablePrivilegesSchema.cs
PgTablesSchema.cs PgTableStatisticsSchema.cs
PgTriggersSchema.cs PgUsersSchema.cs PgViewPrivilegesSchema.cs
PgViewsSchema.cs
Log Message:
Changed #region names
Index: PgAbstractDbSchema.cs
===================================================================
RCS file: /cvsroot/pgsqlclient/pgsqlclient_10/PostgreSql.Data.PgSqlClient/source/DbSchema/PgAbstractDbSchema.cs,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** PgAbstractDbSchema.cs 14 Dec 2003 15:07:38 -0000 1.3
--- PgAbstractDbSchema.cs 18 Dec 2003 11:46:52 -0000 1.4
***************
*** 25,29 ****
namespace PostgreSql.Data.PgSqlClient.DbSchema
{
! #region STRUCTS
internal struct PgColumn
--- 25,29 ----
namespace PostgreSql.Data.PgSqlClient.DbSchema
{
! #region Structures
internal struct PgColumn
***************
*** 111,115 ****
#endregion
! #region ADD_METHODS
public void AddTable(string tableName)
--- 111,115 ----
#endregion
! #region Add Methods
public void AddTable(string tableName)
Index: PgAggregatesSchema.cs
===================================================================
RCS file: /cvsroot/pgsqlclient/pgsqlclient_10/PostgreSql.Data.PgSqlClient/source/DbSchema/PgAggregatesSchema.cs,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** PgAggregatesSchema.cs 14 Dec 2003 15:07:38 -0000 1.3
--- PgAggregatesSchema.cs 18 Dec 2003 11:46:52 -0000 1.4
***************
*** 33,37 ****
#endregion
! #region ADD_METHODS
public override void AddTables()
--- 33,37 ----
#endregion
! #region Add Methods
public override void AddTables()
***************
*** 69,73 ****
#endregion
! #region PARSE_METHODS
public override object[] ParseRestrictions(object[] restrictions)
--- 69,73 ----
#endregion
! #region Parse Methods
public override object[] ParseRestrictions(object[] restrictions)
Index: PgCastsSchema.cs
===================================================================
RCS file: /cvsroot/pgsqlclient/pgsqlclient_10/PostgreSql.Data.PgSqlClient/source/DbSchema/PgCastsSchema.cs,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** PgCastsSchema.cs 14 Dec 2003 15:07:38 -0000 1.3
--- PgCastsSchema.cs 18 Dec 2003 11:46:52 -0000 1.4
***************
*** 33,37 ****
#endregion
! #region ADD_METHODS
public override void AddTables()
--- 33,37 ----
#endregion
! #region Add Methods
public override void AddTables()
***************
*** 72,76 ****
#endregion
! #region PARSE_METHODS
public override object[] ParseRestrictions(object[] restrictions)
--- 72,76 ----
#endregion
! #region Parse Methods
public override object[] ParseRestrictions(object[] restrictions)
Index: PgCheckConstraints.cs
===================================================================
RCS file: /cvsroot/pgsqlclient/pgsqlclient_10/PostgreSql.Data.PgSqlClient/source/DbSchema/PgCheckConstraints.cs,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** PgCheckConstraints.cs 14 Dec 2003 15:07:38 -0000 1.3
--- PgCheckConstraints.cs 18 Dec 2003 11:46:52 -0000 1.4
***************
*** 33,37 ****
#endregion
! #region ADD_METHODS
public override void AddTables()
--- 33,37 ----
#endregion
! #region Add Methods
public override void AddTables()
***************
*** 71,75 ****
#endregion
! #region PARSE_METHODS
public override object[] ParseRestrictions(object[] restrictions)
--- 71,75 ----
#endregion
! #region Parse Methods
public override object[] ParseRestrictions(object[] restrictions)
Index: PgCheckConstraintsByTable.cs
===================================================================
RCS file: /cvsroot/pgsqlclient/pgsqlclient_10/PostgreSql.Data.PgSqlClient/source/DbSchema/PgCheckConstraintsByTable.cs,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** PgCheckConstraintsByTable.cs 14 Dec 2003 15:07:38 -0000 1.3
--- PgCheckConstraintsByTable.cs 18 Dec 2003 11:46:52 -0000 1.4
***************
*** 33,37 ****
#endregion
! #region ADD_METHODS
public override void AddTables()
--- 33,37 ----
#endregion
! #region Add Methods
public override void AddTables()
***************
*** 77,81 ****
#endregion
! #region PARSE_METHODS
public override object[] ParseRestrictions(object[] restrictions)
--- 77,81 ----
#endregion
! #region Parse Methods
public override object[] ParseRestrictions(object[] restrictions)
Index: PgColumnsSchema.cs
===================================================================
RCS file: /cvsroot/pgsqlclient/pgsqlclient_10/PostgreSql.Data.PgSqlClient/source/DbSchema/PgColumnsSchema.cs,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** PgColumnsSchema.cs 14 Dec 2003 15:07:38 -0000 1.5
--- PgColumnsSchema.cs 18 Dec 2003 11:46:52 -0000 1.6
***************
*** 33,37 ****
#endregion
! #region ADD_METHODS
public override void AddTables()
--- 33,37 ----
#endregion
! #region Add Methods
public override void AddTables()
***************
*** 89,93 ****
#endregion
! #region PARSE_METHODS
public override object[] ParseRestrictions(object[] restrictions)
--- 89,93 ----
#endregion
! #region Parse Methods
public override object[] ParseRestrictions(object[] restrictions)
Index: PgDatabaseSchema.cs
===================================================================
RCS file: /cvsroot/pgsqlclient/pgsqlclient_10/PostgreSql.Data.PgSqlClient/source/DbSchema/PgDatabaseSchema.cs,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** PgDatabaseSchema.cs 14 Dec 2003 15:07:38 -0000 1.3
--- PgDatabaseSchema.cs 18 Dec 2003 11:46:52 -0000 1.4
***************
*** 33,37 ****
#endregion
! #region ADD_METHODS
public override void AddTables()
--- 33,37 ----
#endregion
! #region Add Methods
public override void AddTables()
***************
*** 66,70 ****
#endregion
! #region PARSE_METHODS
public override object[] ParseRestrictions(object[] restrictions)
--- 66,70 ----
#endregion
! #region Parse Methods
public override object[] ParseRestrictions(object[] restrictions)
Index: PgDomainsSchema.cs
===================================================================
RCS file: /cvsroot/pgsqlclient/pgsqlclient_10/PostgreSql.Data.PgSqlClient/source/DbSchema/PgDomainsSchema.cs,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** PgDomainsSchema.cs 14 Dec 2003 15:07:38 -0000 1.3
--- PgDomainsSchema.cs 18 Dec 2003 11:46:52 -0000 1.4
***************
*** 33,37 ****
#endregion
! #region ADD_METHODS
public override void AddTables()
--- 33,37 ----
#endregion
! #region Add Methods
public override void AddTables()
***************
*** 77,81 ****
#endregion
! #region PARSE_METHODS
public override object[] ParseRestrictions(object[] restrictions)
--- 77,81 ----
#endregion
! #region Parse Methods
public override object[] ParseRestrictions(object[] restrictions)
Index: PgForeignKeysSchema.cs
===================================================================
RCS file: /cvsroot/pgsqlclient/pgsqlclient_10/PostgreSql.Data.PgSqlClient/source/DbSchema/PgForeignKeysSchema.cs,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** PgForeignKeysSchema.cs 14 Dec 2003 15:07:38 -0000 1.3
--- PgForeignKeysSchema.cs 18 Dec 2003 11:46:52 -0000 1.4
***************
*** 33,37 ****
#endregion
! #region ADD_METHODS
public override void AddTables()
--- 33,37 ----
#endregion
! #region Add Methods
public override void AddTables()
***************
*** 83,87 ****
#endregion
! #region PARSE_METHODS
public override object[] ParseRestrictions(object[] restrictions)
--- 83,87 ----
#endregion
! #region Parse Methods
public override object[] ParseRestrictions(object[] restrictions)
Index: PgFunctionPrivilegesSchema.cs
===================================================================
RCS file: /cvsroot/pgsqlclient/pgsqlclient_10/PostgreSql.Data.PgSqlClient/source/DbSchema/PgFunctionPrivilegesSchema.cs,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** PgFunctionPrivilegesSchema.cs 14 Dec 2003 15:07:38 -0000 1.4
--- PgFunctionPrivilegesSchema.cs 18 Dec 2003 11:46:52 -0000 1.5
***************
*** 33,37 ****
#endregion
! #region ADD_METHODS
public override void AddTables()
--- 33,37 ----
#endregion
! #region Add Methods
public override void AddTables()
***************
*** 68,72 ****
#endregion
! #region PARSE_METHODS
public override object[] ParseRestrictions(object[] restrictions)
--- 68,72 ----
#endregion
! #region Parse Methods
public override object[] ParseRestrictions(object[] restrictions)
***************
*** 79,83 ****
#endregion
! #region OVERRIDEN_METHODS
public override DataTable GetDbSchemaTable(PgConnection connection, object[] restrictions)
--- 79,83 ----
#endregion
! #region Overriden Methods
public override DataTable GetDbSchemaTable(PgConnection connection, object[] restrictions)
Index: PgFunctionsSchema.cs
===================================================================
RCS file: /cvsroot/pgsqlclient/pgsqlclient_10/PostgreSql.Data.PgSqlClient/source/DbSchema/PgFunctionsSchema.cs,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** PgFunctionsSchema.cs 14 Dec 2003 15:07:38 -0000 1.3
--- PgFunctionsSchema.cs 18 Dec 2003 11:46:52 -0000 1.4
***************
*** 33,37 ****
#endregion
! #region ADD_METHODS
public override void AddTables()
--- 33,37 ----
#endregion
! #region Add Methods
public override void AddTables()
***************
*** 80,84 ****
#endregion
! #region PARSE_METHODS
public override object[] ParseRestrictions(object[] restrictions)
--- 80,84 ----
#endregion
! #region Parse Methods
public override object[] ParseRestrictions(object[] restrictions)
Index: PgGroupsSchema.cs
===================================================================
RCS file: /cvsroot/pgsqlclient/pgsqlclient_10/PostgreSql.Data.PgSqlClient/source/DbSchema/PgGroupsSchema.cs,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** PgGroupsSchema.cs 14 Dec 2003 15:07:38 -0000 1.3
--- PgGroupsSchema.cs 18 Dec 2003 11:46:52 -0000 1.4
***************
*** 33,37 ****
#endregion
! #region ADD_METHODS
public override void AddTables()
--- 33,37 ----
#endregion
! #region Add Methods
public override void AddTables()
***************
*** 65,69 ****
#endregion
! #region PARSE_METHODS
public override object[] ParseRestrictions(object[] restrictions)
--- 65,69 ----
#endregion
! #region Parse Methods
public override object[] ParseRestrictions(object[] restrictions)
Index: PgIndexesSchema.cs
===================================================================
RCS file: /cvsroot/pgsqlclient/pgsqlclient_10/PostgreSql.Data.PgSqlClient/source/DbSchema/PgIndexesSchema.cs,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** PgIndexesSchema.cs 14 Dec 2003 15:07:38 -0000 1.3
--- PgIndexesSchema.cs 18 Dec 2003 11:46:52 -0000 1.4
***************
*** 33,37 ****
#endregion
! #region ADD_METHODS
public override void AddTables()
--- 33,37 ----
#endregion
! #region Add Methods
public override void AddTables()
***************
*** 84,88 ****
#endregion
! #region PARSE_METHODS
public override object[] ParseRestrictions(object[] restrictions)
--- 84,88 ----
#endregion
! #region Parse Methods
public override object[] ParseRestrictions(object[] restrictions)
Index: PgPrimaryKeysSchema.cs
===================================================================
RCS file: /cvsroot/pgsqlclient/pgsqlclient_10/PostgreSql.Data.PgSqlClient/source/DbSchema/PgPrimaryKeysSchema.cs,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** PgPrimaryKeysSchema.cs 14 Dec 2003 15:07:38 -0000 1.3
--- PgPrimaryKeysSchema.cs 18 Dec 2003 11:46:52 -0000 1.4
***************
*** 33,37 ****
#endregion
! #region ADD_METHODS
public override void AddTables()
--- 33,37 ----
#endregion
! #region Add Methods
public override void AddTables()
***************
*** 75,79 ****
#endregion
! #region PARSE_METHODS
public override object[] ParseRestrictions(object[] restrictions)
--- 75,79 ----
#endregion
! #region Parse Methods
public override object[] ParseRestrictions(object[] restrictions)
Index: PgProviderTypesSchema.cs
===================================================================
RCS file: /cvsroot/pgsqlclient/pgsqlclient_10/PostgreSql.Data.PgSqlClient/source/DbSchema/PgProviderTypesSchema.cs,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** PgProviderTypesSchema.cs 14 Dec 2003 15:07:38 -0000 1.3
--- PgProviderTypesSchema.cs 18 Dec 2003 11:46:52 -0000 1.4
***************
*** 33,37 ****
#endregion
! #region ADD_METHODS
public override void AddTables()
--- 33,37 ----
#endregion
! #region Add Methods
public override void AddTables()
***************
*** 75,79 ****
#endregion
! #region PARSE_METHODS
public override object[] ParseRestrictions(object[] restrictions)
--- 75,79 ----
#endregion
! #region Parse Methods
public override object[] ParseRestrictions(object[] restrictions)
Index: PgSchemataSchema.cs
===================================================================
RCS file: /cvsroot/pgsqlclient/pgsqlclient_10/PostgreSql.Data.PgSqlClient/source/DbSchema/PgSchemataSchema.cs,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** PgSchemataSchema.cs 14 Dec 2003 15:07:38 -0000 1.3
--- PgSchemataSchema.cs 18 Dec 2003 11:46:52 -0000 1.4
***************
*** 33,37 ****
#endregion
! #region ADD_METHODS
public override void AddTables()
--- 33,37 ----
#endregion
! #region Add Methods
public override void AddTables()
***************
*** 69,73 ****
#endregion
! #region PARSE_METHODS
public override object[] ParseRestrictions(object[] restrictions)
--- 69,73 ----
#endregion
! #region Parse Methods
public override object[] ParseRestrictions(object[] restrictions)
Index: PgSqlLanguagesSchema.cs
===================================================================
RCS file: /cvsroot/pgsqlclient/pgsqlclient_10/PostgreSql.Data.PgSqlClient/source/DbSchema/PgSqlLanguagesSchema.cs,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** PgSqlLanguagesSchema.cs 14 Dec 2003 15:07:38 -0000 1.3
--- PgSqlLanguagesSchema.cs 18 Dec 2003 11:46:52 -0000 1.4
***************
*** 33,37 ****
#endregion
! #region ADD_METHODS
public override void AddTables()
--- 33,37 ----
#endregion
! #region Add Methods
public override void AddTables()
***************
*** 71,75 ****
#endregion
! #region PARSE_METHODS
public override object[] ParseRestrictions(object[] restrictions)
--- 71,75 ----
#endregion
! #region Parse Methods
public override object[] ParseRestrictions(object[] restrictions)
Index: PgTableConstraintsSchema.cs
===================================================================
RCS file: /cvsroot/pgsqlclient/pgsqlclient_10/PostgreSql.Data.PgSqlClient/source/DbSchema/PgTableConstraintsSchema.cs,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** PgTableConstraintsSchema.cs 14 Dec 2003 15:07:38 -0000 1.3
--- PgTableConstraintsSchema.cs 18 Dec 2003 11:46:52 -0000 1.4
***************
*** 33,37 ****
#endregion
! #region ADD_METHODS
public override void AddTables()
--- 33,37 ----
#endregion
! #region Add Methods
public override void AddTables()
***************
*** 77,81 ****
#endregion
! #region PARSE_METHODS
public override object[] ParseRestrictions(object[] restrictions)
--- 77,81 ----
#endregion
! #region Parse Methods
public override object[] ParseRestrictions(object[] restrictions)
Index: PgTablePrivilegesSchema.cs
===================================================================
RCS file: /cvsroot/pgsqlclient/pgsqlclient_10/PostgreSql.Data.PgSqlClient/source/DbSchema/PgTablePrivilegesSchema.cs,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** PgTablePrivilegesSchema.cs 14 Dec 2003 15:07:38 -0000 1.4
--- PgTablePrivilegesSchema.cs 18 Dec 2003 11:46:52 -0000 1.5
***************
*** 34,38 ****
#endregion
! #region ADD_METHODS
public override void AddTables()
--- 34,38 ----
#endregion
! #region Add Methods
public override void AddTables()
***************
*** 70,74 ****
#endregion
! #region OVERRIDEN_METHODS
public override DataTable GetDbSchemaTable(PgConnection connection, object[] restrictions)
--- 70,74 ----
#endregion
! #region Overriden Methods
public override DataTable GetDbSchemaTable(PgConnection connection, object[] restrictions)
***************
*** 124,128 ****
#endregion
! #region PARSE_METHODS
public override object[] ParseRestrictions(object[] restrictions)
--- 124,128 ----
#endregion
! #region Parse Methods
public override object[] ParseRestrictions(object[] restrictions)
Index: PgTablesSchema.cs
===================================================================
RCS file: /cvsroot/pgsqlclient/pgsqlclient_10/PostgreSql.Data.PgSqlClient/source/DbSchema/PgTablesSchema.cs,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** PgTablesSchema.cs 14 Dec 2003 15:07:38 -0000 1.3
--- PgTablesSchema.cs 18 Dec 2003 11:46:52 -0000 1.4
***************
*** 33,37 ****
#endregion
! #region ADD_METHODS
public override void AddTables()
--- 33,37 ----
#endregion
! #region Add Methods
public override void AddTables()
***************
*** 79,83 ****
#endregion
! #region PARSE_METHODS
public override object[] ParseRestrictions(object[] restrictions)
--- 79,83 ----
#endregion
! #region Parse Methods
public override object[] ParseRestrictions(object[] restrictions)
Index: PgTableStatisticsSchema.cs
===================================================================
RCS file: /cvsroot/pgsqlclient/pgsqlclient_10/PostgreSql.Data.PgSqlClient/source/DbSchema/PgTableStatisticsSchema.cs,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** PgTableStatisticsSchema.cs 14 Dec 2003 15:07:38 -0000 1.3
--- PgTableStatisticsSchema.cs 18 Dec 2003 11:46:52 -0000 1.4
***************
*** 34,38 ****
#endregion
! #region ADD_METHODS
public override void AddTables()
--- 34,38 ----
#endregion
! #region Add Methods
public override void AddTables()
***************
*** 75,79 ****
#endregion
! #region PARSE_METHODS
public override object[] ParseRestrictions(object[] restrictions)
--- 75,79 ----
#endregion
! #region Parse Methods
public override object[] ParseRestrictions(object[] restrictions)
Index: PgTriggersSchema.cs
===================================================================
RCS file: /cvsroot/pgsqlclient/pgsqlclient_10/PostgreSql.Data.PgSqlClient/source/DbSchema/PgTriggersSchema.cs,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** PgTriggersSchema.cs 14 Dec 2003 15:07:38 -0000 1.4
--- PgTriggersSchema.cs 18 Dec 2003 11:46:52 -0000 1.5
***************
*** 33,37 ****
#endregion
! #region ADD_METHODS
public override void AddTables()
--- 33,37 ----
#endregion
! #region Add Methods
public override void AddTables()
***************
*** 77,81 ****
#endregion
! #region PARSE_METHODS
public override object[] ParseRestrictions(object[] restrictions)
--- 77,81 ----
#endregion
! #region Parse Methods
public override object[] ParseRestrictions(object[] restrictions)
Index: PgUsersSchema.cs
===================================================================
RCS file: /cvsroot/pgsqlclient/pgsqlclient_10/PostgreSql.Data.PgSqlClient/source/DbSchema/PgUsersSchema.cs,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** PgUsersSchema.cs 14 Dec 2003 15:07:38 -0000 1.3
--- PgUsersSchema.cs 18 Dec 2003 11:46:52 -0000 1.4
***************
*** 33,37 ****
#endregion
! #region ADD_METHODS
public override void AddTables()
--- 33,37 ----
#endregion
! #region Add Methods
public override void AddTables()
***************
*** 69,73 ****
#endregion
! #region PARSE_METHODS
public override object[] ParseRestrictions(object[] restrictions)
--- 69,73 ----
#endregion
! #region Parse Methods
public override object[] ParseRestrictions(object[] restrictions)
Index: PgViewPrivilegesSchema.cs
===================================================================
RCS file: /cvsroot/pgsqlclient/pgsqlclient_10/PostgreSql.Data.PgSqlClient/source/DbSchema/PgViewPrivilegesSchema.cs,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** PgViewPrivilegesSchema.cs 14 Dec 2003 15:07:38 -0000 1.4
--- PgViewPrivilegesSchema.cs 18 Dec 2003 11:46:52 -0000 1.5
***************
*** 33,37 ****
#endregion
! #region ADD_METHODS
public override void AddTables()
--- 33,37 ----
#endregion
! #region Add Methods
public override void AddTables()
***************
*** 70,74 ****
#endregion
! #region OVERRIDEN_METHODS
public override DataTable GetDbSchemaTable(PgConnection connection, object[] restrictions)
--- 70,74 ----
#endregion
! #region Overriden Methods
public override DataTable GetDbSchemaTable(PgConnection connection, object[] restrictions)
***************
*** 125,129 ****
#endregion
! #region PARSE_METHODS
public override object[] ParseRestrictions(object[] restrictions)
--- 125,129 ----
#endregion
! #region Parse Methods
public override object[] ParseRestrictions(object[] restrictions)
Index: PgViewsSchema.cs
===================================================================
RCS file: /cvsroot/pgsqlclient/pgsqlclient_10/PostgreSql.Data.PgSqlClient/source/DbSchema/PgViewsSchema.cs,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** PgViewsSchema.cs 14 Dec 2003 15:07:38 -0000 1.3
--- PgViewsSchema.cs 18 Dec 2003 11:46:52 -0000 1.4
***************
*** 33,37 ****
#endregion
! #region ADD_METHODS
public override void AddTables()
--- 33,37 ----
#endregion
! #region Add Methods
public override void AddTables()
***************
*** 72,76 ****
#endregion
! #region PARSE_METHODS
public override object[] ParseRestrictions(object[] restrictions)
--- 72,76 ----
#endregion
! #region Parse Methods
public override object[] ParseRestrictions(object[] restrictions)
|
|
From: <car...@us...> - 2003-12-18 10:45:29
|
Update of /cvsroot/pgsqlclient/pgsqlclient_10/PostgreSql.Data.PgSqlClient/source/NPgClient In directory sc8-pr-cvs1:/tmp/cvs-serv12937 Removed Files: PgDecodeType.cs PgEncodeType.cs Log Message: Removed no more needed files --- PgDecodeType.cs DELETED --- --- PgEncodeType.cs DELETED --- |
Update of /cvsroot/pgsqlclient/pgsqlclient_10/PostgreSql.Data.PgSqlClient/source
In directory sc8-pr-cvs1:/tmp/cvs-serv10319/source
Modified Files:
PgCommand.cs PgCommandBuilder.cs PgConnection.cs
PgDataAdapter.cs PgDataReader.cs PgTransaction.cs
Log Message:
Prepare for Beta 5
Index: PgCommand.cs
===================================================================
RCS file: /cvsroot/pgsqlclient/pgsqlclient_10/PostgreSql.Data.PgSqlClient/source/PgCommand.cs,v
retrieving revision 1.23
retrieving revision 1.24
diff -C2 -d -r1.23 -r1.24
*** PgCommand.cs 14 Dec 2003 15:06:50 -0000 1.23
--- PgCommand.cs 18 Dec 2003 10:27:32 -0000 1.24
***************
*** 243,247 ****
#endregion
! #region DISPOSE_METHODS
protected override void Dispose(bool disposing)
--- 243,247 ----
#endregion
! #region IDisposable Methods
protected override void Dispose(bool disposing)
***************
*** 282,286 ****
#endregion
! #region ICLONEABLE_METHODS
object ICloneable.Clone()
--- 282,286 ----
#endregion
! #region ICloneable MEthods
object ICloneable.Clone()
Index: PgCommandBuilder.cs
===================================================================
RCS file: /cvsroot/pgsqlclient/pgsqlclient_10/PostgreSql.Data.PgSqlClient/source/PgCommandBuilder.cs,v
retrieving revision 1.14
retrieving revision 1.15
diff -C2 -d -r1.14 -r1.15
*** PgCommandBuilder.cs 14 Dec 2003 15:06:50 -0000 1.14
--- PgCommandBuilder.cs 18 Dec 2003 10:27:32 -0000 1.15
***************
*** 142,146 ****
#endregion
! #region DISPOSE_METHODS
protected override void Dispose(bool disposing)
--- 142,146 ----
#endregion
! #region IDisposable Methods
protected override void Dispose(bool disposing)
***************
*** 330,334 ****
#endregion
! #region BUILD_COMMAND_METHODS
private PgCommand buildInsertCommand(DataRow row, DataTableMapping tableMapping)
--- 330,334 ----
#endregion
! #region Build Command Methods
private PgCommand buildInsertCommand(DataRow row, DataTableMapping tableMapping)
***************
*** 697,701 ****
#endregion
! #region EVENT_HANDLER
private void rowUpdatingHandler(object sender, PgRowUpdatingEventArgs e)
--- 697,701 ----
#endregion
! #region Event Handler MEthods
private void rowUpdatingHandler(object sender, PgRowUpdatingEventArgs e)
Index: PgConnection.cs
===================================================================
RCS file: /cvsroot/pgsqlclient/pgsqlclient_10/PostgreSql.Data.PgSqlClient/source/PgConnection.cs,v
retrieving revision 1.10
retrieving revision 1.11
diff -C2 -d -r1.10 -r1.11
*** PgConnection.cs 14 Dec 2003 15:06:50 -0000 1.10
--- PgConnection.cs 18 Dec 2003 10:27:32 -0000 1.11
***************
*** 213,217 ****
#endregion
! #region DISPOSE_METHODS
protected override void Dispose(bool disposing)
--- 213,217 ----
#endregion
! #region IDisposable Methods
protected override void Dispose(bool disposing)
***************
*** 243,247 ****
#endregion
! #region ICLONEABLE_METHODS
object ICloneable.Clone()
--- 243,247 ----
#endregion
! #region ICloneable MEthods
object ICloneable.Clone()
***************
*** 604,608 ****
#endregion
! #region EVENT_HANDLERS
private void OnInfoMessage(object sender, PgClientMessageEventArgs e)
--- 604,608 ----
#endregion
! #region Event Handlers Methods
private void OnInfoMessage(object sender, PgClientMessageEventArgs e)
Index: PgDataAdapter.cs
===================================================================
RCS file: /cvsroot/pgsqlclient/pgsqlclient_10/PostgreSql.Data.PgSqlClient/source/PgDataAdapter.cs,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** PgDataAdapter.cs 14 Dec 2003 15:06:50 -0000 1.4
--- PgDataAdapter.cs 18 Dec 2003 10:27:32 -0000 1.5
***************
*** 135,139 ****
#endregion
! #region DISPOSE_METHODS
protected override void Dispose(bool disposing)
--- 135,139 ----
#endregion
! #region IDisposable Methods
protected override void Dispose(bool disposing)
Index: PgDataReader.cs
===================================================================
RCS file: /cvsroot/pgsqlclient/pgsqlclient_10/PostgreSql.Data.PgSqlClient/source/PgDataReader.cs,v
retrieving revision 1.15
retrieving revision 1.16
diff -C2 -d -r1.15 -r1.16
*** PgDataReader.cs 14 Dec 2003 15:06:50 -0000 1.15
--- PgDataReader.cs 18 Dec 2003 10:27:32 -0000 1.16
***************
*** 68,72 ****
#endregion
! #region FinalizerS
~PgDataReader()
--- 68,72 ----
#endregion
! #region Finalizer
~PgDataReader()
***************
*** 75,78 ****
--- 75,82 ----
}
+ #endregion
+
+ #region IDisposable Methods
+
void IDisposable.Dispose()
{
***************
*** 110,114 ****
#endregion
! #region IDATAREADER_PROPERTIES_METHODS
public int Depth
--- 114,118 ----
#endregion
! #region IDataReader Properties & Methods
public int Depth
***************
*** 224,228 ****
#endregion
! #region GETSCHEMA_METHODS
public DataTable GetSchemaTable()
--- 228,232 ----
#endregion
! #region GetSchemaTable Method
public DataTable GetSchemaTable()
***************
*** 372,376 ****
#endregion
! #region INDEXERS
public object this[int i]
--- 376,380 ----
#endregion
! #region Indexers
public object this[int i]
***************
*** 386,390 ****
#endregion
! #region IDATARECORD_PROPERTIES_METHODS
public int FieldCount
--- 390,394 ----
#endregion
! #region IDataRecord Properties % Methods
public int FieldCount
***************
*** 661,665 ****
#endregion
! #region IENUMERABLE_METHODS
IEnumerator IEnumerable.GetEnumerator()
--- 665,669 ----
#endregion
! #region IEnumerable Methods
IEnumerator IEnumerable.GetEnumerator()
Index: PgTransaction.cs
===================================================================
RCS file: /cvsroot/pgsqlclient/pgsqlclient_10/PostgreSql.Data.PgSqlClient/source/PgTransaction.cs,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** PgTransaction.cs 14 Dec 2003 15:06:50 -0000 1.4
--- PgTransaction.cs 18 Dec 2003 10:27:32 -0000 1.5
***************
*** 99,103 ****
#endregion
! #region FinalizerS
~PgTransaction()
--- 99,103 ----
#endregion
! #region Finalizer
~PgTransaction()
***************
*** 108,112 ****
#endregion
! #region IDisposable Methods_METHODS
public void Dispose()
--- 108,112 ----
#endregion
! #region IDisposable Methods
public void Dispose()
|
Update of /cvsroot/pgsqlclient/pgsqlclient_10/PostgreSql.Data.PgSqlClient/source/NPgClient In directory sc8-pr-cvs1:/tmp/cvs-serv10319/source/NPgClient Modified Files: PgDbClient.cs PgOutputPacket.cs PgResponsePacket.cs PgStatement.cs Log Message: Prepare for Beta 5 Index: PgDbClient.cs =================================================================== RCS file: /cvsroot/pgsqlclient/pgsqlclient_10/PostgreSql.Data.PgSqlClient/source/NPgClient/PgDbClient.cs,v retrieving revision 1.39 retrieving revision 1.40 diff -C2 -d -r1.39 -r1.40 *** PgDbClient.cs 14 Dec 2003 15:07:13 -0000 1.39 --- PgDbClient.cs 18 Dec 2003 10:27:32 -0000 1.40 *************** *** 39,43 **** #endregion ! #region STATIC_FIELDS private static PgTypeCollection types; --- 39,43 ---- #endregion ! #region Static Fields private static PgTypeCollection types; *************** *** 62,66 **** #endregion ! #region STATIC_PROPERTIES public static PgTypeCollection Types --- 62,66 ---- #endregion ! #region Static Properties public static PgTypeCollection Types *************** *** 136,140 **** #endregion ! #region DB_METHODS public void Connect() --- 136,140 ---- #endregion ! #region Database Methods public void Connect() *************** *** 160,164 **** settings.ServerName, true, ! SecurityProtocolType.Default); receive = new BinaryReader(sslStream); --- 160,164 ---- settings.ServerName, true, ! Mono.Security.Protocol.Tls.SecurityProtocolType.Default); receive = new BinaryReader(sslStream); *************** *** 239,243 **** #endregion ! #region RESPONSE_METHODS public PgResponsePacket ReceiveResponsePacket() --- 239,243 ---- #endregion ! #region Response Methods public PgResponsePacket ReceiveResponsePacket() *************** *** 479,483 **** #endregion ! #region TRANSACTION_METHODS public void BeginTransaction(IsolationLevel isolationLevel) --- 479,483 ---- #endregion ! #region Transaction Methods public void BeginTransaction(IsolationLevel isolationLevel) *************** *** 541,545 **** #endregion ! #region CLIENT_METHODS public void Flush() --- 541,545 ---- #endregion ! #region Client Methods public void Flush() Index: PgOutputPacket.cs =================================================================== RCS file: /cvsroot/pgsqlclient/pgsqlclient_10/PostgreSql.Data.PgSqlClient/source/NPgClient/PgOutputPacket.cs,v retrieving revision 1.21 retrieving revision 1.22 diff -C2 -d -r1.21 -r1.22 *** PgOutputPacket.cs 14 Dec 2003 15:07:13 -0000 1.21 --- PgOutputPacket.cs 18 Dec 2003 10:27:32 -0000 1.22 *************** *** 66,70 **** #endregion ! #region STRING_TYPES_WRITE public void WriteString(string data) --- 66,70 ---- #endregion ! #region String Types public void WriteString(string data) *************** *** 79,83 **** #endregion ! #region NUMERIC_TYPES_WRITE public void WriteShort(short val) --- 79,83 ---- #endregion ! #region Numeric Types public void WriteShort(short val) *************** *** 124,128 **** #endregion ! #region DATE_TIME_WRITE public void WriteDate(DateTime date) --- 124,128 ---- #endregion ! #region Date & Time Types public void WriteDate(DateTime date) *************** *** 187,191 **** #endregion ! #region GEOMETRIC_TYPES_WRITE public void WritePoint(PgPoint point) --- 187,191 ---- #endregion ! #region Geometric Types public void WritePoint(PgPoint point) *************** *** 240,244 **** #endregion ! #region PARAMETER_WRITE public void WriteParameter(PgParameter parameter) --- 240,244 ---- #endregion ! #region Parameters public void WriteParameter(PgParameter parameter) *************** *** 460,464 **** #endregion ! #region PACKET_BYTES public byte[] GetSimplePacketBytes() --- 460,464 ---- #endregion ! #region Packet Methods public byte[] GetSimplePacketBytes() Index: PgResponsePacket.cs =================================================================== RCS file: /cvsroot/pgsqlclient/pgsqlclient_10/PostgreSql.Data.PgSqlClient/source/NPgClient/PgResponsePacket.cs,v retrieving revision 1.21 retrieving revision 1.22 diff -C2 -d -r1.21 -r1.22 *** PgResponsePacket.cs 14 Dec 2003 15:07:13 -0000 1.21 --- PgResponsePacket.cs 18 Dec 2003 10:27:32 -0000 1.22 *************** *** 115,119 **** #endregion ! #region STRING_TYPES_READ public string ReadNullString() --- 115,119 ---- #endregion ! #region String Types public string ReadNullString() *************** *** 151,155 **** #endregion ! #region NUMERIC_TYPES_READ public short ReadShort() --- 151,155 ---- #endregion ! #region Numeric Types public short ReadShort() *************** *** 205,209 **** #endregion ! #region DATE_TIME_TYPES_READ public DateTime ReadDate() --- 205,209 ---- #endregion ! #region Date & Time Types public DateTime ReadDate() *************** *** 286,290 **** #endregion ! #region ARRAY_VECTOR_TYPES_READ public Array ReadArray(PgType type, int length) --- 286,290 ---- #endregion ! #region Array & Vector Types public Array ReadArray(PgType type, int length) *************** *** 355,359 **** #endregion ! #region GEOMETRIC_TYPES_READ public PgPoint ReadPoint() --- 355,359 ---- #endregion ! #region Geometric Types public PgPoint ReadPoint() *************** *** 415,419 **** #endregion ! #region COMMONT_READ_METHOD public object ReadValue(PgType type, int length) --- 415,419 ---- #endregion ! #region Common Methods public object ReadValue(PgType type, int length) *************** *** 508,512 **** #endregion ! #region ARRAY_METHODS private Array readPrimitiveArray(PgType elementType, int length, --- 508,512 ---- #endregion ! #region Array Handling Methods private Array readPrimitiveArray(PgType elementType, int length, Index: PgStatement.cs =================================================================== RCS file: /cvsroot/pgsqlclient/pgsqlclient_10/PostgreSql.Data.PgSqlClient/source/NPgClient/PgStatement.cs,v retrieving revision 1.19 retrieving revision 1.20 diff -C2 -d -r1.19 -r1.20 *** PgStatement.cs 14 Dec 2003 15:07:13 -0000 1.19 --- PgStatement.cs 18 Dec 2003 10:27:32 -0000 1.20 *************** *** 551,555 **** #endregion ! #region MISC_METHODS public string GetPlan(bool verbose) --- 551,555 ---- #endregion ! #region Misc Methods public string GetPlan(bool verbose) *************** *** 591,595 **** #endregion ! #region RESPONSE_METHODS private void processSqlPacket(PgResponsePacket packet) --- 591,595 ---- #endregion ! #region Response Methods private void processSqlPacket(PgResponsePacket packet) |
|
From: <car...@us...> - 2003-12-18 10:27:38
|
Update of /cvsroot/pgsqlclient/pgsqlclient_10/PostgreSql.Data.PgSqlClient/source/PgTypes In directory sc8-pr-cvs1:/tmp/cvs-serv10319/source/PgTypes Modified Files: PgTimeSpan.cs Log Message: Prepare for Beta 5 Index: PgTimeSpan.cs =================================================================== RCS file: /cvsroot/pgsqlclient/pgsqlclient_10/PostgreSql.Data.PgSqlClient/source/PgTypes/PgTimeSpan.cs,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** PgTimeSpan.cs 14 Dec 2003 15:07:55 -0000 1.3 --- PgTimeSpan.cs 18 Dec 2003 10:27:33 -0000 1.4 *************** *** 64,68 **** #endregion ! #region STATIC_FIELDS public static readonly PgTimeSpan MaxValue = new PgTimeSpan(TimeSpan.MaxValue); --- 64,68 ---- #endregion ! #region Static Fields public static readonly PgTimeSpan MaxValue = new PgTimeSpan(TimeSpan.MaxValue); |
|
From: <car...@us...> - 2003-12-18 10:13:01
|
Update of /cvsroot/pgsqlclient/pgsqlclient_10 In directory sc8-pr-cvs1:/tmp/cvs-serv8296 Modified Files: changelog.txt changes.txt Log Message: Updated file Index: changelog.txt =================================================================== RCS file: /cvsroot/pgsqlclient/pgsqlclient_10/changelog.txt,v retrieving revision 1.85 retrieving revision 1.86 diff -C2 -d -r1.85 -r1.86 *** changelog.txt 5 Dec 2003 10:36:12 -0000 1.85 --- changelog.txt 18 Dec 2003 10:12:57 -0000 1.86 *************** *** 1,869 **** ! PgSqlClient - ADO.NET Data Provider for PostgreSQL 7.4+ ! ------------------------------------------------------- ! ! ! 2003-12-02 Carlos Guzmán Álvarez <car...@te...> ! ! * source/PgCommand.cs: ! * source/NPgClient/PgStatement.cs: ! ! - Minor uimprovement to prepare process. [...1714 lines suppressed...] ! - Fixed constructors. ! ! ! 2003-07-12 Carlos Guzmán Álvarez <car...@te...> ! ! ! * Added changelog.txt file. ! ! * source/PgConnection.cs: ! ! - Do not allow to execute CreateDatabase and GetDbSchemaTable if there are a DataReader open. ! ! * source/PgDbConnection.cs: ! ! - Changed Regular expression used for parsing connection string. ! ! ! 2003-07-12 Carlos Guzmán Álvarez <car...@te...> ! * Initial import. Index: changes.txt =================================================================== RCS file: /cvsroot/pgsqlclient/pgsqlclient_10/changes.txt,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** changes.txt 20 Nov 2003 17:33:17 -0000 1.14 --- changes.txt 18 Dec 2003 10:12:57 -0000 1.15 *************** *** 1,120 **** ! PgSqlClient - ADO.NET Data Provider for PostgreSQL 7.4+ ! ------------------------------------------------------- ! ! Beta 4 ( 20-11-2003 ) ! ---- - - -- -- ---- - ! ! - Bug fixes. ! ! - Better fit to ADO.NET. ! ! - Improved handling of command parameters. ! ! - Restricted batch command execution to PgCommand.ExecuteReader calls. ! ! - Added correct handling of character sets. ! ! - Added support for Geometric types. ! ! - Added some improvements to the SSL/TLS library. ! ! ! Beta 3 ( 16-10-2003 ) ! ---- - - -- -- ---- - ! ! - Bug fixes. ! ! - Better fit to ADO.NET. ! ! - Improved Command Builder implementation. ! ! - Improved design time support for PgParameterCollection class. ! ! - Implemented PgDataReader.NextResult method. ! ! - Added implementation for array data type parameters. ! ! - Added some improvements to the TLS library. ! ! ! Beta 2 ( 18-09-2003 ) ! ---- - - -- -- ---- - ! ! * Improvements to TLS (Transport Layer Security support). ! ! NUnit test suite can now be executed using TLS connections ! ( tested on Windows + CygWin + PostgreSQL 7.4 Beta 1 ) ! ! See the Task Lisk at project page on sourceforge to know what ! is pending of implement in the TLS library. ! ! (https://sourceforge.net/pm/task.php?group_project_id=30343&group_id=85397&func=browse) ! ! ! ! Beta 1 ( 12-09-2003 ) ! ---- - - -- -- ---- - ! ! * Better fit to ADO.NET. ! ! * Simple Transport Layer security ( TLS 1.0 ) implementation ! It's usined yet for both TLS and non-TLS connetions but it's not finished yet. ! ! * Improved Command Builder implementation. ! ! * Improved PgDataReader.GetSchemaTable method using prepared statemets for retrieve ! column and primary key information. ! ! * Added SQL Server like Stored Procedure calls. ! ! * Improved compatibility with mono:: (http://www.go-mono.com) ! ! ! ! Alpha 3 ( 05-08-2003 ) ! ----- - - -- -- ---- - ! ! * Bug fixes. ! ! * Improved NUnit test suite. ! ! * Improved PostgreSQL 3.0 protocol handling. ! ! * Improved PgCommandBuilder.DeriveParameters method. ! ! * Added initial implementation of PgConnection.Notification for asynchronous notification support ( task #82889 ). ! ! * Added initial implementation of PgConnection.InfoMessage event ( task #82902 ). ! ! * Added initial implementation of serial fields support ( task #81647 ). ! ! * Changed casing of all clasess from PGXXX to PgXXX to follow MS' guidelines. ! ! * New directory structure in the CVS for match class, file and directory names ! ( pgsqlclient_10 is the actual cvs developement module ) ! ! ! ! Alpha 2 ( 31-07-2003 ) ! ----- - - -- -- ---- - ! ! * Better fit to ADO .NET ! ! * Improved NUnit test suite. ! ! * Added support for Function calls using CommandType.StoredProcedure. ! ! * Added some changes for better work with mono:: platform. ! ! * Added implementation for PgConnection.ChangeDatabase method. ! ! * Added implementation for PgCommandBuilder.DeriveParameters method. ! ! * PgCommandBuilder is now working better. ! ! ! ! Alpha 2 ( 27-07-2003 ) ! ----- - - -- -- ---- - ! Initial release. --- 1,129 ---- ! PgSqlClient - ADO.NET Data Provider for PostgreSQL 7.4+ ! ------------------------------------------------------- ! ! ! Beta 5 ( 18-12-2003 ) ! ---- - - -- -- ---- - ! ! - Buf fixes. ! ! - Minor improvements in PostgreSQL 3.0 implementation. ! ! ! Beta 4 ( 20-11-2003 ) ! ---- - - -- -- ---- - ! ! - Bug fixes. ! ! - Better fit to ADO.NET. ! ! - Improved handling of command parameters. ! ! - Restricted batch command execution to PgCommand.ExecuteReader calls. ! ! - Added correct handling of character sets. ! ! - Added support for Geometric types. ! ! - Added some improvements to the SSL/TLS library. ! ! ! Beta 3 ( 16-10-2003 ) ! ---- - - -- -- ---- - ! ! - Bug fixes. ! ! - Better fit to ADO.NET. ! ! - Improved Command Builder implementation. ! ! - Improved design time support for PgParameterCollection class. ! ! - Implemented PgDataReader.NextResult method. ! ! - Added implementation for array data type parameters. ! ! - Added some improvements to the TLS library. ! ! ! Beta 2 ( 18-09-2003 ) ! ---- - - -- -- ---- - ! ! * Improvements to TLS (Transport Layer Security support). ! ! NUnit test suite can now be executed using TLS connections ! ( tested on Windows + CygWin + PostgreSQL 7.4 Beta 1 ) ! ! See the Task Lisk at project page on sourceforge to know what ! is pending of implement in the TLS library. ! ! (https://sourceforge.net/pm/task.php?group_project_id=30343&group_id=85397&func=browse) ! ! ! ! Beta 1 ( 12-09-2003 ) ! ---- - - -- -- ---- - ! ! * Better fit to ADO.NET. ! ! * Simple Transport Layer security ( TLS 1.0 ) implementation ! It's usined yet for both TLS and non-TLS connetions but it's not finished yet. ! ! * Improved Command Builder implementation. ! ! * Improved PgDataReader.GetSchemaTable method using prepared statemets for retrieve ! column and primary key information. ! ! * Added SQL Server like Stored Procedure calls. ! ! * Improved compatibility with mono:: (http://www.go-mono.com) ! ! ! ! Alpha 3 ( 05-08-2003 ) ! ----- - - -- -- ---- - ! ! * Bug fixes. ! ! * Improved NUnit test suite. ! ! * Improved PostgreSQL 3.0 protocol handling. ! ! * Improved PgCommandBuilder.DeriveParameters method. ! ! * Added initial implementation of PgConnection.Notification for asynchronous notification support ( task #82889 ). ! ! * Added initial implementation of PgConnection.InfoMessage event ( task #82902 ). ! ! * Added initial implementation of serial fields support ( task #81647 ). ! ! * Changed casing of all clasess from PGXXX to PgXXX to follow MS' guidelines. ! ! * New directory structure in the CVS for match class, file and directory names ! ( pgsqlclient_10 is the actual cvs developement module ) ! ! ! ! Alpha 2 ( 31-07-2003 ) ! ----- - - -- -- ---- - ! ! * Better fit to ADO .NET ! ! * Improved NUnit test suite. ! ! * Added support for Function calls using CommandType.StoredProcedure. ! ! * Added some changes for better work with mono:: platform. ! ! * Added implementation for PgConnection.ChangeDatabase method. ! ! * Added implementation for PgCommandBuilder.DeriveParameters method. ! ! * PgCommandBuilder is now working better. ! ! ! ! Alpha 2 ( 27-07-2003 ) ! ----- - - -- -- ---- - ! Initial release. |
|
From: <car...@us...> - 2003-12-18 10:10:51
|
Update of /cvsroot/pgsqlclient/pgsqlclient_10/PostgreSql.Data.PgSqlClient.UnitTests/source
In directory sc8-pr-cvs1:/tmp/cvs-serv7987
Modified Files:
PgBaseTest.cs
Log Message:
Updated file
Index: PgBaseTest.cs
===================================================================
RCS file: /cvsroot/pgsqlclient/pgsqlclient_10/PostgreSql.Data.PgSqlClient.UnitTests/source/PgBaseTest.cs,v
retrieving revision 1.8
retrieving revision 1.9
diff -C2 -d -r1.8 -r1.9
*** PgBaseTest.cs 20 Nov 2003 17:35:31 -0000 1.8
--- PgBaseTest.cs 18 Dec 2003 10:10:47 -0000 1.9
***************
*** 1,368 ****
! /* PgSqlClient - ADO.NET Data Provider for PostgreSQL 7.4+
! * Copyright (C) 2003 Carlos Guzmán Álvarez
! *
! * This library is free software; you can redistribute it and/or
! * modify it under the terms of the GNU Lesser General Public
! * License as published by the Free Software Foundation; either
! * version 2.1 of the License, or (at your option) any later version.
! *
! * This library is distributed in the hope that it will be useful,
! * but WITHOUT ANY WARRANTY; without even the implied warranty of
! * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
! * Lesser General Public License for more details.
! *
! * You should have received a copy of the GNU Lesser General Public
! * License along with this library; if not, write to the Free Software
! * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
! */
!
! using System;
! using System.Text;
! using System.Data;
! using System.Configuration;
! using NUnit.Framework;
!
! using PostgreSql.Data.PgSqlClient;
! using PostgreSql.Data.PgTypes;
!
! namespace PostgreSql.Data.PgSqlClient.UnitTests
! {
! public class PgBaseTest
! {
! private PgConnection connection;
!
! public PgConnection Connection
! {
! get { return connection; }
! }
!
! public PgBaseTest()
! {
! }
!
! [SetUp]
! public void SetUp()
! {
! try
! {
! dropDatabase();
! }
! catch{}
!
! createDatabase();
!
! // Build the connection string
! StringBuilder connString = new StringBuilder();
! connString.AppendFormat(
! "User={0};Password={1};Database={2};DataSource={3};Port={4};SSL={5}",
! ConfigurationSettings.AppSettings["User"],
! ConfigurationSettings.AppSettings["Password"],
! ConfigurationSettings.AppSettings["Database"],
! ConfigurationSettings.AppSettings["DataSource"],
! ConfigurationSettings.AppSettings["Port"],
! ConfigurationSettings.AppSettings["SSL"]);
!
! connection = new PgConnection(connString.ToString());
! connection.StateChange += new StateChangeEventHandler(stateChange);
! connection.Open();
!
! createTables();
! createFunctions();
! }
!
! [TearDown]
! public void TearDown()
! {
! connection.Close();
! }
!
! private void stateChange(object sender, StateChangeEventArgs e)
! {
! Console.WriteLine("Connection state changed from {0} to {1}",
! e.OriginalState, e.CurrentState);
! }
!
! private void createDatabase()
! {
! StringBuilder connString = new StringBuilder();
! connString.AppendFormat(
! "User={0};Password={1};Database={2};DataSource={3};Port={4};SSL={5}",
! ConfigurationSettings.AppSettings["User"],
! ConfigurationSettings.AppSettings["Password"],
! String.Empty,
! ConfigurationSettings.AppSettings["DataSource"],
! ConfigurationSettings.AppSettings["Port"],
! ConfigurationSettings.AppSettings["SSL"]);
!
! PgConnection connection = new PgConnection(connString.ToString());
! connection.Open();
!
! connection.CreateDatabase(
! ConfigurationSettings.AppSettings["Database"],
! null,
! null,
! null,
! "UNICODE");
!
! connection.Close();
! }
!
! private void dropDatabase()
! {
! StringBuilder connString = new StringBuilder();
! connString.AppendFormat(
! "User={0};Password={1};Database={2};DataSource={3};Port={4};SSL={5}",
! ConfigurationSettings.AppSettings["User"],
! ConfigurationSettings.AppSettings["Password"],
! String.Empty,
! ConfigurationSettings.AppSettings["DataSource"],
! ConfigurationSettings.AppSettings["Port"],
! ConfigurationSettings.AppSettings["SSL"]);
!
! PgConnection connection = new PgConnection(connString.ToString());
! connection.Open();
!
! StringBuilder commandText = new StringBuilder();
!
! commandText.AppendFormat(
! "drop database {0}",
! ConfigurationSettings.AppSettings["Database"]);
!
! PgCommand command = new PgCommand(commandText.ToString(), connection);
!
! command.ExecuteNonQuery();
! command.Dispose();
!
! connection.Close();
! }
!
! private void createTables()
! {
! StringBuilder commandText = new StringBuilder();
!
! // Table for general purpouse tests
! commandText.Append("CREATE TABLE public.test_table(");
! commandText.Append("int4_field int4 NOT NULL,");
! commandText.Append("char_field char(10),");
! commandText.Append("varchar_field varchar(30),");
! commandText.Append("single_field float4,");
! commandText.Append("double_field float8,");
! commandText.Append("date_field date,");
! commandText.Append("time_field time,");
! commandText.Append("timestamp_field timestamp,");
! commandText.Append("blob_field bytea,");
! commandText.Append("bool_field bool,");
! commandText.Append("int2_field int2,");
! commandText.Append("int8_field int8,");
! commandText.Append("money_field money,");
! commandText.Append("numeric_field numeric(8,2),");
! commandText.Append("bool_array bool[],");
! commandText.Append("int2_array int2[],");
! commandText.Append("int4_array int4[],");
! commandText.Append("int8_array int8[],");
! commandText.Append("mint2_array int2[][],");
! commandText.Append("serial_field serial NOT NULL,");
! commandText.Append("macaddr_field macaddr,");
! commandText.Append("inet_field inet,");
! commandText.Append("name_field name,");
! commandText.Append("CONSTRAINT test_table_pkey PRIMARY KEY (int4_field)");
! commandText.Append(") WITH OIDS;");
!
! PgCommand command = new PgCommand(commandText.ToString(), connection);
! command.ExecuteNonQuery();
!
! commandText = new StringBuilder();
!
! // Table for Geometric types tests
! commandText.Append("CREATE TABLE public.geometric_table(");
! commandText.Append("pk int4 NOT NULL,");
! commandText.Append("point_field point,");
! commandText.Append("box_field box,");
! commandText.Append("circle_field circle,");
! commandText.Append("lseg_field lseg,");
! commandText.Append("path_field path,");
! commandText.Append("polygon_field polygon,");
! commandText.Append("point_array point[],");
! commandText.Append("box_array box[],");
! commandText.Append("circle_array circle[],");
! commandText.Append("lseg_array lseg[],");
! commandText.Append("path_array path[],");
! commandText.Append("polygon_array polygon[],");
! commandText.Append("line_field line,");
! commandText.Append("line_array line[],");
! commandText.Append("CONSTRAINT geometric_test_pkey PRIMARY KEY (pk)");
! commandText.Append(") WITH OIDS;");
!
! command.CommandText = commandText.ToString();
! command.ExecuteNonQuery();
! command.Dispose();
!
! insertTestData();
! insertGeometricTestData();
! }
!
! private void createFunctions()
! {
! // Create language functions
! StringBuilder commandText = new StringBuilder();
!
! commandText.Append("CREATE OR REPLACE FUNCTION public.plpgsql_call_handler()");
! commandText.Append("RETURNS language_handler AS");
! commandText.Append("'$libdir/plpgsql', 'plpgsql_call_handler'");
! commandText.Append("LANGUAGE 'c' VOLATILE;");
!
! PgCommand command = new PgCommand(commandText.ToString(), connection);
! command.ExecuteNonQuery();
!
! // Create languages
! commandText = new StringBuilder();
!
! commandText.Append("CREATE TRUSTED PROCEDURAL LANGUAGE 'plpgsql' HANDLER plpgsql_call_handler;");
!
! command = new PgCommand(commandText.ToString(), connection);
! command.ExecuteNonQuery();
!
! // Create test function public.TestCount()
! commandText = new StringBuilder();
!
! commandText.Append("CREATE OR REPLACE FUNCTION public.TestCount()");
! commandText.Append("RETURNS int8 AS");
! commandText.Append("'");
! commandText.Append("select count(*) from test_table;");
! commandText.Append("'");
! commandText.Append("LANGUAGE 'sql' VOLATILE;");
!
! command = new PgCommand(commandText.ToString(), connection);
! command.ExecuteNonQuery();
!
! // Create test function public.DeriveCount()
! commandText = new StringBuilder();
!
! commandText.Append("CREATE OR REPLACE FUNCTION public.DeriveCount(int4)");
! commandText.Append("RETURNS int8 AS");
! commandText.Append("'");
! commandText.Append("select count(*) from test_table where int4_field < $1;");
! commandText.Append("'");
! commandText.Append("LANGUAGE 'sql' VOLATILE;");
!
! command.CommandText = commandText.ToString();
! command.ExecuteNonQuery();
!
! // Create test function public.DeleteRows()
! commandText = new StringBuilder();
!
! commandText.Append("CREATE OR REPLACE FUNCTION public.DeleteRows(int4)\r\n");
! commandText.Append("RETURNS BOOLEAN AS '\r\n");
! commandText.Append("DECLARE\r\n");
! commandText.Append("\t\trows INTEGER;\r\n");
! commandText.Append("BEGIN\r\n");
! commandText.Append("DELETE FROM public.test_table WHERE int4_field > $1;\r\n");
! commandText.Append("GET DIAGNOSTICS rows = ROW_COUNT;\r\n");
! commandText.Append("IF rows > 0 THEN\r\n");
! commandText.Append("\t\tRETURN TRUE;\r\n");
! commandText.Append("ELSE\r\n");
! commandText.Append("\t\tRETURN FALSE;\r\n");
! commandText.Append("END IF;\r\n");
! commandText.Append("END;\r\n");
! commandText.Append("'\r\n");
! commandText.Append("LANGUAGE 'plpgsql' VOLATILE;");
!
! command.CommandText = commandText.ToString();
! command.ExecuteNonQuery();
!
! command.Dispose();
! }
!
! private void insertTestData()
! {
! string commandText = "insert into public.test_table values(@int4_field, @char_field, @varchar_field, @single_field, @double_field, @date_Field, @time_field, @timestamp_field)";
!
! PgTransaction transaction = connection.BeginTransaction();
! PgCommand command = new PgCommand(commandText, connection, transaction);
!
! try
! {
! // Add command parameters
! command.Parameters.Add("@int4_field", PgDbType.Int4);
! command.Parameters.Add("@char_field", PgDbType.Char);
! command.Parameters.Add("@varchar_field", PgDbType.VarChar);
! command.Parameters.Add("@single_field", PgDbType.Float);
! command.Parameters.Add("@double_field", PgDbType.Double);
! command.Parameters.Add("@date_field", PgDbType.Date);
! command.Parameters.Add("@time_field", PgDbType.Time);
! command.Parameters.Add("@timestamp_field", PgDbType.Timestamp);
!
! for (int i = 0; i < 100; i++)
! {
! command.Parameters["@int4_field"].Value = i;
! command.Parameters["@char_field"].Value = "IRow " + i.ToString();
! command.Parameters["@varchar_field"].Value = "IRow Number" + i.ToString();
! command.Parameters["@single_field"].Value = (float)(i + 10)/5;
! command.Parameters["@double_field"].Value = Math.Log(i, 10);
! command.Parameters["@date_field"].Value = DateTime.Now;
! command.Parameters["@time_field"].Value = DateTime.Now;
! command.Parameters["@timestamp_field"].Value = DateTime.Now;
!
! command.ExecuteNonQuery();
! }
!
! // Commit transaction
! transaction.Commit();
! }
! catch (PgException ex)
! {
! transaction.Rollback();
! throw ex;
! }
! finally
! {
! command.Dispose();
! }
! }
!
! private void insertGeometricTestData()
! {
! string commandText = "insert into public.geometric_table values(@pk, @point, @box, @circle, @lseg, @path, @polygon)";
!
! PgTransaction transaction = connection.BeginTransaction();
! PgCommand command = new PgCommand(commandText, connection, transaction);
!
! try
! {
! // Add command parameters
! command.Parameters.Add("@pk", PgDbType.Int4);
! command.Parameters.Add("@point", PgDbType.Point);
! command.Parameters.Add("@box", PgDbType.Box);
! command.Parameters.Add("@circle", PgDbType.Circle);
! command.Parameters.Add("@lseg", PgDbType.LSeg);
! command.Parameters.Add("@path", PgDbType.Path);
! command.Parameters.Add("@polygon", PgDbType.Polygon);
!
! for (int i = 0; i < 100; i++)
! {
! command.Parameters["@pk"].Value = i;
! command.Parameters["@point"].Value = new PgPoint(i, i + 10);
! command.Parameters["@box"].Value = new PgBox(new PgPoint(0,i), new PgPoint(i, i));
! command.Parameters["@circle"].Value = new PgCircle(new PgPoint(i, 0), i);
! command.Parameters["@lseg"].Value = new PgLSeg(new PgPoint(-1,0), new PgPoint(1,0));
! command.Parameters["@path"].Value = new PgPath(false, new PgPoint[]{new PgPoint(0,0), new PgPoint(1,0)});
! command.Parameters["@polygon"].Value= new PgPolygon(new PgPoint[]{new PgPoint(1,1), new PgPoint(0,0)});
!
! command.ExecuteNonQuery();
! }
!
! // Commit transaction
! transaction.Commit();
! }
! catch (PgException ex)
! {
! transaction.Rollback();
! throw ex;
! }
! finally
! {
! command.Dispose();
! }
! }
! }
}
--- 1,368 ----
! /* PgSqlClient - ADO.NET Data Provider for PostgreSQL 7.4+
! * Copyright (C) 2003 Carlos Guzmán Álvarez
! *
! * This library is free software; you can redistribute it and/or
! * modify it under the terms of the GNU Lesser General Public
! * License as published by the Free Software Foundation; either
! * version 2.1 of the License, or (at your option) any later version.
! *
! * This library is distributed in the hope that it will be useful,
! * but WITHOUT ANY WARRANTY; without even the implied warranty of
! * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
! * Lesser General Public License for more details.
! *
! * You should have received a copy of the GNU Lesser General Public
! * License along with this library; if not, write to the Free Software
! * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
! */
!
! using System;
! using System.Text;
! using System.Data;
! using System.Configuration;
! using NUnit.Framework;
!
! using PostgreSql.Data.PgSqlClient;
! using PostgreSql.Data.PgTypes;
!
! namespace PostgreSql.Data.PgSqlClient.UnitTests
! {
! public class PgBaseTest
! {
! private PgConnection connection;
!
! public PgConnection Connection
! {
! get { return connection; }
! }
!
! public PgBaseTest()
! {
! }
!
! [SetUp]
! public void SetUp()
! {
! try
! {
! dropDatabase();
! }
! catch{}
!
! createDatabase();
!
! // Build the connection string
! StringBuilder connString = new StringBuilder();
! connString.AppendFormat(
! "User={0};Password={1};Database={2};DataSource={3};Port={4};SSL={5}",
! ConfigurationSettings.AppSettings["User"],
! ConfigurationSettings.AppSettings["Password"],
! ConfigurationSettings.AppSettings["Database"],
! ConfigurationSettings.AppSettings["DataSource"],
! ConfigurationSettings.AppSettings["Port"],
! ConfigurationSettings.AppSettings["SSL"]);
!
! connection = new PgConnection(connString.ToString());
! connection.StateChange += new StateChangeEventHandler(stateChange);
! connection.Open();
!
! createTables();
! createFunctions();
! }
!
! [TearDown]
! public void TearDown()
! {
! connection.Close();
! }
!
! private void stateChange(object sender, StateChangeEventArgs e)
! {
! Console.WriteLine("Connection state changed from {0} to {1}",
! e.OriginalState, e.CurrentState);
! }
!
! private void createDatabase()
! {
! StringBuilder connString = new StringBuilder();
! connString.AppendFormat(
! "User={0};Password={1};Database={2};DataSource={3};Port={4};SSL={5}",
! ConfigurationSettings.AppSettings["User"],
! ConfigurationSettings.AppSettings["Password"],
! String.Empty,
! ConfigurationSettings.AppSettings["DataSource"],
! ConfigurationSettings.AppSettings["Port"],
! ConfigurationSettings.AppSettings["SSL"]);
!
! PgConnection connection = new PgConnection(connString.ToString());
! connection.Open();
!
! connection.CreateDatabase(
! ConfigurationSettings.AppSettings["Database"],
! null,
! null,
! null,
! "UNICODE");
!
! connection.Close();
! }
!
! private void dropDatabase()
! {
! StringBuilder connString = new StringBuilder();
! connString.AppendFormat(
! "User={0};Password={1};Database={2};DataSource={3};Port={4};SSL={5}",
! ConfigurationSettings.AppSettings["User"],
! ConfigurationSettings.AppSettings["Password"],
! String.Empty,
! ConfigurationSettings.AppSettings["DataSource"],
! ConfigurationSettings.AppSettings["Port"],
! ConfigurationSettings.AppSettings["SSL"]);
!
! PgConnection connection = new PgConnection(connString.ToString());
! connection.Open();
!
! StringBuilder commandText = new StringBuilder();
!
! commandText.AppendFormat(
! "drop database {0}",
! ConfigurationSettings.AppSettings["Database"]);
!
! PgCommand command = new PgCommand(commandText.ToString(), connection);
!
! command.ExecuteNonQuery();
! command.Dispose();
!
! connection.Close();
! }
!
! private void createTables()
! {
! StringBuilder commandText = new StringBuilder();
!
! // Table for general purpouse tests
! commandText.Append("CREATE TABLE public.test_table(");
! commandText.Append("int4_field int4 NOT NULL,");
! commandText.Append("char_field char(10),");
! commandText.Append("varchar_field varchar(30),");
! commandText.Append("single_field float4,");
! commandText.Append("double_field float8,");
! commandText.Append("date_field date,");
! commandText.Append("time_field time,");
! commandText.Append("timestamp_field timestamp,");
! commandText.Append("blob_field bytea,");
! commandText.Append("bool_field bool,");
! commandText.Append("int2_field int2,");
! commandText.Append("int8_field int8,");
! commandText.Append("money_field money,");
! commandText.Append("numeric_field numeric(8,2),");
! commandText.Append("bool_array bool[],");
! commandText.Append("int2_array int2[],");
! commandText.Append("int4_array int4[],");
! commandText.Append("int8_array int8[],");
! commandText.Append("mint2_array int2[][],");
! commandText.Append("serial_field serial NOT NULL,");
! commandText.Append("macaddr_field macaddr,");
! commandText.Append("inet_field inet,");
! commandText.Append("name_field name,");
! commandText.Append("CONSTRAINT test_table_pkey PRIMARY KEY (int4_field)");
! commandText.Append(") WITH OIDS;");
!
! PgCommand command = new PgCommand(commandText.ToString(), connection);
! command.ExecuteNonQuery();
!
! commandText = new StringBuilder();
!
! // Table for Geometric types tests
! commandText.Append("CREATE TABLE public.geometric_table(");
! commandText.Append("pk int4 NOT NULL,");
! commandText.Append("point_field point,");
! commandText.Append("box_field box,");
! commandText.Append("circle_field circle,");
! commandText.Append("lseg_field lseg,");
! commandText.Append("path_field path,");
! commandText.Append("polygon_field polygon,");
! commandText.Append("point_array point[],");
! commandText.Append("box_array box[],");
! commandText.Append("circle_array circle[],");
! commandText.Append("lseg_array lseg[],");
! commandText.Append("path_array path[],");
! commandText.Append("polygon_array polygon[],");
! commandText.Append("line_field line,");
! commandText.Append("line_array line[],");
! commandText.Append("CONSTRAINT geometric_test_pkey PRIMARY KEY (pk)");
! commandText.Append(") WITH OIDS;");
!
! command.CommandText = commandText.ToString();
! command.ExecuteNonQuery();
! command.Dispose();
!
! insertTestData();
! insertGeometricTestData();
! }
!
! private void createFunctions()
! {
! // Create language functions
! StringBuilder commandText = new StringBuilder();
!
! commandText.Append("CREATE OR REPLACE FUNCTION public.plpgsql_call_handler()");
! commandText.Append("RETURNS language_handler AS");
! commandText.Append("'$libdir/plpgsql', 'plpgsql_call_handler'");
! commandText.Append("LANGUAGE 'c' VOLATILE;");
!
! PgCommand command = new PgCommand(commandText.ToString(), connection);
! command.ExecuteNonQuery();
!
! // Create languages
! commandText = new StringBuilder();
!
! commandText.Append("CREATE TRUSTED PROCEDURAL LANGUAGE 'plpgsql' HANDLER plpgsql_call_handler;");
!
! command = new PgCommand(commandText.ToString(), connection);
! command.ExecuteNonQuery();
!
! // Create test function public.TestCount()
! commandText = new StringBuilder();
!
! commandText.Append("CREATE OR REPLACE FUNCTION public.TestCount()");
! commandText.Append("RETURNS int8 AS");
! commandText.Append("'");
! commandText.Append("select count(*) from test_table;");
! commandText.Append("'");
! commandText.Append("LANGUAGE 'sql' VOLATILE;");
!
! command = new PgCommand(commandText.ToString(), connection);
! command.ExecuteNonQuery();
!
! // Create test function public.DeriveCount()
! commandText = new StringBuilder();
!
! commandText.Append("CREATE OR REPLACE FUNCTION public.DeriveCount(int4)");
! commandText.Append("RETURNS int8 AS");
! commandText.Append("'");
! commandText.Append("select count(*) from test_table where int4_field < $1;");
! commandText.Append("'");
! commandText.Append("LANGUAGE 'sql' VOLATILE;");
!
! command.CommandText = commandText.ToString();
! command.ExecuteNonQuery();
!
! // Create test function public.DeleteRows()
! commandText = new StringBuilder();
!
! commandText.Append("CREATE OR REPLACE FUNCTION public.DeleteRows(int4)\r\n");
! commandText.Append("RETURNS BOOLEAN AS '\r\n");
! commandText.Append("DECLARE\r\n");
! commandText.Append("\t\trows INTEGER;\r\n");
! commandText.Append("BEGIN\r\n");
! commandText.Append("DELETE FROM public.test_table WHERE int4_field > $1;\r\n");
! commandText.Append("GET DIAGNOSTICS rows = ROW_COUNT;\r\n");
! commandText.Append("IF rows > 0 THEN\r\n");
! commandText.Append("\t\tRETURN TRUE;\r\n");
! commandText.Append("ELSE\r\n");
! commandText.Append("\t\tRETURN FALSE;\r\n");
! commandText.Append("END IF;\r\n");
! commandText.Append("END;\r\n");
! commandText.Append("'\r\n");
! commandText.Append("LANGUAGE 'plpgsql' VOLATILE;");
!
! command.CommandText = commandText.ToString();
! command.ExecuteNonQuery();
!
! command.Dispose();
! }
!
! private void insertTestData()
! {
! string commandText = "insert into public.test_table values(@int4_field, @char_field, @varchar_field, @single_field, @double_field, @date_Field, @time_field, @timestamp_field)";
!
! PgTransaction transaction = connection.BeginTransaction();
! PgCommand command = new PgCommand(commandText, connection, transaction);
!
! try
! {
! // Add command parameters
! command.Parameters.Add("@int4_field", PgDbType.Int4);
! command.Parameters.Add("@char_field", PgDbType.Char);
! command.Parameters.Add("@varchar_field", PgDbType.VarChar);
! command.Parameters.Add("@single_field", PgDbType.Float);
! command.Parameters.Add("@double_field", PgDbType.Double);
! command.Parameters.Add("@date_field", PgDbType.Date);
! command.Parameters.Add("@time_field", PgDbType.Time);
! command.Parameters.Add("@timestamp_field", PgDbType.Timestamp);
!
! for (int i = 0; i < 100; i++)
! {
! command.Parameters["@int4_field"].Value = i;
! command.Parameters["@char_field"].Value = "IRow " + i.ToString();
! command.Parameters["@varchar_field"].Value = "IRow Number" + i.ToString();
! command.Parameters["@single_field"].Value = (float)(i + 10)/5;
! command.Parameters["@double_field"].Value = Math.Log(i, 10);
! command.Parameters["@date_field"].Value = DateTime.Now;
! command.Parameters["@time_field"].Value = DateTime.Now;
! command.Parameters["@timestamp_field"].Value = DateTime.Now;
!
! command.ExecuteNonQuery();
! }
!
! // Commit transaction
! transaction.Commit();
! }
! catch (PgException ex)
! {
! transaction.Rollback();
! throw ex;
! }
! finally
! {
! command.Dispose();
! }
! }
!
! private void insertGeometricTestData()
! {
! string commandText = "insert into public.geometric_table values(@pk, @point, @box, @circle, @lseg, @path, @polygon)";
!
! PgTransaction transaction = connection.BeginTransaction();
! PgCommand command = new PgCommand(commandText, connection, transaction);
!
! try
! {
! // Add command parameters
! command.Parameters.Add("@pk", PgDbType.Int4);
! command.Parameters.Add("@point", PgDbType.Point);
! command.Parameters.Add("@box", PgDbType.Box);
! command.Parameters.Add("@circle", PgDbType.Circle);
! command.Parameters.Add("@lseg", PgDbType.LSeg);
! command.Parameters.Add("@path", PgDbType.Path);
! command.Parameters.Add("@polygon", PgDbType.Polygon);
!
! for (int i = 0; i < 100; i++)
! {
! command.Parameters["@pk"].Value = i;
! command.Parameters["@point"].Value = new PgPoint(i, i + 10);
! command.Parameters["@box"].Value = new PgBox(new PgPoint(0,i), new PgPoint(i, i));
! command.Parameters["@circle"].Value = new PgCircle(new PgPoint(i, 0), i);
! command.Parameters["@lseg"].Value = new PgLSeg(new PgPoint(-1,0), new PgPoint(1,0));
! command.Parameters["@path"].Value = new PgPath(false, new PgPoint[]{new PgPoint(0,0), new PgPoint(1,0)});
! command.Parameters["@polygon"].Value= new PgPolygon(new PgPoint[]{new PgPoint(1,1), new PgPoint(0,0)});
!
! command.ExecuteNonQuery();
! }
!
! // Commit transaction
! transaction.Commit();
! }
! catch (PgException ex)
! {
! transaction.Rollback();
! throw ex;
! }
! finally
! {
! command.Dispose();
! }
! }
! }
}
|
|
From: <car...@us...> - 2003-12-18 10:10:21
|
Update of /cvsroot/pgsqlclient/pgsqlclient_10/Mono.Security.Protocol.Tls In directory sc8-pr-cvs1:/tmp/cvs-serv7947 Modified Files: changelog.txt Log Message: Updated changelog Index: changelog.txt =================================================================== RCS file: /cvsroot/pgsqlclient/pgsqlclient_10/Mono.Security.Protocol.Tls/changelog.txt,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -d -r1.16 -r1.17 *** changelog.txt 9 Dec 2003 19:25:04 -0000 1.16 --- changelog.txt 18 Dec 2003 10:10:17 -0000 1.17 *************** *** 1,292 **** ! TLS/SSL library - PgSqlClient - ADO.NET Data Provider for PostgreSQL 7.4+ ! --------------- ----------- ----------------------------------------- ! ! 2003-12-09 Carlos Guzmán Álvarez <car...@te...> ! ! * Mono.Security.Protocol.Handshake.Client/TlsServerCertificate.cs: ! ! - Fixed message (but not working yet - we need RSA signing ! capabilitites with MD5SHA1 hash). ! ! * Mono.Security.Protocol.Handshake.Client/TlsServerCertificate.cs: ! ! - Retrict certificate validation to the first validation. ! ( real validation needs to be made using a chain ) ! ! - Improved domain validation by making a IP checking between ! the target host IP and the certificate domain IP. ! ! - Fixed error list handling on certificate validation. ! ! 2003-11-28 Carlos Guzmán Álvarez <car...@te...> ! ! * Mono.Security.Protocol.Tls/SslClientStream.cs: ! ! - Added new exceptions. ! ! 2003-11-23 Carlos Guzmán Álvarez <car...@te...> ! ! * Mono.Security.Protocol.Tls/SslServerStream.cs: ! ! - Added new SslServerStream class with empty methods. ! ! * Mono.Security.Protocol.Tls.Handshake.Server: ! ! - New directory with class definitions of handshake message classes ! for the server implementation. ! ! - Class names for server handshake messages are the same as for ! client implementation. ! ! * Mono.Security.Protocol.Tls/SslClientStream.cs: ! ! - Throw exception in constrctors when the targetHost or the streams are invalid. ! ! - Added correct exception throwing in read/write methods. ! ! - Added initial implementation of BeginRead and EndRead methods. ! ! * Mono.Security.Protocol.Tls.Handshake/TlsHandshakeMessage.cs: ! ! - Added new constructor. ! ! - Changed UpdateSession() method to Update() and replaced method ! name in derived classes. ! ! ------------------------- Updated Mono Sources ---------------------- ! ! 2003-11-22 Carlos Guzmán Álvarez <car...@te...> ! ! * Mono.Security.Protocol.Tls/CipherSuite.cs: ! ! - Better handling of padding bytes on message encryption. ! ! * Mono.Security.Protocol.Tls/TlsCipherSuiteFactory.cs: ! ! - Uncommented AES ciphersuites. ! ! ! 2003-11-21 Carlos Guzmán Álvarez <car...@te...> ! ! * Mono.Security.Protocol.Tls/SslClientStream.cs: ! ! - Add correct implementation of RaiseClientCertificateSelection ! ! 2003-11-17 Carlos Guzmán Álvarez <car...@te...> ! ! * Mono.Security.Protocol.Tls/SslClientStream.cs: ! ! Removed ReadByte method, use innerStream.ReadByte() method instead. ! ! 2003-11-13 Carlos Guzmán Álvarez <car...@te...> ! ! * Added implementation of an SslClientStream class similar to the MS .NET Framework 1.2 documentation. ! ! The next files are no more needed: ! ! - TlsSession.cs ! ! - TlsNetworkStream.cs ! ! - TlsSocket.cs ! ! - TlsSessionState.cs ! ! The next files are renamed: ! ! - TlsSessionSettings.cs -> TlsClientSettings.cs ! ! - TlsSessionContext.cs -> TlsContext.cs ! ! The next files are new: ! ! - SslClientStream.cs ( the name is non definitive yet ) ! ! The next files where changed to reflect the new canges: ! ! - TlsHandshakeMessage.cs ! ! - TlsClientCertificate.cs ! ! - TlsClientCertificateVerify.cs ! ! - TlsClientFinished.cs ! ! - TlsClientHello.cs ! ! - TlsClientKeyExchange.cs ! ! - TlsServerCertificate.cs ! ! - TlsServerCertificateRequest.cs ! ! - TlsServerFinished.cs ! ! - TlsServerHello.cs ! ! - TlsServerHelloDone.cs ! ! - TlsServerKeyExchange.cs ! ! - TlsAlert.cs ! ! - TlsCloseNotifyAlert.cs ! ! ! 2003-11-12 Carlos Guzmán Álvarez <car...@te...> ! ! * Mono.Security.Protocol.Tls.Alerts/TlsAlert.cs: ! ! - Changes for give full error message only in debug mode ( Thanks to Sebastién Pouliot. ) ! ! * Mono.Security.Protocol.Tls/TlsProtocol.cs: ! ! - Renamed to SecurityProtocolType.cs ( for match .NET 1.2 ) ! ! * Mono.Security.Cryptography/MD5SHA1CryptoServiceProvider.cs: ! ! - Renamed to MD5SHA1.cs ( Thanks to Sebastién Pouliot. ) ! ! * Mono.Security.Cryptography/TlsCompressionMethod.cs: ! ! - Renamed to SecurityCompressionType. ! ! * Mono.Security.Protocol.Tls/CipherAlgorithmType.cs: ! * Mono.Security.Protocol.Tls/HashAlgorithmType.cs: ! * Mono.Security.Protocol.Tls/ExchangeAlgorithmType.cs: ! ! - New enumerations that matches .NET 1.2 definitions with some minor differences. ! ! * Mono.Security.Protocol.Tls/CipherSuite.cs: ! * Mono.Security.Protocol.Tls/TlsCipherSuite.cs: ! * Mono.Security.Protocol.Tls/TlsSslCipherSuite.cs: ! * Mono.Security.Protocol.Tls/TlsSessionContext.cs: ! ! - Added changes for make use of new enumerations. ! ! * Mono.Security.Protocol.Tls/TlsClientStream.cs: ! ! - Added new informative properties that matches .NET 1.2 SslClientStream ! ( Not all the properties are implemented yet ). ! ! ! 2003-11-10 Carlos Guzmán Álvarez <car...@te...> ! ! * Mono.Security.Protocol.Tls.Alerts/TlsAlert.cs: ! ! - Fixed invalid alert message. ! ! * Mono.Security.Protocol.Tls/CipherSuite.cs: ! * Mono.Security.Protocol.Tls/TlsSslCipherSuite.cs: ! * Mono.Security.Cryptography/HMAC.cs: ! * Mono.Security.Cryptography/MD5SHA1CryptoServiceProvider.cs: ! * Mono.Security.Protocol.Tls.Handshake.Client/TlsClientCertificateVerify.cs: ! ! - Changed ( Thanks to Sebastién Pouliot for his feedback ) ! ! SHA1CryptoServiceProvider sha = new SHA1CryptoServiceProvider(); ! MD5CryptoServiceProvider sha = new MD5CryptoServiceProvider(); ! ! to ! ! HashAlgorithm sha = SHA1.Create(); ! HashAlgorithm md5 = MD5.Create(); ! ! ! 2003-11-04 Carlos Guzmán Álvarez <car...@te...> ! ! * Mono.Security.Protocol.Tls.Handshake.Client/TlsServerCertificate.cs: ! ! - Commented server certificate signature verification. ! ! * Mono.Security.Protocol.Tls/TlsServerSettings.cs: ! ! - Renamed ServerCertificates property to Certificates. ! ! ! ----------------- Updated Mono Sources ----------------------- ! ! ! ! 2003-11-04 Carlos Guzmán Álvarez <car...@te...> ! ! * CipherSuite.cs: ! ! - Added custom padding for record encryption. ! ! ! 2003-11-03 Carlos Guzmán Álvarez <car...@te...> ! ! * Mono.Security.Protocol.Tls.Handshake/TlsHandshakeMessages.cs: ! ! - Removed file. ! ! * Mono.Security.Protocol.Tls/TlsSslHandshakeHash.cs: ! ! - New class for handshake hashes calculation on SSL3 protocol. ! ! * Mono.Security.Protocol.Tls/TlsSessionContext.cs: ! ! - Fixed mac keys clearing for SSL3 protocol. ! ! * Mono.Security.Protocol.Tls/TlsSslCipherSuite.cs: ! * Mono.Security.Protocol.Tls.Handshake.Client/TlsClientFinished.cs: ! ! - Added changes for make use of new TlsSslHandshakeHash class. ! ! * Mono.Security.Protocol.Tls.Handshake.Client/TlsServerFinished.cs: ! ! - Added initial implementation for SSL3 protocol. ! ! * Mono.Security.Cryptography/MD5SHA1CryptoServiceProvider.cs: ! ! - New class for md5-sha hash calculation. ! ! * Mono.Security.Protocol.Tls.Handshake.Client/TlsClientFinished.cs: ! * Mono.Security.Protocol.Tls.Handshake.Client/TlsServerFinished.cs: ! * Mono.Security.Protocol.Tls.Handshake.Client/TlsServerKeyExchange.cs: ! * Mono.Security.Protocol.Tls.Handshake.Client/TlsHandshakeMessage.cs: ! ! - Make use of new MD5SHA1CryptoServiceProvider class. ! ! * Mono.Security.Protocol.Tls.Handshake.Client/TlsClientCertificateVerify.cs: ! ! - Added initial implementation (not finished). ! ! * Mono.Security.Protocol.Tls.Handshake.Client/TlsServerKeyExchange.cs: ! ! - Minor change to message processing. ! ! - Changed verify method name to verifySignature. ! ! * Mono.Security.Protocol.Tls/TlsSessionContext.cs: ! ! - Changed handshakeHashes member to be an TlsStream. ! ! 2003-10-28 Carlos Guzmán Álvarez <car...@te...> ! ! * Mono.Security.Protocol.Tls/CipherSuite.cs: ! * Mono.Security.Protocol.Tls/TlsSessionSettings.cs: ! * Mono.Security.Protocol.Tls/TlsServerSettings.cs: ! * Mono.Security.Protocol.Tls.Handshake.Client/TlsClientCertificateVerify.cs: ! * Mono.Security.Protocol.Tls.Handshake.Client/TlsClientKeyExchange.cs: ! * Mono.Security.Protocol.Tls.Handshake.Client/TlsServerCertificate.cs: ! * Mono.Security.Protocol.Tls.Handshake.Client/TlsServerKeyExchange.cs: ! ! - Added changes for make use of X509 classes from mono. ! ! * Mono.Security/ASN1Convert.cs: ! * Mono.Security.X509/*.*: ! ! - New files from mono for allow basic certificate validation. ! ! ! 2003-10-21 Carlos Guzmán Álvarez <car...@te...> ! ! * Added specific changelog file for the TLS/SSL implementation. ! ! * Added partial implementation of SSL3 protocol. ! ! ! ! --- 1,301 ---- ! TLS/SSL library - PgSqlClient - ADO.NET Data Provider for PostgreSQL 7.4+ ! --------------- ----------- ----------------------------------------- ! ! 2003-12-14 Carlos Guzmán Álvarez <car...@te...> ! ! * Mono.Security.Protocol.Tls/RSASslSignatureFormatter.cs: ! * Mono.Security.Protocol.Tls/RSASslSignatureDeformatter.cs: ! ! - Added new classes for implement in the future RSA-SSL signatures. ! ! * Changed #region names in all source files. ! ! 2003-12-09 Carlos Guzmán Álvarez <car...@te...> ! ! * Mono.Security.Protocol.Handshake.Client/TlsServerCertificate.cs: ! ! - Fixed message (but not working yet - we need RSA signing ! capabilitites with MD5SHA1 hash). ! ! * Mono.Security.Protocol.Handshake.Client/TlsServerCertificate.cs: ! ! - Retrict certificate validation to the first validation. ! ( real validation needs to be made using a chain ) ! ! - Improved domain validation by making a IP checking between ! the target host IP and the certificate domain IP. ! ! - Fixed error list handling on certificate validation. ! ! 2003-11-28 Carlos Guzmán Álvarez <car...@te...> ! ! * Mono.Security.Protocol.Tls/SslClientStream.cs: ! ! - Added new exceptions. ! ! 2003-11-23 Carlos Guzmán Álvarez <car...@te...> ! ! * Mono.Security.Protocol.Tls/SslServerStream.cs: ! ! - Added new SslServerStream class with empty methods. ! ! * Mono.Security.Protocol.Tls.Handshake.Server: ! ! - New directory with class definitions of handshake message classes ! for the server implementation. ! ! - Class names for server handshake messages are the same as for ! client implementation. ! ! * Mono.Security.Protocol.Tls/SslClientStream.cs: ! ! - Throw exception in constrctors when the targetHost or the streams are invalid. ! ! - Added correct exception throwing in read/write methods. ! ! - Added initial implementation of BeginRead and EndRead methods. ! ! * Mono.Security.Protocol.Tls.Handshake/TlsHandshakeMessage.cs: ! ! - Added new constructor. ! ! - Changed UpdateSession() method to Update() and replaced method ! name in derived classes. ! ! ------------------------- Updated Mono Sources ---------------------- ! ! 2003-11-22 Carlos Guzmán Álvarez <car...@te...> ! ! * Mono.Security.Protocol.Tls/CipherSuite.cs: ! ! - Better handling of padding bytes on message encryption. ! ! * Mono.Security.Protocol.Tls/TlsCipherSuiteFactory.cs: ! ! - Uncommented AES ciphersuites. ! ! ! 2003-11-21 Carlos Guzmán Álvarez <car...@te...> ! ! * Mono.Security.Protocol.Tls/SslClientStream.cs: ! ! - Add correct implementation of RaiseClientCertificateSelection ! ! 2003-11-17 Carlos Guzmán Álvarez <car...@te...> ! ! * Mono.Security.Protocol.Tls/SslClientStream.cs: ! ! Removed ReadByte method, use innerStream.ReadByte() method instead. ! ! 2003-11-13 Carlos Guzmán Álvarez <car...@te...> ! ! * Added implementation of an SslClientStream class similar to the MS .NET Framework 1.2 documentation. ! ! The next files are no more needed: ! ! - TlsSession.cs ! ! - TlsNetworkStream.cs ! ! - TlsSocket.cs ! ! - TlsSessionState.cs ! ! The next files are renamed: ! ! - TlsSessionSettings.cs -> TlsClientSettings.cs ! ! - TlsSessionContext.cs -> TlsContext.cs ! ! The next files are new: ! ! - SslClientStream.cs ( the name is non definitive yet ) ! ! The next files where changed to reflect the new canges: ! ! - TlsHandshakeMessage.cs ! ! - TlsClientCertificate.cs ! ! - TlsClientCertificateVerify.cs ! ! - TlsClientFinished.cs ! ! - TlsClientHello.cs ! ! - TlsClientKeyExchange.cs ! ! - TlsServerCertificate.cs ! ! - TlsServerCertificateRequest.cs ! ! - TlsServerFinished.cs ! ! - TlsServerHello.cs ! ! - TlsServerHelloDone.cs ! ! - TlsServerKeyExchange.cs ! ! - TlsAlert.cs ! ! - TlsCloseNotifyAlert.cs ! ! ! 2003-11-12 Carlos Guzmán Álvarez <car...@te...> ! ! * Mono.Security.Protocol.Tls.Alerts/TlsAlert.cs: ! ! - Changes for give full error message only in debug mode ( Thanks to Sebastién Pouliot. ) ! ! * Mono.Security.Protocol.Tls/TlsProtocol.cs: ! ! - Renamed to SecurityProtocolType.cs ( for match .NET 1.2 ) ! ! * Mono.Security.Cryptography/MD5SHA1CryptoServiceProvider.cs: ! ! - Renamed to MD5SHA1.cs ( Thanks to Sebastién Pouliot. ) ! ! * Mono.Security.Cryptography/TlsCompressionMethod.cs: ! ! - Renamed to SecurityCompressionType. ! ! * Mono.Security.Protocol.Tls/CipherAlgorithmType.cs: ! * Mono.Security.Protocol.Tls/HashAlgorithmType.cs: ! * Mono.Security.Protocol.Tls/ExchangeAlgorithmType.cs: ! ! - New enumerations that matches .NET 1.2 definitions with some minor differences. ! ! * Mono.Security.Protocol.Tls/CipherSuite.cs: ! * Mono.Security.Protocol.Tls/TlsCipherSuite.cs: ! * Mono.Security.Protocol.Tls/TlsSslCipherSuite.cs: ! * Mono.Security.Protocol.Tls/TlsSessionContext.cs: ! ! - Added changes for make use of new enumerations. ! ! * Mono.Security.Protocol.Tls/TlsClientStream.cs: ! ! - Added new informative properties that matches .NET 1.2 SslClientStream ! ( Not all the properties are implemented yet ). ! ! ! 2003-11-10 Carlos Guzmán Álvarez <car...@te...> ! ! * Mono.Security.Protocol.Tls.Alerts/TlsAlert.cs: ! ! - Fixed invalid alert message. ! ! * Mono.Security.Protocol.Tls/CipherSuite.cs: ! * Mono.Security.Protocol.Tls/TlsSslCipherSuite.cs: ! * Mono.Security.Cryptography/HMAC.cs: ! * Mono.Security.Cryptography/MD5SHA1CryptoServiceProvider.cs: ! * Mono.Security.Protocol.Tls.Handshake.Client/TlsClientCertificateVerify.cs: ! ! - Changed ( Thanks to Sebastién Pouliot for his feedback ) ! ! SHA1CryptoServiceProvider sha = new SHA1CryptoServiceProvider(); ! MD5CryptoServiceProvider sha = new MD5CryptoServiceProvider(); ! ! to ! ! HashAlgorithm sha = SHA1.Create(); ! HashAlgorithm md5 = MD5.Create(); ! ! ! 2003-11-04 Carlos Guzmán Álvarez <car...@te...> ! ! * Mono.Security.Protocol.Tls.Handshake.Client/TlsServerCertificate.cs: ! ! - Commented server certificate signature verification. ! ! * Mono.Security.Protocol.Tls/TlsServerSettings.cs: ! ! - Renamed ServerCertificates property to Certificates. ! ! ! ----------------- Updated Mono Sources ----------------------- ! ! ! ! 2003-11-04 Carlos Guzmán Álvarez <car...@te...> ! ! * CipherSuite.cs: ! ! - Added custom padding for record encryption. ! ! ! 2003-11-03 Carlos Guzmán Álvarez <car...@te...> ! ! * Mono.Security.Protocol.Tls.Handshake/TlsHandshakeMessages.cs: ! ! - Removed file. ! ! * Mono.Security.Protocol.Tls/TlsSslHandshakeHash.cs: ! ! - New class for handshake hashes calculation on SSL3 protocol. ! ! * Mono.Security.Protocol.Tls/TlsSessionContext.cs: ! ! - Fixed mac keys clearing for SSL3 protocol. ! ! * Mono.Security.Protocol.Tls/TlsSslCipherSuite.cs: ! * Mono.Security.Protocol.Tls.Handshake.Client/TlsClientFinished.cs: ! ! - Added changes for make use of new TlsSslHandshakeHash class. ! ! * Mono.Security.Protocol.Tls.Handshake.Client/TlsServerFinished.cs: ! ! - Added initial implementation for SSL3 protocol. ! ! * Mono.Security.Cryptography/MD5SHA1CryptoServiceProvider.cs: ! ! - New class for md5-sha hash calculation. ! ! * Mono.Security.Protocol.Tls.Handshake.Client/TlsClientFinished.cs: ! * Mono.Security.Protocol.Tls.Handshake.Client/TlsServerFinished.cs: ! * Mono.Security.Protocol.Tls.Handshake.Client/TlsServerKeyExchange.cs: ! * Mono.Security.Protocol.Tls.Handshake.Client/TlsHandshakeMessage.cs: ! ! - Make use of new MD5SHA1CryptoServiceProvider class. ! ! * Mono.Security.Protocol.Tls.Handshake.Client/TlsClientCertificateVerify.cs: ! ! - Added initial implementation (not finished). ! ! * Mono.Security.Protocol.Tls.Handshake.Client/TlsServerKeyExchange.cs: ! ! - Minor change to message processing. ! ! - Changed verify method name to verifySignature. ! ! * Mono.Security.Protocol.Tls/TlsSessionContext.cs: ! ! - Changed handshakeHashes member to be an TlsStream. ! ! 2003-10-28 Carlos Guzmán Álvarez <car...@te...> ! ! * Mono.Security.Protocol.Tls/CipherSuite.cs: ! * Mono.Security.Protocol.Tls/TlsSessionSettings.cs: ! * Mono.Security.Protocol.Tls/TlsServerSettings.cs: ! * Mono.Security.Protocol.Tls.Handshake.Client/TlsClientCertificateVerify.cs: ! * Mono.Security.Protocol.Tls.Handshake.Client/TlsClientKeyExchange.cs: ! * Mono.Security.Protocol.Tls.Handshake.Client/TlsServerCertificate.cs: ! * Mono.Security.Protocol.Tls.Handshake.Client/TlsServerKeyExchange.cs: ! ! - Added changes for make use of X509 classes from mono. ! ! * Mono.Security/ASN1Convert.cs: ! * Mono.Security.X509/*.*: ! ! - New files from mono for allow basic certificate validation. ! ! ! 2003-10-21 Carlos Guzmán Álvarez <car...@te...> ! ! * Added specific changelog file for the TLS/SSL implementation. ! ! * Added partial implementation of SSL3 protocol. ! ! ! ! |
|
From: <car...@us...> - 2003-12-18 10:09:49
|
Update of /cvsroot/pgsqlclient/pgsqlclient_10/Mono.Security.Protocol.Tls/Mono.Security.Protocol.Tls In directory sc8-pr-cvs1:/tmp/cvs-serv7796 Modified Files: TlsCipherSuiteFactory.cs Log Message: Uncomment cipher suites Index: TlsCipherSuiteFactory.cs =================================================================== RCS file: /cvsroot/pgsqlclient/pgsqlclient_10/Mono.Security.Protocol.Tls/Mono.Security.Protocol.Tls/TlsCipherSuiteFactory.cs,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** TlsCipherSuiteFactory.cs 14 Dec 2003 14:59:39 -0000 1.13 --- TlsCipherSuiteFactory.cs 18 Dec 2003 10:09:45 -0000 1.14 *************** *** 44,48 **** } ! #region PRIVATE_STATIC_METHODS private static TlsCipherSuiteCollection GetTls1SupportedCiphers() --- 44,48 ---- } ! #region Private Static Methods private static TlsCipherSuiteCollection GetTls1SupportedCiphers() *************** *** 51,56 **** // Supported ciphers - scs.Add((0x00 << 0x08) | 0x06, "TLS_RSA_EXPORT_WITH_RC2_CBC_40_MD5", CipherAlgorithmType.Rc2, HashAlgorithmType.Md5, ExchangeAlgorithmType.RsaKeyX, true, true, 5, 16, 40, 8, 8); - /* scs.Add((0x00 << 0x08) | 0x35, "TLS_RSA_WITH_AES_256_CBC_SHA", CipherAlgorithmType.Rijndael, HashAlgorithmType.Sha1, ExchangeAlgorithmType.RsaSign, false, true, 32, 32, 256, 16, 16); scs.Add((0x00 << 0x08) | 0x2F, "TLS_RSA_WITH_AES_128_CBC_SHA", CipherAlgorithmType.Rijndael, HashAlgorithmType.Sha1, ExchangeAlgorithmType.RsaSign, false, true, 16, 16, 128, 16, 16); --- 51,54 ---- *************** *** 59,63 **** scs.Add((0x00 << 0x08) | 0x05, "TLS_RSA_WITH_RC4_128_SHA", CipherAlgorithmType.Rc4, HashAlgorithmType.Sha1, ExchangeAlgorithmType.RsaSign, false, false, 16, 16, 128, 0, 0); scs.Add((0x00 << 0x08) | 0x04, "TLS_RSA_WITH_RC4_128_MD5", CipherAlgorithmType.Rc4, HashAlgorithmType.Md5, ExchangeAlgorithmType.RsaSign, false, false, 16, 16, 128, 0, 0); - */ // Default CipherSuite --- 57,60 ---- |
|
From: <car...@us...> - 2003-12-14 15:08:34
|
Update of /cvsroot/pgsqlclient/pgsqlclient_10/WindowsSetup In directory sc8-pr-cvs1:/tmp/cvs-serv15927 Modified Files: PgSqlClientSetup.gi2 Log Message: Prepare for beta 5 Index: PgSqlClientSetup.gi2 =================================================================== RCS file: /cvsroot/pgsqlclient/pgsqlclient_10/WindowsSetup/PgSqlClientSetup.gi2,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** PgSqlClientSetup.gi2 20 Nov 2003 17:36:12 -0000 1.6 --- PgSqlClientSetup.gi2 14 Dec 2003 15:08:31 -0000 1.7 *************** *** 1,115 **** ! <gi2project version="3.7"> ! <packages> ! <package filename="setup" main="1"> ! <components> ! <component id="Main" name="Main"> ! <files> ! <file src="..\build\net-1.1\distribution\*.*" dst="%InstallPath%\*.*" /> ! <file src="..\build\net-1.1\distribution\PostgreSql.Data.PgSqlClient.dll" dst="%GAC%\PostgreSql.Data.PgSqlClient.dll" /> ! <file src="..\build\net-1.1\distribution\Mono.Security.Protocol.Tls.dll" dst="%GAC%\Mono.Security.Protocol.Tls.dll" /> ! </files> ! <shortcuts> ! <shortcut name="%ProgramsMenu%\%ProgramGroup%\Uninstall %AppName%" cmdline="%InstallPath%\Uninstall.exe" /> ! </shortcuts> ! </component> ! <!--component id="Help" name="Help"> ! <files> ! <file src="..\build\net-1.0\distribution\*.chm" dst="%InstallPath%\*.*" /> ! </files> ! <shortcuts> ! <shortcut name="%ProgramsMenu%\%ProgramGroup%\SDK" cmdline="%InstallPath%\PgSqlClientSDK.chm" /> ! </shortcuts> ! </component --> ! <component id="License" name="License"> ! <files> ! <file src="..\build\net-1.1\distribution\license.txt" dst="%InstallPath%\*.*" /> ! </files> ! <shortcuts> ! <shortcut name="%ProgramsMenu%\%ProgramGroup%\Licenses" cmdline="%InstallPath%\license.txt" /> ! </shortcuts> ! </component> ! <component id="Readme" name="Readme"> ! <files> ! <file src="..\build\net-1.1\distribution\readme.txt" dst="%InstallPath%\*.*" /> ! </files> ! <shortcuts> ! <shortcut name="%ProgramsMenu%\%ProgramGroup%\Readme" cmdline="%InstallPath%\README.TXT" /> ! </shortcuts> ! </component> ! <component id="Changes" name="Changes"> ! <files> ! <file src="..\build\net-1.1\distribution\CHANGES.TXT" dst="%InstallPath%\*.*" /> ! </files> ! <shortcuts> ! <shortcut name="%ProgramsMenu%\%ProgramGroup%\Changes" cmdline="%InstallPath%\Changes.TXT" /> ! </shortcuts> ! </component> ! </components> ! <plugins> ! <plugin id="StdUI"> ! <config> ! <paramgroup name="Config"> ! <param name="PreInstallDialogSequence" value="DLG_LANGUAGE,DLG_WELCOME,DLG_LICENSE,DLG_README,DLG_DIR,DLG_GROUP,DLG_START" /> ! <param name="PostInstallDialogSequence"/> ! <param name="ShowMainWindow" value="0" /> ! <param name="ShowDialogTitle" value="1" /> ! <param name="ShowDialogSubTitle" value="1" /> ! <param name="ShowFinalDialog" value="1" /> ! <param name="GradientTopColor" value="0" /> ! <param name="GradientBottomColor" value="$FF0000" /> ! <param name="StretchBanner" value="0" /> ! <param name="DialogFont" value="MS Sans Serif,8" /> ! <param name="DialogBitmap" value="%Presetup%\gins.bmp" /> ! <param name="DialogTitleFont" value="MS Sans Serif,10,$C08000,B" /> ! <param name="DialogTitleShadow" value="0" /> ! <param name="DialogTitleShadowColor" value="$C0C0C0" /> ! <param name="DialogPosition" value="1,1" /> ! <param name="DialogSubTitleFont" value="MS Sans Serif,8,$000000" /> ! </paramgroup> ! <paramgroup name="Labels"> ! <param name="TitleShadow" value="%AppName%,33,23,0,Times New Roman,30,$606060,B" /> ! <param name="Title" value="%AppName%,30,20,0,Times New Roman,30,$FF0000,B" /> ! </paramgroup> ! <paramgroup name="DialogBitmaps"> ! <param name="DLG_LANGUAGE"/> ! <param name="DLG_WELCOME"/> ! <param name="DLG_LICENSE"/> ! <param name="DLG_README"/> ! <param name="DLG_DIR"/> ! <param name="DLG_INSTALLTYPE"/> ! <param name="DLG_FEATURES"/> ! <param name="DLG_START"/> ! <param name="DLG_PROGRESS"/> ! <param name="DLG_FINISH"/> ! <param name="DLG_NOTFINISH"/> ! <param name="DLG_REBOOT"/> ! <param name="DLG_PASSWORD"/> ! <param name="DLG_GROUP"/> ! </paramgroup> ! </config> ! </plugin> ! </plugins> ! <presetup> ! <file action="add" src="presetup\*.*"/> ! <file src="..\build\net-1.1\distribution\readme.txt" /> ! <file src="..\build\net-1.1\distribution\license.txt" /> ! </presetup> ! </package> ! </packages> ! <launchconditions> ! <launchcondition condition = "NETFrameworkInstalled(1.1)" msg="You need to have installed the Microsoft .NET Framework 1.1 before install the PgSqlClient .NET Data Provider" /> ! </launchconditions> ! <variables> ! <var name="AppID" value="PgSqlClient ADO.NET Data Provider 1.0" /> ! <var name="AppName" value="PgSqlClient ADO.NET Data Provider 1.0 Beta 4" /> ! <var name="OutputPath" value="Output" type="normal"/> ! <var name="Password" type="normal"/> ! <var name="CompressionLevel" value="7" type="normal" /> ! <var name="Languages" value="Bgr,Csy,Deu,Enu,Epo,Fra,Hun,Nld,Plk,Ptb,Rus,Sky,Ukr,Esn,Ita,Jpn" type="normal"/> ! <var name="AutoSelectLanguage" value="1" type="normal"/> ! <var name="Uninstall" value="1" /> ! <var name="ProgramGroup" value="PgSqlClient 1.0" /> ! <var name="AppFolder" value="%ProgramsMenu%\%ProgramGroup%" type="normal"/> ! <var name="InstallPath" value="%ProgramFiles%\PgSqlClient .NET Data Provider 1.0" type="normal"/> ! </variables> </gi2project> --- 1,115 ---- ! <gi2project version="3.7"> ! <packages> ! <package filename="setup" main="1"> ! <components> ! <component id="Main" name="Main"> ! <files> ! <file src="..\build\net-1.1\distribution\*.*" dst="%InstallPath%\*.*" /> ! <file src="..\build\net-1.1\distribution\PostgreSql.Data.PgSqlClient.dll" dst="%GAC%\PostgreSql.Data.PgSqlClient.dll" /> ! <file src="..\build\net-1.1\distribution\Mono.Security.Protocol.Tls.dll" dst="%GAC%\Mono.Security.Protocol.Tls.dll" /> ! </files> ! <shortcuts> ! <shortcut name="%ProgramsMenu%\%ProgramGroup%\Uninstall %AppName%" cmdline="%InstallPath%\Uninstall.exe" /> ! </shortcuts> ! </component> ! <!--component id="Help" name="Help"> ! <files> ! <file src="..\build\net-1.0\distribution\*.chm" dst="%InstallPath%\*.*" /> ! </files> ! <shortcuts> ! <shortcut name="%ProgramsMenu%\%ProgramGroup%\SDK" cmdline="%InstallPath%\PgSqlClientSDK.chm" /> ! </shortcuts> ! </component --> ! <component id="License" name="License"> ! <files> ! <file src="..\build\net-1.1\distribution\license.txt" dst="%InstallPath%\*.*" /> ! </files> ! <shortcuts> ! <shortcut name="%ProgramsMenu%\%ProgramGroup%\Licenses" cmdline="%InstallPath%\license.txt" /> ! </shortcuts> ! </component> ! <component id="Readme" name="Readme"> ! <files> ! <file src="..\build\net-1.1\distribution\readme.txt" dst="%InstallPath%\*.*" /> ! </files> ! <shortcuts> ! <shortcut name="%ProgramsMenu%\%ProgramGroup%\Readme" cmdline="%InstallPath%\README.TXT" /> ! </shortcuts> ! </component> ! <component id="Changes" name="Changes"> ! <files> ! <file src="..\build\net-1.1\distribution\CHANGES.TXT" dst="%InstallPath%\*.*" /> ! </files> ! <shortcuts> ! <shortcut name="%ProgramsMenu%\%ProgramGroup%\Changes" cmdline="%InstallPath%\Changes.TXT" /> ! </shortcuts> ! </component> ! </components> ! <plugins> ! <plugin id="StdUI"> ! <config> ! <paramgroup name="Config"> ! <param name="PreInstallDialogSequence" value="DLG_LANGUAGE,DLG_WELCOME,DLG_LICENSE,DLG_README,DLG_DIR,DLG_GROUP,DLG_START" /> ! <param name="PostInstallDialogSequence"/> ! <param name="ShowMainWindow" value="0" /> ! <param name="ShowDialogTitle" value="1" /> ! <param name="ShowDialogSubTitle" value="1" /> ! <param name="ShowFinalDialog" value="1" /> ! <param name="GradientTopColor" value="0" /> ! <param name="GradientBottomColor" value="$FF0000" /> ! <param name="StretchBanner" value="0" /> ! <param name="DialogFont" value="MS Sans Serif,8" /> ! <param name="DialogBitmap" value="%Presetup%\gins.bmp" /> ! <param name="DialogTitleFont" value="MS Sans Serif,10,$C08000,B" /> ! <param name="DialogTitleShadow" value="0" /> ! <param name="DialogTitleShadowColor" value="$C0C0C0" /> ! <param name="DialogPosition" value="1,1" /> ! <param name="DialogSubTitleFont" value="MS Sans Serif,8,$000000" /> ! </paramgroup> ! <paramgroup name="Labels"> ! <param name="TitleShadow" value="%AppName%,33,23,0,Times New Roman,30,$606060,B" /> ! <param name="Title" value="%AppName%,30,20,0,Times New Roman,30,$FF0000,B" /> ! </paramgroup> ! <paramgroup name="DialogBitmaps"> ! <param name="DLG_LANGUAGE"/> ! <param name="DLG_WELCOME"/> ! <param name="DLG_LICENSE"/> ! <param name="DLG_README"/> ! <param name="DLG_DIR"/> ! <param name="DLG_INSTALLTYPE"/> ! <param name="DLG_FEATURES"/> ! <param name="DLG_START"/> ! <param name="DLG_PROGRESS"/> ! <param name="DLG_FINISH"/> ! <param name="DLG_NOTFINISH"/> ! <param name="DLG_REBOOT"/> ! <param name="DLG_PASSWORD"/> ! <param name="DLG_GROUP"/> ! </paramgroup> ! </config> ! </plugin> ! </plugins> ! <presetup> ! <file action="add" src="presetup\*.*"/> ! <file src="..\build\net-1.1\distribution\readme.txt" /> ! <file src="..\build\net-1.1\distribution\license.txt" /> ! </presetup> ! </package> ! </packages> ! <launchconditions> ! <launchcondition condition = "NETFrameworkInstalled(1.1)" msg="You need to have installed the Microsoft .NET Framework 1.1 before install the PgSqlClient .NET Data Provider" /> ! </launchconditions> ! <variables> ! <var name="AppID" value="PgSqlClient ADO.NET Data Provider 1.0" /> ! <var name="AppName" value="PgSqlClient ADO.NET Data Provider 1.0 Beta 5" /> ! <var name="OutputPath" value="Output" type="normal"/> ! <var name="Password" type="normal"/> ! <var name="CompressionLevel" value="7" type="normal" /> ! <var name="Languages" value="Bgr,Csy,Deu,Enu,Epo,Fra,Hun,Nld,Plk,Ptb,Rus,Sky,Ukr,Esn,Ita,Jpn" type="normal"/> ! <var name="AutoSelectLanguage" value="1" type="normal"/> ! <var name="Uninstall" value="1" /> ! <var name="ProgramGroup" value="PgSqlClient 1.0" /> ! <var name="AppFolder" value="%ProgramsMenu%\%ProgramGroup%" type="normal"/> ! <var name="InstallPath" value="%ProgramFiles%\PgSqlClient .NET Data Provider 1.0" type="normal"/> ! </variables> </gi2project> |
Update of /cvsroot/pgsqlclient/pgsqlclient_10/PostgreSql.Data.PgSqlClient/source/PgTypes
In directory sc8-pr-cvs1:/tmp/cvs-serv15792
Modified Files:
PgBox.cs PgCircle.cs PgLine.cs PgLSeg.cs PgPath.cs PgPoint.cs
PgPolygon.cs PgTimeSpan.cs
Log Message:
2003-12-14 Carlos Guzmán Álvarez <car...@te...>
* Changed #region names in all source files.
Index: PgBox.cs
===================================================================
RCS file: /cvsroot/pgsqlclient/pgsqlclient_10/PostgreSql.Data.PgSqlClient/source/PgTypes/PgBox.cs,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -d -r1.6 -r1.7
*** PgBox.cs 12 Nov 2003 19:53:11 -0000 1.6
--- PgBox.cs 14 Dec 2003 15:07:55 -0000 1.7
***************
*** 1,124 ****
! /* PgSqlClient - ADO.NET Data Provider for PostgreSQL 7.4+
! * Copyright (C) 2003 Carlos Guzmán Álvarez
! *
! * This library is free software; you can redistribute it and/or
! * modify it under the terms of the GNU Lesser General Public
! * License as published by the Free Software Foundation; either
! * version 2.1 of the License, or (at your option) any later version.
! *
! * This library is distributed in the hope that it will be useful,
! * but WITHOUT ANY WARRANTY; without even the implied warranty of
! * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
! * Lesser General Public License for more details.
! *
! * You should have received a copy of the GNU Lesser General Public
! * License along with this library; if not, write to the Free Software
! * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
! */
!
! using System;
!
! namespace PostgreSql.Data.PgTypes
! {
! [Serializable]
! public struct PgBox
! {
! #region FIELDS
!
! private PgPoint upperRight;
! private PgPoint lowerLeft;
!
! #endregion
!
! #region PROPERTIES
!
! public PgPoint UpperRight
! {
! get { return upperRight; }
! }
!
! public PgPoint LowerLeft
! {
! get { return lowerLeft; }
! }
!
! #endregion
!
! #region CONSTRUCTORS
!
! public PgBox(PgPoint lowerLeft, PgPoint upperRight)
! {
! this.lowerLeft = lowerLeft;
! this.upperRight = upperRight;
! }
!
! public PgBox(double x1, double y1, double x2, double y2)
! {
! this.lowerLeft = new PgPoint(x1, y1);
! this.upperRight = new PgPoint(x2, y2);
! }
!
! #endregion
!
! #region OPERATORS
!
! public static bool operator ==(PgBox left, PgBox right)
! {
! if (left.UpperRight == right.UpperRight &&
! left.LowerLeft == right.LowerLeft)
! {
! return true;
! }
! else
! {
! return false;
! }
! }
!
! public static bool operator !=(PgBox left, PgBox right)
! {
! if (left.UpperRight != right.UpperRight ||
! left.LowerLeft != right.LowerLeft)
! {
! return true;
! }
! else
! {
! return false;
! }
! }
!
! #endregion
!
! #region OVERRIDEN_METHODS
!
! public override string ToString()
! {
! System.Text.StringBuilder b = new System.Text.StringBuilder();
! b.AppendFormat("(({0},{1}),({2},{3}))",
! this.lowerLeft.X , this.lowerLeft.Y,
! this.upperRight.X , this.upperRight.Y);
!
! return b.ToString();
! }
!
! public override int GetHashCode()
! {
! return base.GetHashCode();
! }
!
! public override bool Equals(object obj)
! {
! if (obj is PgBox)
! {
! return ((PgBox)obj) == this;
! }
! else
! {
! return false;
! }
! }
!
! #endregion
! }
! }
--- 1,124 ----
! /* PgSqlClient - ADO.NET Data Provider for PostgreSQL 7.4+
! * Copyright (C) 2003 Carlos Guzmán Álvarez
! *
! * This library is free software; you can redistribute it and/or
! * modify it under the terms of the GNU Lesser General Public
! * License as published by the Free Software Foundation; either
! * version 2.1 of the License, or (at your option) any later version.
! *
! * This library is distributed in the hope that it will be useful,
! * but WITHOUT ANY WARRANTY; without even the implied warranty of
! * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
! * Lesser General Public License for more details.
! *
! * You should have received a copy of the GNU Lesser General Public
! * License along with this library; if not, write to the Free Software
! * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
! */
!
! using System;
!
! namespace PostgreSql.Data.PgTypes
! {
! [Serializable]
! public struct PgBox
! {
! #region Fields
!
! private PgPoint upperRight;
! private PgPoint lowerLeft;
!
! #endregion
!
! #region Properties
!
! public PgPoint UpperRight
! {
! get { return upperRight; }
! }
!
! public PgPoint LowerLeft
! {
! get { return lowerLeft; }
! }
!
! #endregion
!
! #region Constructors
!
! public PgBox(PgPoint lowerLeft, PgPoint upperRight)
! {
! this.lowerLeft = lowerLeft;
! this.upperRight = upperRight;
! }
!
! public PgBox(double x1, double y1, double x2, double y2)
! {
! this.lowerLeft = new PgPoint(x1, y1);
! this.upperRight = new PgPoint(x2, y2);
! }
!
! #endregion
!
! #region OPERATORS
!
! public static bool operator ==(PgBox left, PgBox right)
! {
! if (left.UpperRight == right.UpperRight &&
! left.LowerLeft == right.LowerLeft)
! {
! return true;
! }
! else
! {
! return false;
! }
! }
!
! public static bool operator !=(PgBox left, PgBox right)
! {
! if (left.UpperRight != right.UpperRight ||
! left.LowerLeft != right.LowerLeft)
! {
! return true;
! }
! else
! {
! return false;
! }
! }
!
! #endregion
!
! #region OVERRIDEN_METHODS
!
! public override string ToString()
! {
! System.Text.StringBuilder b = new System.Text.StringBuilder();
! b.AppendFormat("(({0},{1}),({2},{3}))",
! this.lowerLeft.X , this.lowerLeft.Y,
! this.upperRight.X , this.upperRight.Y);
!
! return b.ToString();
! }
!
! public override int GetHashCode()
! {
! return base.GetHashCode();
! }
!
! public override bool Equals(object obj)
! {
! if (obj is PgBox)
! {
! return ((PgBox)obj) == this;
! }
! else
! {
! return false;
! }
! }
!
! #endregion
! }
! }
Index: PgCircle.cs
===================================================================
RCS file: /cvsroot/pgsqlclient/pgsqlclient_10/PostgreSql.Data.PgSqlClient/source/PgTypes/PgCircle.cs,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** PgCircle.cs 12 Nov 2003 19:53:11 -0000 1.4
--- PgCircle.cs 14 Dec 2003 15:07:55 -0000 1.5
***************
*** 1,121 ****
! /* PgSqlClient - ADO.NET Data Provider for PostgreSQL 7.4+
! * Copyright (C) 2003 Carlos Guzmán Álvarez
! *
! * This library is free software; you can redistribute it and/or
! * modify it under the terms of the GNU Lesser General Public
! * License as published by the Free Software Foundation; either
! * version 2.1 of the License, or (at your option) any later version.
! *
! * This library is distributed in the hope that it will be useful,
! * but WITHOUT ANY WARRANTY; without even the implied warranty of
! * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
! * Lesser General Public License for more details.
! *
! * You should have received a copy of the GNU Lesser General Public
! * License along with this library; if not, write to the Free Software
! * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
! */
!
! using System;
!
! namespace PostgreSql.Data.PgTypes
! {
! [Serializable]
! public struct PgCircle
! {
! #region FIELDS
!
! private PgPoint center;
! private double radius;
!
! #endregion
!
! #region PROPERTIES
!
! public PgPoint Center
! {
! get { return center; }
! }
!
! public double Radius
! {
! get { return radius; }
! }
!
! #endregion
!
! #region CONSTRUCTORS
!
! public PgCircle(PgPoint center, double radius)
! {
! this.center = center;
! this.radius = radius;
! }
!
! public PgCircle(double x, double y, double radius)
! {
! this.center = new PgPoint(x, y);
! this.radius = radius;
! }
!
! #endregion
!
! #region OPERATORS
!
! public static bool operator ==(PgCircle left, PgCircle right)
! {
! if (left.Center == right.Center && left.Radius == right.Radius)
! {
! return true;
! }
! else
! {
! return true;
! }
! }
!
! public static bool operator !=(PgCircle left, PgCircle right)
! {
! if (left.Center != right.Center || left.Radius != right.Radius)
! {
! return true;
! }
! else
! {
! return true;
! }
! }
!
! #endregion
!
! #region OVERRIDEN_METHODS
!
! public override string ToString()
! {
! System.Text.StringBuilder b = new System.Text.StringBuilder();
! b.AppendFormat("<({0},{1}),{2}>",
! this.center.X, this.center.Y, this.radius);
!
! return b.ToString();
! }
!
! public override int GetHashCode()
! {
! return base.GetHashCode();
! }
!
! public override bool Equals(object obj)
! {
! if (obj is PgCircle)
! {
! return ((PgCircle)obj) == this;
! }
! else
! {
! return false;
! }
! }
!
! #endregion
! }
! }
--- 1,121 ----
! /* PgSqlClient - ADO.NET Data Provider for PostgreSQL 7.4+
! * Copyright (C) 2003 Carlos Guzmán Álvarez
! *
! * This library is free software; you can redistribute it and/or
! * modify it under the terms of the GNU Lesser General Public
! * License as published by the Free Software Foundation; either
! * version 2.1 of the License, or (at your option) any later version.
! *
! * This library is distributed in the hope that it will be useful,
! * but WITHOUT ANY WARRANTY; without even the implied warranty of
! * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
! * Lesser General Public License for more details.
! *
! * You should have received a copy of the GNU Lesser General Public
! * License along with this library; if not, write to the Free Software
! * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
! */
!
! using System;
!
! namespace PostgreSql.Data.PgTypes
! {
! [Serializable]
! public struct PgCircle
! {
! #region Fields
!
! private PgPoint center;
! private double radius;
!
! #endregion
!
! #region Properties
!
! public PgPoint Center
! {
! get { return center; }
! }
!
! public double Radius
! {
! get { return radius; }
! }
!
! #endregion
!
! #region Constructors
!
! public PgCircle(PgPoint center, double radius)
! {
! this.center = center;
! this.radius = radius;
! }
!
! public PgCircle(double x, double y, double radius)
! {
! this.center = new PgPoint(x, y);
! this.radius = radius;
! }
!
! #endregion
!
! #region OPERATORS
!
! public static bool operator ==(PgCircle left, PgCircle right)
! {
! if (left.Center == right.Center && left.Radius == right.Radius)
! {
! return true;
! }
! else
! {
! return true;
! }
! }
!
! public static bool operator !=(PgCircle left, PgCircle right)
! {
! if (left.Center != right.Center || left.Radius != right.Radius)
! {
! return true;
! }
! else
! {
! return true;
! }
! }
!
! #endregion
!
! #region OVERRIDEN_METHODS
!
! public override string ToString()
! {
! System.Text.StringBuilder b = new System.Text.StringBuilder();
! b.AppendFormat("<({0},{1}),{2}>",
! this.center.X, this.center.Y, this.radius);
!
! return b.ToString();
! }
!
! public override int GetHashCode()
! {
! return base.GetHashCode();
! }
!
! public override bool Equals(object obj)
! {
! if (obj is PgCircle)
! {
! return ((PgCircle)obj) == this;
! }
! else
! {
! return false;
! }
! }
!
! #endregion
! }
! }
Index: PgLine.cs
===================================================================
RCS file: /cvsroot/pgsqlclient/pgsqlclient_10/PostgreSql.Data.PgSqlClient/source/PgTypes/PgLine.cs,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** PgLine.cs 12 Nov 2003 19:53:11 -0000 1.4
--- PgLine.cs 14 Dec 2003 15:07:55 -0000 1.5
***************
*** 1,124 ****
! /* PgSqlClient - ADO.NET Data Provider for PostgreSQL 7.4+
! * Copyright (C) 2003 Carlos Guzmán Álvarez
! *
! * This library is free software; you can redistribute it and/or
! * modify it under the terms of the GNU Lesser General Public
! * License as published by the Free Software Foundation; either
! * version 2.1 of the License, or (at your option) any later version.
! *
! * This library is distributed in the hope that it will be useful,
! * but WITHOUT ANY WARRANTY; without even the implied warranty of
! * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
! * Lesser General Public License for more details.
! *
! * You should have received a copy of the GNU Lesser General Public
! * License along with this library; if not, write to the Free Software
! * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
! */
!
! using System;
!
! namespace PostgreSql.Data.PgTypes
! {
! [Serializable]
! public struct PgLine
! {
! #region FIELDS
!
! private PgPoint startPoint;
! private PgPoint endPoint;
!
! #endregion
!
! #region PROPERTIES
!
! public PgPoint StartPoint
! {
! get { return startPoint; }
! }
!
! public PgPoint EndPoint
! {
! get { return endPoint; }
! }
!
! #endregion
!
! #region CONSTRUCTORS
!
! public PgLine(PgPoint startPoint, PgPoint endPoint)
! {
! this.startPoint = startPoint;
! this.endPoint = endPoint;
! }
!
! public PgLine(double x1, double y1, double x2, double y2)
! {
! this.startPoint = new PgPoint(x1, y1);
! this.endPoint = new PgPoint(x2, y2);
! }
!
! #endregion
!
! #region OPERATORS
!
! public static bool operator ==(PgLine left, PgLine right)
! {
! if (left.StartPoint == right.StartPoint &&
! left.EndPoint == right.EndPoint)
! {
! return true;
! }
! else
! {
! return false;
! }
! }
!
! public static bool operator !=(PgLine left, PgLine right)
! {
! if (left.StartPoint != right.StartPoint ||
! left.EndPoint != right.EndPoint)
! {
! return true;
! }
! else
! {
! return false;
! }
! }
!
! #endregion
!
! #region OVERRIDEN_METHODS
!
! public override string ToString()
! {
! System.Text.StringBuilder b = new System.Text.StringBuilder();
! b.AppendFormat("(({0},{1}),({2},{3}))",
! this.startPoint.X , this.startPoint.Y,
! this.endPoint.X , this.endPoint.Y);
!
! return b.ToString();
! }
!
! public override int GetHashCode()
! {
! return base.GetHashCode();
! }
!
! public override bool Equals(object obj)
! {
! if (obj is PgLine)
! {
! return ((PgLine)obj) == this;
! }
! else
! {
! return false;
! }
! }
!
! #endregion
! }
! }
--- 1,124 ----
! /* PgSqlClient - ADO.NET Data Provider for PostgreSQL 7.4+
! * Copyright (C) 2003 Carlos Guzmán Álvarez
! *
! * This library is free software; you can redistribute it and/or
! * modify it under the terms of the GNU Lesser General Public
! * License as published by the Free Software Foundation; either
! * version 2.1 of the License, or (at your option) any later version.
! *
! * This library is distributed in the hope that it will be useful,
! * but WITHOUT ANY WARRANTY; without even the implied warranty of
! * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
! * Lesser General Public License for more details.
! *
! * You should have received a copy of the GNU Lesser General Public
! * License along with this library; if not, write to the Free Software
! * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
! */
!
! using System;
!
! namespace PostgreSql.Data.PgTypes
! {
! [Serializable]
! public struct PgLine
! {
! #region Fields
!
! private PgPoint startPoint;
! private PgPoint endPoint;
!
! #endregion
!
! #region Properties
!
! public PgPoint StartPoint
! {
! get { return startPoint; }
! }
!
! public PgPoint EndPoint
! {
! get { return endPoint; }
! }
!
! #endregion
!
! #region Constructors
!
! public PgLine(PgPoint startPoint, PgPoint endPoint)
! {
! this.startPoint = startPoint;
! this.endPoint = endPoint;
! }
!
! public PgLine(double x1, double y1, double x2, double y2)
! {
! this.startPoint = new PgPoint(x1, y1);
! this.endPoint = new PgPoint(x2, y2);
! }
!
! #endregion
!
! #region OPERATORS
!
! public static bool operator ==(PgLine left, PgLine right)
! {
! if (left.StartPoint == right.StartPoint &&
! left.EndPoint == right.EndPoint)
! {
! return true;
! }
! else
! {
! return false;
! }
! }
!
! public static bool operator !=(PgLine left, PgLine right)
! {
! if (left.StartPoint != right.StartPoint ||
! left.EndPoint != right.EndPoint)
! {
! return true;
! }
! else
! {
! return false;
! }
! }
!
! #endregion
!
! #region OVERRIDEN_METHODS
!
! public override string ToString()
! {
! System.Text.StringBuilder b = new System.Text.StringBuilder();
! b.AppendFormat("(({0},{1}),({2},{3}))",
! this.startPoint.X , this.startPoint.Y,
! this.endPoint.X , this.endPoint.Y);
!
! return b.ToString();
! }
!
! public override int GetHashCode()
! {
! return base.GetHashCode();
! }
!
! public override bool Equals(object obj)
! {
! if (obj is PgLine)
! {
! return ((PgLine)obj) == this;
! }
! else
! {
! return false;
! }
! }
!
! #endregion
! }
! }
Index: PgLSeg.cs
===================================================================
RCS file: /cvsroot/pgsqlclient/pgsqlclient_10/PostgreSql.Data.PgSqlClient/source/PgTypes/PgLSeg.cs,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** PgLSeg.cs 12 Nov 2003 19:53:11 -0000 1.5
--- PgLSeg.cs 14 Dec 2003 15:07:55 -0000 1.6
***************
*** 1,124 ****
! /* PgSqlClient - ADO.NET Data Provider for PostgreSQL 7.4+
! * Copyright (C) 2003 Carlos Guzmán Álvarez
! *
! * This library is free software; you can redistribute it and/or
! * modify it under the terms of the GNU Lesser General Public
! * License as published by the Free Software Foundation; either
! * version 2.1 of the License, or (at your option) any later version.
! *
! * This library is distributed in the hope that it will be useful,
! * but WITHOUT ANY WARRANTY; without even the implied warranty of
! * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
! * Lesser General Public License for more details.
! *
! * You should have received a copy of the GNU Lesser General Public
! * License along with this library; if not, write to the Free Software
! * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
! */
!
! using System;
!
! namespace PostgreSql.Data.PgTypes
! {
! [Serializable]
! public struct PgLSeg
! {
! #region FIELDS
!
! private PgPoint startPoint;
! private PgPoint endPoint;
!
! #endregion
!
! #region PROPERTIES
!
! public PgPoint StartPoint
! {
! get { return startPoint; }
! }
!
! public PgPoint EndPoint
! {
! get { return endPoint; }
! }
!
! #endregion
!
! #region CONSTRUCTORS
!
! public PgLSeg(PgPoint startPoint, PgPoint endPoint)
! {
! this.startPoint = startPoint;
! this.endPoint = endPoint;
! }
!
! public PgLSeg(double x1, double y1, double x2, double y2)
! {
! this.startPoint = new PgPoint(x1, y1);
! this.endPoint = new PgPoint(x2, y2);
! }
!
! #endregion
!
! #region OPERATORS
!
! public static bool operator ==(PgLSeg left, PgLSeg right)
! {
! if (left.StartPoint == right.StartPoint &&
! left.EndPoint == right.EndPoint)
! {
! return true;
! }
! else
! {
! return false;
! }
! }
!
! public static bool operator !=(PgLSeg left, PgLSeg right)
! {
! if (left.StartPoint != right.StartPoint ||
! left.EndPoint != right.EndPoint)
! {
! return true;
! }
! else
! {
! return false;
! }
! }
!
! #endregion
!
! #region OVERRIDEN_METHODS
!
! public override string ToString()
! {
! System.Text.StringBuilder b = new System.Text.StringBuilder();
! b.AppendFormat("[({0},{1}),({2},{3})]",
! this.startPoint.X , this.startPoint.Y,
! this.endPoint.X , this.endPoint.Y);
!
! return b.ToString();
! }
!
! public override int GetHashCode()
! {
! return base.GetHashCode();
! }
!
! public override bool Equals(object obj)
! {
! if (obj is PgLSeg)
! {
! return ((PgLSeg)obj) == this;
! }
! else
! {
! return false;
! }
! }
!
! #endregion
! }
! }
--- 1,124 ----
! /* PgSqlClient - ADO.NET Data Provider for PostgreSQL 7.4+
! * Copyright (C) 2003 Carlos Guzmán Álvarez
! *
! * This library is free software; you can redistribute it and/or
! * modify it under the terms of the GNU Lesser General Public
! * License as published by the Free Software Foundation; either
! * version 2.1 of the License, or (at your option) any later version.
! *
! * This library is distributed in the hope that it will be useful,
! * but WITHOUT ANY WARRANTY; without even the implied warranty of
! * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
! * Lesser General Public License for more details.
! *
! * You should have received a copy of the GNU Lesser General Public
! * License along with this library; if not, write to the Free Software
! * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
! */
!
! using System;
!
! namespace PostgreSql.Data.PgTypes
! {
! [Serializable]
! public struct PgLSeg
! {
! #region Fields
!
! private PgPoint startPoint;
! private PgPoint endPoint;
!
! #endregion
!
! #region Properties
!
! public PgPoint StartPoint
! {
! get { return startPoint; }
! }
!
! public PgPoint EndPoint
! {
! get { return endPoint; }
! }
!
! #endregion
!
! #region Constructors
!
! public PgLSeg(PgPoint startPoint, PgPoint endPoint)
! {
! this.startPoint = startPoint;
! this.endPoint = endPoint;
! }
!
! public PgLSeg(double x1, double y1, double x2, double y2)
! {
! this.startPoint = new PgPoint(x1, y1);
! this.endPoint = new PgPoint(x2, y2);
! }
!
! #endregion
!
! #region OPERATORS
!
! public static bool operator ==(PgLSeg left, PgLSeg right)
! {
! if (left.StartPoint == right.StartPoint &&
! left.EndPoint == right.EndPoint)
! {
! return true;
! }
! else
! {
! return false;
! }
! }
!
! public static bool operator !=(PgLSeg left, PgLSeg right)
! {
! if (left.StartPoint != right.StartPoint ||
! left.EndPoint != right.EndPoint)
! {
! return true;
! }
! else
! {
! return false;
! }
! }
!
! #endregion
!
! #region OVERRIDEN_METHODS
!
! public override string ToString()
! {
! System.Text.StringBuilder b = new System.Text.StringBuilder();
! b.AppendFormat("[({0},{1}),({2},{3})]",
! this.startPoint.X , this.startPoint.Y,
! this.endPoint.X , this.endPoint.Y);
!
! return b.ToString();
! }
!
! public override int GetHashCode()
! {
! return base.GetHashCode();
! }
!
! public override bool Equals(object obj)
! {
! if (obj is PgLSeg)
! {
! return ((PgLSeg)obj) == this;
! }
! else
! {
! return false;
! }
! }
!
! #endregion
! }
! }
Index: PgPath.cs
===================================================================
RCS file: /cvsroot/pgsqlclient/pgsqlclient_10/PostgreSql.Data.PgSqlClient/source/PgTypes/PgPath.cs,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** PgPath.cs 12 Nov 2003 19:53:11 -0000 1.4
--- PgPath.cs 14 Dec 2003 15:07:55 -0000 1.5
***************
*** 1,142 ****
! /* PgSqlClient - ADO.NET Data Provider for PostgreSQL 7.4+
! * Copyright (C) 2003 Carlos Guzmán Álvarez
! *
! * This library is free software; you can redistribute it and/or
! * modify it under the terms of the GNU Lesser General Public
! * License as published by the Free Software Foundation; either
! * version 2.1 of the License, or (at your option) any later version.
! *
! * This library is distributed in the hope that it will be useful,
! * but WITHOUT ANY WARRANTY; without even the implied warranty of
! * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
! * Lesser General Public License for more details.
! *
! * You should have received a copy of the GNU Lesser General Public
! * License along with this library; if not, write to the Free Software
! * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
! */
!
! using System;
!
! namespace PostgreSql.Data.PgTypes
! {
! [Serializable]
! public struct PgPath
! {
! #region FIELDS
!
! private PgPoint[] points;
! private bool isClosedPath;
!
! #endregion
!
! #region PROPERTIES
!
! public PgPoint[] Points
! {
! get { return points; }
! }
!
! public bool IsClosedPath
! {
! get { return isClosedPath; }
! }
!
! #endregion
!
! #region CONSTRUCTORS
!
! public PgPath(bool isClosedPath, PgPoint[] points)
! {
! this.isClosedPath = isClosedPath;
! this.points = (PgPoint[])points.Clone();
! }
!
! #endregion
!
! #region OPERATORS
!
! public static bool operator ==(PgPath left, PgPath right)
! {
! bool equals = false;
!
! if (left.Points.Length == right.Points.Length)
! {
! equals = true;
! for (int i = 0; i < left.Points.Length; i++)
! {
! if (left.Points[i] != right.Points[i])
! {
! equals = false;
! break;
! }
! }
! }
!
! return equals;
! }
!
! public static bool operator !=(PgPath left, PgPath right)
! {
! bool notequals = true;
!
! if (left.Points.Length == right.Points.Length)
! {
! notequals = false;
! for (int i = 0; i < left.Points.Length; i++)
! {
! if (left.Points[i] != right.Points[i])
! {
! notequals = true;
! break;
! }
! }
! }
!
! return notequals;
! }
!
! #endregion
!
! #region OVERRIDEN_METHODS
!
! public override string ToString()
! {
! System.Text.StringBuilder b = new System.Text.StringBuilder();
!
! b.Append(this.isClosedPath ? "(" : "[");
!
! for (int i = 0; i < this.points.Length; i++)
! {
! if (b.Length > 1)
! {
! b.Append(",");
! }
! b.Append(this.points[i].ToString());
! }
!
! b.Append(this.isClosedPath ? ")" : "]");
!
! return b.ToString();
! }
!
! public override int GetHashCode()
! {
! return base.GetHashCode();
! }
!
! public override bool Equals(object obj)
! {
! if (obj is PgPath)
! {
! return ((PgPath)obj) == this;
! }
! else
! {
! return false;
! }
! }
!
! #endregion
! }
! }
--- 1,142 ----
! /* PgSqlClient - ADO.NET Data Provider for PostgreSQL 7.4+
! * Copyright (C) 2003 Carlos Guzmán Álvarez
! *
! * This library is free software; you can redistribute it and/or
! * modify it under the terms of the GNU Lesser General Public
! * License as published by the Free Software Foundation; either
! * version 2.1 of the License, or (at your option) any later version.
! *
! * This library is distributed in the hope that it will be useful,
! * but WITHOUT ANY WARRANTY; without even the implied warranty of
! * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
! * Lesser General Public License for more details.
! *
! * You should have received a copy of the GNU Lesser General Public
! * License along with this library; if not, write to the Free Software
! * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
! */
!
! using System;
!
! namespace PostgreSql.Data.PgTypes
! {
! [Serializable]
! public struct PgPath
! {
! #region Fields
!
! private PgPoint[] points;
! private bool isClosedPath;
!
! #endregion
!
! #region Properties
!
! public PgPoint[] Points
! {
! get { return points; }
! }
!
! public bool IsClosedPath
! {
! get { return isClosedPath; }
! }
!
! #endregion
!
! #region Constructors
!
! public PgPath(bool isClosedPath, PgPoint[] points)
! {
! this.isClosedPath = isClosedPath;
! this.points = (PgPoint[])points.Clone();
! }
!
! #endregion
!
! #region OPERATORS
!
! public static bool operator ==(PgPath left, PgPath right)
! {
! bool equals = false;
!
! if (left.Points.Length == right.Points.Length)
! {
! equals = true;
! for (int i = 0; i < left.Points.Length; i++)
! {
! if (left.Points[i] != right.Points[i])
! {
! equals = false;
! break;
! }
! }
! }
!
! return equals;
! }
!
! public static bool operator !=(PgPath left, PgPath right)
! {
! bool notequals = true;
!
! if (left.Points.Length == right.Points.Length)
! {
! notequals = false;
! for (int i = 0; i < left.Points.Length; i++)
! {
! if (left.Points[i] != right.Points[i])
! {
! notequals = true;
! break;
! }
! }
! }
!
! return notequals;
! }
!
! #endregion
!
! #region OVERRIDEN_METHODS
!
! public override string ToString()
! {
! System.Text.StringBuilder b = new System.Text.StringBuilder();
!
! b.Append(this.isClosedPath ? "(" : "[");
!
! for (int i = 0; i < this.points.Length; i++)
! {
! if (b.Length > 1)
! {
! b.Append(",");
! }
! b.Append(this.points[i].ToString());
! }
!
! b.Append(this.isClosedPath ? ")" : "]");
!
! return b.ToString();
! }
!
! public override int GetHashCode()
! {
! return base.GetHashCode();
! }
!
! public override bool Equals(object obj)
! {
! if (obj is PgPath)
! {
! return ((PgPath)obj) == this;
! }
! else
! {
! return false;
! }
! }
!
! #endregion
! }
! }
Index: PgPoint.cs
===================================================================
RCS file: /cvsroot/pgsqlclient/pgsqlclient_10/PostgreSql.Data.PgSqlClient/source/PgTypes/PgPoint.cs,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** PgPoint.cs 12 Nov 2003 19:53:11 -0000 1.4
--- PgPoint.cs 14 Dec 2003 15:07:55 -0000 1.5
***************
*** 1,114 ****
! /* PgSqlClient - ADO.NET Data Provider for PostgreSQL 7.4+
! * Copyright (C) 2003 Carlos Guzmán Álvarez
! *
! * This library is free software; you can redistribute it and/or
! * modify it under the terms of the GNU Lesser General Public
! * License as published by the Free Software Foundation; either
! * version 2.1 of the License, or (at your option) any later version.
! *
! * This library is distributed in the hope that it will be useful,
! * but WITHOUT ANY WARRANTY; without even the implied warranty of
! * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
! * Lesser General Public License for more details.
! *
! * You should have received a copy of the GNU Lesser General Public
! * License along with this library; if not, write to the Free Software
! * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
! */
!
! using System;
!
! namespace PostgreSql.Data.PgTypes
! {
! [Serializable]
! public struct PgPoint
! {
! #region FIELDS
!
! private double x;
! private double y;
!
! #endregion
!
! #region PROPERTIES
!
! public double X
! {
! get { return x; }
! }
!
! public double Y
! {
! get { return y; }
! }
!
! #endregion
!
! #region CONSTRUCTORS
!
! public PgPoint(double x, double y)
! {
! this.x = x;
! this.y = y;
! }
!
! #endregion
!
! #region OPERATORS
!
! public static bool operator ==(PgPoint left, PgPoint right)
! {
! if (left.X == right.X && left.Y == right.Y)
! {
! return true;
! }
! else
! {
! return true;
! }
! }
!
! public static bool operator !=(PgPoint left, PgPoint right)
! {
! if (left.X != right.X || left.Y != right.Y)
! {
! return true;
! }
! else
! {
! return true;
! }
! }
!
! #endregion
!
! #region OVERRIDEN_METHODS
!
! public override string ToString()
! {
! System.Text.StringBuilder b = new System.Text.StringBuilder();
! b.AppendFormat("({0},{1})", this.x, this.y);
!
! return b.ToString();
! }
!
! public override int GetHashCode()
! {
! return base.GetHashCode();
! }
!
! public override bool Equals(object obj)
! {
! if (obj is PgPoint)
! {
! return ((PgPoint)obj) == this;
! }
! else
! {
! return false;
! }
! }
!
! #endregion
! }
! }
--- 1,114 ----
! /* PgSqlClient - ADO.NET Data Provider for PostgreSQL 7.4+
! * Copyright (C) 2003 Carlos Guzmán Álvarez
! *
! * This library is free software; you can redistribute it and/or
! * modify it under the terms of the GNU Lesser General Public
! * License as published by the Free Software Foundation; either
! * version 2.1 of the License, or (at your option) any later version.
! *
! * This library is distributed in the hope that it will be useful,
! * but WITHOUT ANY WARRANTY; without even the implied warranty of
! * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
! * Lesser General Public License for more details.
! *
! * You should have received a copy of the GNU Lesser General Public
! * License along with this library; if not, write to the Free Software
! * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
! */
!
! using System;
!
! namespace PostgreSql.Data.PgTypes
! {
! [Serializable]
! public struct PgPoint
! {
! #region Fields
!
! private double x;
! private double y;
!
! #endregion
!
! #region Properties
!
! public double X
! {
! get { return x; }
! }
!
! public double Y
! {
! get { return y; }
! }
!
! #endregion
!
! #region Constructors
!
! public PgPoint(double x, double y)
! {
! this.x = x;
! this.y = y;
! }
!
! #endregion
!
! #region OPERATORS
!
! public static bool operator ==(PgPoint left, PgPoint right)
! {
! if (left.X == right.X && left.Y == right.Y)
! {
! return true;
! }
! else
! {
! return true;
! }
! }
!
! public static bool operator !=(PgPoint left, PgPoint right)
! {
! if (left.X != right.X || left.Y != right.Y)
! {
! return true;
! }
! else
! {
! return true;
! }
! }
!
! #endregion
!
! #region OVERRIDEN_METHODS
!
! public override string ToString()
! {
! System.Text.StringBuilder b = new System.Text.StringBuilder();
! b.AppendFormat("({0},{1})", this.x, this.y);
!
! return b.ToString();
! }
!
! public override int GetHashCode()
! {
! return base.GetHashCode();
! }
!
! public override bool Equals(object obj)
! {
! if (obj is PgPoint)
! {
! return ((PgPoint)obj) == this;
! }
! else
! {
! return false;
! }
! }
!
! #endregion
! }
! }
Index: PgPolygon.cs
===================================================================
RCS file: /cvsroot/pgsqlclient/pgsqlclient_10/PostgreSql.Data.PgSqlClient/source/PgTypes/PgPolygon.cs,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** PgPolygon.cs 12 Nov 2003 19:53:11 -0000 1.5
--- PgPolygon.cs 14 Dec 2003 15:07:55 -0000 1.6
***************
*** 1,135 ****
! /* PgSqlClient - ADO.NET Data Provider for PostgreSQL 7.4+
! * Copyright (C) 2003 Carlos Guzmán Álvarez
! *
! * This library is free software; you can redistribute it and/or
! * modify it under the terms of the GNU Lesser General Public
! * License as published by the Free Software Foundation; either
! * version 2.1 of the License, or (at your option) any later version.
! *
! * This library is distributed in the hope that it will be useful,
! * but WITHOUT ANY WARRANTY; without even the implied warranty of
! * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
! * Lesser General Public License for more details.
! *
! * You should have received a copy of the GNU Lesser General Public
! * License along with this library; if not, write to the Free Software
! * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
! */
!
! using System;
!
! namespace PostgreSql.Data.PgTypes
! {
! [Serializable]
! public struct PgPolygon
! {
! #region FIELDS
!
! private PgPoint[] points;
!
! #endregion
!
! #region PROPERTIES
!
! public PgPoint[] Points
! {
! get { return points; }
! }
!
! #endregion
!
! #region CONSTRUCTORS
!
! public PgPolygon(PgPoint[] points)
! {
! this.points = (PgPoint[])points.Clone();
! }
!
! #endregion
!
! #region OPERATORS
!
! public static bool operator ==(PgPolygon left, PgPolygon right)
! {
! bool equals = false;
!
! if (left.Points.Length == right.Points.Length)
! {
! equals = true;
! for (int i = 0; i < left.Points.Length; i++)
! {
! if (left.Points[i] != right.Points[i])
! {
! equals = false;
! break;
! }
! }
! }
!
! return equals;
! }
!
! public static bool operator !=(PgPolygon left, PgPolygon right)
! {
! bool notequals = true;
!
! if (left.Points.Length == right.Points.Length)
! {
! notequals = false;
! for (int i = 0; i < left.Points.Length; i++)
! {
! if (left.Points[i] != right.Points[i])
! {
! notequals = true;
! break;
! }
! }
! }
!
! return notequals;
! }
!
! #endregion
!
! #region OVERRIDEN_METHODS
!
! public override string ToString()
! {
! System.Text.StringBuilder b = new System.Text.StringBuilder();
!
! b.Append("(");
!
! for (int i = 0; i < this.points.Length; i++)
! {
! if (b.Length > 1)
! {
! b.Append(",");
! }
! b.Append(this.points[i].ToString());
! }
!
! b.Append(")");
!
! return b.ToString();
! }
!
! public override int GetHashCode()
! {
! return base.GetHashCode();
! }
!
! public override bool Equals(object obj)
! {
! if (obj is PgPolygon)
! {
! return ((PgPolygon)obj) == this;
! }
! else
! {
! return false;
! }
! }
!
! #endregion
! }
! }
--- 1,135 ----
! /* PgSqlClient - ADO.NET Data Provider for PostgreSQL 7.4+
! * Copyright (C) 2003 Carlos Guzmán Álvarez
! *
! * This library is free software; you can redistribute it and/or
! * modify it under the terms of the GNU Lesser General Public
! * License as published by the Free Software Foundation; either
! * version 2.1 of the License, or (at your option) any later version.
! *
! * This library is distributed in the hope that it will be useful,
! * but WITHOUT ANY WARRANTY; without even the implied warranty of
! * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
! * Lesser General Public License for more details.
! *
! * You should have received a copy of the GNU Lesser General Public
! * License along with this library; if not, write to the Free Software
! * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
! */
!
! using System;
!
! namespace PostgreSql.Data.PgTypes
! {
! [Serializable]
! public struct PgPolygon
! {
! #region Fields
!
! private PgPoint[] points;
!
! #endregion
!
! #region Properties
!
! public PgPoint[] Points
! {
! get { return points; }
! }
!
! #endregion
!
! #region Constructors
!
! public PgPolygon(PgPoint[] points)
! {
! this.points = (PgPoint[])points.Clone();
! }
!
! #endregion
!
! #region OPERATORS
!
! public static bool operator ==(PgPolygon left, PgPolygon right)
! {
! bool equals = false;
!
! if (left.Points.Length == right.Points.Length)
! {
! equals = true;
! for (int i = 0; i < left.Points.Length; i++)
! {
! if (left.Points[i] != right.Points[i])
! {
! equals = false;
! break;
! }
! }
! }
!
! return equals;
! }
!
! public static bool operator !=(PgPolygon left, PgPolygon right)
! {
! bool notequals = true;
!
! if (left.Points.Length == right.Points.Length)
! {
! notequals = false;
! for (int i = 0; i < left.Points.Length; i++)
! {
! if (left.Points[i] != right.Points[i])
! {
! notequals = true;
! break;
! }
! }
! }
!
! return notequals;
! }
!
! #endregion
!
! #region OVERRIDEN_METHODS
!
! public override string ToString()
! {
! System.Text.StringBuilder b = new System.Text.StringBuilder();
!
! b.Append("(");
!
! for (int i = 0; i < this.points.Length; i++)
! {
! if (b.Length > 1)
! {
! b.Append(",");
! }
! b.Append(this.points[i].ToString());
! }
!
! b.Append(")");
!
! return b.ToString();
! }
!
! public override int GetHashCode()
! {
! return base.GetHashCode();
! }
!
! public override bool Equals(object obj)
! {
! if (obj is PgPolygon)
! {
! return ((PgPolygon)obj) == this;
! }
! else
! {
! return false;
! }
! }
!
! #endregion
! }
! }
Index: PgTimeSpan.cs
===================================================================
RCS file: /cvsroot/pgsqlclient/pgsqlclient_10/PostgreSql.Data.PgSqlClient/source/PgTypes/PgTimeSpan.cs,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** PgTimeSpan.cs 12 Nov 2003 19:53:11 -0000 1.2
--- PgTimeSpan.cs 14 Dec 2003 15:07:55 -0000 1.3
***************
*** 1,238 ****
! /* PgSqlClient - ADO.NET Data Provider for PostgreSQL 7.4+
! * Copyright (C) 2003 Carlos Guzmán Álvarez
! *
! * This library is free software; you can redistribute it and/or
! * modify it under the terms of the GNU Lesser General Public
! * License as published by the Free Software Foundation; either
! * version 2.1 of the License, or (at your option) any later version.
! *
! * This library is distributed in the hope that it will be useful,
! * but WITHOUT ANY WARRANTY; without even the implied warranty of
! * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
! * Lesser General Public License for more details.
! *
! * You should have received a copy of the GNU Lesser General Public
! * License along with this library; if not, write to the Free Software
! * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
! */
!
! using System;
!
! namespace PostgreSql.Data.PgTypes
! {
! [Serializable]
! public struct PgTimeSpan : IComparable
! {
! #region FIELDS
!
! private TimeSpan interval;
!
! #endregion
!
! #region PROPERTIES
!
! public int Days
! {
! get { return this.interval.Days; }
! }
!
! public int Hours
! {
! get { return this.interval.Hours; }
! }
!
! public int Milliseconds
! {
! get { return this.interval.Milliseconds; }
! }
!
! public int Minutes
! {
! get { return this.interval.Minutes; }
! }
!
! public int Seconds
! {
! get { return this.interval.Seconds; }
! }
!
! public TimeSpan Value
! {
! get { return interval; }
! }
!
! #endregion
!
! #region STATIC_FIELDS
!
! public static readonly PgTimeSpan MaxValue = new PgTimeSpan(TimeSpan.MaxValue);
! public static readonly PgTimeSpan MinValue = new PgTimeSpan(TimeSpan.MinValue);
! public static readonly PgTimeSpan Null = new PgTimeSpan(TimeSpan.Zero);
!
! #endregion
!
! #region CONSTRUCTORS
!
! public PgTimeSpan(TimeSpan interval)
! {
! this.interval = interval;
! }
!
! #endregion
!
! #region ICOMPARABLE
!
! public int CompareTo(object obj)
! {
! return interval.CompareTo(obj);
! }
!
! #endregion
!
! #region STATIC_METHODS
!
! public static bool GreatherThan(PgTimeSpan x, PgTimeSpan y)
! {
! return (x > y);
! }
!
! public static bool GreatherThanOrEqual(PgTimeSpan x, PgTimeSpan y)
! {
! return (x >= y);
! }
!
! public static bool LessThan(PgTimeSpan x, PgTimeSpan y)
! {
! return (x < y);
! }
!
! public static bool LessThanOrEqual(PgTimeSpan x, PgTimeSpan y)
! {
! return (x <= y);
! }
!
! public static bool NotEquals(PgTimeSpan x, PgTimeSpan y)
! {
! return (x != y);
! }
!
! public static PgTimeSpan Parse(string s)
! {
! return new PgTimeSpan(TimeSpan.Parse(s));
! }
!
! #endregion
!
! #region OPERATORS
!
! public static bool operator ==(PgTimeSpan left, PgTimeSpan right)
! {
! bool equals = false;
!
! if (left.Value == right.Value)
! {
! equals = true;
! }
!
! return equals;
! }
!
! public static bool operator !=(PgTimeSpan left, PgTimeSpan right)
! {
! bool notequals = false;
!
! if (left.Value != right.Value)
! {
! notequals = true;
! }
!
! return notequals;
! }
!
! public static bool operator >(PgTimeSpan left, PgTimeSpan right)
! {
! bool greater = false;
!
! if (left.Value > right.Value)
! {
! greater = true;
! }
!
! return greater;
! }
!
! public static bool operator >=(PgTimeSpan left, PgTimeSpan right)
! {
! bool greater = false;
!
! if (left.Value >= right.Value)
! {
! greater = true;
! }
!
! return greater;
! }
!
! public static bool operator <(PgTimeSpan left, PgTimeSpan right)
! {
! bool less = false;
!
! if (left.Value < right.Value)
! {
! less = true;
! }
!
! return less;
! }
!
! public static bool operator <=(PgTimeSpan left, PgTimeSpan right)
! {
! bool less = false;
!
! if (left.Value <= right.Value)
! {
! less = true;
! }
!
! return less;
! }
!
! public static explicit operator TimeSpan(PgTimeSpan x)
! {
! return x.Value;
! }
!
! public static explicit operator PgTimeSpan(string x)
! {
! return new PgTimeSpan(TimeSpan.Parse(x));
! }
!
! #endregion
!
! #region OVERRIDEN_METHODS
!
! public override string ToString()
! {
! return interval.ToString();
! }
!
! public override int GetHashCode()
! {
! return interval.GetHashCode();
! }
!
! public override bool Equals(object obj)
! {
! if (obj is PgTimeSpan)
! {
! return ((PgTimeSpan)obj) == this;
! }
! else
! {
! return false;
! }
! }
!
! #endregion
! }
! }
--- 1,238 ----
! /* PgSqlClient - ADO.NET Data Provider for PostgreSQL 7.4+
! * Copyright (C) 2003 Carlos Guzmán Álvarez
! *
! * This library is free software; you can redistribute it and/or
! * modify it under the terms of the GNU Lesser General Public
! * License as published by the Free Software Foundation; either
! * version 2.1 of the License, or (at your option) any later version.
! *
! * This library is distributed in the hope that it will be useful,
! * but WITHOUT ANY WARRANTY; without even the implied warranty of
! * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
! * Lesser General Public License for more details.
! *
! * You should have received a copy of the GNU Lesser General Public
! * License along with this library; if not, write to the Free Software
! * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
! */
!
! using System;
!
! namespace PostgreSql.Data.PgTypes
! {
! [Serializable]
! public struct PgTimeSpan : IComparable
! {
! #region Fields
!
! private TimeSpan interval;
!
! #endregion
!
! #region Properties
!
! public int Days
! {
! get { return this.interval.Days; }
! }
!
! public int Hours
! {
! get { return this.interval.Hours; }
! }
!
! public int Milliseconds
! {
! get { return this.interval.Milliseconds; }
! }
!
! public int Minutes
! {
! get { return this.interval.Minutes; }
! }
!
! public int Seconds
! {
! get { return this.interval.Seconds; }
! }
!
! public TimeSpan Value
! {
! get { return interval; }
! }
!
! #endregion
!
! #region STATIC_FIELDS
!
! public static readonly PgTimeSpan MaxValue = new PgTimeSpan(TimeSpan.MaxValue);
! public static readonly PgTimeSpan MinValue = new PgTimeSpan(TimeSpan.MinValue);
! public static readonly PgTimeSpan Null = new PgTimeSpan(TimeSpan.Zero);
!
! #endregion
!
! #region Constructors
!
! public PgTimeSpan(TimeSpan interval)
! {
! this.interval = interval;
! }
!
! #endregion
!
! #region ICOMPARABLE
!
! public int CompareTo(object obj)
! {
! return interval.CompareTo(obj);
! }
!
! #endregion
!
! #region Static Methods
!
! public static bool GreatherThan(PgTimeSpan x, PgTimeSpan y)
! {
! return (x > y);
! }
!
! public static bool GreatherThanOrEqual(PgTimeSpan x, PgTimeSpan y)
! {
! return (x >= y);
! }
!
! public static bool LessThan(PgTimeSpan x, PgTimeSpan y)
! {
! return (x < y);
! }
!
! public static bool LessThanOrEqual(PgTimeSpan x, PgTimeSpan y)
! {
! return (x <= y);
! }
!
! public static bool NotEquals(PgTimeSpan x, PgTimeSpan y)
! {
! return (x != y);
! }
!
! public static PgTimeSpan Parse(string s)
! {
! return new PgTimeSpan(TimeSpan.Parse(s));
! }
!
! #endregion
!
! #region OPERATORS
!
! public static bool operator ==(PgTimeSpan left, PgTimeSpan right)
! {
! bool equals = false;
!
! if (left.Value == right.Value)
! {
! equals = true;
! }
!
! return equals;
! }
!
! public static bool operator !=(PgTimeSpan left, PgTimeSpan right)
! {
! bool notequals = false;
!
! if (left.Value != right.Value)
! {
! notequals = true;
! }
!
! return notequals;
! }
!
! public static bool operator >(PgTimeSpan left, PgTimeSpan right)
! {
! bool greater = false;
!
! if (left.Value > right.Value)
! {
! greater = true;
! }
!
! return greater;
! }
!
! public static bool operator >=(PgTimeSpan left, PgTimeSpan right)
! {
! bool greater = false;
!
! if (left.Value >= right.Value)
! {
! greater = true;
! }
!
! return greater;
! }
!
! public static bool operator <(PgTimeSpan left, PgTimeSpan right)
! {
! bool less = false;
!
! if (left.Value < right.Value)
! {
! less = true;
! }
!
! return less;
! }
!
! public static bool operator <=(PgTimeSpan left, PgTimeSpan right)
! {
! bool less = false;
!
! if (left.Value <= right.Value)
! {
! less = true;
! }
!
! return less;
! }
!
! public static explicit operator TimeSpan(PgTimeSpan x)
! {
! return x.Value;
! }
!
! public static explicit operator PgTimeSpan(string x)
! {
! return new PgTimeSpan(TimeSpan.Parse(x));
! }
!
! #endregion
!
! #region OVERRIDEN_METHODS
!
! public override string ToString()
! {
! return interval.ToString();
! }
!
! public override int GetHashCode()
! {
! return interval.GetHashCode();
! }
!
! public override bool Equals(object obj)
! {
! if (obj is PgTimeSpan)
! {
! return ((PgTimeSpan)obj) == this;
! }
! else
! {
! return false;
! }
! }
!
! #endregion
! }
! }
|
Update of /cvsroot/pgsqlclient/pgsqlclient_10/PostgreSql.Data.PgSqlClient/source/DbSchema
In directory sc8-pr-cvs1:/tmp/cvs-serv15737
Modified Files:
PgAbstractDbSchema.cs PgAggregatesSchema.cs PgCastsSchema.cs
PgCheckConstraints.cs PgCheckConstraintsByTable.cs
PgColumnsSchema.cs PgDatabaseSchema.cs PgDomainsSchema.cs
PgForeignKeysSchema.cs PgFunctionPrivilegesSchema.cs
PgFunctionsSchema.cs PgGroupsSchema.cs PgIndexesSchema.cs
PgPrimaryKeysSchema.cs PgProviderTypesSchema.cs
PgSchemataSchema.cs PgSqlLanguagesSchema.cs
PgTableConstraintsSchema.cs PgTablePrivilegesSchema.cs
PgTablesSchema.cs PgTableStatisticsSchema.cs
PgTriggersSchema.cs PgUsersSchema.cs PgViewPrivilegesSchema.cs
PgViewsSchema.cs
Log Message:
2003-12-14 Carlos Guzmán Álvarez <car...@te...>
* Changed #region names in all source files.
Index: PgAbstractDbSchema.cs
===================================================================
RCS file: /cvsroot/pgsqlclient/pgsqlclient_10/PostgreSql.Data.PgSqlClient/source/DbSchema/PgAbstractDbSchema.cs,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** PgAbstractDbSchema.cs 25 Oct 2003 21:01:23 -0000 1.2
--- PgAbstractDbSchema.cs 14 Dec 2003 15:07:38 -0000 1.3
***************
*** 1,465 ****
! /* PgSqlClient - ADO.NET Data Provider for PostgreSQL 7.4+
! * Copyright (C) 2003 Carlos Guzmán Álvarez
! *
! * This library is free software; you can redistribute it and/or
! * modify it under the terms of the GNU Lesser General Public
! * License as published by the Free Software Foundation; either
! * version 2.1 of the License, or (at your option) any later version.
! *
! * This library is distributed in the hope that it will be useful,
! * but WITHOUT ANY WARRANTY; without even the implied warranty of
! * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
! * Lesser General Public License for more details.
! *
! * You should have received a copy of the GNU Lesser General Public
! * License along with this library; if not, write to the Free Software
! * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
! */
!
! using System;
! using System.Data;
! using System.Text;
! using System.Text.RegularExpressions;
! using System.Collections;
!
! namespace PostgreSql.Data.PgSqlClient.DbSchema
! {
! #region STRUCTS
!
! internal struct PgColumn
! {
! public string ColumnName;
! public string ColumnAlias;
! public string WhereColumnName;
! }
!
! internal struct PgTableJoin
! {
! public string JoinType;
! public string RightTable;
! public string Expression;
! }
!
! internal struct PgPrivilege
! {
! public string User;
! public MatchCollection Privileges;
! }
!
! #endregion
!
! internal abstract class PgAbstractDbSchema : IDbSchema
! {
! #region FIELDS
!
! private ArrayList restrictionColumns;
! private ArrayList dataColumns;
! private ArrayList tables;
! private ArrayList joins;
! private ArrayList orderByColumns;
! private ArrayList whereFilters;
!
! private string tableName;
!
! #endregion
!
! #region PROPERTIES
!
! public ArrayList RestrictionColumns
! {
! get { return restrictionColumns; }
! }
!
! #endregion
!
! #region CONSTRUCTORS
!
! public PgAbstractDbSchema()
! {
! restrictionColumns = new ArrayList();
! dataColumns = new ArrayList();
! tables = new ArrayList();
! joins = new ArrayList();
! orderByColumns = new ArrayList();
! whereFilters = new ArrayList();
!
! AddTables();
! AddRestrictionColumns();
! AddDataColumns();
! AddJoins();
! AddOrderByColumns();
! AddWhereFilters();
! }
!
! public PgAbstractDbSchema(string tableName) : this()
! {
! this.tableName = tableName;
! }
!
! #endregion
!
! #region ABSTRACT_METHODS
!
! public abstract void AddTables();
! public abstract void AddRestrictionColumns();
! public abstract void AddDataColumns();
! public abstract void AddJoins();
! public abstract void AddOrderByColumns();
! public abstract void AddWhereFilters();
! public abstract object[] ParseRestrictions(object[] restrictions);
!
! #endregion
!
! #region ADD_METHODS
!
! public void AddTable(string tableName)
! {
! tables.Add(tableName);
! }
!
! public void AddRestrictionColumn(string columnName, string columnAlias, string whereColumnName)
! {
! PgColumn column = new PgColumn();
!
! column.ColumnName = columnName;
! column.ColumnAlias = columnAlias;
! if (whereColumnName != null)
! {
! column.WhereColumnName = whereColumnName;
! }
! else
! {
! column.WhereColumnName = columnName;
! }
!
!
! restrictionColumns.Add(column);
! }
!
! public void AddDataColumn(string columnName, string columnAlias)
! {
! PgColumn column = new PgColumn();
!
! column.ColumnName = columnName;
! column.ColumnAlias = columnAlias;
!
! dataColumns.Add(column);
! }
!
! public void AddJoin(string joinType, string rightTable, string expression)
! {
! PgTableJoin join = new PgTableJoin();
!
! join.JoinType = joinType;
! join.RightTable = rightTable;
! join.Expression = expression;
!
! joins.Add(join);
! }
!
! public void AddOrderBy(string column)
! {
! orderByColumns.Add(column);
! }
!
! public void AddWhereFilter(string filter)
! {
! whereFilters.Add(filter);
! }
!
! #endregion
!
! #region METHODS
!
! public virtual DataTable GetDbSchemaTable(PgConnection connection, object[] restrictions)
! {
! restrictions = ParseRestrictions(restrictions);
!
! DataSet dataSet = null;
! PgDataAdapter adapter = null;
! PgCommand command = new PgCommand();
!
! try
! {
! command.Connection = connection;
! command.CommandText = GetCommandText(restrictions);
! if (connection.ActiveTransaction != null &&
! !connection.ActiveTransaction.IsUpdated)
! {
! command.Transaction = connection.ActiveTransaction;
! }
!
! adapter = new PgDataAdapter(command);
! dataSet = new DataSet(tableName);
!
! adapter.Fill(dataSet, tableName);
! }
! catch (PgException pgex)
! {
! throw pgex;
! }
! catch (Exception ex)
! {
! throw new PgException(ex.Message);
! }
! finally
! {
! command.Dispose();
! adapter.Dispose();
! }
!
! return dataSet.Tables[tableName];
! }
!
! public string GetCommandText(object[] restrictions)
! {
! StringBuilder sql = new StringBuilder();
!
! // Add restriction columns
! sql.Append("SELECT ");
! foreach (PgColumn column in restrictionColumns)
! {
! sql.AppendFormat("{0} AS {1}", column.ColumnName, column.ColumnAlias);
! if ((restrictionColumns.IndexOf(column) + 1) < restrictionColumns.Count)
! {
! sql.Append(", ");
! }
! }
!
! // Add DataColumns
! if (restrictionColumns.Count > 0 && dataColumns.Count > 0)
! {
! sql.Append(", ");
! }
! foreach (PgColumn column in dataColumns)
! {
! sql.AppendFormat("{0} AS {1}", column.ColumnName, column.ColumnAlias);
! if ((dataColumns.IndexOf(column) + 1) < dataColumns.Count)
! {
! sql.Append(", ");
! }
! }
!
! // Add tables
! sql.Append(" FROM ");
! foreach (string table in tables)
! {
! sql.Append(table);
! if ((tables.IndexOf(table) + 1) < tables.Count)
! {
! sql.Append(", ");
! }
! }
!
! if (joins.Count != 0)
! {
! foreach (PgTableJoin join in joins)
! {
! sql.AppendFormat(" {0} {1} ON {2}",
! join.JoinType,
! join.RightTable,
! join.Expression);
! }
! }
!
! // Add restrictions
! StringBuilder whereFilter = new StringBuilder();
!
! if (restrictions != null && restrictions.Length > 0)
! {
! for (int i = 0; i < restrictions.Length; i++)
! {
! if (restrictions[i] != null)
! {
! if (whereFilter.Length > 0)
! {
! whereFilter.Append(" AND ");
! }
! whereFilter.AppendFormat("{0} = '{1}'",
! ((PgColumn)restrictionColumns[i]).WhereColumnName,
! restrictions[i]);
! }
! }
! }
!
! if (whereFilters != null && whereFilters.Count > 0)
! {
! foreach (string condition in whereFilters)
! {
! if (whereFilter.Length > 0)
! {
! whereFilter.Append(" AND ");
! }
! whereFilter.Append(condition);
! }
! }
!
! if (whereFilter.Length > 0)
! {
! sql.AppendFormat(" WHERE {0}", whereFilter);
! }
!
! // Add Order By
! if (orderByColumns.Count > 0)
! {
! sql.Append(" ORDER BY ");
!
! foreach (string columnName in orderByColumns)
! {
! sql.Append(columnName);
!
! if ((orderByColumns.IndexOf(columnName) + 1) < orderByColumns.Count)
! {
! sql.Append(", ");
! }
! }
! }
!
! return sql.ToString();
! }
!
! #endregion
!
! #region PROTECTED_METHODS
!
! protected void AddPrivilegesColumns(DataTable table)
! {
! table.Columns.Add("INSERT", Type.GetType("System.Boolean"));
! table.Columns["INSERT"].DefaultValue = false;
!
! table.Columns.Add("INSERT_WITH_GRANT", Type.GetType("System.Boolean"));
! table.Columns["INSERT_WITH_GRANT"].DefaultValue = false;
!
! table.Columns.Add("SELECT", Type.GetType("System.Boolean"));
! table.Columns["SELECT"].DefaultValue = false;
!
! table.Columns.Add("SELECT_WITH_GRANT", Type.GetType("System.Boolean"));
! table.Columns["SELECT_WITH_GRANT"].DefaultValue = false;
!
! table.Columns.Add("UPDATE", Type.GetType("System.Boolean"));
! table.Columns["UPDATE"].DefaultValue = false;
!
! table.Columns.Add("UPDATE_WITH_GRANT", Type.GetType("System.Boolean"));
! table.Columns["UPDATE_WITH_GRANT"].DefaultValue = false;
!
! table.Columns.Add("DELETE", Type.GetType("System.Boolean"));
! table.Columns["DELETE"].DefaultValue = false;
!
! table.Columns.Add("DELETE_WITH_GRANT", Type.GetType("System.Boolean"));
! table.Columns["DELETE_WITH_GRANT"].DefaultValue = false;
!
! table.Columns.Add("RULE", Type.GetType("System.Boolean"));
! table.Columns["RULE"].DefaultValue = false;
!
! table.Columns.Add("RULE_WITH_GRANT", Type.GetType("System.Boolean"));
! table.Columns["RULE_WITH_GRANT"].DefaultValue = false;
!
! table.Columns.Add("REFERENCES", Type.GetType("System.Boolean"));
! table.Columns["REFERENCES"].DefaultValue = false;
!
! table.Columns.Add("REFERENCES_WITH_GRANT", Type.GetType("System.Boolean"));
! table.Columns["REFERENCES_WITH_GRANT"].DefaultValue = false;
!
! table.Columns.Add("TRIGGER", Type.GetType("System.Boolean"));
! table.Columns["TRIGGER"].DefaultValue = false;
!
! table.Columns.Add("TRIGGER_WITH_GRANT", Type.GetType("System.Boolean"));
! table.Columns["TRIGGER_WITH_GRANT"].DefaultValue = false;
! }
!
! protected PgPrivilege[] DecodePrivileges(string[] acl)
! {
! Regex search = new Regex(@"((a|r|w|d|R|x|t)\*?)");
! PgPrivilege[] priv = new PgPrivilege[acl.Length];
!
! for (int i = 0; i < acl.Length; i++)
! {
! priv[i].User = acl[i].Split('=')[0];
! if (priv[i].User.Length == 0)
! {
! priv[i].User = "PUBLIC";
! }
! string aclitem = acl[i].Split('=')[1];
! aclitem = aclitem.Split('/')[0];
!
! priv[i].Privileges = search.Matches(aclitem);
! }
!
! return priv;
! }
!
! protected void FillPrivileges(DataRow row, MatchCollection privileges)
! {
! foreach (Match privilege in privileges)
! {
! switch (privilege.Value)
! {
! case "a":
! case "a*":
! row["INSERT"] = true;
! if (privilege.Value.IndexOf("*") != -1)
! {
! row["INSERT_WITH_GRANT"] = true;
! }
! break;
!
! case "r":
! case "r*":
! row["SELECT"] = true;
! if (privilege.Value.IndexOf("*") != -1)
! {
! row["SELECT_WITH_GRANT"] = true;
! }
! break;
!
! case "w":
! case "w*":
! row["UPDATE"] = true;
! if (privilege.Value.IndexOf("*") != -1)
! {
! row["UPDATE_WITH_GRANT"] = true;
! }
! break;
!
! case "d":
! case "d*":
! row["DELETE"] = true;
! if (privilege.Value.IndexOf("*") != -1)
! {
! row["DELETE_WITH_GRANT"] = false;
! }
! break;
!
! case "R":
! case "R*":
! row["RULE"] = true;
! if (privilege.Value.IndexOf("*") != -1)
! {
! row["RULE_WITH_GRANT"] = true;
! }
! break;
!
! case "x":
! case "x*":
! row["REFERENCES"] = true;
! if (privilege.Value.IndexOf("*") != -1)
! {
! row["REFERENCES_WITH_GRANT"] = true;
! }
! break;
!
! case "t":
! case "t*":
! row["TRIGGER"] = true;
! if (privilege.Value.IndexOf("*") != -1)
! {
! row["TRIGGER_WITH_GRANT"] = true;
! }
! break;
! }
! }
! }
!
! #endregion
! }
! }
--- 1,465 ----
! /* PgSqlClient - ADO.NET Data Provider for PostgreSQL 7.4+
! * Copyright (C) 2003 Carlos Guzmán Álvarez
! *
! * This library is free software; you can redistribute it and/or
! * modify it under the terms of the GNU Lesser General Public
! * License as published by the Free Software Foundation; either
! * version 2.1 of the License, or (at your option) any later version.
! *
! * This library is distributed in the hope that it will be useful,
! * but WITHOUT ANY WARRANTY; without even the implied warranty of
! * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
! * Lesser General Public License for more details.
! *
! * You should have received a copy of the GNU Lesser General Public
! * License along with this library; if not, write to the Free Software
! * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
! */
!
! using System;
! using System.Data;
! using System.Text;
! using System.Text.RegularExpressions;
! using System.Collections;
!
! namespace PostgreSql.Data.PgSqlClient.DbSchema
! {
! #region STRUCTS
!
! internal struct PgColumn
! {
! public string ColumnName;
! public string ColumnAlias;
! public string WhereColumnName;
! }
!
! internal struct PgTableJoin
! {
! public string JoinType;
! public string RightTable;
! public string Expression;
! }
!
! internal struct PgPrivilege
! {
! public string User;
! public MatchCollection Privileges;
! }
!
! #endregion
!
! internal abstract class PgAbstractDbSchema : IDbSchema
! {
! #region Fields
!
! private ArrayList restrictionColumns;
! private ArrayList dataColumns;
! private ArrayList tables;
! private ArrayList joins;
! private ArrayList orderByColumns;
! private ArrayList whereFilters;
!
! private string tableName;
!
! #endregion
!
! #region Properties
!
! public ArrayList RestrictionColumns
! {
! get { return restrictionColumns; }
! }
!
! #endregion
!
! #region Constructors
!
! public PgAbstractDbSchema()
! {
! restrictionColumns = new ArrayList();
! dataColumns = new ArrayList();
! tables = new ArrayList();
! joins = new ArrayList();
! orderByColumns = new ArrayList();
! whereFilters = new ArrayList();
!
! AddTables();
! AddRestrictionColumns();
! AddDataColumns();
! AddJoins();
! AddOrderByColumns();
! AddWhereFilters();
! }
!
! public PgAbstractDbSchema(string tableName) : this()
! {
! this.tableName = tableName;
! }
!
! #endregion
!
! #region Abstract Methods
!
! public abstract void AddTables();
! public abstract void AddRestrictionColumns();
! public abstract void AddDataColumns();
! public abstract void AddJoins();
! public abstract void AddOrderByColumns();
! public abstract void AddWhereFilters();
! public abstract object[] ParseRestrictions(object[] restrictions);
!
! #endregion
!
! #region ADD_METHODS
!
! public void AddTable(string tableName)
! {
! tables.Add(tableName);
! }
!
! public void AddRestrictionColumn(string columnName, string columnAlias, string whereColumnName)
! {
! PgColumn column = new PgColumn();
!
! column.ColumnName = columnName;
! column.ColumnAlias = columnAlias;
! if (whereColumnName != null)
! {
! column.WhereColumnName = whereColumnName;
! }
! else
! {
! column.WhereColumnName = columnName;
! }
!
!
! restrictionColumns.Add(column);
! }
!
! public void AddDataColumn(string columnName, string columnAlias)
! {
! PgColumn column = new PgColumn();
!
! column.ColumnName = columnName;
! column.ColumnAlias = columnAlias;
!
! dataColumns.Add(column);
! }
!
! public void AddJoin(string joinType, string rightTable, string expression)
! {
! PgTableJoin join = new PgTableJoin();
!
! join.JoinType = joinType;
! join.RightTable = rightTable;
! join.Expression = expression;
!
! joins.Add(join);
! }
!
! public void AddOrderBy(string column)
! {
! orderByColumns.Add(column);
! }
!
! public void AddWhereFilter(string filter)
! {
! whereFilters.Add(filter);
! }
!
! #endregion
!
! #region Methods
!
! public virtual DataTable GetDbSchemaTable(PgConnection connection, object[] restrictions)
! {
! restrictions = ParseRestrictions(restrictions);
!
! DataSet dataSet = null;
! PgDataAdapter adapter = null;
! PgCommand command = new PgCommand();
!
! try
! {
! command.Connection = connection;
! command.CommandText = GetCommandText(restrictions);
! if (connection.ActiveTransaction != null &&
! !connection.ActiveTransaction.IsUpdated)
! {
! command.Transaction = connection.ActiveTransaction;
! }
!
! adapter = new PgDataAdapter(command);
! dataSet = new DataSet(tableName);
!
! adapter.Fill(dataSet, tableName);
! }
! catch (PgException pgex)
! {
! throw pgex;
! }
! catch (Exception ex)
! {
! throw new PgException(ex.Message);
! }
! finally
! {
! command.Dispose();
! adapter.Dispose();
! }
!
! return dataSet.Tables[tableName];
! }
!
! public string GetCommandText(object[] restrictions)
! {
! StringBuilder sql = new StringBuilder();
!
! // Add restriction columns
! sql.Append("SELECT ");
! foreach (PgColumn column in restrictionColumns)
! {
! sql.AppendFormat("{0} AS {1}", column.ColumnName, column.ColumnAlias);
! if ((restrictionColumns.IndexOf(column) + 1) < restrictionColumns.Count)
! {
! sql.Append(", ");
! }
! }
!
! // Add DataColumns
! if (restrictionColumns.Count > 0 && dataColumns.Count > 0)
! {
! sql.Append(", ");
! }
! foreach (PgColumn column in dataColumns)
! {
! sql.AppendFormat("{0} AS {1}", column.ColumnName, column.ColumnAlias);
! if ((dataColumns.IndexOf(column) + 1) < dataColumns.Count)
! {
! sql.Append(", ");
! }
! }
!
! // Add tables
! sql.Append(" FROM ");
! foreach (string table in tables)
! {
! sql.Append(table);
! if ((tables.IndexOf(table) + 1) < tables.Count)
! {
! sql.Append(", ");
! }
! }
!
! if (joins.Count != 0)
! {
! foreach (PgTableJoin join in joins)
! {
! sql.AppendFormat(" {0} {1} ON {2}",
! join.JoinType,
! join.RightTable,
! join.Expression);
! }
! }
!
! // Add restrictions
! StringBuilder whereFilter = new StringBuilder();
!
! if (restrictions != null && restrictions.Length > 0)
! {
! for (int i = 0; i < restrictions.Length; i++)
! {
! if (restrictions[i] != null)
! {
! if (whereFilter.Length > 0)
! {
! whereFilter.Append(" AND ");
! }
! whereFilter.AppendFormat("{0} = '{1}'",
! ((PgColumn)restrictionColumns[i]).WhereColumnName,
! restrictions[i]);
! }
! }
! }
!
! if (whereFilters != null && whereFilters.Count > 0)
! {
! foreach (string condition in whereFilters)
! {
! if (whereFilter.Length > 0)
! {
! whereFilter.Append(" AND ");
! }
! whereFilter.Append(condition);
! }
! }
!
! if (whereFilter.Length > 0)
! {
! sql.AppendFormat(" WHERE {0}", whereFilter);
! }
!
! // Add Order By
! if (orderByColumns.Count > 0)
! {
! sql.Append(" ORDER BY ");
!
! foreach (string columnName in orderByColumns)
! {
! sql.Append(columnName);
!
! if ((orderByColumns.IndexOf(columnName) + 1) < orderByColumns.Count)
! {
! sql.Append(", ");
! }
! }
! }
!
! return sql.ToString();
! }
!
! #endregion
!
! #region Protected Methods
!
! protected void AddPrivilegesColumns(DataTable table)
! {
! table.Columns.Add("INSERT", Type.GetType("System.Boolean"));
! table.Columns["INSERT"].DefaultValue = false;
!
! table.Columns.Add("INSERT_WITH_GRANT", Type.GetType("System.Boolean"));
! table.Columns["INSERT_WITH_GRANT"].DefaultValue = false;
!
! table.Columns.Add("SELECT", Type.GetType("System.Boolean"));
! table.Columns["SELECT"].DefaultValue = false;
!
! table.Columns.Add("SELECT_WITH_GRANT", Type.GetType("System.Boolean"));
! table.Columns["SELECT_WITH_GRANT"].DefaultValue = false;
!
! table.Columns.Add("UPDATE", Type.GetType("System.Boolean"));
! table.Columns["UPDATE"].DefaultValue = false;
!
! table.Columns.Add("UPDATE_WITH_GRANT", Type.GetType("System.Boolean"));
! table.Columns["UPDATE_WITH_GRANT"].DefaultValue = false;
!
! table.Columns.Add("DELETE", Type.GetType("System.Boolean"));
! table.Columns["DELETE"].DefaultValue = false;
!
! table.Columns.Add("DELETE_WITH_GRANT", Type.GetType("System.Boolean"));
! table.Columns["DELETE_WITH_GRANT"].DefaultValue = false;
!
! table.Columns.Add("RULE", Type.GetType("System.Boolean"));
! table.Columns["RULE"].DefaultValue = false;
!
! table.Columns.Add("RULE_WITH_GRANT", Type.GetType("System.Boolean"));
! table.Columns["RULE_WITH_GRANT"].DefaultValue = false;
!
! table.Columns.Add("REFERENCES", Type.GetType("System.Boolean"));
! table.Columns["REFERENCES"].DefaultValue = false;
!
! table.Columns.Add("REFERENCES_WITH_GRANT", Type.GetType("System.Boolean"));
! table.Columns["REFERENCES_WITH_GRANT"].DefaultValue = false;
!
! table.Columns.Add("TRIGGER", Type.GetType("System.Boolean"));
! table.Columns["TRIGGER"].DefaultValue = false;
!
! table.Columns.Add("TRIGGER_WITH_GRANT", Type.GetType("System.Boolean"));
! table.Columns["TRIGGER_WITH_GRANT"].DefaultValue = false;
! }
!
! protected PgPrivilege[] DecodePrivileges(string[] acl)
! {
! Regex search = new Regex(@"((a|r|w|d|R|x|t)\*?)");
! PgPrivilege[] priv = new PgPrivilege[acl.Length];
!
! for (int i = 0; i < acl.Length; i++)
! {
! priv[i].User = acl[i].Split('=')[0];
! if (priv[i].User.Length == 0)
! {
! priv[i].User = "PUBLIC";
! }
! string aclitem = acl[i].Split('=')[1];
! aclitem = aclitem.Split('/')[0];
!
! priv[i].Privileges = search.Matches(aclitem);
! }
!
! return priv;
! }
!
! protected void FillPrivileges(DataRow row, MatchCollection privileges)
! {
! foreach (Match privilege in privileges)
! {
! switch (privilege.Value)
! {
! case "a":
! case "a*":
! row["INSERT"] = true;
! if (privilege.Value.IndexOf("*") != -1)
! {
! row["INSERT_WITH_GRANT"] = true;
! }
! break;
!
! case "r":
! case "r*":
! row["SELECT"] = true;
! if (privilege.Value.IndexOf("*") != -1)
! {
! row["SELECT_WITH_GRANT"] = true;
! }
! break;
!
! case "w":
! case "w*":
! row["UPDATE"] = true;
! if (privilege.Value.IndexOf("*") != -1)
! {
! row["UPDATE_WITH_GRANT"] = true;
! }
! break;
!
! case "d":
! case "d*":
! row["DELETE"] = true;
! if (privilege.Value.IndexOf("*") != -1)
! {
! row["DELETE_WITH_GRANT"] = false;
! }
! break;
!
! case "R":
! case "R*":
! row["RULE"] = true;
! if (privilege.Value.IndexOf("*") != -1)
! {
! row["RULE_WITH_GRANT"] = true;
! }
! break;
!
! case "x":
! case "x*":
! row["REFERENCES"] = true;
! if (privilege.Value.IndexOf("*") != -1)
! {
! row["REFERENCES_WITH_GRANT"] = true;
! }
! break;
!
! case "t":
! case "t*":
! row["TRIGGER"] = true;
! if (privilege.Value.IndexOf("*") != -1)
! {
! row["TRIGGER_WITH_GRANT"] = true;
! }
! break;
! }
! }
! }
!
! #endregion
! }
! }
Index: PgAggregatesSchema.cs
===================================================================
RCS file: /cvsroot/pgsqlclient/pgsqlclient_10/PostgreSql.Data.PgSqlClient/source/DbSchema/PgAggregatesSchema.cs,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** PgAggregatesSchema.cs 2 Aug 2003 21:11:37 -0000 1.2
--- PgAggregatesSchema.cs 14 Dec 2003 15:07:38 -0000 1.3
***************
*** 1,82 ****
! /* PgSqlClient - ADO.NET Data Provider for PostgreSQL 7.4+
! * Copyright (C) 2003 Carlos Guzmán Álvarez
! *
! * This library is free software; you can redistribute it and/or
! * modify it under the terms of the GNU Lesser General Public
! * License as published by the Free Software Foundation; either
! * version 2.1 of the License, or (at your option) any later version.
! *
! * This library is distributed in the hope that it will be useful,
! * but WITHOUT ANY WARRANTY; without even the implied warranty of
! * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
! * Lesser General Public License for more details.
! *
! * You should have received a copy of the GNU Lesser General Public
! * License along with this library; if not, write to the Free Software
! * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
! */
!
! using System;
! using System.Data;
! using System.Text;
!
! namespace PostgreSql.Data.PgSqlClient.DbSchema
! {
! internal class PgAggregatesSchema : PgAbstractDbSchema
! {
! #region CONSTRUCTORS
!
! public PgAggregatesSchema() : base("Aggregates")
! {
! }
!
! #endregion
!
! #region ADD_METHODS
!
! public override void AddTables()
! {
! AddTable("pg_aggregate");
! }
!
! public override void AddRestrictionColumns()
! {
! AddRestrictionColumn("pg_aggregate.aggfnoid", "AGGREGATE_FUNCTION", null);
! }
!
! public override void AddDataColumns()
! {
! AddDataColumn("pg_aggregate.aggtransfn" , "TRANSITION_FUNCTION");
! AddDataColumn("pg_aggregate.aggfinalfn" , "FINAL_FUNCTION");
! AddDataColumn("pg_aggregate.agginitval" , "INITIAL_VALUE");
! AddDataColumn("pg_type.typname" , "BASE_TYPE");
! }
!
! public override void AddJoins()
! {
! AddJoin("left join", "pg_type", "pg_aggregate.aggtranstype = pg_type.oid");
! }
!
! public override void AddOrderByColumns()
! {
! AddOrderBy("pg_aggregate.aggfnoid");
! }
!
! public override void AddWhereFilters()
! {
! }
!
! #endregion
!
! #region PARSE_METHODS
!
! public override object[] ParseRestrictions(object[] restrictions)
! {
! object[] parsed = restrictions;
!
! return parsed;
! }
!
! #endregion
! }
}
--- 1,82 ----
! /* PgSqlClient - ADO.NET Data Provider for PostgreSQL 7.4+
! * Copyright (C) 2003 Carlos Guzmán Álvarez
! *
! * This library is free software; you can redistribute it and/or
! * modify it under the terms of the GNU Lesser General Public
! * License as published by the Free Software Foundation; either
! * version 2.1 of the License, or (at your option) any later version.
! *
! * This library is distributed in the hope that it will be useful,
! * but WITHOUT ANY WARRANTY; without even the implied warranty of
! * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
! * Lesser General Public License for more details.
! *
! * You should have received a copy of the GNU Lesser General Public
! * License along with this library; if not, write to the Free Software
! * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
! */
!
! using System;
! using System.Data;
! using System.Text;
!
! namespace PostgreSql.Data.PgSqlClient.DbSchema
! {
! internal class PgAggregatesSchema : PgAbstractDbSchema
! {
! #region Constructors
!
! public PgAggregatesSchema() : base("Aggregates")
! {
! }
!
! #endregion
!
! #region ADD_METHODS
!
! public override void AddTables()
! {
! AddTable("pg_aggregate");
! }
!
! public override void AddRestrictionColumns()
! {
! AddRestrictionColumn("pg_aggregate.aggfnoid", "AGGREGATE_FUNCTION", null);
! }
!
! public override void AddDataColumns()
! {
! AddDataColumn("pg_aggregate.aggtransfn" , "TRANSITION_FUNCTION");
! AddDataColumn("pg_aggregate.aggfinalfn" , "FINAL_FUNCTION");
! AddDataColumn("pg_aggregate.agginitval" , "INITIAL_VALUE");
! AddDataColumn("pg_type.typname" , "BASE_TYPE");
! }
!
! public override void AddJoins()
! {
! AddJoin("left join", "pg_type", "pg_aggregate.aggtranstype = pg_type.oid");
! }
!
! public override void AddOrderByColumns()
! {
! AddOrderBy("pg_aggregate.aggfnoid");
! }
!
! public override void AddWhereFilters()
! {
! }
!
! #endregion
!
! #region PARSE_METHODS
!
! public override object[] ParseRestrictions(object[] restrictions)
! {
! object[] parsed = restrictions;
!
! return parsed;
! }
!
! #endregion
! }
}
Index: PgCastsSchema.cs
===================================================================
RCS file: /cvsroot/pgsqlclient/pgsqlclient_10/PostgreSql.Data.PgSqlClient/source/DbSchema/PgCastsSchema.cs,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** PgCastsSchema.cs 2 Aug 2003 21:11:37 -0000 1.2
--- PgCastsSchema.cs 14 Dec 2003 15:07:38 -0000 1.3
***************
*** 1,102 ****
! /* PgSqlClient - ADO.NET Data Provider for PostgreSQL 7.4+
! * Copyright (C) 2003 Carlos Guzmán Álvarez
! *
! * This library is free software; you can redistribute it and/or
! * modify it under the terms of the GNU Lesser General Public
! * License as published by the Free Software Foundation; either
! * version 2.1 of the License, or (at your option) any later version.
! *
! * This library is distributed in the hope that it will be useful,
! * but WITHOUT ANY WARRANTY; without even the implied warranty of
! * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
! * Lesser General Public License for more details.
! *
! * You should have received a copy of the GNU Lesser General Public
! * License along with this library; if not, write to the Free Software
! * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
! */
!
! using System;
! using System.Data;
! using System.Text;
!
! namespace PostgreSql.Data.PgSqlClient.DbSchema
! {
! internal class PgCastsSchema : PgAbstractDbSchema
! {
! #region CONSTRUCTORS
!
! public PgCastsSchema() : base("Casts")
! {
! }
!
! #endregion
!
! #region ADD_METHODS
!
! public override void AddTables()
! {
! AddTable("pg_cast");
! }
!
! public override void AddRestrictionColumns()
! {
! }
!
! public override void AddDataColumns()
! {
! AddDataColumn("pg_typesrc.typname" , "SOURCE_TYPE");
! AddDataColumn("pg_typetgt.typname" , "TARGET_TYPE");
! AddDataColumn("pg_namespace.nspname", "FUNCTION_SCHEMA");
! AddDataColumn("pg_proc.proname" , "FUNCTION_NAME");
! AddDataColumn(getContextExpression("pg_cast.castcontext"), "CAST_CONTEXT");
! }
!
! public override void AddJoins()
! {
! AddJoin("left join", "pg_type as pg_typesrc", "pg_cast.castsource = pg_typesrc.oid");
! AddJoin("left join", "pg_type as pg_typetgt", "pg_cast.casttarget = pg_typetgt.oid");
! AddJoin("left join", "pg_proc" , "pg_cast.castfunc = pg_proc.oid");
! AddJoin("left join", "pg_namespace" , "pg_proc.pronamespace = pg_namespace.oid");
! }
!
! public override void AddOrderByColumns()
! {
! AddOrderBy("pg_proc.proname");
! }
!
! public override void AddWhereFilters()
! {
! }
!
! #endregion
!
! #region PARSE_METHODS
!
! public override object[] ParseRestrictions(object[] restrictions)
! {
! object[] parsed = restrictions;
!
! return parsed;
! }
!
! #endregion
!
! #region PRIVATE_METHODS
!
! private string getContextExpression(string fieldName)
! {
! StringBuilder expression = new StringBuilder();
!
! expression.AppendFormat(" case {0} ", fieldName);
! expression.Append(" when 'e' THEN 'EXPLICIT'");
! expression.Append(" when 'a' THEN 'ASSIGNMENT'");
! expression.Append(" when 'i' THEN 'EXPRESSIONS'");
! expression.Append(" END ");
!
! return expression.ToString();
! }
!
! #endregion
! }
}
--- 1,102 ----
! /* PgSqlClient - ADO.NET Data Provider for PostgreSQL 7.4+
! * Copyright (C) 2003 Carlos Guzmán Álvarez
! *
! * This library is free software; you can redistribute it and/or
! * modify it under the terms of the GNU Lesser General Public
! * License as published by the Free Software Foundation; either
! * version 2.1 of the License, or (at your option) any later version.
! *
! * This library is distributed in the hope that it will be useful,
! * but WITHOUT ANY WARRANTY; without even the implied warranty of
! * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
! * Lesser General Public License for more details.
! *
! * You should have received a copy of the GNU Lesser General Public
! * License along with this library; if not, write to the Free Software
! * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
! */
!
! using System;
! using System.Data;
! using System.Text;
!
! namespace PostgreSql.Data.PgSqlClient.DbSchema
! {
! internal class PgCastsSchema : PgAbstractDbSchema
! {
! #region Constructors
!
! public PgCastsSchema() : base("Casts")
! {
! }
!
! #endregion
!
! #region ADD_METHODS
!
! public override void AddTables()
! {
! AddTable("pg_cast");
! }
!
! public override void AddRestrictionColumns()
! {
! }
!
! public override void AddDataColumns()
! {
! AddDataColumn("pg_typesrc.typname" , "SOURCE_TYPE");
! AddDataColumn("pg_typetgt.typname" , "TARGET_TYPE");
! AddDataColumn("pg_namespace.nspname", "FUNCTION_SCHEMA");
! AddDataColumn("pg_proc.proname" , "FUNCTION_NAME");
! AddDataColumn(getContextExpression("pg_cast.castcontext"), "CAST_CONTEXT");
! }
!
! public override void AddJoins()
! {
! AddJoin("left join", "pg_type as pg_typesrc", "pg_cast.castsource = pg_typesrc.oid");
! AddJoin("left join", "pg_type as pg_typetgt", "pg_cast.casttarget = pg_typetgt.oid");
! AddJoin("left join", "pg_proc" , "pg_cast.castfunc = pg_proc.oid");
! AddJoin("left join", "pg_namespace" , "pg_proc.pronamespace = pg_namespace.oid");
! }
!
! public override void AddOrderByColumns()
! {
! AddOrderBy("pg_proc.proname");
! }
!
! public override void AddWhereFilters()
! {
! }
!
! #endregion
!
! #region PARSE_METHODS
!
! public override object[] ParseRestrictions(object[] restrictions)
! {
! object[] parsed = restrictions;
!
! return parsed;
! }
!
! #endregion
!
! #region Private Methods
!
! private string getContextExpression(string fieldName)
! {
! StringBuilder expression = new StringBuilder();
!
! expression.AppendFormat(" case {0} ", fieldName);
! expression.Append(" when 'e' THEN 'EXPLICIT'");
! expression.Append(" when 'a' THEN 'ASSIGNMENT'");
! expression.Append(" when 'i' THEN 'EXPRESSIONS'");
! expression.Append(" END ");
!
! return expression.ToString();
! }
!
! #endregion
! }
}
Index: PgCheckConstraints.cs
===================================================================
RCS file: /cvsroot/pgsqlclient/pgsqlclient_10/PostgreSql.Data.PgSqlClient/source/DbSchema/PgCheckConstraints.cs,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** PgCheckConstraints.cs 2 Aug 2003 21:11:37 -0000 1.2
--- PgCheckConstraints.cs 14 Dec 2003 15:07:38 -0000 1.3
***************
*** 1,127 ****
! /* PgSqlClient - ADO.NET Data Provider for PostgreSQL 7.4+
! * Copyright (C) 2003 Carlos Guzmán Álvarez
! *
! * This library is free software; you can redistribute it and/or
! * modify it under the terms of the GNU Lesser General Public
! * License as published by the Free Software Foundation; either
! * version 2.1 of the License, or (at your option) any later version.
! *
! * This library is distributed in the hope that it will be useful,
! * but WITHOUT ANY WARRANTY; without even the implied warranty of
! * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
! * Lesser General Public License for more details.
! *
! * You should have received a copy of the GNU Lesser General Public
! * License along with this library; if not, write to the Free Software
! * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
! */
!
! using System;
! using System.Data;
! using System.Text;
!
! namespace PostgreSql.Data.PgSqlClient.DbSchema
! {
! internal class PgCheckConstraintsSchema : PgAbstractDbSchema
! {
! #region CONSTRUCTORS
!
! public PgCheckConstraintsSchema() : base("CheckConstraints")
! {
! }
!
! #endregion
!
! #region ADD_METHODS
!
! public override void AddTables()
! {
! AddTable("pg_constraint");
! }
!
! public override void AddRestrictionColumns()
! {
! AddRestrictionColumn("pg_namespace.nspname", "CONSTRAINT_SCHEMA", null);
! AddRestrictionColumn("pg_constraint.conname", "CONSTRAINT_NAME", null);
! }
!
! public override void AddDataColumns()
! {
! AddDataColumn("pg_get_constraintdef(pg_constraint.oid)", "CHECK_CLAUSULE");
! AddDataColumn("pg_description.description", "DESCRIPTION");
! }
!
! public override void AddJoins()
! {
! AddJoin("left join", "pg_namespace" , "pg_constraint.connamespace = pg_namespace.oid");
! AddJoin("left join", "pg_description" , "pg_constraint.oid = pg_description.objoid");
! }
!
! public override void AddOrderByColumns()
! {
! AddOrderBy("pg_namespace.nspname");
! AddOrderBy("pg_constraint.conname");
! }
!
! public override void AddWhereFilters()
! {
! AddWhereFilter("pg_constraint.contype = 'c'");
! }
!
! #endregion
!
! #region PARSE_METHODS
!
! public override object[] ParseRestrictions(object[] restrictions)
! {
! object[] parsed = restrictions;
!
! if (parsed != null)
! {
! if (parsed.Length == 7 && parsed[6] != null)
! {
! switch (parsed[6].ToString().ToUpper())
! {
! case "UNIQUE":
! parsed[3] = "u";
! break;
!
! case "PRIMARY KEY":
! parsed[3] = "p";
! break;
!
! case "FOREIGN KEY":
! parsed[3] = "f";
! break;
!
! case "CHECK":
! parsed[3] = "c";
! break;
! }
! }
! }
!
! return parsed;
! }
!
! #endregion
!
! #region PRIVATE_METHODS
!
! private string getConstraintTypeExpression(string fieldName)
! {
! StringBuilder expression = new StringBuilder();
!
! expression.AppendFormat(" case {0} ", fieldName);
! expression.Append(" when 'u' THEN 'UNIQUE'");
! expression.Append(" when 'p' THEN 'PRIMARY KEY'");
! expression.Append(" when 'f' THEN 'FOREIGN KEY'");
! expression.Append(" when 'c' THEN 'CHECK'");
! expression.Append(" END ");
!
! return expression.ToString();
! }
!
! #endregion
! }
}
--- 1,127 ----
! /* PgSqlClient - ADO.NET Data Provider for PostgreSQL 7.4+
! * Copyright (C) 2003 Carlos Guzmán Álvarez
! *
! * This library is free software; you can redistribute it and/or
! * modify it under the terms of the GNU Lesser General Public
! * License as published by the Free Software Foundation; either
! * version 2.1 of the License, or (at your option) any later version.
! *
! * This library is distributed in the hope that it will be useful,
! * but WITHOUT ANY WARRANTY; without even the implied warranty of
! * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
! * Lesser General Public License for more details.
! *
! * You should have received a copy of the GNU Lesser General Public
! * License along with this library; if not, write to the Free Software
! * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
! */
!
! using System;
! using System.Data;
! using System.Text;
!
! namespace PostgreSql.Data.PgSqlClient.DbSchema
! {
! internal class PgCheckConstraintsSchema : PgAbstractDbSchema
! {
! #region Constructors
!
! public PgCheckConstraintsSchema() : base("CheckConstraints")
! {
! }
!
! #endregion
!
! #region ADD_METHODS
!
! public override void AddTables()
! {
! AddTable("pg_constraint");
! }
!
! public override void AddRestrictionColumns()
! {
! AddRestrictionColumn("pg_namespace.nspname", "CONSTRAINT_SCHEMA", null);
! AddRestrictionColumn("pg_constraint.conname", "CONSTRAINT_NAME", null);
! }
!
! public override void AddDataColumns()
! {
! AddDataColumn("pg_get_constraintdef(pg_constraint.oid)", "CHECK_CLAUSULE");
! AddDataColumn("pg_description.description", "DESCRIPTION");
! }
!
! public override void AddJoins()
! {
! AddJoin("left join", "pg_namespace" , "pg_constraint.connamespace = pg_namespace.oid");
! AddJoin("left join", "pg_description" , "pg_constraint.oid = pg_description.objoid");
! }
!
! public override void AddOrderByColumns()
! {
! AddOrderBy("pg_namespace.nspname");
! AddOrderBy("pg_constraint.conname");
! }
!
! public override void AddWhereFilters()
! {
! AddWhereFilter("pg_constraint.contype = 'c'");
! }
!
! #endregion
!
! #region PARSE_METHODS
!
! public override object[] ParseRestrictions(object[] restrictions)
! {
! object[] parsed = restrictions;
!
! if (parsed != null)
! {
! if (parsed.Length == 7 && parsed[6] != null)
! {
! switch (parsed[6].ToString().ToUpper())
! {
! case "UNIQUE":
! parsed[3] = "u";
! break;
!
! case "PRIMARY KEY":
! parsed[3] = "p";
! break;
!
! case "FOREIGN KEY":
! parsed[3] = "f";
! break;
!
! case "CHECK":
! parsed[3] = "c";
! break;
! }
! }
! }
!
! return parsed;
! }
!
! #endregion
!
! #region Private Methods
!
! private string getConstraintTypeExpression(string fieldName)
! {
! StringBuilder expression = new StringBuilder();
!
! expression.AppendFormat(" case {0} ", fieldName);
! expression.Append(" when 'u' THEN 'UNIQUE'");
! expression.Append(" when 'p' THEN 'PRIMARY KEY'");
! expression.Append(" when 'f' THEN 'FOREIGN KEY'");
! expression.Append(" when 'c' THEN 'CHECK'");
! expression.Append(" END ");
!
! return expression.ToString();
! }
!
! #endregion
! }
}
Index: PgCheckConstraintsByTable.cs
===================================================================
RCS file: /cvsroot/pgsqlclient/pgsqlclient_10/PostgreSql.Data.PgSqlClient/source/DbSchema/PgCheckConstraintsByTable.cs,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** PgCheckConstraintsByTable.cs 2 Aug 2003 21:11:37 -0000 1.2
--- PgCheckConstraintsByTable.cs 14 Dec 2003 15:07:38 -0000 1.3
***************
*** 1,133 ****
! /* PgSqlClient - ADO.NET Data Provider for PostgreSQL 7.4+
! * Copyright (C) 2003 Carlos Guzmán Álvarez
! *
! * This library is free software; you can redistribute it and/or
! * modify it under the terms of the GNU Lesser General Public
! * License as published by the Free Software Foundation; either
! * version 2.1 of the License, or (at your option) any later version.
! *
! * This library is distributed in the hope that it will be useful,
! * but WITHOUT ANY WARRANTY; without even the implied warranty of
! * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
! * Lesser General Public License for more details.
! *
! * You should have received a copy of the GNU Lesser General Public
! * License along with this library; if not, write to the Free Software
! * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
! */
!
! using System;
! using System.Data;
! using System.Text;
!
! namespace PostgreSql.Data.PgSqlClient.DbSchema
! {
! internal class PgCheckConstraintsByTableSchema : PgAbstractDbSchema
! {
! #region CONSTRUCTORS
!
! public PgCheckConstraintsByTableSchema() : base("CheckConstraintsByTable")
! {
! }
!
! #endregion
!
! #region ADD_METHODS
!
! public override void AddTables()
! {
! AddTable("pg_constraint");
! }
!
! public override void AddRestrictionColumns()
! {
! AddRestrictionColumn("pg_namespace.nspname" , "CONSTRAINT_SCHEMA" , null);
! AddRestrictionColumn("pg_constraint.conname", "CONSTRAINT_NAME" , null);
! AddRestrictionColumn("tbn.nspname" , "TABLE_SCHEMA" , null);
! AddRestrictionColumn("pg_class.relname" , "TABLE_NAME" , null);
! }
!
! public override void AddDataColumns()
! {
! AddDataColumn("pg_get_constraintdef(pg_constraint.oid)", "CHECK_CLAUSULE");
! AddDataColumn("pg_description.description", "DESCRIPTION");
! }
!
! public override void AddJoins()
! {
! AddJoin("left join", "pg_class" , "pg_class.oid = pg_constraint.conrelid");
! AddJoin("left join", "pg_namespace tbn" , "pg_class.relnamespace = tbn.oid");
! AddJoin("left join", "pg_namespace" , "pg_constraint.connamespace = pg_namespace.oid");
! AddJoin("left join", "pg_description" , "pg_constraint.oid = pg_description.objoid");
! }
!
! public override void AddOrderByColumns()
! {
! AddOrderBy("pg_namespace.nspname");
! AddOrderBy("pg_class.relname");
! AddOrderBy("pg_constraint.conname");
! }
!
! public override void AddWhereFilters()
! {
! AddWhereFilter("pg_constraint.contype = 'c'");
! AddWhereFilter("pg_class.relkind = 'r'");
! }
!
! #endregion
!
! #region PARSE_METHODS
!
! public override object[] ParseRestrictions(object[] restrictions)
! {
! object[] parsed = restrictions;
!
! if (parsed != null)
! {
! if (parsed.Length == 7 && parsed[6] != null)
! {
! switch (parsed[6].ToString().ToUpper())
! {
! case "UNIQUE":
! parsed[3] = "u";
! break;
!
! case "PRIMARY KEY":
! parsed[3] = "p";
! break;
!
! case "FOREIGN KEY":
! parsed[3] = "f";
! break;
!
! case "CHECK":
! parsed[3] = "c";
! break;
! }
! }
! }
!
! return parsed;
! }
!
! #endregion
!
! #region PRIVATE_METHODS
!
! private string getConstraintTypeExpression(string fieldName)
! {
! StringBuilder expression = new StringBuilder();
!
! expression.AppendFormat(" case {0} ", fieldName);
! expression.Append(" when 'u' THEN 'UNIQUE'");
! expression.Append(" when 'p' THEN 'PRIMARY KEY'");
! expression.Append(" when 'f' THEN 'FOREIGN KEY'");
! expression.Append(" when 'c' THEN 'CHECK'");
! expression.Append(" END ");
!
! return expression.ToString();
! }
!
! #endregion
! }
}
--- 1,133 ----
! /* PgSqlClient - ADO.NET Data Provider for PostgreSQL 7.4+
! * Copyright (C) 2003 Carlos Guzmán Álvarez
! *
! * This library is free software; you can redistribute it and/or
! * modify it under the terms of the GNU Lesser General Public
! * License as published by the Free Software Foundation; either
! * version 2.1 of the License, or (at your option) any later version.
! *
! * This library is distributed in the hope that it will be useful,
! * but WITHOUT ANY WARRANTY; without even the implied warranty of
! * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
! * Lesser General Public License for more details.
! *
! * You should have received a copy of the GNU Lesser General Public
! * License along with this library; if not, write to the Free Software
! * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
! */
!
! using System;
! using System.Data;
! using System.Text;
!
! namespace PostgreSql.Data.PgSqlClient.DbSchema
! {
! internal class PgCheckConstraintsByTableSchema : PgAbstractDbSchema
! {
! #region Constructors
!
! public PgCheckConstraintsByTableSchema() : base("CheckConstraintsByTable")
! {
! }
!
! #endregion
!
! #region ADD_METHODS
!
! public override void AddTables()
! {
! AddTable("pg_constraint");
! }
!
! public override void AddRestrictionColumns()
! {
! AddRestrictionColumn("pg_namespace.nspname" , "CONSTRAINT_SCHEMA" , null);
! AddRestrictionColumn("pg_constraint.conname", "CONSTRAINT_NAME" , null);
! AddRestrictionColumn("tbn.nspname" , "TABLE_SCHEMA" , null);
! AddRestrictionColumn("pg_class.relname" , "TABLE_NAME" , null);
! }
!
! public override void AddDataColumns()
! {
! AddDataColumn("pg_get_constraintdef(pg_constraint.oid)", "CHECK_CLAUSULE");
! AddDataColumn("pg_description.description", "DESCRIPTION");
! }
!
! public override void AddJoins()
! {
! AddJoin("left join", "pg_class" , "pg_class.oid = pg_constraint.conrelid");
! AddJoin("left join", "pg_namespace tbn" , "pg_class.relnamespace = tbn.oid");
! AddJoin("left join", "pg_namespace" , "pg_constraint.connamespace = pg_namespace.oid");
! AddJoin("left join", "pg_description" , "pg_constraint.oid = pg_description.objoid");
! }
!
! public override void AddOrderByColumns()
! {
! AddOrderBy("pg_namespace.nspname");
! AddOrderBy("pg_class.relname");
! AddOrderBy("pg_constraint.conname");
! }
!
! public override void AddWhereFilters()
! {
! AddWhereFilter("pg_constraint.contype = 'c'");
! AddWhereFilter("pg_class.relkind = 'r'");
! }
!
! #endregion
!
! #region PARSE_METHODS
!
! public override object[] ParseRestrictions(object[] restrictions)
! {
! object[] parsed = restrictions;
!
! if (parsed != null)
! {
! if (parsed.Length == 7 && parsed[6] != null)
! {
! switch (parsed[6].ToString().ToUpper())
! {
! case "UNIQUE":
! parsed[3] = "u";
! break;
!
! case "PRIMARY KEY":
! parsed[3] = "p";
! break;
!
! case "FOREIGN KEY":
! parsed[3] = "f";
! break;
!
! case "CHECK":
! parsed[3] = "c";
! break;
! }
! }
! }
!
! return parsed;
! }
!
! #endregion
!
! #region Private Methods
!
! private string getConstraintTypeExpression(string fieldName)
! {
! StringBuilder expression = new StringBuilder();
!
! expression.AppendFormat(" case {0} ", fieldName);
! expression.Append(" when 'u' THEN 'UNIQUE'");
! expression.Append(" when 'p' THEN 'PRIMARY KEY'");
! expression.Append(" when 'f' THEN 'FOREIGN KEY'");
! expression.Append(" when 'c' THEN 'CHECK'");
! expression.Append(" END ");
!
! return expression.ToString();
! }
!
! #endregion
! }
}
Index: PgColumnsSchema.cs
===================================================================
RCS file: /cvsroot/pgsqlclient/pgsqlclient_10/PostgreSql.Data.PgSqlClient/source/DbSchema/PgColumnsSchema.cs,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** PgColumnsSchema.cs 3 Aug 2003 10:23:03 -0000 1.4
--- PgColumnsSchema.cs 14 Dec 2003 15:07:38 -0000 1.5
***************
*** 1,132 ****
! /* PgSqlClient - ADO.NET Data Provider for PostgreSQL 7.4+
! * Copyright (C) 2003 Carlos Guzmán Álvarez
! *
! * This library is free software; you can redistribute it and/or
! * modify it under the terms of the GNU Lesser General Public
! * License as published by the Free Software Foundation; either
! * version 2.1 of the License, or (at your option) any later version.
! *
! * This library is distributed in the hope that it will be useful,
! * but WITHOUT ANY WARRANTY; without even the implied warranty of
! * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
! * Lesser General Public License for more details.
! *
! * You should have received a copy of the GNU Lesser General Public
! * License along with this library; if not, write to the Free Software
! * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
! */
!
! using System;
! using System.Data;
! using System.Text;
!
! namespace PostgreSql.Data.PgSqlClient.DbSchema
! {
! internal class PgColumnsSchema : PgAbstractDbSchema
! {
! #region CONSTRUCTORS
!
! public PgColumnsSchema() : base("Columns")
! {
! }
!
! #endregion
!
! #region ADD_METHODS
!
! public override void AddTables()
! {
! AddTable("pg_attribute");
! }
!
! public override void AddRestrictionColumns()
! {
! AddRestrictionColumn("pg_namespace.nspname" , "TABLE_SCHEMA", null);
! AddRestrictionColumn("pg_class.relname" , "TABLE_NAME", null);
! AddRestrictionColumn("pg_attribute.attname" , "COLUMN_NAME", null);
! }
!
! public override void AddDataColumns()
! {
! AddDataColumn("pg_attribute.atttypid" , "DATA_TYPE");
! AddDataColumn("pg_attribute.attlen" , "COLUMN_SIZE");
! AddDataColumn("pg_attribute.attndims" , "COLUMN_DIMENSIONS");
! AddDataColumn("pg_attribute.attnum" , "ORDINAL_POSITION");
! AddDataColumn("pg_attribute.atthasdef" , "HAS_DEFAULT");
! AddDataColumn("pg_attrdef.adsrc" , "COLUMN_DEFAULT");
! AddDataColumn("pg_attribute.attnotnull" , "IS_NOT_NULL");
! AddDataColumn("(pg_depend.objid is not null)", "IS_AUTOINCREMENT");
! AddDataColumn(getStorageExpression("pg_attribute.attstorage"), "STORAGE");
! AddDataColumn("pg_description.description", "DESCRIPTION");
! }
!
! public override void AddJoins()
! {
! AddJoin("left join", "pg_class" , "pg_attribute.attrelid = pg_class.oid");
! AddJoin("left join", "pg_namespace" , "pg_class.relnamespace = pg_namespace.oid");
! AddJoin("left join", "pg_attrdef" , "(pg_class.oid = pg_attrdef.adrelid AND pg_attribute.attnum = pg_attrdef.adnum)");
! AddJoin("left join", "pg_description", "(pg_attribute.attrelid = pg_description.objoid AND pg_attribute.attnum = pg_description.objsubid)");
! AddJoin("left join",
! "pg_depend",
! "(pg_attribute.attrelid = pg_depend.refobjid AND pg_attribute.attnum = pg_depend.refobjsubid AND pg_depend.deptype = 'i')");
! }
!
! public override void AddOrderByColumns()
! {
! AddOrderBy("pg_namespace.nspname");
! AddOrderBy("pg_class.relname");
! AddOrderBy("pg_attribute.attnum");
! }
!
! public override void AddWhereFilters()
! {
! // Do not get dropped columns
! AddWhereFilter("pg_attribute.attisdropped = false");
! // Get only columns with a number > 0
! AddWhereFilter("pg_attribute.attnum > 0");
! }
!
! #endregion
!
! #region PARSE_METHODS
!
! public override object[] ParseRestrictions(object[] restrictions)
! {
! object[] parsed = restrictions;
!
! return parsed;
! }
!
! #endregion
!
! #region PRIVATE_METHODS
!
! private string getSerialExpression(string fieldName)
! {
! StringBuilder expression = new StringBuilder();
!
! expression.AppendFormat(" case {0} ", fieldName);
! expression.Append(" when 0 THEN true");
! expression.Append(" default THEN false");
! expression.Append(" END ");
!
! return expression.ToString();
! }
!
! private string getStorageExpression(string fieldName)
! {
! StringBuilder expression = new StringBuilder();
!
! expression.AppendFormat(" case {0} ", fieldName);
! expression.Append(" when 'p' THEN 'PLAIN'");
! expression.Append(" when 'e' THEN 'EXTERNAL'");
! expression.Append(" when 'm' THEN 'MAIN'");
! expression.Append(" when 'x' THEN 'EXTENDED'");
! expression.Append(" END ");
!
! return expression.ToString();
! }
!
! #endregion
! }
! }
--- 1,132 ----
! /* PgSqlClient - ADO.NET Data Provider for PostgreSQL 7.4+
! * Copyright (C) 2003 Carlos Guzmán Álvarez
! *
! * This library is free software; you can redistribute it and/or
! * modify it under the terms of the GNU Lesser General Public
! * License as published by the Free Software Foundation; either
! * version 2.1 of the License, or (at your option) any later version.
! *
! * This library is distributed in the hope that it will be useful,
! * but WITHOUT ANY WARRANTY; without even the implied warranty of
! * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
! * Lesser General Public License for more details.
! *
! * You should have received a copy of the GNU Lesser General Public
! * License along with this library; if not, write to the Free Software
! * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
! */
!
! using System;
! using System.Data;
! using System.Text;
!
! namespace PostgreSql.Data.PgSqlClient.DbSchema
! {
! internal class PgColumnsSchema : PgAbstractDbSchema
! {
! #region Constructors
!
! public PgColumnsSchema() : base("Columns")
! {
! }
!
! #endregion
!
! #region ADD_METHODS
!
! public override void AddTables()
! {
! AddTable("pg_attribute");
! }
!
! public override void AddRestrictionColumns()
! {
! AddRestrictionColumn("pg_namespace.nspname" , "TABLE_SCHEMA", null);
! AddRestrictionColumn("pg_class.relname" , "TABLE_NAME", null);
! AddRestrictionColumn("pg_attribute.attname" , "COLUMN_NAME", null);
! }
!
! public override void AddDataColumns()
! {
! AddDataColumn("pg_attribute.atttypid" , "DATA_TYPE");
! AddDataColumn("pg_attribute.attlen" , "COLUMN_SIZE");
! AddDataColumn("pg_attribute.attndims" , "COLUMN_DIMENSIONS");
! AddDataColumn("pg_attribute.attnum" , "ORDINAL_POSITION");
! AddDataColumn("pg_attribute.atthasdef" , "HAS_DEFAULT");
! AddDataColumn("pg_attrdef.adsrc" , "COLUMN_DEFAULT");
! AddDataColumn("pg_attribute.attnotnull" , "IS_NOT_NULL");
! AddDataColumn("(pg_depend.objid is not null)", "IS_AUTOINCREMENT");
! AddDataColumn(getStorageExpression("pg_attribute.attstorage"), "STORAGE");
! AddDataColumn("pg_description.description", "DESCRIPTION");
! }
!
! public override void AddJoins()
! {
! AddJoin("left join", "pg_class" , "pg_attribute.attrelid = pg_class.oid");
! AddJoin("left join", "pg_namespace" , "pg_class.relnamespace = pg_namespace.oid");
! AddJoin("left join", "pg_attrdef" , "(pg_class.oid = pg_attrdef.adrelid AND pg_attribute.attnum = pg_attrdef.adnum)");
! AddJoin("left join", "pg_description", "(pg_attribute.attrelid = pg_description.objoid AND pg_attribute.attnum = pg_description.objsubid)");
! AddJoin("left join",
! "pg_depend",
! "(pg_attribute.attrelid = pg_depend.refobjid AND pg_attribute.attnum = pg_depend.refobjsubid AND pg_depend.deptype = 'i')");
! }
!
! public override void AddOrderByColumns()
! {
! AddOrderBy("pg_namespace.nspname");
! AddOrderBy("pg_class.relname");
! AddOrderBy("pg_attribute.attnum");
! }
!
! public override void AddWhereFilters()
! {
! // Do not get dropped columns
! AddWhereFilter("pg_attribute.attisdropped = false");
! // Get only columns with a number > 0
! AddWhereFilter("pg_attribute.attnum > 0");
! }
!
! #endregion
!
! #region PARSE_METHODS
!
! public override object[] ParseRestrictions(object[] restrictions)
! {
! object[] parsed = restrictions;
!
! return parsed;
! }
!
! #endregion
!
! #region Private Methods
!
! private string getSerialExpression(string fieldName)
! {
! StringBuilder expression = new StringBuilder();
!
! expression.AppendFormat(" case {0} ", fieldName);
! expression.Append(" when 0 THEN true");
! expression.Append(" default THEN false");
! expression.Append(" END ");
!
! return expression.ToString();
! }
!
! private string getStorageExpression(string fieldName)
! {
! StringBuilder expression = new StringBuilder();
!
! expression.AppendFormat(" case {0} ", fieldName);
! expression.Append(" when 'p' THEN 'PLAIN'");
! expression.Append(" when 'e' THEN 'EXTERNAL'");
! expression.Append(" when 'm' THEN 'MAIN'");
! expression.Append(" when ...
[truncated message content] |
Update of /cvsroot/pgsqlclient/pgsqlclient_10/PostgreSql.Data.PgSqlClient/source/NPgClient
In directory sc8-pr-cvs1:/tmp/cvs-serv15669
Modified Files:
PgCharSet.cs PgCharSetCollection.cs PgClientError.cs
PgClientErrorCollection.cs PgClientException.cs
PgConnectionParams.cs PgDbClient.cs PgFieldDescriptor.cs
PgOutputPacket.cs PgParameter.cs PgResponsePacket.cs
PgRowDescriptor.cs PgStatement.cs PgType.cs
PgTypeCollection.cs
Log Message:
2003-12-14 Carlos Guzmán Álvarez <car...@te...>
* Changed #region names in all source files.
Index: PgCharSet.cs
===================================================================
RCS file: /cvsroot/pgsqlclient/pgsqlclient_10/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 2 Aug 2003 19:43:02 -0000 1.1.1.1
--- PgCharSet.cs 14 Dec 2003 15:07:13 -0000 1.2
***************
*** 1,67 ****
! /* PgSqlClient - ADO.NET Data Provider for PostgreSQL 7.4+
! * Copyright (C) 2003 Carlos Guzmán Álvarez
! *
! * This library is free software; you can redistribute it and/or
! * modify it under the terms of the GNU Lesser General Public
! * License as published by the Free Software Foundation; either
! * version 2.1 of the License, or (at your option) any later version.
! *
! * This library is distributed in the hope that it will be useful,
! * but WITHOUT ANY WARRANTY; without even the implied warranty of
! * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
! * Lesser General Public License for more details.
! *
! * You should have received a copy of the GNU Lesser General Public
! * License along with this library; if not, write to the Free Software
! * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
! */
!
! using System;
! using System.Text;
!
! namespace PostgreSql.Data.NPgClient
! {
! internal class PgCharSet
! {
! #region FIELDS
!
! private string charSet;
! private Encoding encoding;
!
! #endregion
!
! #region PROPERTIES
!
! public string CharSet
! {
! get { return charSet; }
! }
!
! public Encoding Encoding
! {
! get { return encoding; }
! }
!
! #endregion
!
! #region CONSTRUCTORS
!
! public PgCharSet()
! {
! }
!
! public PgCharSet(string charSet, string systemCharSet)
! {
! this.charSet = charSet;
! this.encoding = Encoding.GetEncoding(systemCharSet);
! }
!
! public PgCharSet(string charSet, int cp)
! {
! this.charSet = charSet;
! this.encoding = Encoding.GetEncoding(cp);
! }
!
! #endregion
! }
! }
--- 1,67 ----
! /* PgSqlClient - ADO.NET Data Provider for PostgreSQL 7.4+
! * Copyright (C) 2003 Carlos Guzmán Álvarez
! *
! * This library is free software; you can redistribute it and/or
! * modify it under the terms of the GNU Lesser General Public
! * License as published by the Free Software Foundation; either
! * version 2.1 of the License, or (at your option) any later version.
! *
! * This library is distributed in the hope that it will be useful,
! * but WITHOUT ANY WARRANTY; without even the implied warranty of
! * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
! * Lesser General Public License for more details.
! *
! * You should have received a copy of the GNU Lesser General Public
! * License along with this library; if not, write to the Free Software
! * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
! */
!
! using System;
! using System.Text;
!
! namespace PostgreSql.Data.NPgClient
! {
! internal class PgCharSet
! {
! #region Fields
!
! private string charSet;
! private Encoding encoding;
!
! #endregion
!
! #region Properties
!
! public string CharSet
! {
! get { return charSet; }
! }
!
! public Encoding Encoding
! {
! get { return encoding; }
! }
!
! #endregion
!
! #region Constructors
!
! public PgCharSet()
! {
! }
!
! public PgCharSet(string charSet, string systemCharSet)
! {
! this.charSet = charSet;
! this.encoding = Encoding.GetEncoding(systemCharSet);
! }
!
! public PgCharSet(string charSet, int cp)
! {
! this.charSet = charSet;
! this.encoding = Encoding.GetEncoding(cp);
! }
!
! #endregion
! }
! }
Index: PgCharSetCollection.cs
===================================================================
RCS file: /cvsroot/pgsqlclient/pgsqlclient_10/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 22 Aug 2003 15:13:36 -0000 1.2
--- PgCharSetCollection.cs 14 Dec 2003 15:07:13 -0000 1.3
***************
*** 1,109 ****
! /* PgSqlClient - ADO.NET Data Provider for PostgreSQL 7.4+
! * Copyright (C) 2003 Carlos Guzmán Álvarez
! *
! * This library is free software; you can redistribute it and/or
! * modify it under the terms of the GNU Lesser General Public
! * License as published by the Free Software Foundation; either
! * version 2.1 of the License, or (at your option) any later version.
! *
! * This library is distributed in the hope that it will be useful,
! * but WITHOUT ANY WARRANTY; without even the implied warranty of
! * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
! * Lesser General Public License for more details.
! *
! * You should have received a copy of the GNU Lesser General Public
! * License along with this library; if not, write to the Free Software
! * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
! */
!
! using System;
! using System.Data;
! using System.Collections;
! 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; }
! }
!
! #endregion
!
! #region METHODS
!
! public bool Contains(string charset)
! {
! return(-1 != IndexOf(charset));
! }
!
! public int IndexOf(string charset)
! {
! int index = 0;
! foreach(PgCharSet item in this)
! {
! if (cultureAwareCompare(item.CharSet, charset))
! {
! return index;
! }
! index++;
! }
! return -1;
! }
!
! public void RemoveAt(string charset)
! {
! RemoveAt(IndexOf(charset));
! }
!
! public PgCharSet Add(PgCharSet charset)
! {
! base.Add(charset);
!
! return charset;
! }
!
! public PgCharSet Add(string charset, string systemCharset)
! {
! PgCharSet charSet = new PgCharSet(charset, systemCharset);
!
! base.Add(charSet);
!
! return charSet;
! }
!
! public PgCharSet Add(string charset, int cp)
! {
! PgCharSet charSet = new PgCharSet(charset, cp);
!
! base.Add(charSet);
!
! return charSet;
! }
!
! private bool cultureAwareCompare(string strA, string strB)
! {
! try
! {
! return CultureInfo.CurrentCulture.CompareInfo.Compare(strA, strB, CompareOptions.IgnoreKanaType | CompareOptions.IgnoreWidth | CompareOptions.IgnoreCase) == 0 ? true : false;
! }
! catch (Exception)
! {
! return strA.ToUpper() == strB.ToUpper() ? true : false;
! }
! }
!
! #endregion
! }
! }
--- 1,109 ----
! /* PgSqlClient - ADO.NET Data Provider for PostgreSQL 7.4+
! * Copyright (C) 2003 Carlos Guzmán Álvarez
! *
! * This library is free software; you can redistribute it and/or
! * modify it under the terms of the GNU Lesser General Public
! * License as published by the Free Software Foundation; either
! * version 2.1 of the License, or (at your option) any later version.
! *
! * This library is distributed in the hope that it will be useful,
! * but WITHOUT ANY WARRANTY; without even the implied warranty of
! * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
! * Lesser General Public License for more details.
! *
! * You should have received a copy of the GNU Lesser General Public
! * License along with this library; if not, write to the Free Software
! * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
! */
!
! using System;
! using System.Data;
! using System.Collections;
! 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; }
! }
!
! #endregion
!
! #region Methods
!
! public bool Contains(string charset)
! {
! return(-1 != IndexOf(charset));
! }
!
! public int IndexOf(string charset)
! {
! int index = 0;
! foreach(PgCharSet item in this)
! {
! if (cultureAwareCompare(item.CharSet, charset))
! {
! return index;
! }
! index++;
! }
! return -1;
! }
!
! public void RemoveAt(string charset)
! {
! RemoveAt(IndexOf(charset));
! }
!
! public PgCharSet Add(PgCharSet charset)
! {
! base.Add(charset);
!
! return charset;
! }
!
! public PgCharSet Add(string charset, string systemCharset)
! {
! PgCharSet charSet = new PgCharSet(charset, systemCharset);
!
! base.Add(charSet);
!
! return charSet;
! }
!
! public PgCharSet Add(string charset, int cp)
! {
! PgCharSet charSet = new PgCharSet(charset, cp);
!
! base.Add(charSet);
!
! return charSet;
! }
!
! private bool cultureAwareCompare(string strA, string strB)
! {
! try
! {
! return CultureInfo.CurrentCulture.CompareInfo.Compare(strA, strB, CompareOptions.IgnoreKanaType | CompareOptions.IgnoreWidth | CompareOptions.IgnoreCase) == 0 ? true : false;
! }
! catch (Exception)
! {
! return strA.ToUpper() == strB.ToUpper() ? true : false;
! }
! }
!
! #endregion
! }
! }
Index: PgClientError.cs
===================================================================
RCS file: /cvsroot/pgsqlclient/pgsqlclient_10/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 2 Aug 2003 19:43:02 -0000 1.1.1.1
--- PgClientError.cs 14 Dec 2003 15:07:13 -0000 1.2
***************
*** 1,128 ****
! /* PgSqlClient - ADO.NET Data Provider for PostgreSQL 7.4+
! * Copyright (C) 2003 Carlos Guzmán Álvarez
! *
! * This library is free software; you can redistribute it and/or
! * modify it under the terms of the GNU Lesser General Public
! * License as published by the Free Software Foundation; either
! * version 2.1 of the License, or (at your option) any later version.
! *
! * This library is distributed in the hope that it will be useful,
! * but WITHOUT ANY WARRANTY; without even the implied warranty of
! * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
! * Lesser General Public License for more details.
! *
! * You should have received a copy of the GNU Lesser General Public
! * License along with this library; if not, write to the Free Software
! * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
! */
!
! using System;
!
! namespace PostgreSql.Data.NPgClient
! {
! internal sealed class PgClientError
! {
! #region FIELDS
!
! private string severity;
! private string code;
! private string message;
! private string detail;
! private string hint;
! private string where;
! private string position;
! private string file;
! private int line;
! private string routine;
!
! #endregion
!
! #region PROPERTIES
!
! public string Severity
! {
! get { return severity; }
! set { severity = value; }
! }
!
! public string Message
! {
! get { return message; }
! set { message = value; }
! }
!
! public string Code
! {
! get { return code; }
! set { code = value; }
! }
!
! public string Detail
! {
! get { return detail; }
! set { detail = value; }
! }
!
! public string Hint
! {
! get { return hint; }
! set { hint = value; }
! }
!
! public string Where
! {
! get { return where; }
! set { where = value; }
! }
!
! public string Position
! {
! get { return position; }
! set { position = value; }
! }
!
! public string File
! {
! get { return file; }
! set { file = value; }
! }
!
! public int Line
! {
! get { return line; }
! set { line = value; }
! }
!
! public string Routine
! {
! get { return routine; }
! set { routine = value; }
! }
!
! #endregion
!
! #region CONSTRUCTORS
!
! public PgClientError()
! {
! }
!
! public PgClientError(string message)
! {
! this.message = message;
! }
!
! public PgClientError(string severity, string code, string message)
! {
! this.severity = severity;
! this.code = code;
! this.message = message;
! }
!
! #endregion
!
! #region METHODS
!
! #endregion
! }
! }
--- 1,128 ----
! /* PgSqlClient - ADO.NET Data Provider for PostgreSQL 7.4+
! * Copyright (C) 2003 Carlos Guzmán Álvarez
! *
! * This library is free software; you can redistribute it and/or
! * modify it under the terms of the GNU Lesser General Public
! * License as published by the Free Software Foundation; either
! * version 2.1 of the License, or (at your option) any later version.
! *
! * This library is distributed in the hope that it will be useful,
! * but WITHOUT ANY WARRANTY; without even the implied warranty of
! * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
! * Lesser General Public License for more details.
! *
! * You should have received a copy of the GNU Lesser General Public
! * License along with this library; if not, write to the Free Software
! * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
! */
!
! using System;
!
! namespace PostgreSql.Data.NPgClient
! {
! internal sealed class PgClientError
! {
! #region Fields
!
! private string severity;
! private string code;
! private string message;
! private string detail;
! private string hint;
! private string where;
! private string position;
! private string file;
! private int line;
! private string routine;
!
! #endregion
!
! #region Properties
!
! public string Severity
! {
! get { return severity; }
! set { severity = value; }
! }
!
! public string Message
! {
! get { return message; }
! set { message = value; }
! }
!
! public string Code
! {
! get { return code; }
! set { code = value; }
! }
!
! public string Detail
! {
! get { return detail; }
! set { detail = value; }
! }
!
! public string Hint
! {
! get { return hint; }
! set { hint = value; }
! }
!
! public string Where
! {
! get { return where; }
! set { where = value; }
! }
!
! public string Position
! {
! get { return position; }
! set { position = value; }
! }
!
! public string File
! {
! get { return file; }
! set { file = value; }
! }
!
! public int Line
! {
! get { return line; }
! set { line = value; }
! }
!
! public string Routine
! {
! get { return routine; }
! set { routine = value; }
! }
!
! #endregion
!
! #region Constructors
!
! public PgClientError()
! {
! }
!
! public PgClientError(string message)
! {
! this.message = message;
! }
!
! public PgClientError(string severity, string code, string message)
! {
! this.severity = severity;
! this.code = code;
! this.message = message;
! }
!
! #endregion
!
! #region Methods
!
! #endregion
! }
! }
Index: PgClientErrorCollection.cs
===================================================================
RCS file: /cvsroot/pgsqlclient/pgsqlclient_10/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 22 Aug 2003 15:13:36 -0000 1.2
--- PgClientErrorCollection.cs 14 Dec 2003 15:07:13 -0000 1.3
***************
*** 1,97 ****
! /* PgSqlClient - ADO.NET Data Provider for PostgreSQL 7.4+
! * Copyright (C) 2003 Carlos Guzmán Álvarez
! *
! * This library is free software; you can redistribute it and/or
! * modify it under the terms of the GNU Lesser General Public
! * License as published by the Free Software Foundation; either
! * version 2.1 of the License, or (at your option) any later version.
! *
! * This library is distributed in the hope that it will be useful,
! * but WITHOUT ANY WARRANTY; without even the implied warranty of
! * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
! * Lesser General Public License for more details.
! *
! * You should have received a copy of the GNU Lesser General Public
! * License along with this library; if not, write to the Free Software
! * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
! */
!
! using System;
! using System.Collections;
! 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; }
! }
!
! #endregion
!
! #region METHODS
!
! public bool Contains(string errorMessage)
! {
! return(-1 != IndexOf(errorMessage));
! }
!
! public int IndexOf(string errorMessage)
! {
! int index = 0;
! foreach(PgClientError item in this)
! {
! if (cultureAwareCompare(item.Message, errorMessage))
! {
! return index;
! }
! index++;
! }
! return -1;
! }
!
! public void RemoveAt(string errorMessage)
! {
! RemoveAt(IndexOf(errorMessage));
! }
!
! public PgClientError Add(PgClientError error)
! {
! base.Add(error);
!
! return error;
! }
!
! public PgClientError Add(string severity, string message, string code)
! {
! PgClientError error = new PgClientError(severity, code, message);
!
! return Add(error);
! }
!
! private bool cultureAwareCompare(string strA, string strB)
! {
! try
! {
! return CultureInfo.CurrentCulture.CompareInfo.Compare(strA, strB, CompareOptions.IgnoreKanaType | CompareOptions.IgnoreWidth | CompareOptions.IgnoreCase) == 0 ? true : false;
! }
! catch (Exception)
! {
! return strA.ToUpper() == strB.ToUpper() ? true : false;
! }
! }
!
! #endregion
! }
! }
--- 1,97 ----
! /* PgSqlClient - ADO.NET Data Provider for PostgreSQL 7.4+
! * Copyright (C) 2003 Carlos Guzmán Álvarez
! *
! * This library is free software; you can redistribute it and/or
! * modify it under the terms of the GNU Lesser General Public
! * License as published by the Free Software Foundation; either
! * version 2.1 of the License, or (at your option) any later version.
! *
! * This library is distributed in the hope that it will be useful,
! * but WITHOUT ANY WARRANTY; without even the implied warranty of
! * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
! * Lesser General Public License for more details.
! *
! * You should have received a copy of the GNU Lesser General Public
! * License along with this library; if not, write to the Free Software
! * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
! */
!
! using System;
! using System.Collections;
! 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; }
! }
!
! #endregion
!
! #region Methods
!
! public bool Contains(string errorMessage)
! {
! return(-1 != IndexOf(errorMessage));
! }
!
! public int IndexOf(string errorMessage)
! {
! int index = 0;
! foreach(PgClientError item in this)
! {
! if (cultureAwareCompare(item.Message, errorMessage))
! {
! return index;
! }
! index++;
! }
! return -1;
! }
!
! public void RemoveAt(string errorMessage)
! {
! RemoveAt(IndexOf(errorMessage));
! }
!
! public PgClientError Add(PgClientError error)
! {
! base.Add(error);
!
! return error;
! }
!
! public PgClientError Add(string severity, string message, string code)
! {
! PgClientError error = new PgClientError(severity, code, message);
!
! return Add(error);
! }
!
! private bool cultureAwareCompare(string strA, string strB)
! {
! try
! {
! return CultureInfo.CurrentCulture.CompareInfo.Compare(strA, strB, CompareOptions.IgnoreKanaType | CompareOptions.IgnoreWidth | CompareOptions.IgnoreCase) == 0 ? true : false;
! }
! catch (Exception)
! {
! return strA.ToUpper() == strB.ToUpper() ? true : false;
! }
! }
!
! #endregion
! }
! }
Index: PgClientException.cs
===================================================================
RCS file: /cvsroot/pgsqlclient/pgsqlclient_10/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 2 Aug 2003 19:43:02 -0000 1.1.1.1
--- PgClientException.cs 14 Dec 2003 15:07:13 -0000 1.2
***************
*** 1,61 ****
! /* PgSqlClient - ADO.NET Data Provider for PostgreSQL 7.4+
! * Copyright (C) 2003 Carlos Guzmán Álvarez
! *
! * This library is free software; you can redistribute it and/or
! * modify it under the terms of the GNU Lesser General Public
! * License as published by the Free Software Foundation; either
! * version 2.1 of the License, or (at your option) any later version.
! *
! * This library is distributed in the hope that it will be useful,
! * but WITHOUT ANY WARRANTY; without even the implied warranty of
! * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
! * Lesser General Public License for more details.
! *
! * You should have received a copy of the GNU Lesser General Public
! * License along with this library; if not, write to the Free Software
! * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
! */
!
! using System;
! using System.Text;
!
! namespace PostgreSql.Data.NPgClient
! {
! internal class PgClientException : Exception
! {
! #region FIELDS
!
! private string message;
! private PgClientErrorCollection errors;
!
! #endregion
!
! #region PROPERTIES
!
! public new string Message
! {
! get { return message; }
! }
!
! public PgClientErrorCollection Errors
! {
! get { return errors; }
! }
!
! #endregion
!
! #region CONSTRUCTORS
!
! public PgClientException() : base()
! {
! errors = new PgClientErrorCollection();
! }
!
! public PgClientException(string message) : this()
! {
! this.message = message;
! }
!
! #endregion
! }
! }
--- 1,61 ----
! /* PgSqlClient - ADO.NET Data Provider for PostgreSQL 7.4+
! * Copyright (C) 2003 Carlos Guzmán Álvarez
! *
! * This library is free software; you can redistribute it and/or
! * modify it under the terms of the GNU Lesser General Public
! * License as published by the Free Software Foundation; either
! * version 2.1 of the License, or (at your option) any later version.
! *
! * This library is distributed in the hope that it will be useful,
! * but WITHOUT ANY WARRANTY; without even the implied warranty of
! * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
! * Lesser General Public License for more details.
! *
! * You should have received a copy of the GNU Lesser General Public
! * License along with this library; if not, write to the Free Software
! * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
! */
!
! using System;
! using System.Text;
!
! namespace PostgreSql.Data.NPgClient
! {
! internal class PgClientException : Exception
! {
! #region Fields
!
! private string message;
! private PgClientErrorCollection errors;
!
! #endregion
!
! #region Properties
!
! public new string Message
! {
! get { return message; }
! }
!
! public PgClientErrorCollection Errors
! {
! get { return errors; }
! }
!
! #endregion
!
! #region Constructors
!
! public PgClientException() : base()
! {
! errors = new PgClientErrorCollection();
! }
!
! public PgClientException(string message) : this()
! {
! this.message = message;
! }
!
! #endregion
! }
! }
Index: PgConnectionParams.cs
===================================================================
RCS file: /cvsroot/pgsqlclient/pgsqlclient_10/PostgreSql.Data.PgSqlClient/source/NPgClient/PgConnectionParams.cs,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** PgConnectionParams.cs 15 Aug 2003 17:50:09 -0000 1.2
--- PgConnectionParams.cs 14 Dec 2003 15:07:13 -0000 1.3
***************
*** 1,121 ****
! /* PgSqlClient - ADO.NET Data Provider for PostgreSQL 7.4+
! * Copyright (C) 2003 Carlos Guzmán Álvarez
! *
! * This library is free software; you can redistribute it and/or
! * modify it under the terms of the GNU Lesser General Public
! * License as published by the Free Software Foundation; either
! * version 2.1 of the License, or (at your option) any later version.
! *
! * This library is distributed in the hope that it will be useful,
! * but WITHOUT ANY WARRANTY; without even the implied warranty of
! * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
! * Lesser General Public License for more details.
! *
! * You should have received a copy of the GNU Lesser General Public
! * License along with this library; if not, write to the Free Software
! * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
! */
!
! using System;
! using System.Text;
!
! namespace PostgreSql.Data.NPgClient
! {
! internal class PgConnectionParams
! {
! #region FIELDS
!
! private string serverName;
! private string database;
! private string userName;
! private string userPassword;
! private int serverPort;
! private int packetSize;
! private int timeout;
! private bool pooling;
! private Encoding encoding;
! private bool ssl;
!
! #endregion
!
! #region PROPERTIES
!
! public string ServerName
! {
! get { return serverName; }
! set { serverName = value; }
! }
!
! public string Database
! {
! get { return database; }
! set { database = value; }
! }
!
! public string UserName
! {
! get { return userName; }
! set { userName = value; }
! }
!
! public string UserPassword
! {
! get { return userPassword; }
! set { userPassword = value; }
! }
!
! public int PacketSize
! {
! get { return packetSize; }
! set { packetSize = value; }
! }
!
! public int ServerPort
! {
! get { return serverPort; }
! set { serverPort = value; }
! }
!
! public Encoding Encoding
! {
! get { return encoding; }
! set { encoding = value; }
! }
!
! public int Timeout
! {
! get { return timeout; }
! set { timeout = value; }
! }
!
! public bool Pooling
! {
! get { return pooling; }
! set { pooling = value; }
! }
!
! public bool SSL
! {
! get { return ssl; }
! set { ssl = value; }
! }
!
! #endregion
!
! #region CONSTRUCTORS
!
! public PgConnectionParams()
! {
! serverName = "localhost";
! userName = "postgres";
! userPassword = "postgres";
! serverPort = 5432;
! packetSize = 8192;
! pooling = true;
! timeout = 15;
! encoding = Encoding.Default;
! }
!
! #endregion
! }
}
--- 1,121 ----
! /* PgSqlClient - ADO.NET Data Provider for PostgreSQL 7.4+
! * Copyright (C) 2003 Carlos Guzmán Álvarez
! *
! * This library is free software; you can redistribute it and/or
! * modify it under the terms of the GNU Lesser General Public
! * License as published by the Free Software Foundation; either
! * version 2.1 of the License, or (at your option) any later version.
! *
! * This library is distributed in the hope that it will be useful,
! * but WITHOUT ANY WARRANTY; without even the implied warranty of
! * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
! * Lesser General Public License for more details.
! *
! * You should have received a copy of the GNU Lesser General Public
! * License along with this library; if not, write to the Free Software
! * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
! */
!
! using System;
! using System.Text;
!
! namespace PostgreSql.Data.NPgClient
! {
! internal class PgConnectionParams
! {
! #region Fields
!
! private string serverName;
! private string database;
! private string userName;
! private string userPassword;
! private int serverPort;
! private int packetSize;
! private int timeout;
! private bool pooling;
! private Encoding encoding;
! private bool ssl;
!
! #endregion
!
! #region Properties
!
! public string ServerName
! {
! get { return serverName; }
! set { serverName = value; }
! }
!
! public string Database
! {
! get { return database; }
! set { database = value; }
! }
!
! public string UserName
! {
! get { return userName; }
! set { userName = value; }
! }
!
! public string UserPassword
! {
! get { return userPassword; }
! set { userPassword = value; }
! }
!
! public int PacketSize
! {
! get { return packetSize; }
! set { packetSize = value; }
! }
!
! public int ServerPort
! {
! get { return serverPort; }
! set { serverPort = value; }
! }
!
! public Encoding Encoding
! {
! get { return encoding; }
! set { encoding = value; }
! }
!
! public int Timeout
! {
! get { return timeout; }
! set { timeout = value; }
! }
!
! public bool Pooling
! {
! get { return pooling; }
! set { pooling = value; }
! }
!
! public bool SSL
! {
! get { return ssl; }
! set { ssl = value; }
! }
!
! #endregion
!
! #region Constructors
!
! public PgConnectionParams()
! {
! serverName = "localhost";
! userName = "postgres";
! userPassword = "postgres";
! serverPort = 5432;
! packetSize = 8192;
! pooling = true;
! timeout = 15;
! encoding = Encoding.Default;
! }
!
! #endregion
! }
}
Index: PgDbClient.cs
===================================================================
RCS file: /cvsroot/pgsqlclient/pgsqlclient_10/PostgreSql.Data.PgSqlClient/source/NPgClient/PgDbClient.cs,v
retrieving revision 1.38
retrieving revision 1.39
diff -C2 -d -r1.38 -r1.39
*** PgDbClient.cs 23 Nov 2003 13:24:37 -0000 1.38
--- PgDbClient.cs 14 Dec 2003 15:07:13 -0000 1.39
***************
*** 1,852 ****
! /* PgSqlClient - ADO.NET Data Provider for PostgreSQL 7.4+
! * Copyright (C) 2003 Carlos Guzmán Álvarez
! *
! * This library is free software; you can redistribute it and/or
! * modify it under the terms of the GNU Lesser General Public
! * License as published by the Free Software Foundation; either
! * version 2.1 of the License, or (at your option) any later version.
! *
! * This library is distributed in the hope that it will be useful,
! * but WITHOUT ANY WARRANTY; without even the implied warranty of
[...1675 lines suppressed...]
! private void detach()
! {
! // Close streams
! if (sslStream != null)
! {
! sslStream.Close();
! }
! if (networkStream != null)
! {
! networkStream.Close();
! }
! if (socket != null)
! {
! socket.Close();
! }
! }
!
! #endregion
! }
! }
Index: PgFieldDescriptor.cs
===================================================================
RCS file: /cvsroot/pgsqlclient/pgsqlclient_10/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 2 Aug 2003 19:43:02 -0000 1.1.1.1
--- PgFieldDescriptor.cs 14 Dec 2003 15:07:13 -0000 1.2
***************
*** 1,91 ****
! /* PgSqlClient - ADO.NET Data Provider for PostgreSQL 7.4+
! * Copyright (C) 2003 Carlos Guzmán Álvarez
! *
! * This library is free software; you can redistribute it and/or
! * modify it under the terms of the GNU Lesser General Public
! * License as published by the Free Software Foundation; either
! * version 2.1 of the License, or (at your option) any later version.
! *
! * This library is distributed in the hope that it will be useful,
! * but WITHOUT ANY WARRANTY; without even the implied warranty of
! * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
! * Lesser General Public License for more details.
! *
! * You should have received a copy of the GNU Lesser General Public
! * License along with this library; if not, write to the Free Software
! * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
! */
!
! using System;
!
! namespace PostgreSql.Data.NPgClient
! {
! internal class PgFieldDescriptor
! {
! #region FIELDS
!
! private string fieldName;
! private int oidTable;
! private short oidNumber;
! private PgType dataType;
! private short dataTypeSize;
! private int typeModifier;
! private short formatCode;
!
! #endregion
!
! #region PROPERTIES
!
! public string FieldName
! {
! get { return fieldName; }
! set { fieldName = value; }
! }
!
! public int OidTable
! {
! get { return oidTable; }
! set { oidTable = value; }
! }
!
! public short OidNumber
! {
! get { return oidNumber; }
! set { oidNumber = value; }
! }
!
! public PgType DataType
! {
! get { return dataType; }
! set { dataType = value; }
! }
!
! public short DataTypeSize
! {
! get { return dataTypeSize; }
! set { dataTypeSize = value; }
! }
!
! public int TypeModifier
! {
! get { return typeModifier; }
! set { typeModifier = value; }
! }
!
! public short FormatCode
! {
! get { return formatCode; }
! set { formatCode = value; }
! }
!
! #endregion
!
! #region CONSTRUCTORS
!
! public PgFieldDescriptor()
! {
! }
!
! #endregion
! }
! }
--- 1,91 ----
! /* PgSqlClient - ADO.NET Data Provider for PostgreSQL 7.4+
! * Copyright (C) 2003 Carlos Guzmán Álvarez
! *
! * This library is free software; you can redistribute it and/or
! * modify it under the terms of the GNU Lesser General Public
! * License as published by the Free Software Foundation; either
! * version 2.1 of the License, or (at your option) any later version.
! *
! * This library is distributed in the hope that it will be useful,
! * but WITHOUT ANY WARRANTY; without even the implied warranty of
! * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
! * Lesser General Public License for more details.
! *
! * You should have received a copy of the GNU Lesser General Public
! * License along with this library; if not, write to the Free Software
! * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
! */
!
! using System;
!
! namespace PostgreSql.Data.NPgClient
! {
! internal class PgFieldDescriptor
! {
! #region Fields
!
! private string fieldName;
! private int oidTable;
! private short oidNumber;
! private PgType dataType;
! private short dataTypeSize;
! private int typeModifier;
! private short formatCode;
!
! #endregion
!
! #region Properties
!
! public string FieldName
! {
! get { return fieldName; }
! set { fieldName = value; }
! }
!
! public int OidTable
! {
! get { return oidTable; }
! set { oidTable = value; }
! }
!
! public short OidNumber
! {
! get { return oidNumber; }
! set { oidNumber = value; }
! }
!
! public PgType DataType
! {
! get { return dataType; }
! set { dataType = value; }
! }
!
! public short DataTypeSize
! {
! get { return dataTypeSize; }
! set { dataTypeSize = value; }
! }
!
! public int TypeModifier
! {
! get { return typeModifier; }
! set { typeModifier = value; }
! }
!
! public short FormatCode
! {
! get { return formatCode; }
! set { formatCode = value; }
! }
!
! #endregion
!
! #region Constructors
!
! public PgFieldDescriptor()
! {
! }
!
! #endregion
! }
! }
Index: PgOutputPacket.cs
===================================================================
RCS file: /cvsroot/pgsqlclient/pgsqlclient_10/PostgreSql.Data.PgSqlClient/source/NPgClient/PgOutputPacket.cs,v
retrieving revision 1.20
retrieving revision 1.21
diff -C2 -d -r1.20 -r1.21
*** PgOutputPacket.cs 21 Nov 2003 16:59:23 -0000 1.20
--- PgOutputPacket.cs 14 Dec 2003 15:07:13 -0000 1.21
***************
*** 1,488 ****
! /* PgSqlClient - ADO.NET Data Provider for PostgreSQL 7.4+
! * Copyright (C) 2003 Carlos Guzmán Álvarez
! *
! * This library is free software; you can redistribute it and/or
! * modify it under the terms of the GNU Lesser General Public
! * License as published by the Free Software Foundation; either
! * version 2.1 of the License, or (at your option) any later version.
! *
! * This library is distributed in the hope that it will be useful,
! * but WITHOUT ANY WARRANTY; without even the implied warranty of
! * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
! * Lesser General Public License for more details.
! *
! * You should have received a copy of the GNU Lesser General Public
! * License along with this library; if not, write to the Free Software
! * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
! */
!
! using System;
! using System.Data;
! using System.Net;
! using System.IO;
! using System.Text;
! using System.Globalization;
!
! using PostgreSql.Data.PgTypes;
!
! namespace PostgreSql.Data.NPgClient
! {
! internal class PgOutputPacket : BinaryWriter
! {
! #region FIELDS
!
! private Encoding encoding;
!
! #endregion
!
! #region PROPERTIES
!
! public long Position
! {
! get { return ((MemoryStream)BaseStream).Position; }
! }
!
! public long Length
! {
! get { return ((MemoryStream)BaseStream).Length; }
! }
!
! #endregion
!
! #region CONSTRUCTORS
!
! public PgOutputPacket() : base(new MemoryStream())
! {
! this.encoding = Encoding.Default;
! Write(new byte[0]);
! }
!
! public PgOutputPacket(Encoding encoding) : base(new MemoryStream(), encoding)
! {
! this.encoding = encoding;
! this.Write(new byte[0]);
! }
!
! #endregion
!
! #region STRING_TYPES_WRITE
!
! public void WriteString(string data)
! {
! if (!data.EndsWith(PgCodes.NULL_TERMINATOR.ToString()))
! {
! data += PgCodes.NULL_TERMINATOR;
! }
! this.Write(encoding.GetBytes(data));
! }
!
! #endregion
!
! #region NUMERIC_TYPES_WRITE
!
! public void WriteShort(short val)
! {
! this.Write((short)IPAddress.HostToNetworkOrder(val));
! }
!
! public void WriteInt(int val)
! {
! this.Write((int)IPAddress.HostToNetworkOrder(val));
! }
!
! public void WriteLong(long val)
! {
! this.Write((long)IPAddress.HostToNetworkOrder(val));
! }
!
! public void WriteFloat(float val)
! {
! FloatLayout floatValue = new FloatLayout();
!
! floatValue.f = val;
! floatValue.i0 = IPAddress.HostToNetworkOrder(floatValue.i0);
!
! this.Write(floatValue.f);
! }
!
! public void WriteDouble(double val)
! {
! DoubleLayout doubleValue = new DoubleLayout();
! int temp;
!
! doubleValue.d = val;
! doubleValue.i0 = IPAddress.HostToNetworkOrder(doubleValue.i0);
! doubleValue.i4 = IPAddress.HostToNetworkOrder(doubleValue.i4);
!
! temp = doubleValue.i0;
! doubleValue.i0 = doubleValue.i4;
! doubleValue.i4 = temp;
!
! this.Write(doubleValue.d);
! }
!
! #endregion
!
! #region DATE_TIME_WRITE
!
! public void WriteDate(DateTime date)
! {
! TimeSpan days = date.Subtract(PgCodes.BASE_DATE);
!
! this.WriteInt(days.Days);
! }
!
! public void WriteInterval(TimeSpan interval)
! {
! int months = (interval.Days / 30);
! int days = (interval.Days % 30);
!
! this.WriteDouble(interval.Subtract(TimeSpan.FromDays(months * 30)).TotalSeconds);
! this.WriteInt(months);
! }
!
! 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,
! time.Second,
! time.Millisecond);
!
! TimeSpan seconds = realTime.Subtract(PgCodes.BASE_DATE);
!
! this.WriteDouble(seconds.TotalSeconds);
! }
!
! public void WriteTimeWithTZ(DateTime time)
! {
! DateTime realTime = new DateTime(PgCodes.BASE_DATE.Year,
! PgCodes.BASE_DATE.Month,
! PgCodes.BASE_DATE.Day,
! time.Hour,
! time.Minute,
! time.Second,
! time.Millisecond);
!
! TimeSpan seconds = realTime.Subtract(PgCodes.BASE_DATE);
!
! this.WriteDouble(seconds.TotalSeconds);
! this.WriteInt((-1)*Int32.Parse(time.ToString("zz"))*3600);
! }
!
! public void WriteTimestamp(DateTime timestamp)
! {
! TimeSpan days = timestamp.Subtract(PgCodes.BASE_DATE);
!
! this.WriteDouble(days.TotalSeconds);
! }
!
! public void WriteTimestampWithTZ(DateTime timestamp)
! {
! this.WriteTimestamp(timestamp);
! }
!
! #endregion
!
! #region GEOMETRIC_TYPES_WRITE
!
! public void WritePoint(PgPoint point)
! {
! this.WriteDouble(point.X);
! this.WriteDouble(point.Y);
! }
!
! public void WriteCircle(PgCircle circle)
! {
! this.WritePoint(circle.Center);
! this.WriteDouble(circle.Radius);
! }
!
! public void WriteLine(PgLine line)
! {
! this.WritePoint(line.StartPoint);
! this.WritePoint(line.EndPoint);
! }
!
! public void WriteLSeg(PgLSeg lseg)
! {
! this.WritePoint(lseg.StartPoint);
! this.WritePoint(lseg.EndPoint);
! }
!
! public void WriteBox(PgBox box)
! {
! this.WritePoint(box.UpperRight);
! this.WritePoint(box.LowerLeft);
! }
!
! public void WritePolygon(PgPolygon polygon)
! {
! this.WriteInt(polygon.Points.Length);
! for (int i = 0; i < polygon.Points.Length; i++)
! {
! this.WritePoint(polygon.Points[i]);
! }
! }
!
! public void WritePath(PgPath path)
! {
! this.Write(path.IsClosedPath);
! this.WriteInt(path.Points.Length);
! for (int i = 0; i < path.Points.Length; i++)
! {
! this.WritePoint(path.Points[i]);
! }
! }
!
! #endregion
!
! #region PARAMETER_WRITE
!
! public void WriteParameter(PgParameter parameter)
! {
! int size = parameter.DataType.Size;
!
! if (parameter.Value == System.DBNull.Value ||
! parameter.Value == null)
! {
! // -1 indicates a NULL argument value
! this.WriteInt(-1);
! }
! else
! {
! if (parameter.DataType.DataType == PgDataType.Binary ||
! parameter.DataType.DataType == PgDataType.Array ||
! parameter.DataType.DataType == PgDataType.Vector)
! {
! // Handle this type as Array values
! System.Array array = (System.Array)parameter.Value;
!
! // Get array elements type info
! PgType elementType = PgDbClient.Types[parameter.DataType.ElementType];
! size = elementType.Size;
!
! // Create a new packet for write array parameter information
! PgOutputPacket packet = new PgOutputPacket();
!
! // Write the number of dimensions
! packet.WriteInt(array.Rank);
!
! // Write flags (always 0)
! packet.WriteInt(0);
!
! // Write base type of the array elements
! packet.WriteInt(parameter.DataType.ElementType);
!
! // Write lengths and lower bounds
! for (int i = 0; i < array.Rank; i ++)
! {
! packet.WriteInt(array.GetLength(i));
! packet.WriteInt(array.GetLowerBound(i) + 1);
! }
!
! // Write array values
! foreach (object element in array)
! {
! this.writeParameter(packet, elementType.DataType, size, element);
! }
!
! // Write parameter size
! this.WriteInt(packet.GetByteCount());
! // Write parameter data
! this.Write(packet.ToArray());
! }
! else
! {
! this.writeParameter(this, parameter.DataType.DataType, size, parameter.Value);
! }
! }
! }
!
! #endregion
!
! #region PRIVATE_METHODS
!
! private void writeParameter(PgOutputPacket packet, PgDataType dataType, int size, object value)
! {
! switch (dataType)
! {
! case PgDataType.Binary:
! packet.WriteInt(((byte[])value).Length);
! packet.Write((byte[])value);
! break;
!
! case PgDataType.Byte:
! packet.WriteInt(size);
! packet.Write((byte)value);
! break;
!
! case PgDataType.Int2:
! packet.WriteInt(size);
! packet.WriteShort(Convert.ToInt16(value));
! break;
!
! case PgDataType.Int4:
! packet.WriteInt(size);
! packet.WriteInt(Convert.ToInt32(value));
! break;
!
! case PgDataType.Int8:
! packet.WriteInt(size);
! packet.WriteLong(Convert.ToInt64(value));
! break;
!
! case PgDataType.Interval:
! packet.WriteInt(size);
! packet.WriteInterval(TimeSpan.Parse(value.ToString()));
! break;
!
! case PgDataType.Decimal:
! {
! string paramValue = value.ToString();
! packet.WriteInt(encoding.GetByteCount(paramValue));
! packet.Write(paramValue.ToCharArray());
! }
! break;
!
! case PgDataType.Double:
! packet.WriteInt(size);
! packet.WriteDouble(Convert.ToDouble(value));
! break;
!
! case PgDataType.Float:
! packet.WriteInt(size);
! packet.WriteFloat(Convert.ToSingle(value));
! break;
!
! case PgDataType.Currency:
! packet.WriteInt(size);
! packet.WriteInt(Convert.ToInt32(Convert.ToSingle(value)*100));
! break;
!
! case PgDataType.Date:
! packet.WriteInt(size);
! packet.WriteDate(Convert.ToDateTime(value));
! break;
!
! case PgDataType.Time:
! packet.WriteInt(size);
! packet.WriteTime(Convert.ToDateTime(value));
! break;
!
! case PgDataType.TimeWithTZ:
! packet.WriteInt(size);
! packet.WriteTimeWithTZ(Convert.ToDateTime(value));
! break;
!
! case PgDataType.Timestamp:
! packet.WriteInt(size);
! packet.WriteTimestamp(Convert.ToDateTime(value));
! break;
!
! case PgDataType.TimestampWithTZ:
! packet.WriteInt(size);
! packet.WriteTimestampWithTZ(Convert.ToDateTime(value));
! break;
!
! case PgDataType.Char:
! case PgDataType.VarChar:
! {
! string paramValue = value.ToString() + PgCodes.NULL_TERMINATOR;
! packet.WriteInt(encoding.GetByteCount(paramValue));
! packet.WriteString(paramValue);
! }
! break;
!
! case PgDataType.Point:
! packet.WriteInt(size);
! packet.WritePoint((PgPoint)value);
! break;
!
! case PgDataType.Circle:
! packet.WriteInt(size);
! packet.WriteCircle((PgCircle)value);
! break;
!
! case PgDataType.Line:
! packet.WriteInt(size);
! packet.WriteLine((PgLine)value);
! break;
!
! case PgDataType.LSeg:
! packet.WriteInt(size);
! packet.WriteLSeg((PgLSeg)value);
! break;
!
! case PgDataType.Box:
! packet.WriteInt(size);
! packet.WriteBox((PgBox)value);
! break;
!
! case PgDataType.Polygon:
! PgPolygon polygon = (PgPolygon)value;
!
! packet.WriteInt((size*polygon.Points.Length) + 4);
! packet.WritePolygon(polygon);
! break;
!
! case PgDataType.Path:
! PgPath path = (PgPath)value;
!
! packet.WriteInt((size*path.Points.Length) + 5);
! packet.WritePath(path);
! break;
! }
! }
!
! #endregion
!
! #region STREAM_METHODS
!
! public int GetByteCount()
! {
! return (int)((MemoryStream)BaseStream).Length;
! }
!
! public byte[] ToArray()
! {
! return ((MemoryStream)BaseStream).ToArray();
! }
!
! public void Reset()
! {
! ((MemoryStream)BaseStream).SetLength(0);
! ((MemoryStream)BaseStream).Position = 0;
! }
!
! #endregion
!
! #region PACKET_BYTES
!
! public byte[] GetSimplePacketBytes()
! {
! PgOutputPacket packet = new PgOutputPacket();
!
! // Write packet contents
! packet.WriteInt(GetByteCount() + 4);
! packet.Write(ToArray());
!
! return packet.ToArray();
! }
!
! public byte[] GetPacketBytes(char format)
! {
! PgOutputPacket packet = new PgOutputPacket();
!
! packet.Write((byte)format);
! packet.WriteInt(GetByteCount() + 4);
! packet.Write(ToArray());
!
! return packet.ToArray();
! }
!
! #endregion
! }
}
--- 1,488 ----
! /* PgSqlClient - ADO.NET Data Provider for PostgreSQL 7.4+
! * Copyright (C) 2003 Carlos Guzmán Álvarez
! *
! * This library is free software; you can redistribute it and/or
! * modify it under the terms of the GNU Lesser General Public
! * License as published by the Free Software Foundation; either
! * version 2.1 of the License, or (at your option) any later version.
! *
! * This library is distributed in the hope that it will be useful,
! * but WITHOUT ANY WARRANTY; without even the implied warranty of
! * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
! * Lesser General Public License for more details.
! *
! * You should have received a copy of the GNU Lesser General Public
! * License along with this library; if not, write to the Free Software
! * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
! */
!
! using System;
! using System.Data;
! using System.Net;
! using System.IO;
! using System.Text;
! using System.Globalization;
!
! using PostgreSql.Data.PgTypes;
!
! namespace PostgreSql.Data.NPgClient
! {
! internal class PgOutputPacket : BinaryWriter
! {
! #region Fields
!
! private Encoding encoding;
!
! #endregion
!
! #region Properties
!
! public long Position
! {
! get { return ((MemoryStream)BaseStream).Position; }
! }
!
! public long Length
! {
! get { return ((MemoryStream)BaseStream).Length; }
! }
!
! #endregion
!
! #region Constructors
!
! public PgOutputPacket() : base(new MemoryStream())
! {
! this.encoding = Encoding.Default;
! Write(new byte[0]);
! }
!
! public PgOutputPacket(Encoding encoding) : base(new MemoryStream(), encoding)
! {
! this.encoding = encoding;
! this.Write(new byte[0]);
! }
!
! #endregion
!
! #region STRING_TYPES_WRITE
!
! public void WriteString(string data)
! {
! if (!data.EndsWith(PgCodes.NULL_TERMINATOR.ToString()))
! {
! data += PgCodes.NULL_TERMINATOR;
! }
! this.Write(encoding.GetBytes(data));
! }
!
! #endregion
!
! #region NUMERIC_TYPES_WRITE
!
! public void WriteShort(short val)
! {
! this.Write((short)IPAddress.HostToNetworkOrder(val));
! }
!
! public void WriteInt(int val)
! {
! this.Write((int)IPAddress.HostToNetworkOrder(val));
! }
!
! public void WriteLong(long val)
! {
! this.Write((long)IPAddress.HostToNetworkOrder(val));
! }
!
! public void WriteFloat(float val)
! {
! FloatLayout floatValue = new FloatLayout();
!
! floatValue.f = val;
! floatValue.i0 = IPAddress.HostToNetworkOrder(floatValue.i0);
!
! this.Write(floatValue.f);
! }
!
! public void WriteDouble(double val)
! {
! DoubleLayout doubleValue = new DoubleLayout();
! int temp;
!
! doubleValue.d = val;
! doubleValue.i0 = IPAddress.HostToNetworkOrder(doubleValue.i0);
! doubleValue.i4 = IPAddress.HostToNetworkOrder(doubleValue.i4);
!
! temp = doubleValue.i0;
! doubleValue.i0 = doubleValue.i4;
! doubleValue.i4 = temp;
!
! this.Write(doubleValue.d);
! }
!
! #endregion
!
! #region DATE_TIME_WRITE
!
! public void WriteDate(DateTime date)
! {
! TimeSpan days = date.Subtract(PgCodes.BASE_DATE);
!
! this.WriteInt(days.Days);
! }
!
! public void WriteInterval(TimeSpan interval)
! {
! int months = (interval.Days / 30);
! int days = (interval.Days % 30);
!
! this.WriteDouble(interval.Subtract(TimeSpan.FromDays(months * 30)).TotalSeconds);
! this.WriteInt(months);
! }
!
! 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,
! time.Second,
! time.Millisecond);
!
! TimeSpan seconds = realTime.Subtract(PgCodes.BASE_DATE);
!
! this.WriteDouble(seconds.TotalSeconds);
! }
!
! public void WriteTimeWithTZ(DateTime time)
! {
! DateTime realTime = new DateTime(PgCodes.BASE_DATE.Year,
! PgCodes.BASE_DATE.Month,
! PgCodes.BASE_DATE.Day,
! time.Hour,
! time.Minute,
! time.Second,
! time.Millisecond);
!
! TimeSpan seconds = realTime.Subtract(PgCodes.BASE_DATE);
!
! this.WriteDouble(seconds.TotalSeconds);
! this.WriteInt((-1)*Int32.Parse(time.ToString("zz"))*3600);
! }
!
! public void WriteTimestamp(DateTime timestamp)
! {
! TimeSpan days = timestamp.Subtract(PgCodes.BASE_DATE);
!
! this.WriteDouble(days.TotalSeconds);
! }
!
! public void WriteTimestampWithTZ(DateTime timestamp)
! {
! this.WriteTimestamp(timestamp);
! }
!
! #endregion
!
! #region GEOMETRIC_TYPES_WRITE
!
! public void WritePoint(PgPoint point)
! {
! this.WriteDouble(point.X);
! this.WriteDouble(point.Y);
! }
!
! public void WriteCircle(PgCircle circle)
! {
! this.WritePoint(circle.Center);
! this.WriteDouble(circle.Radius);
! }
!
! public void WriteLine(PgLine line)
! {
! this.WritePoint(line.StartPoint);
! this.WritePoint(line.EndPoint);
! }
!
! public void WriteLSeg(PgLSeg lseg)
! {
! this.WritePoint(lseg.StartPoint);
! this.WritePoint(lseg.EndPoint);
! }
!
! public void WriteBox(PgBox box)
! {
! this.WritePoint(box.UpperRight);
! this.WritePoint(box.LowerLeft);
! }
!
! public void WritePolygon(PgPolygon polygon)
! {
! this.WriteInt(polygon.Points.Length);
! for (int i = 0; i < polygon.Points.Length; i++)
! {
! this.WritePoint(polygon.Points[i]);
! }
! }
!
! public void WritePath(PgPath path)
! {
! this.Write(path.IsClosedPath);
! this.WriteInt(path.Points.Length);
! for (int i = 0; i < path.Points.Length; i++)
! {
! this.WritePoint(path.Points[i]);
! }
! }
!
! #endregion
!
! #region PARAMETER_WRITE
!
! public void WriteParameter(PgParameter parameter)
! {
! int size = parameter.DataType.Size;
!
! if (parameter.Value == System.DBNull.Value ||
! parameter.Value == null)
! {
! // -1 indicates a NULL argument value
! this.WriteInt(-1);
! }
! else
! {
! if (parameter.DataType.DataType == PgDataType.Binary ||
! parameter.DataType.DataType == PgDataType.Array ||
! parameter.DataType.DataType == PgDataType.Vector)
! {
! // Handle this type as Array values
! System.Array array = (System.Array)parameter.Value;
!
! // Get array elements type info
! PgType elementType = PgDbClient.Types[parameter.DataType.ElementType];
! size = elementType.Size;
!
! // Create a new packet for write array parameter information
! PgOutputPacket packet = new PgOutputPacket();
!
! // Write the number of dimensions
! packet.WriteInt(array.Rank);
!
! // Write flags (always 0)
! packet.WriteInt(0);
!
! // Write base type of the array elements
! packet.WriteInt(parameter.DataType.ElementType);
!
! // Write lengths and lower bounds
! for (int i = 0; i < array.Rank; i ++)
! {
! packet.WriteInt(array.GetLength(i));
! packet.WriteInt(array.GetLowerBound(i) + 1);
! }
!
! // Write array values
! foreach (object element in array)
! {
! this.writeParameter(packet, elementType.DataType, size, element);
! }
!
! // Write parameter size
! this.WriteInt(packet.GetByteCount());
! // Write parameter data
! this.Write(packet.ToArray());
! }
! else
! {
! this.writeParameter(this, parameter.DataType.DataType, size, parameter.Value);
! }
! }
! }
!
! #endregion
!
! #region Private Methods
!
! private void writeParameter(PgOutputPacket packet, PgDataType dataType, int size, object value)
! {
! switch (dataType)
! {
! case PgDataType.Binary:
! packet.WriteInt(((byte[])value).Length);
! packet.Write((byte[])value);
! break;
!
! case PgDataType.Byte:
! packet.WriteInt(size);
! packet.Write((byte)value);
! break;
!
! case PgDataType.Int2:
! packet.WriteInt(size);
! packet.WriteShort(Convert.ToInt16(value));
! break;
!
! case PgDataType.Int4:
! packet.WriteInt(size);
! packet.WriteInt(Convert.ToInt32(value));
! break;
!
! case PgDataType.Int8:
! packet.WriteInt(size);
! packet.WriteLong(Convert.ToInt64(value));
! break;
!
! case PgDataType.Interval:
! packet.WriteInt(size);
! packet.WriteInterval(TimeSpan.Parse(value.ToString()));
! break;
!
! case PgDataType.Decimal:
! {
! string paramValue = value.ToString();
! packet.WriteInt(encoding.GetByteCount(paramValue));
! packet.Write(paramValue.ToCharArray());
! }
! break;
!
! case PgDataType.Double:
! packet.WriteInt(size);
! packet.WriteDouble(Convert.ToDouble(value));
! break;
!
! case PgDataType.Float:
! packet.WriteInt(size);
! packet.WriteFloat(Convert.ToSingle(value));
! break;
!
! case PgDataType.Currency:
! packet.WriteInt(size);
! packet.WriteInt(Convert.ToInt32(Convert.ToSingle(value)*100));
! break;
!
! case PgDataType.Date:
! packet.WriteInt(size);
! packet.WriteDate(Convert.ToDateTime(value));
! break;
!
! case PgDataType.Time:
! packet.WriteInt(size);
! packet.WriteTime(Convert.ToDateTime(value));
! break;
!
! case PgDataType.TimeWithTZ:
! packet.WriteInt(size);
! packet.WriteTimeWithTZ(Convert.ToDateTime(value));
! break;
!
! case PgDataType.Timestamp:
! packet.WriteInt(size);
! packet.WriteTimestamp(Convert.ToDateTime(value));
! break;
!
! case PgDataType.TimestampWithTZ:
! packet.WriteInt(size);
! packet.WriteTimestampWithTZ(Convert.ToDateTime(value));
! break;
!
! case PgDataType.Char:
! case PgDataType.VarChar:
! {
! string paramValue = value.ToString() + PgCodes.NULL_TERMINATOR;
! packet.WriteInt(encoding.GetByteCount(paramValue));
! packet.WriteString(paramValue);
! }
! break;
!
! case PgDataType.Point:
! packet.WriteInt(size);
! packet.WritePoint((PgPoint)value);
! break;
!
! case PgDataType.Circle:
! packet.WriteInt(size);
! packet.WriteCircle((PgCircle)value);
! break;
!
! case PgDataType.Line:
! packet.WriteInt(size);
! packet.WriteLine((PgLine)value);
! break;
!
! case PgDataType.LSeg:
! packet.WriteInt(size);
! packet.WriteLSeg((PgLSeg)value);
! break;
!
! case PgDataType.Box:
! packet.WriteInt(size);
! packet.WriteBox((PgBox)value);
! break;
!
! case PgDataType.Polygon:
! PgPolygon polygon = (PgPolygon)value;
!
! ...
[truncated message content] |
Update of /cvsroot/pgsqlclient/pgsqlclient_10/PostgreSql.Data.PgSqlClient/source
In directory sc8-pr-cvs1:/tmp/cvs-serv15570
Modified Files:
PgCommand.cs PgCommandBuilder.cs PgConnection.cs
PgConnectionPool.cs PgDataAdapter.cs PgDataReader.cs
PgDbConnection.cs PgError.cs PgErrorCollection.cs
PgException.cs PgParameter.cs PgParameterCollection.cs
PgTransaction.cs
Log Message:
2003-12-14 Carlos Guzmán Álvarez <car...@te...>
* Changed #region names in all source files.
Index: PgCommand.cs
===================================================================
RCS file: /cvsroot/pgsqlclient/pgsqlclient_10/PostgreSql.Data.PgSqlClient/source/PgCommand.cs,v
retrieving revision 1.22
retrieving revision 1.23
diff -C2 -d -r1.22 -r1.23
*** PgCommand.cs 6 Dec 2003 12:01:14 -0000 1.22
--- PgCommand.cs 14 Dec 2003 15:06:50 -0000 1.23
***************
*** 1,750 ****
! /* PgSqlClient - ADO.NET Data Provider for PostgreSQL 7.4+
! * Copyright (C) 2003 Carlos Guzmán Álvarez
! *
! * This library is free software; you can redistribute it and/or
! * modify it under the terms of the GNU Lesser General Public
! * License as published by the Free Software Foundation; either
! * version 2.1 of the License, or (at your option) any later version.
! *
! * This library is distributed in the hope that it will be useful,
! * but WITHOUT ANY WARRANTY; without even the implied warranty of
[...1471 lines suppressed...]
! int count = 0;
! for (int i = 0; i < matches.Count; i++)
! {
! if (matches[i].Value.Trim() != String.Empty)
! {
! this.commands[count] = matches[i].Value.Trim();
! count++;
! }
! }
! }
! else
! {
! this.commands = new string[]{this.commandText};
! }
! }
! }
!
! #endregion
! }
}
Index: PgCommandBuilder.cs
===================================================================
RCS file: /cvsroot/pgsqlclient/pgsqlclient_10/PostgreSql.Data.PgSqlClient/source/PgCommandBuilder.cs,v
retrieving revision 1.13
retrieving revision 1.14
diff -C2 -d -r1.13 -r1.14
*** PgCommandBuilder.cs 19 Nov 2003 15:19:19 -0000 1.13
--- PgCommandBuilder.cs 14 Dec 2003 15:06:50 -0000 1.14
***************
*** 1,781 ****
! /* PgSqlClient - ADO.NET Data Provider for PostgreSQL 7.4+
! * Copyright (C) 2003 Carlos Guzmán Álvarez
! *
! * This library is free software; you can redistribute it and/or
! * modify it under the terms of the GNU Lesser General Public
! * License as published by the Free Software Foundation; either
! * version 2.1 of the License, or (at your option) any later version.
! *
! * This library is distributed in the hope that it will be useful,
! * but WITHOUT ANY WARRANTY; without even the implied warranty of
[...1533 lines suppressed...]
! e.Status = UpdateStatus.Continue;
! }
! }
! catch (Exception exception)
! {
! e.Errors = exception;
! e.Status = UpdateStatus.ErrorsOccurred;
! }
! finally
! {
! if (mustClose)
! {
! dataAdapter.SelectCommand.Connection.Close();
! }
! }
! }
!
! #endregion
! }
! }
Index: PgConnection.cs
===================================================================
RCS file: /cvsroot/pgsqlclient/pgsqlclient_10/PostgreSql.Data.PgSqlClient/source/PgConnection.cs,v
retrieving revision 1.9
retrieving revision 1.10
diff -C2 -d -r1.9 -r1.10
*** PgConnection.cs 24 Nov 2003 16:38:58 -0000 1.9
--- PgConnection.cs 14 Dec 2003 15:06:50 -0000 1.10
***************
*** 1,659 ****
! /* PgSqlClient - ADO.NET Data Provider for PostgreSQL 7.4+
! * Copyright (C) 2003 Carlos Guzmán Álvarez
! *
! * This library is free software; you can redistribute it and/or
! * modify it under the terms of the GNU Lesser General Public
! * License as published by the Free Software Foundation; either
! * version 2.1 of the License, or (at your option) any later version.
! *
! * This library is distributed in the hope that it will be useful,
! * but WITHOUT ANY WARRANTY; without even the implied warranty of
[...1289 lines suppressed...]
! X509CertificateCollection clientCertificates,
! X509Certificate serverCertificate,
! string targetHost,
! X509CertificateCollection serverRequestedCertificates)
! {
! if (this.ClientCertSelection != null)
! {
! return this.ClientCertSelection(
! clientCertificates,
! serverCertificate,
! targetHost,
! serverRequestedCertificates);
! }
!
! return null;
! }
!
! #endregion
! }
! }
Index: PgConnectionPool.cs
===================================================================
RCS file: /cvsroot/pgsqlclient/pgsqlclient_10/PostgreSql.Data.PgSqlClient/source/PgConnectionPool.cs,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -C2 -d -r1.1.1.1 -r1.2
*** PgConnectionPool.cs 2 Aug 2003 19:43:00 -0000 1.1.1.1
--- PgConnectionPool.cs 14 Dec 2003 15:06:50 -0000 1.2
***************
*** 1,238 ****
! /* PgSqlClient - ADO.NET Data Provider for PostgreSQL 7.4+
! * Copyright (C) 2003 Carlos Guzmán Álvarez
! *
! * This library is free software; you can redistribute it and/or
! * modify it under the terms of the GNU Lesser General Public
! * License as published by the Free Software Foundation; either
! * version 2.1 of the License, or (at your option) any later version.
! *
! * This library is distributed in the hope that it will be useful,
! * but WITHOUT ANY WARRANTY; without even the implied warranty of
! * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
! * Lesser General Public License for more details.
! *
! * You should have received a copy of the GNU Lesser General Public
! * License along with this library; if not, write to the Free Software
! * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
! */
!
! using System;
! using System.Data;
! 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
!
! #region METHODS
!
! public static void Initialize()
! {
! 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);
! }
!
! #endregion
! }
!
! internal class PgPoolManager
! {
! #region FIELDS
!
! private ArrayList locked;
! private ArrayList unlocked;
! private Thread cleanUpThread;
!
! #endregion
!
! #region CONSTRUCTORS
!
! public PgPoolManager()
! {
! locked = ArrayList.Synchronized(new ArrayList());
! unlocked = ArrayList.Synchronized(new ArrayList());
!
! cleanUpThread = new Thread(new ThreadStart(RunCleanUp));
! cleanUpThread.Name = "CleanUp Thread";
! cleanUpThread.Start();
! cleanUpThread.IsBackground = true;
! }
!
! #endregion
!
! #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))
! {
! if (connection.Lifetime != 0)
! {
! if ((now - connection.Created) > connection.Lifetime)
! {
! unlocked.Remove(connection);
! Expire(connection);
! }
! else
! {
! unlocked.Remove(connection);
! locked.Add(connection);
!
! return(connection);
! }
! }
! else
! {
! unlocked.Remove(connection);
! locked.Add(connection);
!
! return(connection);
! }
! }
! else
! {
! unlocked.Remove(connection);
! Expire(connection);
! }
! }
! }
!
! newConnection = Create(connectionString);
! newConnection.Created = System.DateTime.Now.Ticks;
!
! locked.Add(newConnection);
! }
!
! return(newConnection);
! }
!
! public void CheckIn(PgDbConnection connection)
! {
! lock (typeof(PgDbConnection))
! {
! connection.Created = System.DateTime.Now.Ticks;
!
! locked.Remove(connection);
! unlocked.Add(connection);
! }
! }
!
! private void RunCleanUp()
! {
! TimeSpan interval = new TimeSpan(0, 0, 10);
!
! while (true)
! {
! CleanUp(null);
!
! Thread.Sleep(interval);
! }
! }
!
! private PgDbConnection Create(string connectionString)
! {
! try
! {
! PgDbConnection connection = new PgDbConnection(connectionString);
! connection.Connect();
! connection.Pooled = true;
!
! return connection;
! }
! catch (PgClientException ex)
! {
! throw ex;
! }
! }
!
! private bool Validate(PgDbConnection connection, string connectionString)
! {
! try
! {
! return (connection.ConnectionString == connectionString &&
! connection.VerifyConnection());
! }
! catch (Exception ex)
! {
! throw ex;
! }
! }
!
! private void Expire(PgDbConnection connection)
! {
! try
! {
! if (connection.VerifyConnection())
! {
! connection.Disconnect();
! }
! }
! catch (Exception)
! {
! throw new PgException("Error closing database connection.");
! }
! }
!
! private void CleanUp(object State)
! {
! long now = System.DateTime.Now.Ticks;
!
! lock (unlocked.SyncRoot)
! {
! 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)
! {
! if ((now - connection.Created) > connection.Lifetime)
! {
! unlocked.Remove(connection);
! Expire(connection);
! }
! }
! }
! }
! }
! }
!
! #endregion
! }
! }
--- 1,238 ----
! /* PgSqlClient - ADO.NET Data Provider for PostgreSQL 7.4+
! * Copyright (C) 2003 Carlos Guzmán Álvarez
! *
! * This library is free software; you can redistribute it and/or
! * modify it under the terms of the GNU Lesser General Public
! * License as published by the Free Software Foundation; either
! * version 2.1 of the License, or (at your option) any later version.
! *
! * This library is distributed in the hope that it will be useful,
! * but WITHOUT ANY WARRANTY; without even the implied warranty of
! * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
! * Lesser General Public License for more details.
! *
! * You should have received a copy of the GNU Lesser General Public
! * License along with this library; if not, write to the Free Software
! * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
! */
!
! using System;
! using System.Data;
! 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
!
! #region Methods
!
! public static void Initialize()
! {
! 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);
! }
!
! #endregion
! }
!
! internal class PgPoolManager
! {
! #region Fields
!
! private ArrayList locked;
! private ArrayList unlocked;
! private Thread cleanUpThread;
!
! #endregion
!
! #region Constructors
!
! public PgPoolManager()
! {
! locked = ArrayList.Synchronized(new ArrayList());
! unlocked = ArrayList.Synchronized(new ArrayList());
!
! cleanUpThread = new Thread(new ThreadStart(RunCleanUp));
! cleanUpThread.Name = "CleanUp Thread";
! cleanUpThread.Start();
! cleanUpThread.IsBackground = true;
! }
!
! #endregion
!
! #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))
! {
! if (connection.Lifetime != 0)
! {
! if ((now - connection.Created) > connection.Lifetime)
! {
! unlocked.Remove(connection);
! Expire(connection);
! }
! else
! {
! unlocked.Remove(connection);
! locked.Add(connection);
!
! return(connection);
! }
! }
! else
! {
! unlocked.Remove(connection);
! locked.Add(connection);
!
! return(connection);
! }
! }
! else
! {
! unlocked.Remove(connection);
! Expire(connection);
! }
! }
! }
!
! newConnection = Create(connectionString);
! newConnection.Created = System.DateTime.Now.Ticks;
!
! locked.Add(newConnection);
! }
!
! return(newConnection);
! }
!
! public void CheckIn(PgDbConnection connection)
! {
! lock (typeof(PgDbConnection))
! {
! connection.Created = System.DateTime.Now.Ticks;
!
! locked.Remove(connection);
! unlocked.Add(connection);
! }
! }
!
! private void RunCleanUp()
! {
! TimeSpan interval = new TimeSpan(0, 0, 10);
!
! while (true)
! {
! CleanUp(null);
!
! Thread.Sleep(interval);
! }
! }
!
! private PgDbConnection Create(string connectionString)
! {
! try
! {
! PgDbConnection connection = new PgDbConnection(connectionString);
! connection.Connect();
! connection.Pooled = true;
!
! return connection;
! }
! catch (PgClientException ex)
! {
! throw ex;
! }
! }
!
! private bool Validate(PgDbConnection connection, string connectionString)
! {
! try
! {
! return (connection.ConnectionString == connectionString &&
! connection.VerifyConnection());
! }
! catch (Exception ex)
! {
! throw ex;
! }
! }
!
! private void Expire(PgDbConnection connection)
! {
! try
! {
! if (connection.VerifyConnection())
! {
! connection.Disconnect();
! }
! }
! catch (Exception)
! {
! throw new PgException("Error closing database connection.");
! }
! }
!
! private void CleanUp(object State)
! {
! long now = System.DateTime.Now.Ticks;
!
! lock (unlocked.SyncRoot)
! {
! 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)
! {
! if ((now - connection.Created) > connection.Lifetime)
! {
! unlocked.Remove(connection);
! Expire(connection);
! }
! }
! }
! }
! }
! }
!
! #endregion
! }
! }
Index: PgDataAdapter.cs
===================================================================
RCS file: /cvsroot/pgsqlclient/pgsqlclient_10/PostgreSql.Data.PgSqlClient/source/PgDataAdapter.cs,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** PgDataAdapter.cs 19 Nov 2003 15:19:19 -0000 1.3
--- PgDataAdapter.cs 14 Dec 2003 15:06:50 -0000 1.4
***************
*** 1,223 ****
! /* PgSqlClient - ADO.NET Data Provider for PostgreSQL 7.4+
! * Copyright (C) 2003 Carlos Guzmán Álvarez
! *
! * This library is free software; you can redistribute it and/or
! * modify it under the terms of the GNU Lesser General Public
! * License as published by the Free Software Foundation; either
! * version 2.1 of the License, or (at your option) any later version.
! *
! * This library is distributed in the hope that it will be useful,
! * but WITHOUT ANY WARRANTY; without even the implied warranty of
! * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
! * Lesser General Public License for more details.
! *
! * You should have received a copy of the GNU Lesser General Public
! * License along with this library; if not, write to the Free Software
! * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
! */
!
! using System;
! using System.Data;
! using System.Drawing;
! using System.Data.Common;
! using System.ComponentModel;
! 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
!
! [ToolboxItem(true),
! ToolboxBitmap(typeof(PgDataAdapter), "Resources.ToolBox.PgDataAdapter.bmp"),
! DefaultEvent("RowUpdated")]
! public sealed class PgDataAdapter : DbDataAdapter, IDbDataAdapter
! {
! #region EVENTS
!
! private static readonly object EventRowUpdated = new object();
! private static readonly object EventRowUpdating = new object();
!
! #endregion
!
! #region FIELDS
!
! private PgCommand selectCommand;
! private PgCommand insertCommand;
! private PgCommand updateCommand;
! private PgCommand deleteCommand;
! private bool disposed;
!
! #endregion
!
! #region PROPERTIES
!
! IDbCommand IDbDataAdapter.SelectCommand
! {
! get { return selectCommand; }
! set { selectCommand = (PgCommand)value; }
! }
!
! IDbCommand IDbDataAdapter.InsertCommand
! {
! get { return insertCommand; }
! set { insertCommand = (PgCommand)value; }
! }
!
! IDbCommand IDbDataAdapter.UpdateCommand
! {
! get { return updateCommand; }
! set { updateCommand = (PgCommand)value; }
! }
!
! IDbCommand IDbDataAdapter.DeleteCommand
! {
! get { return deleteCommand; }
! set { deleteCommand = (PgCommand)value; }
! }
!
! [Category("DataCategory_Update"), DefaultValue(null)]
! public PgCommand SelectCommand
! {
! get { return selectCommand; }
! set { selectCommand = value; }
! }
!
! [Category("DataCategory_Update"), DefaultValue(null)]
! public PgCommand InsertCommand
! {
! get { return insertCommand; }
! set { insertCommand = value; }
! }
!
! [Category("DataCategory_Fill"), DefaultValue(null)]
! public PgCommand UpdateCommand
! {
! get { return updateCommand; }
! set { updateCommand = value; }
! }
!
! [Category("DataCategory_Update"), DefaultValue(null)]
! public PgCommand DeleteCommand
! {
! get { return deleteCommand; }
! set { deleteCommand = value; }
! }
!
! #endregion
!
! #region CONSTRUCTORS
!
! public PgDataAdapter() : base()
! {
! GC.SuppressFinalize(this);
! }
!
! 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));
! }
!
! #endregion
!
! #region DISPOSE_METHODS
!
! protected override void Dispose(bool disposing)
! {
! if (!disposed)
! {
! try
! {
! if (disposing)
! {
! if (selectCommand != null)
! {
! selectCommand.Dispose();
! }
! if (insertCommand != null)
! {
! insertCommand.Dispose();
! }
! if (updateCommand != null)
! {
! updateCommand.Dispose();
! }
! }
!
! // release any unmanaged resources
!
! disposed = true;
! }
! finally
! {
! base.Dispose(disposing);
! }
! }
! }
!
! #endregion
!
! #region METHODS
!
! public event PgRowUpdatedEventHandler RowUpdated
! {
! add { Events.AddHandler(EventRowUpdated, value); }
! remove { Events.RemoveHandler(EventRowUpdated, value); }
! }
!
! [Category("DataCategory_Update")]
! public event PgRowUpdatingEventHandler RowUpdating
! {
! add { Events.AddHandler(EventRowUpdating, value); }
! remove { Events.RemoveHandler(EventRowUpdating, value); }
! }
!
! #endregion
!
! #region PROTECTED_METHODS
!
! 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);
! }
! }
!
! 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);
! }
! }
!
! #endregion
! }
! }
--- 1,223 ----
! /* PgSqlClient - ADO.NET Data Provider for PostgreSQL 7.4+
! * Copyright (C) 2003 Carlos Guzmán Álvarez
! *
! * This library is free software; you can redistribute it and/or
! * modify it under the terms of the GNU Lesser General Public
! * License as published by the Free Software Foundation; either
! * version 2.1 of the License, or (at your option) any later version.
! *
! * This library is distributed in the hope that it will be useful,
! * but WITHOUT ANY WARRANTY; without even the implied warranty of
! * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
! * Lesser General Public License for more details.
! *
! * You should have received a copy of the GNU Lesser General Public
! * License along with this library; if not, write to the Free Software
! * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
! */
!
! using System;
! using System.Data;
! using System.Drawing;
! using System.Data.Common;
! using System.ComponentModel;
! 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
!
! [ToolboxItem(true),
! ToolboxBitmap(typeof(PgDataAdapter), "Resources.ToolBox.PgDataAdapter.bmp"),
! DefaultEvent("RowUpdated")]
! public sealed class PgDataAdapter : DbDataAdapter, IDbDataAdapter
! {
! #region Events
!
! private static readonly object EventRowUpdated = new object();
! private static readonly object EventRowUpdating = new object();
!
! #endregion
!
! #region Fields
!
! private PgCommand selectCommand;
! private PgCommand insertCommand;
! private PgCommand updateCommand;
! private PgCommand deleteCommand;
! private bool disposed;
!
! #endregion
!
! #region Properties
!
! IDbCommand IDbDataAdapter.SelectCommand
! {
! get { return selectCommand; }
! set { selectCommand = (PgCommand)value; }
! }
!
! IDbCommand IDbDataAdapter.InsertCommand
! {
! get { return insertCommand; }
! set { insertCommand = (PgCommand)value; }
! }
!
! IDbCommand IDbDataAdapter.UpdateCommand
! {
! get { return updateCommand; }
! set { updateCommand = (PgCommand)value; }
! }
!
! IDbCommand IDbDataAdapter.DeleteCommand
! {
! get { return deleteCommand; }
! set { deleteCommand = (PgCommand)value; }
! }
!
! [Category("DataCategory_Update"), DefaultValue(null)]
! public PgCommand SelectCommand
! {
! get { return selectCommand; }
! set { selectCommand = value; }
! }
!
! [Category("DataCategory_Update"), DefaultValue(null)]
! public PgCommand InsertCommand
! {
! get { return insertCommand; }
! set { insertCommand = value; }
! }
!
! [Category("DataCategory_Fill"), DefaultValue(null)]
! public PgCommand UpdateCommand
! {
! get { return updateCommand; }
! set { updateCommand = value; }
! }
!
! [Category("DataCategory_Update"), DefaultValue(null)]
! public PgCommand DeleteCommand
! {
! get { return deleteCommand; }
! set { deleteCommand = value; }
! }
!
! #endregion
!
! #region Constructors
!
! public PgDataAdapter() : base()
! {
! GC.SuppressFinalize(this);
! }
!
! 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));
! }
!
! #endregion
!
! #region DISPOSE_METHODS
!
! protected override void Dispose(bool disposing)
! {
! if (!disposed)
! {
! try
! {
! if (disposing)
! {
! if (selectCommand != null)
! {
! selectCommand.Dispose();
! }
! if (insertCommand != null)
! {
! insertCommand.Dispose();
! }
! if (updateCommand != null)
! {
! updateCommand.Dispose();
! }
! }
!
! // release any unmanaged resources
!
! disposed = true;
! }
! finally
! {
! base.Dispose(disposing);
! }
! }
! }
!
! #endregion
!
! #region Methods
!
! public event PgRowUpdatedEventHandler RowUpdated
! {
! add { Events.AddHandler(EventRowUpdated, value); }
! remove { Events.RemoveHandler(EventRowUpdated, value); }
! }
!
! [Category("DataCategory_Update")]
! public event PgRowUpdatingEventHandler RowUpdating
! {
! add { Events.AddHandler(EventRowUpdating, value); }
! remove { Events.RemoveHandler(EventRowUpdating, value); }
! }
!
! #endregion
!
! #region Protected Methods
!
! 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);
! }
! }
!
! 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);
! }
! }
!
! #endregion
! }
! }
Index: PgDataReader.cs
===================================================================
RCS file: /cvsroot/pgsqlclient/pgsqlclient_10/PostgreSql.Data.PgSqlClient/source/PgDataReader.cs,v
retrieving revision 1.14
retrieving revision 1.15
diff -C2 -d -r1.14 -r1.15
*** PgDataReader.cs 20 Nov 2003 17:34:42 -0000 1.14
--- PgDataReader.cs 14 Dec 2003 15:06:50 -0000 1.15
***************
*** 1,839 ****
! /* PgSqlClient - ADO.NET Data Provider for PostgreSQL 7.4+
! * Copyright (C) 2003 Carlos Guzmán Álvarez
! *
! * This library is free software; you can redistribute it and/or
! * modify it under the terms of the GNU Lesser General Public
! * License as published by the Free Software Foundation; either
! * version 2.1 of the License, or (at your option) any later version.
! *
! * This library is distributed in the hope that it will be useful,
! * but WITHOUT ANY WARRANTY; without even the implied warranty of
[...1649 lines suppressed...]
! recordsAffected += command.Statement.RecordsAffected;
! }
! }
! }
!
! private bool cultureAwareCompare(string strA, string strB)
! {
! try
! {
! return CultureInfo.CurrentCulture.CompareInfo.Compare(strA, strB, CompareOptions.IgnoreKanaType | CompareOptions.IgnoreWidth | CompareOptions.IgnoreCase) == 0 ? true : false;
! }
! catch (Exception)
! {
! return strA.ToUpper() == strB.ToUpper() ? true : false;
! }
! }
!
! #endregion
! }
}
Index: PgDbConnection.cs
===================================================================
RCS file: /cvsroot/pgsqlclient/pgsqlclient_10/PostgreSql.Data.PgSqlClient/source/PgDbConnection.cs,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** PgDbConnection.cs 9 Oct 2003 15:46:23 -0000 1.3
--- PgDbConnection.cs 14 Dec 2003 15:06:50 -0000 1.4
***************
*** 1,219 ****
! /* PgSqlClient - ADO.NET Data Provider for PostgreSQL 7.4+
! * Copyright (C) 2003 Carlos Guzmán Álvarez
! *
! * This library is free software; you can redistribute it and/or
! * modify it under the terms of the GNU Lesser General Public
! * License as published by the Free Software Foundation; either
! * version 2.1 of the License, or (at your option) any later version.
! *
! * This library is distributed in the hope that it will be useful,
! * but WITHOUT ANY WARRANTY; without even the implied warranty of
! * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
! * Lesser General Public License for more details.
! *
! * You should have received a copy of the GNU Lesser General Public
! * License along with this library; if not, write to the Free Software
! * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
! */
!
! using System;
! using System.Text;
! using System.Collections;
! 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;
! private bool pooled;
! private Regex search;
!
! #endregion
!
! #region PROPERTIES
!
! public PgDbClient DB
! {
! get { return db; }
! }
!
! public string ConnectionString
! {
! get { return connectionString; }
! }
!
! public long Lifetime
! {
! get { return lifetime; }
! }
! public long Created
! {
! get { return created; }
! set { created = value; }
! }
!
! public bool Pooled
! {
! get { return pooled; }
! set { pooled = value; }
! }
!
! public PgConnectionParams Settings
! {
! get { return settings; }
! }
!
! #endregion
!
! #region CONSTRUCTORS
!
! private PgDbConnection()
! {
! settings = new PgConnectionParams();
! search = new Regex(@"([\w\s\d]*)\s*=\s*([^;]*)");
!
! connectionString = String.Empty;
! lifetime = 0;
! created = 0;
! pooled = true;
! }
!
! public PgDbConnection(string connectionString) : this()
! {
! this.connectionString = connectionString;
! parseConnectionString();
! }
!
! #endregion
!
! #region METHODS
!
! public void Connect()
! {
! try
! {
! db = new PgDbClient(settings);
! db.Connect();
! }
! catch (PgClientException ex)
! {
! throw new PgException(ex.Message, ex);
! }
! }
!
! public void Disconnect()
! {
! try
! {
! db.Disconnect();
! }
! catch (PgClientException ex)
! {
! throw new PgException(ex.Message, ex);
! }
! }
!
! private void parseConnectionString()
! {
! MatchCollection elements = search.Matches(connectionString);
!
! foreach (Match element in elements)
! {
! if (element.Groups[2].Value.Trim().Length > 0)
! {
! switch (element.Groups[1].Value.Trim().ToLower())
! {
! case "datasource":
! case "server":
! case "host":
! settings.ServerName = element.Groups[2].Value.Trim();
! break;
!
! case "database":
! settings.Database = element.Groups[2].Value.Trim();
! break;
!
! case "user name":
! case "user":
! settings.UserName = element.Groups[2].Value.Trim();
! break;
!
! case "user password":
! case "password":
! settings.UserPassword = element.Groups[2].Value.Trim();
! break;
!
! case "port":
! settings.ServerPort = Int32.Parse(element.Groups[2].Value.Trim());
! break;
!
! case "connection lifetime":
! lifetime = Int32.Parse(element.Groups[2].Value.Trim());
! break;
!
! case "timeout":
! case "connection timeout":
! settings.Timeout = Int32.Parse(element.Groups[2].Value.Trim());
! break;
!
! case "packet size":
! settings.PacketSize = Int32.Parse(element.Groups[2].Value.Trim());
! break;
!
! case "pooling":
! settings.Pooling = Boolean.Parse(element.Groups[2].Value.Trim());
! break;
!
! case "ssl":
! settings.SSL = Boolean.Parse(element.Groups[2].Value.Trim());
! break;
! }
! }
! }
!
! if (settings.UserName == String.Empty || settings.ServerName == String.Empty || settings.ServerPort == 0)
! {
! throw new ArgumentException("An invalid connection string argument has been supplied or a required connection string argument has not been supplied.");
! }
! else
! {
! if (settings.PacketSize < 512 || settings.PacketSize > 32767)
! {
! StringBuilder msg = new StringBuilder();
!
! msg.AppendFormat("'Packet Size' value of {0} is not valid.\r\nThe value should be an integer >= 512 and <= 32767.", settings.PacketSize);
!
! throw new ArgumentException(msg.ToString());
! }
! }
! }
!
! internal bool VerifyConnection()
! {
! bool isValid = true;
!
! try
! {
! // Try to send a Sync message to the PostgreSQL Server
! this.db.Sync();
! }
! catch (Exception)
! {
! isValid = false;
! }
!
! return isValid;
! }
!
! #endregion
! }
}
--- 1,219 ----
! /* PgSqlClient - ADO.NET Data Provider for PostgreSQL 7.4+
! * Copyright (C) 2003 Carlos Guzmán Álvarez
! *
! * This library is free software; you can redistribute it and/or
! * modify it under the terms of the GNU Lesser General Public
! * License as published by the Free Software Foundation; either
! * version 2.1 of the License, or (at your option) any later version.
! *
! * This library is distributed in the hope that it will be useful,
! * but WITHOUT ANY WARRANTY; without even the implied warranty of
! * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
! * Lesser General Public License for more details.
! *
! * You should have received a copy of the GNU Lesser General Public
! * License along with this library; if not, write to the Free Software
! * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
! */
!
! using System;
! using System.Text;
! using System.Collections;
! 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;
! private bool pooled;
! private Regex search;
!
! #endregion
!
! #region Properties
!
! public PgDbClient DB
! {
! get { return db; }
! }
!
! public string ConnectionString
! {
! get { return connectionString; }
! }
!
! public long Lifetime
! {
! get { return lifetime; }
! }
! public long Created
! {
! get { return created; }
! set { created = value; }
! }
!
! public bool Pooled
! {
! get { return pooled; }
! set { pooled = value; }
! }
!
! public PgConnectionParams Settings
! {
! get { return settings; }
! }
!
! #endregion
!
! #region Constructors
!
! private PgDbConnection()
! {
! settings = new PgConnectionParams();
! search = new Regex(@"([\w\s\d]*)\s*=\s*([^;]*)");
!
! connectionString = String.Empty;
! lifetime = 0;
! created = 0;
! pooled = true;
! }
!
! public PgDbConnection(string connectionString) : this()
! {
! this.connectionString = connectionString;
! parseConnectionString();
! }
!
! #endregion
!
! #region Methods
!
! public void Connect()
! {
! try
! {
! db = new PgDbClient(settings);
! db.Connect();
! }
! catch (PgClientException ex)
! {
! throw new PgException(ex.Message, ex);
! }
! }
!
! public void Disconnect()
! {
! try
! {
! db.Disconnect();
! }
! catch (PgClientException ex)
! {
! throw new PgException(ex.Message, ex);
! }
! }
!
! private void parseConnectionString()
! {
! MatchCollection elements = search.Matches(connectionString);
!
! foreach (Match element in elements)
! {
! if (element.Groups[2].Value.Trim().Length > 0)
! {
! switch (element.Groups[1].Value.Trim().ToLower())
! {
! case "datasource":
! case "server":
! case "host":
! settings.ServerName = element.Groups[2].Value.Trim();
! break;
!
! case "database":
! settings.Database = element.Groups[2].Value.Trim();
! break;
!
! case "user name":
! case "user":
! settings.UserName = element.Groups[2].Value.Trim();
! break;
!
! case "user password":
! case "password":
! settings.UserPassword = element.Groups[2].Value.Trim();
! break;
!
! case "port":
! settings.ServerPort = Int32.Parse(element.Groups[2].Value.Trim());
! break;
!
! case "connection lifetime":
! lifetime = Int32.Parse(element.Groups[2].Value.Trim());
! break;
!
! case "timeout":
! case "connection timeout":
! settings.Timeout = Int32.Parse(element.Groups[2].Value.Trim());
! break;
!
! case "packet size":
! settings.PacketSize = Int32.Parse(element.Groups[2].Value.Trim());
! break;
!
! case "pooling":
! settings.Pooling = Boolean.Parse(element.Groups[2].Value.Trim());
! break;
!
! case "ssl":
! settings.SSL = Boolean.Parse(element.Groups[2].Value.Trim());
! break;
! }
! }
! }
!
! if (settings.UserName == String.Empty || settings.ServerName == String.Empty || settings.ServerPort == 0)
! {
! throw new ArgumentException("An invalid connection string argument has been supplied or a required connection string argument has not been supplied.");
! }
! else
! {
! if (settings.PacketSize < 512 || settings.PacketSize > 32767)
! {
! StringBuilder msg = new StringBuilder();
!
! msg.AppendFormat("'Packet Size' value of {0} is not valid.\r\nThe value should be an integer >= 512 and <= 32767.", settings.PacketSize);
!
! throw new ArgumentException(msg.ToString());
! }
! }
! }
!
! internal bool VerifyConnection()
! {
! bool isValid = true;
!
! try
! {
! // Try to send a Sync message to the PostgreSQL Server
! this.db.Sync();
! }
! catch (Exception)
! {
! isValid = false;
! }
!
! return isValid;
! }
!
! #endregion
! }
}
Index: PgError.cs
===================================================================
RCS file: /cvsroot/pgsqlclient/pgsqlclient_10/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 2 Aug 2003 19:43:01 -0000 1.1.1.1
--- PgError.cs 14 Dec 2003 15:06:50 -0000 1.2
***************
*** 1,125 ****
! /* PgSqlClient - ADO.NET Data Provider for PostgreSQL 7.4+
! * Copyright (C) 2003 Carlos Guzmán Álvarez
! *
! * This library is free software; you can redistribute it and/or
! * modify it under the terms of the GNU Lesser General Public
! * License as published by the Free Software Foundation; either
! * version 2.1 of the License, or (at your option) any later version.
! *
! * This library is distributed in the hope that it will be useful,
! * but WITHOUT ANY WARRANTY; without even the implied warranty of
! * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
! * Lesser General Public License for more details.
! *
! * You should have received a copy of the GNU Lesser General Public
! * License along with this library; if not, write to the Free Software
! * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
! */
!
! using System;
!
! namespace PostgreSql.Data.PgSqlClient
! {
! [Serializable]
! public sealed class PgError
! {
! #region FIELDS
!
! private string severity;
! private string code;
! private string message;
! private string detail;
! private string hint;
! private string where;
! private string position;
! private string file;
! private int line;
! private string routine;
!
! #endregion
!
! #region PROPERTIES
!
! public string Severity
! {
! get { return severity; }
! set { severity = value; }
! }
!
! public string Message
! {
! get { return message; }
! set { message = value; }
! }
!
! public string Code
! {
! get { return code; }
! set { code = value; }
! }
!
! public string Detail
! {
! get { return detail; }
! set { detail = value; }
! }
!
! public string Hint
! {
! get { return hint; }
! set { hint = value; }
! }
!
! public string Where
! {
! get { return where; }
! set { where = value; }
! }
!
! public string Position
! {
! get { return position; }
! set { position = value; }
! }
!
! public string File
! {
! get { return file; }
! set { file = value; }
! }
!
! public int Line
! {
! get { return line; }
! set { line = value; }
! }
!
! public string Routine
! {
! get { return routine; }
! set { routine = value; }
! }
!
! #endregion
!
! #region CONSTRUCTORS
!
! internal PgError()
! {
! }
!
! internal PgError(string message)
! {
! this.message = message;
! }
!
! internal PgError(string severity, string code, string message)
! {
! this.severity = severity;
! this.code = code;
! this.message = message;
! }
!
! #endregion
! }
! }
--- 1,125 ----
! /* PgSqlClient - ADO.NET Data Provider for PostgreSQL 7.4+
! * Copyright (C) 2003 Carlos Guzmán Álvarez
! *
! * This library is free software; you can redistribute it and/or
! * modify it under the terms of the GNU Lesser General Public
! * License as published by the Free Software Foundation; either
! * version 2.1 of the License, or (at your option) any later version.
! *
! * This library is distributed in the hope that it will be useful,
! * but WITHOUT ANY WARRANTY; without even the implied warranty of
! * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
! * Lesser General Public License for more details.
! *
! * You should have received a copy of the GNU Lesser General Public
! * License along with this library; if not, write to the Free Software
! * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
! */
!
! using System;
!
! namespace PostgreSql.Data.PgSqlClient
! {
! [Serializable]
! public sealed class PgError
! {
! #region Fields
!
! private string severity;
! private string code;
! private string message;
! private string detail;
! private string hint;
! private string where;
! private string position;
! private string file;
! private int line;
! private string routine;
!
! #endregion
!
! #region Properties
!
! public string Severity
! {
! get { return severity; }
! set { severity = value; }
! }
!
! public string Message
! {
! get { return message; }
! set { message = value; }
! }
!
! public string Code
! {
! get { return code; }
! set { code = value; }
! }
!
! public string Detail
! {
! get { return detail; }
! set { detail = value; }
! }
!
! public string Hint
! {
! get { return hint; }
! set { hint = value; }
! }
!
! public string Where
! {
! get { return where; }
! set { where = value; }
! }
!
! public string Position
! {
! get { return position; }
! set { position = value; }
! }
!
! public string File
! {
! get { return file; }
! set { file = value; }
! }
!
! public int Line
! {
! get { return line; }
! set { line = value; }
! }
!
! public string Routine
! {
! get { return routine; }
! set { routine = value; }
! }
!
! #endregion
!
! #region Constructors
!
! internal PgError()
! {
! }
!
! internal PgError(string message)
! {
! this.message = message;
! }
!
! internal PgError(string severity, string code, string message)
! {
! this.severity = severity;
! this.code = code;
! this.message = message;
! }
!
! #endregion
! }
! }
Index: PgErrorCollection.cs
===================================================================
RCS file: /cvsroot/pgsqlclient/pgsqlclient_10/PostgreSql.Data.PgSqlClient/source/PgErrorCollection.cs,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** PgErrorCollection.cs 22 Aug 2003 15:13:50 -0000 1.2
--- PgErrorCollection.cs 14 Dec 2003 15:06:50 -0000 1.3
***************
*** 1,116 ****
! /* PgSqlClient - ADO.NET Data Provider for PostgreSQL 7.4+
! * Copyright (C) 2003 Carlos Guzmán Álvarez
! *
! * This library is free software; you can redistribute it and/or
! * modify it under the terms of the GNU Lesser General Public
! * License as published by the Free Software Foundation; either
! * version 2.1 of the License, or (at your option) any later version.
! *
! * This library is distributed in the hope that it will be useful,
! * but WITHOUT ANY WARRANTY; without even the implied warranty of
! * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
! * Lesser General Public License for more details.
! *
! * You should have received a copy of the GNU Lesser General Public
! * License along with this library; if not, write to the Free Software
! * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
! */
!
! using System;
! using System.Collections;
! using System.ComponentModel;
! using System.Globalization;
!
! namespace PostgreSql.Data.PgSqlClient
! {
! [Serializable,
! ListBindable(false)]
! public sealed class PgErrorCollection : ICollection, IEnumerable
! {
! #region FIELDS
!
! private ArrayList errors;
!
! #endregion
!
! #region PROPERTIES
!
! public PgError this[string errorMessage]
! {
! get { return (PgError)errors[errors.IndexOf(errorMessage)]; }
! set { errors[errors.IndexOf(errorMessage)] = (PgError)value; }
! }
!
! public PgError this[int errorIndex]
! {
! get { return (PgError)errors[errorIndex]; }
! set { errors[errorIndex] = (PgError)value; }
! }
!
! public int Count
! {
! get { return errors.Count; }
! }
!
! public bool IsSynchronized
! {
! get { return errors.IsSynchronized; }
! }
!
! public object SyncRoot
! {
! get { return errors.SyncRoot; }
! }
!
! #endregion
!
! #region constructors
!
! internal PgErrorCollection()
! {
! errors = new ArrayList();
! }
!
! #endregion
!
! #region METHODS
!
! public IEnumerator GetEnumerator()
! {
! return errors.GetEnumerator();
! }
!
! public void CopyTo(Array array, int index)
! {
! errors.CopyTo(array, index);
! }
!
! internal PgError Add(PgError error)
! {
! errors.Add(error);
!
! return error;
! }
!
! internal PgError Add(string severity, string message, string code)
! {
! PgError error = new PgError(severity, code, message);
!
! return Add(error);
! }
!
! private bool cultureAwareCompare(string strA, string strB)
! {
! try
! {
! return CultureInfo.CurrentCulture.CompareInfo.Compare(strA, strB, CompareOptions.IgnoreKanaType | CompareOptions.IgnoreWidth | CompareOptions.IgnoreCase) == 0 ? true : false;
! }
! catch (Exception)
! {
! return strA.ToUpper() == strB.ToUpper() ? true : false;
! }
! }
!
! #endregion
! }
! }
--- 1,116 ----
! /* PgSqlClient - ADO.NET Data Provider for PostgreSQL 7.4+
! * Copyright (C) 2003 Carlos Guzmán Álvarez
! *
! * This library is free software; you can redistribute it and/or
! * modify it under the terms of the GNU Lesser General Public
! * License as published by the Free Software Foundation; either
! * version 2.1 of the License, or (at your option) any later version.
! *
! * This library is distributed in the hope that it will be useful,
! * but WITHOUT ANY WARRANTY; without even the implied warranty of
! * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
! * Lesser General Public License for more details.
! *
! * You should have received a copy of the GNU Lesser General Public
! * License along with this library; if not, write to the Free Software
! * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
! */
!
! using System;
! using System.Collections;
! using System.ComponentModel;
! using System.Globalization;
!
! namespace PostgreSql.Data.PgSqlClient
! {
! [Serializable,
! ListBindable(false)]
! public sealed class PgErrorCollection : ICollection, IEnumerable
! {
! #region Fields
!
! private ArrayList errors;
!
! #endregion
!
! #region Properties
!
! public PgError this[string errorMessage]
! {
! get { return (PgError)errors[errors.IndexOf(errorMessage)]; }
! set { errors[errors.IndexOf(errorMessage)] = (PgError)value; }
! }
!
! public PgError this[int errorIndex]
! {
! get { return (PgError)errors[errorIndex]; }
! set { errors[errorIndex] = (PgError)value; }
! }
!
! public int Count
! {
! get { return errors.Count; }
! }
!
! public bool IsSynchronized
! {
! get { return errors.IsSynchronized; }
! }
!
! public object SyncRoot
! {
! get { return errors.SyncRoot; }
! }
!
! #endregion
!
! #region constructors
!
! internal PgErrorCollection()
! {
! errors = new ArrayList();
! }
!
! #endregion
!
! #region Methods
!
! public IEnumerator GetEnumerator()
! {
! return errors.GetEnumerator();
! }
!
! public void CopyTo(Array array, int index)
! {
! errors.CopyTo(array, index);
! }
!
! internal PgError Add(PgError error)
! {
! errors.Add(error);
!
! return error;
! }
!
! internal PgError Add(string severity, string message, string code)
! {
! PgError error = new PgError(severity, code, message);
!
! return Add(error);
! }
!
! private bool cultureAwareCompare(string strA, string strB)
! {
! try
! {
! return CultureInfo.CurrentCulture.CompareInfo.Compare(strA, strB, CompareOptions.IgnoreKanaType | CompareOptions.IgnoreWidth | CompareOptions.IgnoreCase) == 0 ? true : false;
! }
! catch (Exception)
! {
! return strA.ToUpper() == strB.ToUpper() ? true : false;
! }
! }
!
! #endregion
! }
! }
Index: PgException.cs
===================================================================
RCS file: /cvsroot/pgsqlclient/pgsqlclient_10/PostgreSql.Data.PgSqlClient/source/PgException.cs,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -C2 -d -r1.1.1.1 -r1.2
*** PgException.cs 2 Aug 2003 19:43:01 -0000 1.1.1.1
--- PgException.cs 14 Dec 2003 15:06:50 -0000 1.2
***************
*** 1,97 ****
! /* PgSqlClient - ADO.NET Data Provider for PostgreSQL 7.4+
! * Copyright (C) 2003 Carlos Guzmán Álvarez
! *
! * This library is free software; you can redistribute it and/or
! * modify it under the terms of the GNU Lesser General Public
! * License as published by the Free Software Foundation; either
! * version 2.1 of the License, or (at your option) any later version.
! *
! * This library is distributed in the hope that it will be useful,
! * but WITHOUT ANY WARRANTY; without even the implied warranty of
! * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
! * Lesser General Public License for more details.
! *
! * You should have received a copy of the GNU Lesser General Public
! * License along with this library; if not, write to the Free Software
! * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
! */
!
! using System;
! using System.Text;
! using System.ComponentModel;
! using System.Runtime.Serialization;
! using PostgreSql.Data.NPgClient;
!
! namespace PostgreSql.Data.PgSqlClient
! {
! [Serializable]
! public class PgException : Exception
! {
! #region FIELDS
!
! private PgErrorCollection errors;
!
! #endregion
!
! #region PROPERTIES
!
! [DesignerSerializationVisibility(DesignerSerializationVisibility.Content)]
! public PgErrorCollection Errors
! {
! get { return errors; }
! }
!
! #endregion
!
! #region CONSTRUCTORS
!
! internal PgException() : base()
! {
! errors = new PgErrorCollection();
! }
!
! internal PgException(string message) : base(message)
! {
! errors = new PgErrorCollection();
! }
!
! internal PgException(SerializationInfo info, StreamingContext context) : base(info, context)
! {
! errors = new PgErrorCollection();
! }
!
! internal PgException(string message, PgClientException ex) : base(message, ex)
! {
! errors = new PgErrorCollection();
! Source = ex.Source;
!
! getPgExceptionErrors(ex);
! }
!
! #endregion
!
! #region METHODS
!
! private void getPgExceptionErrors(PgClientException ex)
! {
! foreach (PgClientError error in ex.Errors)
! {
! PgError newError = new PgError();
!
! newError.Severity = error.Severity;
! newError.Code = error.Code;
! newError.Message = error.Message;
! newError.Detail = error.Detail;
! newError.Hint = error.Hint;
! newError.Line = error.Line;
! newError.Where = error.Where;
! newError.Position = error.Position;
! newError.Routine = error.Routine;
!
! errors.Add(newError);
! }
! }
!
! #endregion
! }
}
--- 1,97 ----
! /* PgSqlClient - ADO.NET Data Provider for PostgreSQL 7.4+
! * Copyright (C) 2003 Carlos Guzmán Álvarez
! *
! * This library is free software; you can redistribute it and/or
! * modify it under the terms of the GNU Lesser General Public
! * License as published by the Free Software Foundation; either
! * version 2.1 of the License, or (at your option) any later version.
! *
! * This library is distributed in the hope that it will be useful,
! * but WITHOUT ANY WARRANTY; without even the implied warranty of
! * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
! * Lesser General Public License for more details.
! *
! * You should have received a copy of the GNU Lesser General Public
! * License along with this library; if not, write to the Free Software
! * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
! */
!
! using System;
! using System.Text;
! using System.ComponentModel;
! using System.Runtime.Serialization;
! using PostgreSql.Data.NPgClient;
!
! namespace PostgreSql.Data.PgSqlClient
! {
! [Serializable]
! public class PgException : Exception
! {
! #region Fields
!
! private PgErrorCollection errors;
!
! #endregion
!
! #region Properties
!
! [DesignerSerializationVisibility(DesignerSerializationVisibility.Content)]
! public PgErrorCollection Errors
! {
! get { return errors; }
! }
!
! #endregion
!
! #region Constructors
!
! internal PgException() : base()
! {
! errors = new PgErrorCollection();
! }
!
! internal PgException(string message) : base(message)
! {
! errors = new PgErrorCollection();
! }
!
! internal PgException(SerializationInfo info, StreamingContext context) : base(info, context)
! {
! errors = new PgErrorCollection();
! }
!
! internal PgException(string message, PgClientException ex) : base(message, ex)
! {
! errors = new PgErrorCollection();
! Source = ex.Source;
!
! getPgExceptionErrors(ex);
! }
!
! #endregion
!
! #region Methods
!
! private void getPgExceptionErrors(PgClientException ex)
! {
! foreach (PgClientError error in ex.Errors)
! {
! PgError newError = new PgError();
!
! newError.Severity = error.Severity;
! newError.Code = error.Code;
! newError.Message = error.Message;
! newError.Detail = error.Detail;
! newError.Hint = error.Hint;
! newError.Line = error.Line;
! newError.Where = error.Where;
! newError.Position = error.Position;
! newError.Routine = error.Routine;
!
! errors.Add(newError);
! }
! }
!
! #endregion
! }
}
Index: PgParameter.cs
===================================================================
RCS file: /cvsroot/pgsqlclient/pgsqlclient_10/PostgreSql.Data.PgSqlClient/source/PgParameter.cs,v
retrieving revision 1.8
retrieving revision 1.9
diff -C2 -d -r1.8 -r1.9
*** PgParameter.cs 26 Oct 2003 11:32:00 -0000 1.8
--- PgParameter.cs 14 Dec 2003 15:06:50 -0000 1.9
***************
*** 1,430 ****
! /* PgSqlClient - ADO.NET Data Provider for PostgreSQL 7.4+
! * Copyright (C) 2003 Carlos Guzmán Álvarez
! *
! * This library is free software; you can redistribute it and/or
! * modify it under the terms of the GNU Lesser General Public
! * License as published by the Free Software Foundation; either
! * version 2.1 of the License, or (at your option) any later version.
! *
! * This library is distributed in the hope that it will be useful,
! * but WITHOUT ANY WARRANTY; without even the implied warranty of
! * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
! * Lesser General Public License for more details.
! *
! * You should have received a copy of the GNU Lesser General Public
! * License along with this library; if not, write to the Free Software
! * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
! */
!
! using System;
! using System.Data;
! using System.ComponentModel;
!
! namespace PostgreSql.Data.PgSqlClient
! {
! [ParenthesizePropertyName(true),
! TypeConverter(typeof(Design.PgParameterConverter))]
! public sealed class PgParameter : MarshalByRefObject, IDbDataParameter, IDataParameter, ICloneable
! {
! #region FIELDS
!
! ParameterDirection direction;
! DataRowVersion sourceVersion;
! bool isNullable;
! string parameterName;
! string sourceColumn;
! object value;
! byte precision;
! byte scale;
! int...
[truncated message content] |