From 5e4d6cab00cb29cd088ab7b62ab13aff103b64cb Mon Sep 17 00:00:00 2001 From: onefang Date: Sun, 19 May 2019 21:24:15 +1000 Subject: Dump OpenSim 0.9.0.1 into it's own branch. --- bin/Npgsql.xml | 5656 +++++++++++++++++++++++++++++++++++--------------------- 1 file changed, 3578 insertions(+), 2078 deletions(-) (limited to 'bin/Npgsql.xml') diff --git a/bin/Npgsql.xml b/bin/Npgsql.xml index a51252d..8133430 100644 --- a/bin/Npgsql.xml +++ b/bin/Npgsql.xml @@ -4,240 +4,2020 @@ Npgsql - + + + Handles serialisation of .NET array or IEnumeration to pg format. + Arrays of arrays, enumerations of enumerations, arrays of enumerations etc. + are treated as multi-dimensional arrays (in much the same manner as an array of arrays + is used to emulate multi-dimensional arrays in languages that lack native support for them). + If such an enumeration of enumerations is "jagged" (as opposed to rectangular, cuboid, + hypercuboid, hyperhypercuboid, etc) then this class will "correctly" serialise it, but pg + will raise an error as it doesn't allow jagged arrays. + + + + + Create an ArrayNativeToBackendTypeConverter with the element converter passed + + The that would be used to serialise the element type. + + + + Serialise the enumeration or array. + + + + + Convert a System.Array to PG binary format. + Write the array header and prepare to write array data to the stream. + + + + + Append all array data to the binary stream. + + + + + Handles parsing of pg arrays into .NET arrays. + + + + + Takes a string representation of a pg 1-dimensional array + (or a 1-dimensional row within an n-dimensional array) + and allows enumeration of the string represenations of each items. + + + + + Takes a string representation of a pg n-dimensional array + and allows enumeration of the string represenations of the next + lower level of rows (which in turn can be taken as (n-1)-dimensional arrays. + + + + + Takes an ArrayList which may be an ArrayList of ArrayLists, an ArrayList of ArrayLists of ArrayLists + and so on and enumerates the items that aren't ArrayLists (the leaf nodes if we think of the ArrayList + passed as a tree). Simply uses the ArrayLists' own IEnumerators to get that of the next, + pushing them onto a stack until we hit something that isn't an ArrayList. + ArrayList to enumerate + IEnumerable + + + + + Create a new ArrayBackendToNativeTypeConverter + + for the element type. + + + + Creates an array from pg text representation. + + + + + Creates an array list from pg represenation of an array. + Multidimensional arrays are treated as ArrayLists of ArrayLists + + + + + Creates an n-dimensional array from an ArrayList of ArrayLists or + a 1-dimensional array from something else. + + to convert + Type of the elements in the list + produced. + + + + Creates an n-dimensional System.Array from PG binary representation. + This function reads the array header and sets up an n-dimensional System.Array object to hold its data. + PopulateArrayFromBinaryArray() is then called to carry out array population. + + + + + Recursively populates an array from PB binary data representation. + + + + + Takes an array of ints and treats them like the limits of a set of counters. + Retains a matching set of ints that is set to all zeros on the first ++ + On a ++ it increments the "right-most" int. If that int reaches it's + limit it is set to zero and the one before it is incremented, and so on. + + Making this a more general purpose class is pretty straight-forward, but we'll just put what we need here. + + + + + Implements a bit string; a collection of zero or more bits which can each be 1 or 0. + BitString's behave as a list of bools, though like most strings and unlike most collections the position + tends to be of as much significance as the value. + BitStrings are often used as masks, and are commonly cast to and from other values. + + + + + Represents the empty string. + + + + + Create a BitString from an enumeration of boolean values. The BitString will contain + those booleans in the order they came in. + + The boolean values. + + + + Creates a BitString filled with a given number of true or false values. + + The value to fill the string with. + The number of bits to fill. + + + + Creats a bitstring from a string. + The string to copy from. + + + + + + Creates a single-bit element from a boolean value. + + The bool value which determines whether + the bit is 1 or 0. + + + + Creates a bitstring from an unsigned integer value. The string will be the shortest required to + contain the integer (e.g. 1 bit for 0 or 1, 2 for 2 or 3, 3 for 4-7, and so on). + + The integer. + This method is not CLS Compliant, and may not be available to some languages. + + + + Creates a bitstring from an integer value. The string will be the shortest required to + contain the integer (e.g. 1 bit for 0 or 1, 2 for 2 or 3, 3 for 4-7, and so on). + + The integer. + + + + Finds the first instance of a given value + + The value - whether true or false - to search for. + The index of the value found, or -1 if none are present. + + + + True if there is at least one bit with the value looked for. + + The value - true or false - to detect. + True if at least one bit was the same as item, false otherwise. + + + + Copies the bitstring to an array of bools. + + The boolean array to copy to. + The index in the array to start copying from. + + + + Returns an enumerator that enumerates through the string. + + The enumerator. + + + + Creats a bitstring by concatenating another onto this one. + + The string to append to this one. + The combined strings. + + + + Returns a substring of this string. + + The position to start from, must be between 0 and the length of the string. + The length of the string to return, must be greater than zero, and may not be + so large that the start + length exceeds the bounds of this instance. + The Bitstring identified + + + + Returns a substring of this string. + + The position to start from, must be between 0 and the length of the string, + the rest of the string is returned. + The Bitstring identified + + + + A logical and between this string and another. The two strings must be the same length. + + Another BitString to AND with this one. + A bitstring with 1 where both BitStrings had 1 and 0 otherwise. + + + + A logical or between this string and another. The two strings must be the same length. + + Another BitString to OR with this one. + A bitstring with 1 where either BitString had 1 and 0 otherwise. + + + + A logical xor between this string and another. The two strings must be the same length. + + Another BitString to XOR with this one. + A bitstring with 1 where one BitStrings and the other had 0, + and 0 where they both had 1 or both had 0. + + + + A bitstring that is the logical inverse of this one. + + A bitstring of the same length as this with 1 where this has 0 and vice-versa. + + + + Shifts the string operand bits to the left, filling with zeros to produce a + string of the same length. + + The number of bits to shift to the left. + A left-shifted bitstring. + The behaviour of LShift is closer to what one would expect from dealing + with PostgreSQL bit-strings than in using the same operations on integers in .NET + In particular, negative operands result in a right-shift, and operands greater than + the length of the string will shift it entirely, resulting in a zero-filled string. + + + + + Shifts the string operand bits to the right, filling with zeros to produce a + string of the same length. + + The number of bits to shift to the right. + A right-shifted bitstring. + The behaviour of RShift is closer to what one would expect from dealing + with PostgreSQL bit-strings than in using the same operations on integers in .NET + In particular, negative operands result in a left-shift, and operands greater than + the length of the string will shift it entirely, resulting in a zero-filled string. It also performs + a logical shift, rather than an arithmetic shift, so it always sets the vacated bit positions to zero + (like PostgreSQL and like .NET for unsigned integers but not for signed integers). + + + + + Returns true if the this string is identical to the argument passed. + + + + + Compares two strings. Strings are compared as strings, so while 0 being less than 1 will + mean a comparison between two strings of the same size is the same as treating them as numbers, + in the case of two strings of differing lengths the comparison starts at the right-most (most significant) + bit, and if all bits of the shorter string are exhausted without finding a comparison, then the larger + string is deemed to be greater than the shorter (0010 is greater than 0001 but less than 00100). + + Another string to compare with this one. + A value if the two strings are identical, an integer less + than zero if this is less than the argument, and an integer greater + than zero otherwise. + + + + Compares the string with another object. + + The object to compare with. + If the object is null then this string is considered greater. If the object is another BitString + then they are compared as in the explicit comparison for BitStrings + in any other case a is thrown. + + + + Compares this BitString with an object for equality. + + + + + Returns a code for use in hashing operations. + + + + + Returns a string representation of the BitString. + + + A string which can contain a letter and optionally a number which sets a minimum size for the string + returned. In each case using the lower-case form of the letter will result in a lower-case string + being returned. + + + B + A string of 1s and 0s. + + + X + An hexadecimal string (will result in an error unless the string's length is divisible by 4). + + + G + A string of 1s and 0s in single-quotes preceded by 'B' (Postgres bit string literal syntax). + + Y + An hexadecimal string in single-quotes preceded by 'X' (Postgres bit literal syntax, will result in an error unless the string's length is divisible by 4. + + C + The format produced by format-string "Y" if legal, otherwise that produced by format-string "G". + E + The most compact safe representation for Postgres. If single bit will be either a 0 or a 1. Otherwise if it + can be that produce by format string "Y" it will, otherwise if there are less than 9bits in length it will be that + produced by format-string "G". For longer strings that cannot be represented in hexadecimal it will be a string + representing the first part of the string in format "Y" followed by the PostgreSQL concatenation operator, followed + by the final bits in the format "G". E.g. "X'13DCE'||B'110'" + If format is empty or null, it is treated as if "B" had been passed (the default repreesentation, and that + generally used by PostgreSQL for display). + + The formatted string. + + + + Returns a string representation for the Bitstring + + A string containing '0' and '1' characters. + + + + Returns the same string as . formatProvider is ignored. + + + + + Parses a string to produce a BitString. Most formats that can be produced by + can be accepted, but hexadecimal + can be interpreted with the preceding X' to mark the following characters as + being hexadecimal rather than binary. + + + + + Performs a logical AND on the two operands. + + + + + Performs a logcial OR on the two operands. + + + + + Perofrms a logical EXCLUSIVE-OR on the two operands + + + + + Performs a logical NOT on the operand. + + + + + Concatenates the operands. + + + + + Left-shifts the string BitString. + + + + + Right-shifts the string BitString. + + + + + Compares the two operands. + + + + + Compares the two operands. + + + + + Compares the two operands. + + + + + Compares the two operands. + + + + + Compares the two operands. + + + + + Compares the two operands. + + + + + Interprets the bitstring as a series of bits in an encoded character string, + encoded according to the Encoding passed, and returns that string. + The bitstring must contain a whole number of octets(bytes) and also be + valid according to the Encoding passed. + + The to use in producing the string. + The string that was encoded in the BitString. + + + + Interprets the bitstring as a series of octets (bytes) and returns those octets. Fails + if the Bitstring does not contain a whole number of octets (its length is not evenly + divisible by 8). + + + + + Interprets the bitstring as a series of signed octets (bytes) and returns those octets. Fails + if the Bitstring does not contain a whole number of octets (its length is not evenly + divisible by 8). + This method is not CLS-Compliant and may not be available to languages that cannot + handle signed bytes. + + + + + Interprets the bitstring as a series of unsigned 16-bit integers and returns those integers. + Fails if the Bitstring's length is not evenly divisible by 16. + This method is not CLS-Compliant and may not be available to languages that cannot + handle unsigned integers. + + + + + Interprets the bitstring as a series of 16-bit integers and returns those integers. + Fails if the Bitstring's length is not evenly divisible by 16. + + + + + Interprets the bitstring as a series of unsigned 32-bit integers and returns those integers. + Fails if the Bitstring's length is not evenly divisible by 32. + This method is not CLS-Compliant and may not be available to languages that cannot + handle unsigned integers. + + + + + Interprets the bitstring as a series of signed 32-bit integers and returns those integers. + Fails if the Bitstring's length is not evenly divisible by 32. + + + + + Interprets the bitstring as a series of unsigned 64-bit integers and returns those integers. + Fails if the Bitstring's length is not evenly divisible by 64. + This method is not CLS-Compliant and may not be available to languages that cannot + handle unsigned integers. + + + + + Interprets the bitstring as a series of signed 64-bit integers and returns those integers. + Fails if the Bitstring's length is not evenly divisible by 64. + + + + + The length of the string. + + + + + Retrieves the value of the bit at the given index. + + + + + Represents the PostgreSQL interval datatype. + PostgreSQL differs from .NET in how it's interval type doesn't assume 24 hours in a day + (to deal with 23- and 25-hour days caused by daylight savings adjustments) and has a concept + of months that doesn't exist in .NET's class. (Neither datatype + has any concessions for leap-seconds). + For most uses just casting to and from TimeSpan will work correctly — in particular, + the results of subtracting one or the PostgreSQL date, time and + timestamp types from another should be the same whether you do so in .NET or PostgreSQL — + but if the handling of days and months in PostgreSQL is important to your application then you + should use this class instead of . + If you don't know whether these differences are important to your application, they + probably arent! Just use and do not use this class directly ☺ + To avoid forcing unnecessary provider-specific concerns on users who need not be concerned + with them a call to on a field containing an + value will return a rather than an + . If you need the extra functionality of + then use . + + + + + + + + + + Represents the number of ticks (100ns periods) in one microsecond. This field is constant. + + + + + Represents the number of ticks (100ns periods) in one millisecond. This field is constant. + + + + + Represents the number of ticks (100ns periods) in one second. This field is constant. + + + + + Represents the number of ticks (100ns periods) in one minute. This field is constant. + + + + + Represents the number of ticks (100ns periods) in one hour. This field is constant. + + + + + Represents the number of ticks (100ns periods) in one day. This field is constant. + + + + + Represents the number of hours in one day (assuming no daylight savings adjustments). This field is constant. + + + + + Represents the number of days assumed in one month if month justification or unjustifcation is performed. + This is set to 30 for consistency with PostgreSQL. Note that this is means that month adjustments cause + a year to be taken as 30 × 12 = 360 rather than 356/366 days. + + + + + Represents the number of ticks (100ns periods) in one day, assuming 30 days per month. + + + + + Represents the number of months in a year. This field is constant. + + + + + Represents the maximum . This field is read-only. + + + + + Represents the minimum . This field is read-only. + + + + + Represents the zero . This field is read-only. + + + + + Initializes a new to the specified number of ticks. + + A time period expressed in 100ns units. + + + + Initializes a new to hold the same time as a + + A time period expressed in a + + + + Initializes a new to the specified number of months, days + & ticks. + + Number of months. + Number of days. + Number of 100ns units. + + + + Initializes a new to the specified number of + days, hours, minutes & seconds. + + Number of days. + Number of hours. + Number of minutes. + Number of seconds. + + + + Initializes a new to the specified number of + days, hours, minutes, seconds & milliseconds. + + Number of days. + Number of hours. + Number of minutes. + Number of seconds. + Number of milliseconds. + + + + Initializes a new to the specified number of + months, days, hours, minutes, seconds & milliseconds. + + Number of months. + Number of days. + Number of hours. + Number of minutes. + Number of seconds. + Number of milliseconds. + + + + Initializes a new to the specified number of + years, months, days, hours, minutes, seconds & milliseconds. + Years are calculated exactly equivalent to 12 months. + + Number of years. + Number of months. + Number of days. + Number of hours. + Number of minutes. + Number of seconds. + Number of milliseconds. + + + + Creates an from a number of ticks. + + The number of ticks (100ns units) in the interval. + A d with the given number of ticks. + + + + Creates an from a number of microseconds. + + The number of microseconds in the interval. + A d with the given number of microseconds. + + + + Creates an from a number of milliseconds. + + The number of milliseconds in the interval. + A d with the given number of milliseconds. + + + + Creates an from a number of seconds. + + The number of seconds in the interval. + A d with the given number of seconds. + + + + Creates an from a number of minutes. + + The number of minutes in the interval. + A d with the given number of minutes. + + + + Creates an from a number of hours. + + The number of hours in the interval. + A d with the given number of hours. + + + + Creates an from a number of days. + + The number of days in the interval. + A d with the given number of days. + + + + Creates an from a number of months. + + The number of months in the interval. + A d with the given number of months. + + + + Adds another interval to this instance and returns the result. + + An to add to this instance. + An whose values are the sums of the two instances. + + + + Subtracts another interval from this instance and returns the result. + + An to subtract from this instance. + An whose values are the differences of the two instances. + + + + Returns an whose value is the negated value of this instance. + + An whose value is the negated value of this instance. + + + + This absolute value of this instance. In the case of some, but not all, components being negative, + the rules used for justification are used to determine if the instance is positive or negative. + + An whose value is the absolute value of this instance. + + + + Equivalent to PostgreSQL's justify_days function. + + An based on this one, but with any hours outside of the range [-23, 23] + converted into days. + + + + Opposite to PostgreSQL's justify_days function. + + An based on this one, but with any days converted to multiples of ±24hours. + + + + Equivalent to PostgreSQL's justify_months function. + + An based on this one, but with any days outside of the range [-30, 30] + converted into months. + + + + Opposite to PostgreSQL's justify_months function. + + An based on this one, but with any months converted to multiples of ±30days. + + + + Equivalent to PostgreSQL's justify_interval function. + + An based on this one, + but with any months converted to multiples of ±30days + and then with any days converted to multiples of ±24hours + + + + Opposite to PostgreSQL's justify_interval function. + + An based on this one, but with any months converted to multiples of ±30days and then any days converted to multiples of ±24hours; + + + + Produces a canonical NpgslInterval with 0 months and hours in the range of [-23, 23]. + + + While the fact that for many purposes, two different instances could be considered + equivalent (e.g. one with 2days, 3hours and one with 1day 27hours) there are different possible canonical forms. + + E.g. we could move all excess hours into days and all excess days into months and have the most readable form, + or we could move everything into the ticks and have the form that allows for the easiest arithmetic) the form + chosen has two important properties that make it the best choice. + First, it is closest two how + objects are most often represented. Second, it is compatible with results of many + PostgreSQL functions, particularly with age() and the results of subtracting one date, time or timestamp from + another. + + Note that the results of casting a to is + canonicalised. + + + An based on this one, but with months converted to multiples of ±30days and with any hours outside of the range [-23, 23] + converted into days. + + + + Implicit cast of a to an + + A + An eqivalent, canonical, . + + + + Implicit cast of an to a . + + A . + An equivalent . + + + + Returns true if another is exactly the same as this instance. + + An for comparison. + true if the two instances are exactly the same, + false otherwise. + + + + Returns true if another object is an , that is exactly the same as + this instance + + An for comparison. + true if the argument is an and is exactly the same + as this one, false otherwise. + + + + Compares two instances. + + The first . + The second . + 0 if the two are equal or equivalent. A value greater than zero if x is greater than y, + a value less than zero if x is less than y. + + + + A hash code suitable for uses with hashing algorithms. + + An signed integer. + + + + Compares this instance with another/ + + An to compare this with. + 0 if the instances are equal or equivalent. A value less than zero if + this instance is less than the argument. A value greater than zero if this instance + is greater than the instance. + + + + Compares this instance with another/ + + An object to compare this with. + 0 if the argument is an and the instances are equal or equivalent. + A value less than zero if the argument is an and + this instance is less than the argument. + A value greater than zero if the argument is an and this instance + is greater than the instance. + A value greater than zero if the argument is null. + The argument is not an . + + + + Parses a and returns a instance. + Designed to use the formats generally returned by PostgreSQL. + + The to parse. + An represented by the argument. + The string was null. + A value obtained from parsing the string exceeded the values allowed for the relevant component. + The string was not in a format that could be parsed to produce an . + + + + Attempt to parse a to produce an . + + The to parse. + (out) The produced, or if the parsing failed. + true if the parsing succeeded, false otherwise. + + + + Create a representation of the instance. + The format returned is of the form: + [M mon[s]] [d day[s]] [HH:mm:ss[.f[f[f[f[f[f[f[f[f]]]]]]]]]] + A zero is represented as 00:00:00 + + Ticks are 100ns, Postgress resolution is only to 1µs at most. Hence we lose 1 or more decimal + precision in storing values in the database. Despite this, this method will output that extra + digit of precision. It's forward-compatible with any future increases in resolution up to 100ns, + and also makes this ToString() more applicable to any other use-case. + + + The representation. + + + + Adds two together. + + The first to add. + The second to add. + An whose values are the sum of the arguments. + + + + Subtracts one from another. + + The to subtract the other from. + The to subtract from the other. + An whose values are the difference of the arguments + + + + Returns true if two are exactly the same. + + The first to compare. + The second to compare. + true if the two arguments are exactly the same, false otherwise. + + + + Returns false if two are exactly the same. + + The first to compare. + The second to compare. + false if the two arguments are exactly the same, true otherwise. + + + + Compares two instances to see if the first is less than the second + + The first to compare. + The second to compare. + true if the first is less than second, false otherwise. + + + + Compares two instances to see if the first is less than or equivalent to the second + + The first to compare. + The second to compare. + true if the first is less than or equivalent to second, false otherwise. + + + + Compares two instances to see if the first is greater than the second + + The first to compare. + The second to compare. + true if the first is greater than second, false otherwise. + + + + Compares two instances to see if the first is greater than or equivalent the second + + The first to compare. + The second to compare. + true if the first is greater than or equivalent to the second, false otherwise. + + + + Returns the instance. + + An . + The argument. + + + + Negates an instance. + + An . + The negation of the argument. + + + + The total number of ticks(100ns units) contained. This is the resolution of the + type. This ignores the number of days and + months held. If you want them included use first. + The resolution of the PostgreSQL + interval type is by default 1µs = 1,000 ns. It may be smaller as follows: + + + interval(0) + resolution of 1s (1 second) + + + interval(1) + resolution of 100ms = 0.1s (100 milliseconds) + + + interval(2) + resolution of 10ms = 0.01s (10 milliseconds) + + + interval(3) + resolution of 1ms = 0.001s (1 millisecond) + + + interval(4) + resolution of 100µs = 0.0001s (100 microseconds) + + + interval(5) + resolution of 10µs = 0.00001s (10 microseconds) + + + interval(6) or interval + resolution of 1µs = 0.000001s (1 microsecond) + + + As such, if the 100-nanosecond resolution is significant to an application, a PostgreSQL interval will + not suffice for those purposes. + In more frequent cases though, the resolution of the interval suffices. + will always suffice to handle the resolution of any interval value, and upon + writing to the database, will be rounded to the resolution used. + + The number of ticks in the instance. + + + + + Gets the number of whole microseconds held in the instance. + An in the range [-999999, 999999]. + + + + + Gets the number of whole milliseconds held in the instance. + An in the range [-999, 999]. + + + + + Gets the number of whole seconds held in the instance. + An in the range [-59, 59]. + + + + + Gets the number of whole minutes held in the instance. + An in the range [-59, 59]. + + + + + Gets the number of whole hours held in the instance. + Note that this can be less than -23 or greater than 23 unless + has been used to produce this instance. + + + + + Gets the number of days held in the instance. + Note that this does not pay attention to a time component with -24 or less hours or + 24 or more hours, unless has been called to produce this instance. + + + + + Gets the number of months held in the instance. + Note that this does not pay attention to a day component with -30 or less days or + 30 or more days, unless has been called to produce this instance. + + + + + Returns a representing the time component of the instance. + Note that this may have a value beyond the range ±23:59:59.9999999 unless + has been called to produce this instance. + + + + + The total number of ticks (100ns units) in the instance, assuming 24 hours in each day and + 30 days in a month. + + + + + The total number of microseconds in the instance, assuming 24 hours in each day and + 30 days in a month. + + + + + The total number of milliseconds in the instance, assuming 24 hours in each day and + 30 days in a month. + + + + + The total number of seconds in the instance, assuming 24 hours in each day and + 30 days in a month. + + + + + The total number of minutes in the instance, assuming 24 hours in each day and + 30 days in a month. + + + + + The total number of hours in the instance, assuming 24 hours in each day and + 30 days in a month. + + + + + The total number of days in the instance, assuming 24 hours in each day and + 30 days in a month. + + + + + The total number of months in the instance, assuming 24 hours in each day and + 30 days in a month. + + + + + Normalise this time; if it is 24:00:00, convert it to 00:00:00 + + This time, normalised + + + + The total number of ticks(100ns units) contained. This is the resolution of the + type. + The resolution of the PostgreSQL + interval type is by default 1µs = 1,000 ns. It may be smaller as follows: + + + time(0) + resolution of 1s (1 second) + + + time(1) + resolution of 100ms = 0.1s (100 milliseconds) + + + time(2) + resolution of 10ms = 0.01s (10 milliseconds) + + + time(3) + resolution of 1ms = 0.001s (1 millisecond) + + + time(4) + resolution of 100µs = 0.0001s (100 microseconds) + + + time(5) + resolution of 10µs = 0.00001s (10 microseconds) + + + time(6) or interval + resolution of 1µs = 0.000001s (1 microsecond) + + + As such, if the 100-nanosecond resolution is significant to an application, a PostgreSQL time will + not suffice for those purposes. + In more frequent cases though, the resolution of time suffices. + will always suffice to handle the resolution of any time value, and upon + writing to the database, will be rounded to the resolution used. + + The number of ticks in the instance. + + + + + Gets the number of whole microseconds held in the instance. + An integer in the range [0, 999999]. + + + + + Gets the number of whole milliseconds held in the instance. + An integer in the range [0, 999]. + + + + + Gets the number of whole seconds held in the instance. + An interger in the range [0, 59]. + + + + + Gets the number of whole minutes held in the instance. + An integer in the range [0, 59]. + + + + + Gets the number of whole hours held in the instance. + Note that the time 24:00:00 can be stored for roundtrip compatibility. Any calculations on such a + value will normalised it to 00:00:00. + + + + + Normalise this time; if it is 24:00:00, convert it to 00:00:00 + + This time, normalised + + + + Compares this with another . As per postgres' rules, + first the times are compared as if they were both in the same timezone. If they are equal then + then timezones are compared (+01:00 being "smaller" than -01:00). + + the to compare with. + An integer which is 0 if they are equal, < 0 if this is the smaller and > 0 if this is the larger. + + + + Gets the number of whole microseconds held in the instance. + An integer in the range [0, 999999]. + + + + + Gets the number of whole milliseconds held in the instance. + An integer in the range [0, 999]. + + + + + Gets the number of whole seconds held in the instance. + An interger in the range [0, 59]. + + + + + Gets the number of whole minutes held in the instance. + An integer in the range [0, 59]. + + + + + Gets the number of whole hours held in the instance. + Note that the time 24:00:00 can be stored for roundtrip compatibility. Any calculations on such a + value will normalised it to 00:00:00. + + + + + Summary description for LargeObjectManager. + + + + + Options that control certain aspects of native to backend conversions that depend + on backend version and status. + + + + + Clone the current object. + + A new NativeToBackendTypeConverterOptions object. + + + + Clone the current object with a different OID/Name mapping. + + OID/Name mapping object to use in the new instance. + A new NativeToBackendTypeConverterOptions object. + + + + Provide event handlers to convert all native supported basic data types from their backend + text representation to a .NET object. + + + + + Convert UTF8 encoded text a string. + + + + + Byte array from bytea encoded as ASCII text, escaped or hex format. + + + + + Byte array from bytea encoded as binary. + + + + + Convert a postgresql boolean to a System.Boolean. + + + + + Convert a postgresql boolean to a System.Boolean. + + + + + Convert a postgresql bit to a System.Boolean. + + + + + Convert a postgresql datetime to a System.DateTime. + + + + + Convert a postgresql date to a System.DateTime. + + + + + Convert a postgresql time to a System.DateTime. + + + + + Convert a postgresql money to a System.Decimal. + + + + + Convert a postgresql float4 or float8 to a System.Float or System.Double respectively. + + + + + Provide event handlers to convert extended native supported data types from their backend + text representation to a .NET object. + + + + + Convert a postgresql point to a System.NpgsqlPoint. + + + + + Convert a postgresql point to a System.RectangleF. + + + + + LDeg. + + + + + Path. + + + + + Polygon. + + + + + Circle. + + + + + Inet. + + + + + MAC Address. + + + + + interval + + + + + Provide event handlers to convert the basic native supported data types from + native form to backend representation. + + + + + Convert a string to UTF8 encoded text, escaped and quoted as required. + + + + + Convert a string to UTF8 encoded text. + + + + + Binary data, escaped and quoted as required. + + + + + Binary data with possible older style octal escapes, quoted. + + + + + Binary data in the new hex format (>= 9.0), quoted. + + + + + Binary data, raw. + + + + + Convert to a postgresql boolean text format. + + + + + Convert to a postgresql boolean binary format. + + + + + Convert to a postgresql binary int2. + + + + + Convert to a postgresql binary int4. + + + + + Convert to a postgresql binary int8. + + + + + Convert to a postgresql bit. + + + + + Convert to a postgresql timestamp. + + + + + Convert to a postgresql date. + + + + + Convert to a postgresql time. + + + + + Convert to a postgres money. + + + + + Convert to a postgres double with maximum precision. + + + + + Convert a System.Float to a postgres float4. + + + + + Convert a System.Double to a postgres float8. + + + + + Provide event handlers to convert extended native supported data types from + native form to backend representation. + + + + + Point. + + + + + Box. + + + + + LSeg. + + + + + Open path. + + + + + Polygon. + + + + + Convert to a postgres MAC Address. + + + + + Circle. + + + + + Convert to a postgres inet. + + + + + Convert to a postgres interval + + + + + Delegate called to convert the given backend text data to its native representation. + + + + + Delegate called to convert the given backend binary data to its native representation. + + + + + Represents a backend data type. + This class can be called upon to convert a backend field representation to a native object. + + + + + Construct a new NpgsqlTypeInfo with the given attributes and conversion handlers. + + Type OID provided by the backend server. + Type name provided by the backend server. + NpgsqlDbType + DbType + System type to convert fields of this type to. + Data conversion handler for text encoding. + Data conversion handler for binary data. + + + + Perform a data conversion from a backend representation to + a native object. + + Data sent from the backend. + fieldValueSize + Type modifier field sent from the backend. + + + + Perform a data conversion from a backend representation to + a native object. + + Data sent from the backend. + TypeSize + Type modifier field sent from the backend. + + + + Type OID provided by the backend server. + + + + + Type name provided by the backend server. + + + + + NpgsqlDbType. + + + + + NpgsqlDbType. + + + + + Provider type to convert fields of this type to. + + + + + System type to convert fields of this type to. + + + + + Reports whether a backend binary to native decoder is available for this type. + + + + + Delegate called to convert the given native data to its backand representation. + + + + + Represents a backend data type. + This class can be called upon to convert a native object to its backend field representation, + + + - This class represents a parameter to a command that will be sent to server + Returns an NpgsqlNativeTypeInfo for an array where the elements are of the type + described by the NpgsqlNativeTypeInfo supplied. - + - Initializes a new instance of the NpgsqlParameter class. + Construct a new NpgsqlTypeInfo with the given attributes and conversion handlers. + Type name provided by the backend server. + DbType + Quote + NpgsqlDbType + Data conversion handler for text backend encoding. + Data conversion handler for binary backend encoding (for extended queries). - + - Initializes a new instance of the NpgsqlParameter - class with the parameter m_Name and a value of the new NpgsqlParameter. + Perform a data conversion from a native object to + a backend representation. + DBNull and null values are handled differently depending if a plain query is used + When - The m_Name of the parameter to map. - An Object that is the value of the NpgsqlParameter. - -

When you specify an Object - in the value parameter, the DbType is - inferred from the .NET Framework type of the Object.

-

When using this constructor, you must be aware of a possible misuse of the constructor which takes a DbType parameter. - This happens when calling this constructor passing an int 0 and the compiler thinks you are passing a value of DbType. - Use Convert.ToInt32(value) for example to have compiler calling the correct constructor.

-
+ Native .NET object to be converted. + Specifies that the value should be formatted for the extended query syntax. + Options to guide serialization. If null, a default options set is used. + Specifies that the value should be formatted as an extended query array element.
- + - Initializes a new instance of the NpgsqlParameter - class with the parameter m_Name and the data type. + Type name provided by the backend server. - The m_Name of the parameter to map. - One of the DbType values. - + - Initializes a new instance of the NpgsqlParameter - class with the parameter m_Name, the DbType, and the size. + NpgsqlDbType. - The m_Name of the parameter to map. - One of the DbType values. - The length of the parameter. - + - Initializes a new instance of the NpgsqlParameter - class with the parameter m_Name, the DbType, the size, - and the source column m_Name. + DbType. - The m_Name of the parameter to map. - One of the DbType values. - The length of the parameter. - The m_Name of the source column. - + - Initializes a new instance of the NpgsqlParameter - class with the parameter m_Name, the DbType, the size, - the source column m_Name, a ParameterDirection, - the precision of the parameter, the scale of the parameter, a - DataRowVersion to use, and the - value of the parameter. + Apply quoting. - The m_Name of the parameter to map. - One of the DbType values. - The length of the parameter. - The m_Name of the source column. - One of the ParameterDirection values. - true if the value of the field can be null, otherwise false. - The total number of digits to the left and right of the decimal point to which - Value is resolved. - The total number of decimal places to which - Value is resolved. - One of the DataRowVersion values. - An Object that is the value - of the NpgsqlParameter. - + - Creates a new NpgsqlParameter that - is a copy of the current instance. + Use parameter size information. - A new NpgsqlParameter that is a copy of this instance. - + - Gets or sets the maximum number of digits used to represent the - Value property. + Reports whether a native to backend binary encoder is available for this type. - The maximum number of digits used to represent the - Value property. - The default value is 0, which indicates that the data provider - sets the precision for Value. - + - Gets or sets the number of decimal places to which - Value is resolved. + Provide mapping between type OID, type name, and a NpgsqlBackendTypeInfo object that represents it. - The number of decimal places to which - Value is resolved. The default is 0. - + - Gets or sets the maximum size, in bytes, of the data within the column. + Construct an empty mapping. - The maximum size, in bytes, of the data within the column. - The default value is inferred from the parameter value. - + - Gets or sets the DbType of the parameter. + Copy constuctor. - One of the DbType values. The default is String. - + - Gets or sets the DbType of the parameter. + Add the given NpgsqlBackendTypeInfo to this mapping. - One of the DbType values. The default is String. - + - Gets or sets a value indicating whether the parameter is input-only, - output-only, bidirectional, or a stored procedure return value parameter. + Add a new NpgsqlBackendTypeInfo with the given attributes and conversion handlers to this mapping. - One of the ParameterDirection - values. The default is Input. + Type OID provided by the backend server. + Type name provided by the backend server. + NpgsqlDbType + DbType + System type to convert fields of this type to. + Data conversion handler for text encoding. + Data conversion handler for binary data. - + - Gets or sets a value indicating whether the parameter accepts null values. + Make a shallow copy of this type mapping. - true if null values are accepted; otherwise, false. The default is false. - + - Gets or sets the m_Name of the NpgsqlParameter. + Determine if a NpgsqlBackendTypeInfo with the given backend type OID exists in this mapping. - The m_Name of the NpgsqlParameter. - The default is an empty string. - + - The m_Name scrubbed of any optional marker + Determine if a NpgsqlBackendTypeInfo with the given backend type name exists in this mapping. + + + + + Get the number of type infos held. + + + + + Retrieve the NpgsqlBackendTypeInfo with the given backend type OID, or null if none found. + + + + + Retrieve the NpgsqlBackendTypeInfo with the given backend type name, or null if none found. + + + + + Provide mapping between type Type, NpgsqlDbType and a NpgsqlNativeTypeInfo object that represents it. + + + + + Add the given NpgsqlNativeTypeInfo to this mapping. + + + + + Add a new NpgsqlNativeTypeInfo with the given attributes and conversion handlers to this mapping. + + Type name provided by the backend server. + NpgsqlDbType + DbType + Quote + Data conversion handler for text backend encoding. + Data conversion handler for binary backend encoding (for extended query). + + + + Retrieve the NpgsqlNativeTypeInfo with the given NpgsqlDbType. + + + + + Retrieve the NpgsqlNativeTypeInfo with the given DbType. + + + + + Retrieve the NpgsqlNativeTypeInfo with the given Type. + + + + + Determine if a NpgsqlNativeTypeInfo with the given backend type name exists in this mapping. + + + + + Determine if a NpgsqlNativeTypeInfo with the given NpgsqlDbType exists in this mapping. + + + + + Determine if a NpgsqlNativeTypeInfo with the given Type name exists in this mapping. + + + + + Get the number of type infos held. + + + + + Represents a PostgreSQL Point type + + + + + Represents a PostgreSQL Line Segment type. + + + + + Represents a PostgreSQL Path type. + + + + + Represents a PostgreSQL Polygon type. + + + + + Represents a PostgreSQL Circle type. + + + + + Represents a PostgreSQL inet type. + + + + + Represents a PostgreSQL MacAddress type. + + + + + + + The macAddr parameter must contain a string that can only consist of numbers + and upper-case letters as hexadecimal digits. (See PhysicalAddress.Parse method on MSDN) + + + + This class contains helper methods for type conversion between + the .Net type system and postgresql. + + + + + A cache of basic datatype mappings keyed by server version. This way we don't + have to load the basic type mappings for every connection. + + + + + Find a NpgsqlNativeTypeInfo in the default types map that can handle objects + of the given NpgsqlDbType. - + - Gets or sets the m_Name of the source column that is mapped to the - DataSet and used for loading or - returning the Value. + Find a NpgsqlNativeTypeInfo in the default types map that can handle objects + of the given NpgsqlDbType. - The m_Name of the source column that is mapped to the - DataSet. The default is an empty string. - + - Gets or sets the DataRowVersion - to use when loading Value. + Find a NpgsqlNativeTypeInfo in the default types map that can handle objects + of the given DbType. - One of the DataRowVersion values. - The default is Current. - + - Gets or sets the value of the parameter. + Find a NpgsqlNativeTypeInfo in the default types map that can handle objects + of the given System.Type. - An Object that is the value of the parameter. - The default value is null. - + - Gets or sets the value of the parameter. - - An Object that is the value of the parameter. - The default value is null. + This method is responsible to convert the byte[] received from the backend + to the corresponding NpgsqlType. + The given TypeInfo is called upon to do the conversion. + If no TypeInfo object is provided, no conversion is performed. + - - - This class represents the Parse message sent to PostgreSQL - server. + + + This method is responsible to convert the string received from the backend + to the corresponding NpgsqlType. + The given TypeInfo is called upon to do the conversion. + If no TypeInfo object is provided, no conversion is performed. - - + - For classes representing messages sent from the client to the server. + Create the one and only native to backend type map. + This map is used when formatting native data + types to backend representations. - + - Writes given objects into a stream for PostgreSQL COPY in default copy format (not CSV or BINARY). - + This method creates (or retrieves from cache) a mapping between type and OID + of all natively supported postgresql data types. + This is needed as from one version to another, this mapping can be changed and + so we avoid hardcoding them. + + NpgsqlTypeMapping containing all known data types. The mapping must be + cloned before it is modified because it is cached; changes made by one connection may + effect another connection. + - + - Return an exact copy of this NpgsqlConnectionString. + Attempt to map types by issuing a query against pg_type. + This function takes a list of NpgsqlTypeInfo and attempts to resolve the OID field + of each by querying pg_type. If the mapping is found, the type info object is + updated (OID) and added to the provided NpgsqlTypeMapping object. + NpgsqlConnector to send query through. + Mapping object to add types too. + List of types that need to have OID's mapped. - + - This function will set value for known key, both private member and base[key]. + Set Cache Size. The default value is 20. - - - + - The function will modify private member only, not base[key]. + Lookup cached entity. null will returned if not match. + For both get{} and set{} apply LRU rule. - - + key + - + - Clear the member and assign them to the default value. + The globally available text encoding used for frontend/backend communication. - + + This class represents the base class for the state pattern design pattern + implementation. + + + This class represents the base class for the state pattern design pattern + implementation. + + + This class represents the base class for the state pattern design pattern + implementation. + + + + - Compatibilty version. When possible, behaviour caused by breaking changes will be preserved - if this version is less than that where the breaking change was introduced. - + This method is used by the states to change the state of the context. + - + - Case insensative accessor for indivual connection string values. + Call ProcessBackendResponsesEnum(), and scan and discard all results. - + - Common base class for all derived MD5 implementations. + This method is responsible to handle all protocol messages sent from the backend. + It holds all the logic to do it. + To exchange data, it uses a Mediator object from which it reads/writes information + to handle backend requests. + + + + + + Checks for context socket availability. + Socket.Poll supports integer as microseconds parameter. + This limits the usable command timeout value + to 2,147 seconds: (2,147 x 1,000,000 less than max_int). + In order to bypass this limit, the availability of + the socket is checked in 2,147 seconds cycles + true, if for context socket availability was checked, false otherwise. + Context. + Select mode. @@ -307,359 +2087,589 @@ Returns the size in bits of the hash. - + + + Must be overriden if not 1 + + + + + Must be overriden if not 1 + + + + + Common base class for all derived MD5 implementations. + + + + + Called from constructor of derived class. + + + + + Creates the default derived class. + + + + + C# implementation of the MD5 cryptographic hash function. + + + + + Creates a new MD5CryptoServiceProvider. + + + + + Drives the hashing function. + + Byte array containing the data to hash. + Where in the input buffer to start. + Size in bytes of the data in the buffer to hash. + + + + This finalizes the hash. Takes the data from the chaining variables and returns it. + + + + + Resets the class after use. Called automatically after hashing is done. + + + + + This is the meat of the hash function. It is what processes each block one at a time. + + Byte array to process data from. + Where in the byte array to start processing. + + + + Pads and then processes the final block. + + Buffer to grab data from. + Position in buffer in bytes to get data from. + How much data in bytes in the buffer to use. + + + + Implements for version 3 of the protocol. + + + + + Reads a row, field by field, allowing a DataRow to be built appropriately. + + + + + Marker interface which identifies a class which may take possession of a stream for the duration of + it's lifetime (possibly temporarily giving that possession to another class for part of that time. + + It inherits from IDisposable, since any such class must make sure it leaves the stream in a valid state. + + The most important such class is that compiler-generated from ProcessBackendResponsesEnum. Of course + we can't make that inherit from this interface, alas. + + + + + Marker interface which identifies a class which represents part of + a response from the server. + + + + + Reads part of a field, as needed (for + and + + + + + Adds further functionality to stream that is dependant upon the type of data read. + + + + + Completes the implementation of Streamer for char data. + + + + + Completes the implementation of Streamer for byte data. + + + + + Implements for version 2 of the protocol. + + + + + Encapsulates the null mapping bytes sent at the start of a version 2 + datarow message, and the process of identifying the nullity of the data + at a particular index + + + + + This class represents a BackEndKeyData message received + from PostgreSQL + + + + + This class represents the Bind message sent to PostgreSQL + server. + + + + + + For classes representing messages sent from the client to the server. + + + + + This class represents the CancelRequest message sent to PostgreSQL + server. + + + + - Must be overriden if not 1 + Represents a SQL statement or function (stored procedure) to execute + against a PostgreSQL database. This class cannot be inherited. - - - Must be overriden if not 1 + Represents a SQL statement or function (stored procedure) to execute + against a PostgreSQL database. This class cannot be inherited. - - - Called from constructor of derived class. + Represents a SQL statement or function (stored procedure) to execute + against a PostgreSQL database. This class cannot be inherited. - + - Creates the default derived class. + Initializes a new instance of the NpgsqlCommand class. - + - Given a join expression and a projection, fetch all columns in the projection - that reference columns in the join. + Initializes a new instance of the NpgsqlCommand class with the text of the query. + The text of the query. - + - Given an InputExpression append all from names (including nested joins) to the list. + Initializes a new instance of the NpgsqlCommand class with the text of the query and a NpgsqlConnection. + The text of the query. + A NpgsqlConnection that represents the connection to a PostgreSQL server. - + - Get new ColumnExpression that will be used in projection that had it's existing columns moved. - These should be simple references to the inner column + Initializes a new instance of the NpgsqlCommand class with the text of the query, a NpgsqlConnection, and the NpgsqlTransaction. + The text of the query. + A NpgsqlConnection that represents the connection to a PostgreSQL server. + The NpgsqlTransaction in which the NpgsqlCommand executes. - + - Every property accessed in the list of columns must be adjusted for a new scope + Used to execute internal commands. - - - This class provides many util methods to handle - reading and writing of PostgreSQL protocol messages. - - - - - This method takes a ProtocolVersion and returns an integer - version number that the Postgres backend will recognize in a - startup packet. - - - + - This method takes a version string as returned by SELECT VERSION() and returns - a valid version string ("7.2.2" for example). - This is only needed when running protocol version 2. - This does not do any validity checks. + Attempts to cancel the execution of a NpgsqlCommand. + This Method isn't implemented yet. - - - This method gets a C NULL terminated string from the network stream. - It keeps reading a byte in each time until a NULL byte is returned. - It returns the resultant string of bytes read. - This string is sent from backend. - - - + - Reads requested number of bytes from stream with retries until Stream.Read returns 0 or count is reached. + Create a new command based on this one. - Stream to read - byte buffer to fill - starting position to fill the buffer - number of bytes to read - The number of bytes read. May be less than count if no more bytes are available. + A new NpgsqlCommand object. - - - This method writes a C NULL terminated string to the network stream. - It appends a NULL terminator to the end of the String. - + - This method writes a C NULL terminated string to the network stream. - It appends a NULL terminator to the end of the String. - + Create a new command based on this one. + + A new NpgsqlCommand object. - + - This method writes a set of bytes to the stream. It also enables logging of them. + Creates a new instance of an DbParameter object. + An DbParameter object. - + - This method writes a C NULL terminated string limited in length to the - backend server. - It pads the string with null bytes to the size specified. - + Creates a new instance of a NpgsqlParameter object. + + A NpgsqlParameter object. - + - Write a 32-bit integer to the given stream in the correct byte order. + Slightly optimised version of ExecuteNonQuery() for internal use in cases where the number + of affected rows is of no interest. + This function must not be called with a query that returns result rows, after calling Prepare(), or. + with a query that requires parameter substitution of any kind. - + - Read a 32-bit integer from the given stream in the correct byte order. + Executes a SQL statement against the connection and returns the number of rows affected. + The number of rows affected if known; -1 otherwise. - + - Write a 16-bit integer to the given stream in the correct byte order. + Sends the CommandText to + the Connection and builds a + NpgsqlDataReader + using one of the CommandBehavior values. + One of the CommandBehavior values. + A NpgsqlDataReader object. - + - Read a 16-bit integer from the given stream in the correct byte order. + Sends the CommandText to + the Connection and builds a + NpgsqlDataReader. + A NpgsqlDataReader object. - + - Represent the frontend/backend protocol version. + Sends the CommandText to + the Connection and builds a + NpgsqlDataReader + using one of the CommandBehavior values. + One of the CommandBehavior values. + A NpgsqlDataReader object. + Currently the CommandBehavior parameter is ignored. - + - Represent the backend server version. - As this class offers no functionality beyond that offered by it has been - deprecated in favour of that class. - - + This method binds the parameters from parameters collection to the bind + message. + - + - Returns the string representation of this version in three place dot notation (Major.Minor.Patch). + Executes the query, and returns the first column of the first row + in the result set returned by the query. Extra columns or rows are ignored. + The first column of the first row in the result set, + or a null reference if the result set is empty. - + - Server version major number. + Creates a prepared version of the command on a PostgreSQL server. - + - Server version minor number. + This method checks the connection state to see if the connection + is set or it is open. If one of this conditions is not met, throws + an InvalidOperationException - + - Server version patch level number. + This method substitutes the Parameters, if exist, in the command + to their actual values. + The parameter name format is :ParameterName. + A version of CommandText with the Parameters inserted. - + - Represents a PostgreSQL COPY TO STDOUT operation with a corresponding SQL statement - to execute against a PostgreSQL database - and an associated stream used to write results to (if provided by user) - or for reading the results (when generated by driver). - Eg. new NpgsqlCopyOut("COPY (SELECT * FROM mytable) TO STDOUT", connection, streamToWrite).Start(); + Process this.commandText, trimming each distinct command and substituting paramater + tokens. + + + UTF8 encoded command ready to be sent to the backend. - + - Creates NpgsqlCommand to run given query upon Start(), after which CopyStream provides data from database as requested in the query. + Find the beginning and end of each distinct SQL command and produce + a list of descriptors, one for each command. Commands described are trimmed of + leading and trailing white space and their terminating semi-colons. + Raw command text. + List of chunk descriptors. - + - Given command is run upon Start(), after which CopyStream provides data from database as requested in the query. + Append a region of a source command text to an output command, performing parameter token + substitutions. + Stream to which to append output. + Command text. + Starting index within src. + Length of region to be processed. + + - + - Given command is executed upon Start() and all requested copy data is written to toStream immediately. + Gets or sets the SQL statement or function (stored procedure) to execute at the data source. + The Transact-SQL statement or stored procedure to execute. The default is an empty string. - + - Returns true if this operation is currently active and field at given location is in binary format. + Gets or sets the wait time before terminating the attempt + to execute a command and generating an error. + The time (in seconds) to wait for the command to execute. + The default is 20 seconds. - + - Command specified upon creation is executed as a non-query. - If CopyStream is set upon creation, all copy data from server will be written to it, and operation will be finished immediately. - Otherwise the CopyStream member can be used for reading copy data from server until no more data is available. + Gets or sets a value indicating how the + CommandText property is to be interpreted. + One of the CommandType values. The default is CommandType.Text. - + - Flush generated CopyStream at once. Effectively reads and discard all the rest of copy data from server. + Gets or sets the NpgsqlConnection + used by this instance of the NpgsqlCommand. + The connection to a data source. The default value is a null reference. - + - Returns true if the connection is currently reserved for this operation. + Gets the NpgsqlParameterCollection. + The parameters of the SQL statement or function (stored procedure). The default is an empty collection. - + - The stream provided by user or generated upon Start() + Gets or sets the NpgsqlTransaction + within which the NpgsqlCommand executes. + The NpgsqlTransaction. + The default value is a null reference. - + - The Command used to execute this copy operation. + Gets or sets how command results are applied to the DataRow + when used by the Update + method of the DbDataAdapter. + One of the UpdateRowSource values. - + - Returns true if this operation is currently active and in binary format. + Returns oid of inserted row. This is only updated when using executenonQuery and when command inserts just a single row. If table is created without oids, this will always be 0. - + - Returns number of fields if this operation is currently active, otherwise -1 + This class is responsible to create database commands for automatic insert, update and delete operations. - + - Faster alternative to using the generated CopyStream. + Initializes a new instance of the class. - + - This class manages all connector objects, pooled AND non-pooled. + Initializes a new instance of the class. + The adapter. - - Unique static instance of the connector pool - mamager. - - - Map of index to unused pooled connectors, avaliable to the - next RequestConnector() call. - This hashmap will be indexed by connection string. - This key will hold a list of queues of pooled connectors available to be used. - - - Timer for tracking unused connections in pools. - - + - Searches the shared and pooled connector lists for a - matching connector object or creates a new one. + + This method is reponsible to derive the command parameter list with values obtained from function definition. + It clears the Parameters collection of command. Also, if there is any parameter type which is not supported by Npgsql, an InvalidOperationException will be thrown. + Parameters name will be parameter1, parameter2, ... - The NpgsqlConnection that is requesting - the connector. Its ConnectionString will be used to search the - pool for available connectors. - A connector object. + NpgsqlCommand whose function parameters will be obtained. - + - Find a pooled connector. Handle locking and timeout here. + Gets the automatically generated object required + to perform insertions at the data source. + + The automatically generated object required to perform insertions. + - + - Find a pooled connector. Handle shared/non-shared here. + Gets the automatically generated object required to perform insertions + at the data source, optionally using columns for parameter names. + + If true, generate parameter names matching column names, if possible. + If false, generate @p1, @p2, and so on. + + + The automatically generated object required to perform insertions. + - + - Releases a connector, possibly back to the pool for future use. + Gets the automatically generated System.Data.Common.DbCommand object required + to perform updates at the data source. - - Pooled connectors will be put back into the pool if there is room. - Shared connectors should just have their use count decremented - since they always stay in the shared pool. - - The connector to release. + + The automatically generated System.Data.Common.DbCommand object required to perform updates. + - + - Release a pooled connector. Handle locking here. + Gets the automatically generated object required to perform updates + at the data source, optionally using columns for parameter names. + + If true, generate parameter names matching column names, if possible. + If false, generate @p1, @p2, and so on. + + + The automatically generated object required to perform updates. + - + - Release a pooled connector. Handle shared/non-shared here. + Gets the automatically generated System.Data.Common.DbCommand object required + to perform deletions at the data source. + + The automatically generated System.Data.Common.DbCommand object required to perform deletions. + - + - Create a connector without any pooling functionality. + Gets the automatically generated object required to perform deletions + at the data source, optionally using columns for parameter names. + + If true, generate parameter names matching column names, if possible. + If false, generate @p1, @p2, and so on. + + + The automatically generated object required to perform deletions. + - + - Find an available pooled connector in the non-shared pool, or create - a new one if none found. + Applies the parameter information. + The parameter. + The row. + Type of the statement. + if set to true [where clause]. - + - This method is only called when NpgsqlConnection.Dispose(false) is called which means a - finalization. This also means, an NpgsqlConnection was leak. We clear pool count so that - client doesn't end running out of connections from pool. When the connection is finalized, its underlying - socket is closed. + Returns the name of the specified parameter in the format of @p#. + The number to be included as part of the parameter's name.. + + The name of the parameter with the specified number appended as part of the parameter name. + - + - Close the connector. + Returns the full parameter name, given the partial parameter name. - - Connector to release + The partial name of the parameter. + + The full parameter name corresponding to the partial parameter name requested. + - + - Put a pooled connector into the pool queue. + Returns the placeholder for the parameter in the associated SQL statement. - Connector to pool + The number to be included as part of the parameter's name. + + The name of the parameter with the specified number appended. + - + - A queue with an extra Int32 for keeping track of busy connections. + Registers the to handle the event for a . + The to be used for the update. - + - Connections available to the end user + Adds an event handler for the event. + The sender + A instance containing information about the event. - + - Connections currently in use + Given an unquoted identifier in the correct catalog case, returns the correct quoted form of that identifier, including properly escaping any embedded quotes in the identifier. + The original unquoted identifier. + + The quoted version of the identifier. Embedded quotes within the identifier are properly escaped. + + + + + Unquoted identifier parameter cannot be null - + - This class represents a BackEndKeyData message received - from PostgreSQL + Given a quoted identifier, returns the correct unquoted form of that identifier, including properly un-escaping any embedded quotes in the identifier. + The identifier that will have its embedded quotes removed. + + The unquoted identifier, with embedded quotes properly un-escaped. + + + + + Quoted identifier parameter cannot be null - + - Used when a connection is closed + Gets or sets the beginning character or characters to use when specifying database objects (for example, tables or columns) whose names contain characters such as spaces or reserved tokens. + + The beginning character or characters to use. The default is an empty string. + + + + - + - Summary description for NpgsqlQuery + Gets or sets the ending character or characters to use when specifying database objects (for example, tables or columns) whose names contain characters such as spaces or reserved tokens. + + The ending character or characters to use. The default is an empty string. + + + + Represents the method that handles the Notice events. + The source of the event. A NpgsqlNoticeEventArgs that contains the event data. @@ -689,6 +2699,14 @@ The connection used to open the PostgreSQL database. + + + Initializes a new instance of the + NpgsqlConnection class + and sets the ConnectionString. + + The connection used to open the PostgreSQL database. + Begins a database transaction with the specified isolation level. @@ -739,7 +2757,13 @@ Releases the connection to the database. If the connection is pooled, it will be - made available for re-use. If it is non-pooled, the actual connection will be shutdown. + made available for re-use. If it is non-pooled, the actual connection will be shutdown. + + + + + When a connection is closed within an enclosing TransactionScope and the transaction + hasn't been promoted, we defer the actual closing until the scope ends. @@ -776,6 +2800,11 @@ A new NpgsqlConnection object. + + + Returns a copy of the NpgsqlConnectionStringBuilder that contains the parsed connection string values. + + Default SSL CertificateSelectionCallback implementation. @@ -796,11 +2825,33 @@ Default SSL ProvideClientCertificatesCallback implementation. + + + Default SSL ValidateRemoteCertificateCallback implementation. + + Write each key/value pair in the connection string to the log. + + + Sets the `settings` ConnectionStringBuilder based on the given `connectionString` + + The connection string to load the builder from + + + + Sets the `settings` ConnectionStringBuilder based on the given `connectionString` + + The connection string to load the builder from + + + + Refresh the cached _connectionString whenever the builder settings change + + Returns the supported collections @@ -854,6 +2905,11 @@ Mono.Security.Protocol.Tls.PrivateKeySelectionCallback delegate. + + + Called to validate server's certificate during SSL handshake + + Gets or sets the string used to connect to a PostgreSQL database. @@ -1005,828 +3061,520 @@ - Process id of backend server. - This can only be called when there is an active connection. - - - - - The connector object connected to the backend. - - - - - Gets the NpgsqlConnectionStringBuilder containing the parsed connection string values. - - - - - User name. - - - - - Password. - - - - - Determine if connection pooling will be used for this connection. - - - - - This class represents the CancelRequest message sent to PostgreSQL - server. - - - - - - - - - - - - - - - - - - - A time period expressed in 100ns units. - - - A time period expressed in a - - - Number of 100ns units. - - - Number of seconds. - - - Number of milliseconds. - - - Number of milliseconds. - - - Number of milliseconds. - - - A d with the given number of ticks. - - - A d with the given number of microseconds. - - - A d with the given number of milliseconds. - - - A d with the given number of seconds. - - - A d with the given number of minutes. - - - A d with the given number of hours. - - - A d with the given number of days. - - - A d with the given number of months. - - - An whose values are the sums of the two instances. - - - An whose values are the differences of the two instances. - - - An whose value is the negated value of this instance. - - - An whose value is the absolute value of this instance. - - - - An based on this one, but with any days converted to multiples of ±24hours. - - - - An based on this one, but with any months converted to multiples of ±30days. - - - - An based on this one, but with any months converted to multiples of ±30days and then any days converted to multiples of ±24hours; - - - - An eqivalent, canonical, . - - - An equivalent . - - - - - - An signed integer. - - - - The argument is not an . - - - The string was not in a format that could be parsed to produce an . - - - true if the parsing succeeded, false otherwise. - - - The representation. - - - An whose values are the sum of the arguments. - - - An whose values are the difference of the arguments - - - true if the two arguments are exactly the same, false otherwise. - - - false if the two arguments are exactly the same, true otherwise. - - - true if the first is less than second, false otherwise. - - - true if the first is less than or equivalent to second, false otherwise. - - - true if the first is greater than second, false otherwise. - - - true if the first is greater than or equivalent to the second, false otherwise. - - - The argument. - - - The negation of the argument. - - - - - - - - - - - - - - - - - - - - This time, normalised - - - - - - - - - This time, normalised - - - An integer which is 0 if they are equal, < 0 if this is the smaller and > 0 if this is the larger. - - - - - - - - - A class to handle everything associated with SSPI authentication - - - - - Simplified SecBufferDesc struct with only one SecBuffer - - - - - This class represents the Parse message sent to PostgreSQL - server. - - - - - - EventArgs class to send Notice parameters, which are just NpgsqlError's in a lighter context. - - - - - Notice information. - - - - - This class represents the ErrorResponse and NoticeResponse - message sent from PostgreSQL server. - - - - - Return a string representation of this error object. + Process id of backend server. + This can only be called when there is an active connection. - + - Severity code. All versions. + Report whether the backend is expecting standard conformant strings. + In version 8.1, Postgres began reporting this value (false), but did not actually support standard conformant strings. + In version 8.2, Postgres began supporting standard conformant strings, but defaulted this flag to false. + As of version 9.1, this flag defaults to true. - + - Error code. PostgreSQL 7.4 and up. + Report whether the backend understands the string literal E prefix (>= 8.1). - + - Terse error message. All versions. + Report whether the backend understands the hex byte format (>= 9.0). - + - Detailed error message. PostgreSQL 7.4 and up. + The connector object connected to the backend. - + - Suggestion to help resolve the error. PostgreSQL 7.4 and up. + Gets the NpgsqlConnectionStringBuilder containing the parsed connection string values. - + - Position (one based) within the query string where the error was encounterd. PostgreSQL 7.4 and up. + User name. - + - Position (one based) within the query string where the error was encounterd. This position refers to an internal command executed for example inside a PL/pgSQL function. PostgreSQL 7.4 and up. + Password. - + - Internal query string where the error was encounterd. This position refers to an internal command executed for example inside a PL/pgSQL function. PostgreSQL 7.4 and up. + Determine if connection pooling will be used for this connection. - + - Trace back information. PostgreSQL 7.4 and up. + Return an exact copy of this NpgsqlConnectionString. - + - Source file (in backend) reporting the error. PostgreSQL 7.4 and up. + No integrated security if we're on mono and .NET 4.5 because of ClaimsIdentity, + see https://github.com/npgsql/Npgsql/issues/133 - + - Source file line number (in backend) reporting the error. PostgreSQL 7.4 and up. + This function will set value for known key, both private member and base[key]. + + + + value, coerced as needed to the stored type. - + - Source routine (in backend) reporting the error. PostgreSQL 7.4 and up. + The function will modify private member only, not base[key]. + + + value, coerced as needed to the stored type. - + - String containing the sql sent which produced this error. + The function will access private member only, not base[key]. + + value. - + - Backend protocol version in use. + Clear the member and assign them to the default value. - + - Represents an ongoing COPY TO STDOUT operation. - Provides methods to read data from server or end the operation. + Gets or sets the backend server host name. - - This class represents the base class for the state pattern design pattern - implementation. - - - - + - This method is used by the states to change the state of the context. - + Gets or sets the backend server port. + - + - This method is responsible to handle all protocol messages sent from the backend. - It holds all the logic to do it. - To exchange data, it uses a Mediator object from which it reads/writes information - to handle backend requests. - - + Gets or sets the specified backend communication protocol version. + - + - This method is responsible to handle all protocol messages sent from the backend. - It holds all the logic to do it. - To exchange data, it uses a Mediator object from which it reads/writes information - to handle backend requests. + Gets or sets the name of the database to be used after a connection is opened. - - - - - Called from NpgsqlState.ProcessBackendResponses upon CopyOutResponse. - If CopyStream is already set, it is used to write data received from server, after which the copy ends. - Otherwise CopyStream is set to a readable NpgsqlCopyOutStream that receives data from server. - + The name of the database to be + used after a connection is opened. - + - Called from NpgsqlOutStream.Read to read copy data from server. + Gets or sets the login user name. - + - Copy format information returned from server. + This is a pretty horrible hack to fix https://github.com/npgsql/Npgsql/issues/133 + In a nutshell, starting with .NET 4.5 WindowsIdentity inherits from ClaimsIdentity + which doesn't exist in mono, and calling UserName getter above bombs. + The workaround is that the function that actually deals with WindowsIdentity never + gets called on mono, so never gets JITted and the problem goes away. - + - Handles serialisation of .NET array or IEnumeration to pg format. - Arrays of arrays, enumerations of enumerations, arrays of enumerations etc. - are treated as multi-dimensional arrays (in much the same manner as an array of arrays - is used to emulate multi-dimensional arrays in languages that lack native support for them). - If such an enumeration of enumerations is "jagged" (as opposed to rectangular, cuboid, - hypercuboid, hyperhypercuboid, etc) then this class will "correctly" serialise it, but pg - will raise an error as it doesn't allow jagged arrays. + Gets or sets the login password as a UTF8 encoded byte array. - + - Create an ArrayNativeToBackendTypeConverter with the element converter passed + Sets the login password as a string. - The that would be used to serialise the element type. - + - Serialise the enumeration or array. + Gets or sets a value indicating whether to attempt to use SSL. - + - Handles parsing of pg arrays into .NET arrays. + Gets or sets a value indicating whether to attempt to use SSL. - + - Takes a string representation of a pg 1-dimensional array - (or a 1-dimensional row within an n-dimensional array) - and allows enumeration of the string represenations of each items. + Gets the backend encoding. Always returns "UTF8". - + - Takes a string representation of a pg n-dimensional array - and allows enumeration of the string represenations of the next - lower level of rows (which in turn can be taken as (n-1)-dimensional arrays. + Gets or sets the time to wait while trying to establish a connection + before terminating the attempt and generating an error. + The time (in seconds) to wait for a connection to open. The default value is 15 seconds. - + - Takes an ArrayList which may be an ArrayList of ArrayLists, an ArrayList of ArrayLists of ArrayLists - and so on and enumerates the items that aren't ArrayLists (the leaf nodes if we think of the ArrayList - passed as a tree). Simply uses the ArrayLists' own IEnumerators to get that of the next, - pushing them onto a stack until we hit something that isn't an ArrayList. - ArrayList to enumerate - IEnumerable + Gets or sets the schema search path. - + - Create a new ArrayBackendToNativeTypeConverter + Gets or sets a value indicating whether connection pooling should be used. - for the element type. - + - Creates an array from pg representation. + Gets or sets the time to wait before closing unused connections in the pool if the count + of all connections exeeds MinPoolSize. + + If connection pool contains unused connections for ConnectionLifeTime seconds, + the half of them will be closed. If there will be unused connections in a second + later then again the half of them will be closed and so on. + This strategy provide smooth change of connection count in the pool. + + The time (in seconds) to wait. The default value is 15 seconds. - + - Creates an array list from pg represenation of an array. - Multidimensional arrays are treated as ArrayLists of ArrayLists + Gets or sets the minimum connection pool size. - + - Creates an n-dimensional array from an ArrayList of ArrayLists or - a 1-dimensional array from something else. + Gets or sets the maximum connection pool size. - to convert - produced. - + - Takes an array of ints and treats them like the limits of a set of counters. - Retains a matching set of ints that is set to all zeros on the first ++ - On a ++ it increments the "right-most" int. If that int reaches it's - limit it is set to zero and the one before it is incremented, and so on. - - Making this a more general purpose class is pretty straight-forward, but we'll just put what we need here. + Gets or sets a value indicating whether to listen for notifications and report them between command activity. - - - This class represents the ParameterStatus message sent from PostgreSQL - server. - - - - - - This class is responsible for serving as bridge between the backend - protocol handling and the core classes. It is used as the mediator for - exchanging data generated/sent from/to backend. - - - - + - This class is responsible to create database commands for automatic insert, update and delete operations. + Gets the time to wait while trying to execute a command + before terminating the attempt and generating an error. + The time (in seconds) to wait for a command to complete. The default value is 20 seconds. - + - - This method is reponsible to derive the command parameter list with values obtained from function definition. - It clears the Parameters collection of command. Also, if there is any parameter type which is not supported by Npgsql, an InvalidOperationException will be thrown. - Parameters name will be parameter1, parameter2, ... - For while, only parameter name and NpgsqlDbType are obtained. + Gets or sets a value indicating whether datareaders are loaded in their entirety (for compatibility with earlier code). - NpgsqlCommand whose function parameters will be obtained. - + - Represents a completed response message. + Compatibilty version. When possible, behaviour caused by breaking changes will be preserved + if this version is less than that where the breaking change was introduced. - - + - Marker interface which identifies a class which may take possession of a stream for the duration of - it's lifetime (possibly temporarily giving that possession to another class for part of that time. - - It inherits from IDisposable, since any such class must make sure it leaves the stream in a valid state. - - The most important such class is that compiler-generated from ProcessBackendResponsesEnum. Of course - we can't make that inherit from this interface, alas. + Gets or sets the ootional application name parameter to be sent to the backend during connection initiation. - + - The exception that is thrown when the PostgreSQL backend reports errors. + Gets or sets a value indicating whether to silently Prepare() all commands before execution. - + - Construct a backend error exception based on a list of one or more - backend errors. The basic Exception.Message will be built from the - first (usually the only) error in the list. + Case insensative accessor for indivual connection string values. - + - Format a .NET style exception string. - Include all errors in the list, including any hints. + Set both ImplicitDefault and ExplicitDefault to the 's default value. + + + - + - Append a line to the given Stream, first checking for zero-length. + Set ImplicitDefault to the default value of 's type, + and ExplicitDefault to . + + + - + - Provide access to the entire list of errors provided by the PostgreSQL backend. + Represents the method that allows the application to provide a certificate collection to be used for SSL clien authentication + A X509CertificateCollection to be filled with one or more client certificates. - + - Severity code. All versions. + Represents the method that is called to validate the certificate provided by the server during an SSL handshake + The server's certificate + The certificate chain containing the certificate's CA and any intermediate authorities + Any errors that were detected - + - Error code. PostgreSQL 7.4 and up. + !!! Helper class, for compilation only. + Connector implements the logic for the Connection Objects to + access the physical connection to the database, and isolate + the application developer from connection pooling internals. - + - Basic error message. All versions. + Constructor. + Connection string. + Pooled + Controls whether the connector can be shared. - + - Detailed error message. PostgreSQL 7.4 and up. + This method checks if the connector is still ok. + We try to send a simple query text, select 1 as ConnectionTest; - + - Suggestion to help resolve the error. PostgreSQL 7.4 and up. + This method is responsible for releasing all resources associated with this Connector. - + - Position (one based) within the query string where the error was encounterd. PostgreSQL 7.4 and up. + This method is responsible to release all portals used by this Connector. - + - Trace back information. PostgreSQL 7.4 and up. + Default SSL CertificateSelectionCallback implementation. - + - Source file (in backend) reporting the error. PostgreSQL 7.4 and up. + Default SSL CertificateValidationCallback implementation. - + - Source file line number (in backend) reporting the error. PostgreSQL 7.4 and up. + Default SSL PrivateKeySelectionCallback implementation. - + - Source routine (in backend) reporting the error. PostgreSQL 7.4 and up. + Default SSL ProvideClientCertificatesCallback implementation. - + - String containing the sql sent which produced this error. + Default SSL ValidateRemoteCertificateCallback implementation. - + - Returns the entire list of errors provided by the PostgreSQL backend. + This method is required to set all the version dependent features flags. + SupportsPrepare means the server can use prepared query plans (7.3+) - + - The level of verbosity of the NpgsqlEventLog + Opens the physical connection to the server. + Usually called by the RequestConnector + Method of the connection pool manager. - + - Don't log at all + Closes the physical connection to the server. - + - Only log the most common issues + Returns next portal index. - + - Log everything + Returns next plan index. - + - This class handles all the Npgsql event and debug logging + Occurs on NoticeResponses from the PostgreSQL backend. - + - Writes a string to the Npgsql event log if msglevel is bigger then NpgsqlEventLog.Level + Occurs on NotificationResponses from the PostgreSQL backend. - - This method is obsolete and should no longer be used. - It is likely to be removed in future versions of Npgsql - - The message to write to the event log - The minimum LogLevel for which this message should be logged. - + - Writes a string to the Npgsql event log if msglevel is bigger then NpgsqlEventLog.Level + Called to provide client certificates for SSL handshake. - The ResourceManager to get the localized resources - The name of the resource that should be fetched by the ResourceManager - The minimum LogLevel for which this message should be logged. - The additional parameters that shall be included into the log-message (must be compatible with the string in the resource): - + - Writes the default log-message for the action of calling the Get-part of an Indexer to the log file. + Mono.Security.Protocol.Tls.CertificateSelectionCallback delegate. - The minimum LogLevel for which this message should be logged. - The name of the class that contains the Indexer - The parameter given to the Indexer - + - Writes the default log-message for the action of calling the Set-part of an Indexer to the logfile. + Mono.Security.Protocol.Tls.CertificateValidationCallback delegate. - The minimum LogLevel for which this message should be logged. - The name of the class that contains the Indexer - The parameter given to the Indexer - The value the Indexer is set to - + - Writes the default log-message for the action of calling the Get-part of a Property to the logfile. + Mono.Security.Protocol.Tls.PrivateKeySelectionCallback delegate. - The minimum LogLevel for which this message should be logged. - The name of the class that contains the Property - The name of the Property - + - Writes the default log-message for the action of calling the Set-part of a Property to the logfile. + Called to validate server's certificate during SSL handshake - The minimum LogLevel for which this message should be logged. - The name of the class that contains the Property - The name of the Property - The value the Property is set to - + - Writes the default log-message for the action of calling a Method without Arguments to the logfile. + Gets the current state of the connection. - The minimum LogLevel for which this message should be logged. - The name of the class that contains the Method - The name of the Method - + - Writes the default log-message for the action of calling a Method with one Argument to the logfile. + Return Connection String. - The minimum LogLevel for which this message should be logged. - The name of the class that contains the Method - The name of the Method - The value of the Argument of the Method - + - Writes the default log-message for the action of calling a Method with two Arguments to the logfile. + Version of backend server this connector is connected to. - The minimum LogLevel for which this message should be logged. - The name of the class that contains the Method - The name of the Method - The value of the first Argument of the Method - The value of the second Argument of the Method - + - Writes the default log-message for the action of calling a Method with three Arguments to the logfile. + Backend protocol version in use by this connector. - The minimum LogLevel for which this message should be logged. - The name of the class that contains the Method - The name of the Method - The value of the first Argument of the Method - The value of the second Argument of the Method - The value of the third Argument of the Method - + - Writes the default log-message for the action of calling a Method with more than three Arguments to the logfile. + The physical connection socket to the backend. - The minimum LogLevel for which this message should be logged. - The name of the class that contains the Method - The name of the Method - A Object-Array with zero or more Ojects that are Arguments of the Method. - + - Sets/Returns the level of information to log to the logfile. - - The current LogLevel + The physical connection stream to the backend. + - + - Sets/Returns the filename to use for logging. - - The filename of the current Log file. + The top level stream to the backend. + - + - Sets/Returns whether Log messages should be echoed to the console - - true if Log messages are echoed to the console, otherwise false - - - - This class represents the Parse message sent to PostgreSQL - server. - - + Reports if this connector is fully connected. + - + - Represents a PostgreSQL COPY FROM STDIN operation with a corresponding SQL statement - to execute against a PostgreSQL database - and an associated stream used to read data from (if provided by user) - or for writing it (when generated by driver). - Eg. new NpgsqlCopyIn("COPY mytable FROM STDIN", connection, streamToRead).Start(); + The connection mediator. - + - Creates NpgsqlCommand to run given query upon Start(). Data for the requested COPY IN operation can then be written to CopyData stream followed by a call to End() or Cancel(). + Report if the connection is in a transaction. - + - Given command is run upon Start(). Data for the requested COPY IN operation can then be written to CopyData stream followed by a call to End() or Cancel(). + Report whether the current connection can support prepare functionality. - + - Given command is executed upon Start() and all data from fromStream is passed to it as copy data. + Options that control certain aspects of native to backend conversions that depend + on backend version and status. - + - Returns true if this operation is currently active and field at given location is in binary format. + This class manages all connector objects, pooled AND non-pooled. - + + Unique static instance of the connector pool + mamager. + + + Map of index to unused pooled connectors, avaliable to the + next RequestConnector() call. + This hashmap will be indexed by connection string. + This key will hold a list of queues of pooled connectors available to be used. + + + Timer for tracking unused connections in pools. + + - Command specified upon creation is executed as a non-query. - If CopyStream is set upon creation, it will be flushed to server as copy data, and operation will be finished immediately. - Otherwise the CopyStream member can be used for writing copy data to server and operation finished with a call to End() or Cancel(). + Searches the shared and pooled connector lists for a + matching connector object or creates a new one. + The NpgsqlConnection that is requesting + the connector. Its ConnectionString will be used to search the + pool for available connectors. + A connector object. - + - Called after writing all data to CopyStream to successfully complete this copy operation. + Find a pooled connector. Handle shared/non-shared here. - + - Withdraws an already started copy operation. The operation will fail with given error message. - Will do nothing if current operation is not active. + Releases a connector, possibly back to the pool for future use. + + Pooled connectors will be put back into the pool if there is room. + Shared connectors should just have their use count decremented + since they always stay in the shared pool. + + Connection to which the connector is leased. + The connector to release. - + - Returns true if the connection is currently reserved for this operation. + Release a pooled connector. Handle shared/non-shared here. - + - The stream provided by user or generated upon Start(). - User may provide a stream to constructor; it is used to pass to server all data read from it. - Otherwise, call to Start() sets this to a writable NpgsqlCopyInStream that passes all data written to it to server. - In latter case this is only available while the copy operation is active and null otherwise. + Find an available pooled connector in the non-shared pool, or create + a new one if none found. - + - Returns true if this operation is currently active and in binary format. + Put a pooled connector into the pool queue. + Connection is leased to. + Connector to pool - + - Returns number of fields expected on each input row if this operation is currently active, otherwise -1 + A queue with an extra Int32 for keeping track of busy connections. - + - The Command used to execute this copy operation. + Connections available to the end user - + - Set before a COPY IN query to define size of internal buffer for reading from given CopyStream. + Connections currently in use @@ -1854,280 +3602,295 @@ Returns number of fields if this operation is currently active, otherwise -1 - - - + + + Represents a PostgreSQL COPY FROM STDIN operation with a corresponding SQL statement + to execute against a PostgreSQL database + and an associated stream used to read data from (if provided by user) + or for writing it (when generated by driver). + Eg. new NpgsqlCopyIn("COPY mytable FROM STDIN", connection, streamToRead).Start(); + - + - Provide event handlers to convert all native supported basic data types from their backend - text representation to a .NET object. + Creates NpgsqlCommand to run given query upon Start(). Data for the requested COPY IN operation can then be written to CopyData stream followed by a call to End() or Cancel(). - + - Binary data. + Given command is run upon Start(). Data for the requested COPY IN operation can then be written to CopyData stream followed by a call to End() or Cancel(). - + - Convert a postgresql boolean to a System.Boolean. + Given command is executed upon Start() and all data from fromStream is passed to it as copy data. - + - Convert a postgresql bit to a System.Boolean. + Returns true if this operation is currently active and field at given location is in binary format. - + - Convert a postgresql datetime to a System.DateTime. + Command specified upon creation is executed as a non-query. + If CopyStream is set upon creation, it will be flushed to server as copy data, and operation will be finished immediately. + Otherwise the CopyStream member can be used for writing copy data to server and operation finished with a call to End() or Cancel(). + + + + + Called after writing all data to CopyStream to successfully complete this copy operation. + + + + + Withdraws an already started copy operation. The operation will fail with given error message. + Will do nothing if current operation is not active. + + + + + Returns true if the connection is currently reserved for this operation. - + - Convert a postgresql date to a System.DateTime. + The stream provided by user or generated upon Start(). + User may provide a stream to constructor; it is used to pass to server all data read from it. + Otherwise, call to Start() sets this to a writable NpgsqlCopyInStream that passes all data written to it to server. + In latter case this is only available while the copy operation is active and null otherwise. - + - Convert a postgresql time to a System.DateTime. + Returns true if this operation is currently active and in binary format. - + - Convert a postgresql money to a System.Decimal. + Returns number of fields expected on each input row if this operation is currently active, otherwise -1 - + - Provide event handlers to convert the basic native supported data types from - native form to backend representation. + The Command used to execute this copy operation. - + - Binary data. + Set before a COPY IN query to define size of internal buffer for reading from given CopyStream. - + - Convert to a postgresql boolean. + Represents an ongoing COPY FROM STDIN operation. + Provides methods to push data to server and end or cancel the operation. - + - Convert to a postgresql bit. + Called from NpgsqlState.ProcessBackendResponses upon CopyInResponse. + If CopyStream is already set, it is used to read data to push to server, after which the copy is completed. + Otherwise CopyStream is set to a writable NpgsqlCopyInStream that calls SendCopyData each time it is written to. - + - Convert to a postgresql timestamp. + Sends given packet to server as a CopyData message. + Does not check for notifications! Use another thread for that. - + - Convert to a postgresql date. + Sends CopyDone message to server. Handles responses, ie. may throw an exception. - + - Convert to a postgresql time. + Sends CopyFail message to server. Handles responses, ie. should always throw an exception: + in CopyIn state the server responds to CopyFail with an error response; + outside of a CopyIn state the server responds to CopyFail with an error response; + without network connection or whatever, there's going to eventually be a failure, timeout or user intervention. - + - Convert to a postgres money. + Copy format information returned from server. - + - Convert to a postgres double with maximum precision. + Stream for writing data to a table on a PostgreSQL version 7.4 or newer database during an active COPY FROM STDIN operation. + Passes data exactly as is and when given, so see to it that you use server encoding, correct format and reasonably sized writes! - + - Provide event handlers to convert extended native supported data types from their backend - text representation to a .NET object. + Created only by NpgsqlCopyInState.StartCopy() - + - Convert a postgresql point to a System.NpgsqlPoint. + Successfully completes copying data to server. Returns after operation is finished. + Does nothing if this stream is not the active copy operation writer. - + - Convert a postgresql point to a System.RectangleF. + Withdraws an already started copy operation. The operation will fail with given error message. + Does nothing if this stream is not the active copy operation writer. - + - LDeg. + Writes given bytes to server. + Fails if this stream is not the active copy operation writer. - + - Path. + Flushes stream contents to server. + Fails if this stream is not the active copy operation writer. - + - Polygon. + Not readable - + - Circle. + Not seekable - + - Inet. + Not supported - + - MAC Address. + True while this stream can be used to write copy data to server - + - interval + False - + - Provide event handlers to convert extended native supported data types from - native form to backend representation. + True - + - Point. + False - + - Box. + Number of bytes written so far - + - LSeg. + Number of bytes written so far; not settable - + - Open path. + Represents a PostgreSQL COPY TO STDOUT operation with a corresponding SQL statement + to execute against a PostgreSQL database + and an associated stream used to write results to (if provided by user) + or for reading the results (when generated by driver). + Eg. new NpgsqlCopyOut("COPY (SELECT * FROM mytable) TO STDOUT", connection, streamToWrite).Start(); - + - Polygon. + Creates NpgsqlCommand to run given query upon Start(), after which CopyStream provides data from database as requested in the query. - + - Convert to a postgres MAC Address. + Given command is run upon Start(), after which CopyStream provides data from database as requested in the query. - + - Circle. + Given command is executed upon Start() and all requested copy data is written to toStream immediately. - + - Convert to a postgres inet. + Returns true if this operation is currently active and field at given location is in binary format. - + - Convert to a postgres interval + Command specified upon creation is executed as a non-query. + If CopyStream is set upon creation, all copy data from server will be written to it, and operation will be finished immediately. + Otherwise the CopyStream member can be used for reading copy data from server until no more data is available. - + - EventArgs class to send Notification parameters. + Flush generated CopyStream at once. Effectively reads and discard all the rest of copy data from server. - + - Process ID of the PostgreSQL backend that sent this notification. + Returns true if the connection is currently reserved for this operation. - + - Condition that triggered that notification. + The stream provided by user or generated upon Start() - + - Additional Information From Notifiying Process (for future use, currently postgres always sets this to an empty string) + The Command used to execute this copy operation. - + - Resolve a host name or IP address. - This is needed because if you call Dns.Resolve() with an IP address, it will attempt - to resolve it as a host name, when it should just convert it to an IP address. + Returns true if this operation is currently active and in binary format. - - - - - This class represents a RowDescription message sent from - the PostgreSQL. - - - + - This struct represents the internal data of the RowDescription message. + Returns number of fields if this operation is currently active, otherwise -1 - - - This class represents the Parse message sent to PostgreSQL - server. - - - - + - A factory to create instances of various Npgsql objects. + Faster alternative to using the generated CopyStream. - + - Creates an NpgsqlCommand object. + Represents an ongoing COPY TO STDOUT operation. + Provides methods to read data from server or end the operation. - - - This class represents the Parse message sent to PostgreSQL - server. - - - - + - Represents the method that handles the RowUpdated events. + Called from NpgsqlState.ProcessBackendResponses upon CopyOutResponse. + If CopyStream is already set, it is used to write data received from server, after which the copy ends. + Otherwise CopyStream is set to a readable NpgsqlCopyOutStream that receives data from server. - The source of the event. - A NpgsqlRowUpdatedEventArgs that contains the event data. - + - Represents the method that handles the RowUpdating events. + Called from NpgsqlOutStream.Read to read copy data from server. - The source of the event. - A NpgsqlRowUpdatingEventArgs that contains the event data. - + - This class represents an adapter from many commands: select, update, insert and delete to fill Datasets. + Copy format information returned from server. @@ -2210,71 +3973,29 @@ Number of bytes read so far; can not be set. - - - This class represents the Bind message sent to PostgreSQL - server. - - - - - - Summary description for LargeObjectManager. - - - - - Represents a transaction to be made in a PostgreSQL database. This class cannot be inherited. - - - - - Commits the database transaction. - - - - - Rolls back a transaction from a pending state. - - - - - Rolls back a transaction from a pending savepoint state. - - - + - Creates a transaction save point. + Writes given objects into a stream for PostgreSQL COPY in default copy format (not CSV or BINARY). - + - Cancel the transaction without telling the backend about it. This is - used to make the transaction go away when closing a connection. + Represents the method that handles the RowUpdated events. + The source of the event. + A NpgsqlRowUpdatedEventArgs that contains the event data. - + - Gets the NpgsqlConnection - object associated with the transaction, or a null reference if the - transaction is no longer valid. + Represents the method that handles the RowUpdating events. - The NpgsqlConnection - object associated with the transaction. + The source of the event. + A NpgsqlRowUpdatingEventArgs that contains the event data. - + - Specifies the IsolationLevel for this transaction. - - The IsolationLevel for this transaction. - The default is ReadCommitted. - - - - This class represents a StartupPacket message of PostgreSQL - protocol. - - + This class represents an adapter from many commands: select, update, insert and delete to fill Datasets. + @@ -2327,8 +4048,8 @@ Get the value of a column as a . - If the differences between and - in handling of days and months is not important to your application, use + If the differences between and + in handling of days and months is not important to your application, use instead. Index of the field to find. @@ -2381,13 +4102,14 @@ - Copy values from each column in the current row into . + Copy values from each column in the current row into . + Destination for column values. The number of column values copied. - Copy values from each column in the current row into . + Copy values from each column in the current row into . An array appropriately sized to store values from all columns. The number of column values copied. @@ -2465,14 +4187,14 @@ - This is the primary implementation of NpgsqlDataReader. It is the one used in normal cases (where the + This is the primary implementation of NpgsqlDataReader. It is the one used in normal cases (where the preload-reader option is not set in the connection string to resolve some potential backwards-compatibility issues), the only implementation used internally, and in cases where CachingDataReader is used, it is still used to do the actual "leg-work" of turning a response stream from the server into a datareader-style object - with CachingDataReader then filling it's cache from here. - + Iterate through the objects returned through from the server. If it's a CompletedResponse the rowsaffected count is updated appropriately, @@ -2559,1561 +4281,1339 @@ and hence never used internally. - - - Represents the method that allows the application to provide a certificate collection to be used for SSL clien authentication - - A X509CertificateCollection to be filled with one or more client certificates. - - - - !!! Helper class, for compilation only. - Connector implements the logic for the Connection Objects to - access the physical connection to the database, and isolate - the application developer from connection pooling internals. - - - - - Constructor. - - Controls whether the connector can be shared. - - - - This method checks if the connector is still ok. - We try to send a simple query text, select 1 as ConnectionTest; - - - - - This method is responsible for releasing all resources associated with this Connector. - - - - - This method is responsible to release all portals used by this Connector. - - - - - Default SSL CertificateSelectionCallback implementation. - - - - - Default SSL CertificateValidationCallback implementation. - - - - - Default SSL PrivateKeySelectionCallback implementation. - - - - - Default SSL ProvideClientCertificatesCallback implementation. - - - - - This method is required to set all the version dependent features flags. - SupportsPrepare means the server can use prepared query plans (7.3+) - - - - - Opens the physical connection to the server. - - Usually called by the RequestConnector - Method of the connection pool manager. - - - - Closes the physical connection to the server. - - - - - Returns next portal index. - - - - - Returns next plan index. - - - - - Occurs on NoticeResponses from the PostgreSQL backend. - - - - - Occurs on NotificationResponses from the PostgreSQL backend. - - - - - Called to provide client certificates for SSL handshake. - - - - - Mono.Security.Protocol.Tls.CertificateSelectionCallback delegate. - - - - - Mono.Security.Protocol.Tls.CertificateValidationCallback delegate. - - - - - Mono.Security.Protocol.Tls.PrivateKeySelectionCallback delegate. - - - - - Gets the current state of the connection. - - - - - Return Connection String. - - - - - Version of backend server this connector is connected to. - - - - - Backend protocol version in use by this connector. - - - - - The physical connection stream to the backend. - - - - - The physical connection socket to the backend. - - - - - Reports if this connector is fully connected. - - - - - The connection mediator. - - - - - Report if the connection is in a transaction. - - - - - Report whether the current connection can support prepare functionality. - - - - - This class contains helper methods for type conversion between - the .Net type system and postgresql. - - - - - A cache of basic datatype mappings keyed by server version. This way we don't - have to load the basic type mappings for every connection. - - - - - Find a NpgsqlNativeTypeInfo in the default types map that can handle objects - of the given NpgsqlDbType. - - - - - Find a NpgsqlNativeTypeInfo in the default types map that can handle objects - of the given NpgsqlDbType. - - - - - Find a NpgsqlNativeTypeInfo in the default types map that can handle objects - of the given DbType. - - - - - Find a NpgsqlNativeTypeInfo in the default types map that can handle objects - of the given System.Type. - - - - - This method is responsible to convert the string received from the backend - to the corresponding NpgsqlType. - The given TypeInfo is called upon to do the conversion. - If no TypeInfo object is provided, no conversion is performed. - - - - - Create the one and only native to backend type map. - This map is used when formatting native data - types to backend representations. - - - - - This method creates (or retrieves from cache) a mapping between type and OID - of all natively supported postgresql data types. - This is needed as from one version to another, this mapping can be changed and - so we avoid hardcoding them. + + + This is the base class for NpgsqlDescribeStatement and NpgsqlDescribePortal. - NpgsqlTypeMapping containing all known data types. The mapping must be - cloned before it is modified because it is cached; changes made by one connection may - effect another connection. - - - - Attempt to map types by issuing a query against pg_type. - This function takes a list of NpgsqlTypeInfo and attempts to resolve the OID field - of each by querying pg_type. If the mapping is found, the type info object is - updated (OID) and added to the provided NpgsqlTypeMapping object. - - NpgsqlConnector to send query through. - Mapping object to add types too. - List of types that need to have OID's mapped. - - - - Delegate called to convert the given backend data to its native representation. - - - - - Delegate called to convert the given native data to its backand representation. - - - - - Represents a backend data type. - This class can be called upon to convert a backend field representation to a native object. - + - - - Construct a new NpgsqlTypeInfo with the given attributes and conversion handlers. - - Type OID provided by the backend server. - Type name provided by the backend server. - NpgsqlDbType - System type to convert fields of this type to. - Data conversion handler. + + + This class represents the Statement Describe message sent to PostgreSQL + server. + + - - - Perform a data conversion from a backend representation to - a native object. - - Data sent from the backend. - Type modifier field sent from the backend. + + + This class represents the Portal Describe message sent to PostgreSQL + server. + + - + - Type OID provided by the backend server. + EventArgs class to send Notice parameters, which are just NpgsqlError's in a lighter context. - + - Type name provided by the backend server. + Notice information. - + - NpgsqlDbType. + This class represents the ErrorResponse and NoticeResponse + message sent from PostgreSQL server. - + - NpgsqlDbType. + Return a string representation of this error object. - + - Provider type to convert fields of this type to. + Severity code. All versions. - + - System type to convert fields of this type to. + Error code. PostgreSQL 7.4 and up. - + - Represents a backend data type. - This class can be called upon to convert a native object to its backend field representation, + Terse error message. All versions. - + - Returns an NpgsqlNativeTypeInfo for an array where the elements are of the type - described by the NpgsqlNativeTypeInfo supplied. + Detailed error message. PostgreSQL 7.4 and up. - + - Construct a new NpgsqlTypeInfo with the given attributes and conversion handlers. + Suggestion to help resolve the error. PostgreSQL 7.4 and up. - Type name provided by the backend server. - NpgsqlDbType - Data conversion handler. - + - Perform a data conversion from a native object to - a backend representation. - DBNull and null values are handled differently depending if a plain query is used - When + Position (one based) within the query string where the error was encounterd. PostgreSQL 7.4 and up. - Native .NET object to be converted. - Flag indicating if the conversion has to be done for - plain queries or extended queries - + - Type name provided by the backend server. + Position (one based) within the query string where the error was encounterd. This position refers to an internal command executed for example inside a PL/pgSQL function. PostgreSQL 7.4 and up. - + - NpgsqlDbType. + Internal query string where the error was encounterd. This position refers to an internal command executed for example inside a PL/pgSQL function. PostgreSQL 7.4 and up. - + - DbType. + Trace back information. PostgreSQL 7.4 and up. - + - Apply quoting. + Source file (in backend) reporting the error. PostgreSQL 7.4 and up. - + - Use parameter size information. + Source file line number (in backend) reporting the error. PostgreSQL 7.4 and up. - + - Provide mapping between type OID, type name, and a NpgsqlBackendTypeInfo object that represents it. + Source routine (in backend) reporting the error. PostgreSQL 7.4 and up. - + - Construct an empty mapping. + Schema name which relates to the error. PostgreSQL 9.3 and up. - + - Copy constuctor. + Table name which relates to the error. PostgreSQL 9.3 and up. - + - Add the given NpgsqlBackendTypeInfo to this mapping. + Column name which relates to the error. PostgreSQL 9.3 and up. - + - Add a new NpgsqlBackendTypeInfo with the given attributes and conversion handlers to this mapping. + Data type of column which relates to the error. PostgreSQL 9.3 and up. - Type OID provided by the backend server. - Type name provided by the backend server. - NpgsqlDbType - System type to convert fields of this type to. - Data conversion handler. - + - Make a shallow copy of this type mapping. + Constraint name which relates to the error. PostgreSQL 9.3 and up. - + - Determine if a NpgsqlBackendTypeInfo with the given backend type OID exists in this mapping. + String containing the sql sent which produced this error. - + - Determine if a NpgsqlBackendTypeInfo with the given backend type name exists in this mapping. + Backend protocol version in use. - + - Get the number of type infos held. + Error and notice message field codes - + - Retrieve the NpgsqlBackendTypeInfo with the given backend type OID, or null if none found. + Severity: the field contents are ERROR, FATAL, or PANIC (in an error message), + or WARNING, NOTICE, DEBUG, INFO, or LOG (in a notice message), or a localized + translation of one of these. Always present. - + - Retrieve the NpgsqlBackendTypeInfo with the given backend type name, or null if none found. + Code: the SQLSTATE code for the error (see Appendix A). Not localizable. Always present. - + - Provide mapping between type Type, NpgsqlDbType and a NpgsqlNativeTypeInfo object that represents it. + Message: the primary human-readable error message. This should be accurate + but terse (typically one line). Always present. - + - Add the given NpgsqlNativeTypeInfo to this mapping. + Detail: an optional secondary error message carrying more detail about the problem. + Might run to multiple lines. - + - Add a new NpgsqlNativeTypeInfo with the given attributes and conversion handlers to this mapping. + Hint: an optional suggestion what to do about the problem. This is intended to differ + from Detail in that it offers advice (potentially inappropriate) rather than hard facts. + Might run to multiple lines. - Type name provided by the backend server. - NpgsqlDbType - Data conversion handler. - + - Retrieve the NpgsqlNativeTypeInfo with the given NpgsqlDbType. + Position: the field value is a decimal ASCII integer, indicating an error cursor + position as an index into the original query string. The first character has index 1, + and positions are measured in characters not bytes. - + - Retrieve the NpgsqlNativeTypeInfo with the given DbType. + Internal position: this is defined the same as the P field, but it is used when the + cursor position refers to an internally generated command rather than the one submitted + by the client. + The q field will always appear when this field appears. - + - Retrieve the NpgsqlNativeTypeInfo with the given Type. + Internal query: the text of a failed internally-generated command. + This could be, for example, a SQL query issued by a PL/pgSQL function. - + - Determine if a NpgsqlNativeTypeInfo with the given backend type name exists in this mapping. + Where: an indication of the context in which the error occurred. + Presently this includes a call stack traceback of active procedural language functions + and internally-generated queries. The trace is one entry per line, most recent first. - + - Determine if a NpgsqlNativeTypeInfo with the given NpgsqlDbType exists in this mapping. + Schema name: if the error was associated with a specific database object, + the name of the schema containing that object, if any. - + - Determine if a NpgsqlNativeTypeInfo with the given Type name exists in this mapping. + Table name: if the error was associated with a specific table, the name of the table. + (Refer to the schema name field for the name of the table's schema.) - + - Get the number of type infos held. + Column name: if the error was associated with a specific table column, the name of the column. + (Refer to the schema and table name fields to identify the table.) - + - Implements for version 3 of the protocol. + Data type name: if the error was associated with a specific data type, the name of the data type. + (Refer to the schema name field for the name of the data type's schema.) - + - Reads a row, field by field, allowing a DataRow to be built appropriately. + Constraint name: if the error was associated with a specific constraint, the name of the constraint. + Refer to fields listed above for the associated table or domain. + (For this purpose, indexes are treated as constraints, even if they weren't created with constraint syntax.) - + - Reads part of a field, as needed (for - and + File: the file name of the source-code location where the error was reported. - + - Adds further functionality to stream that is dependant upon the type of data read. + Line: the line number of the source-code location where the error was reported. - + - Completes the implementation of Streamer for char data. + Routine: the name of the source-code routine reporting the error. - + - Completes the implementation of Streamer for byte data. + The level of verbosity of the NpgsqlEventLog - + - Implements for version 2 of the protocol. + Don't log at all - + - Encapsulates the null mapping bytes sent at the start of a version 2 - datarow message, and the process of identifying the nullity of the data - at a particular index + Only log the most common issues - + - Provides the underlying mechanism for reading schema information. + Log everything - + - Creates an NpgsqlSchema that can read schema information from the database. + This class handles all the Npgsql event and debug logging - An open database connection for reading metadata. - + - Returns the MetaDataCollections that lists all possible collections. + Writes a string to the Npgsql event log if msglevel is bigger then NpgsqlEventLog.Level - The MetaDataCollections + + This method is obsolete and should no longer be used. + It is likely to be removed in future versions of Npgsql + + The message to write to the event log + The minimum LogLevel for which this message should be logged. - + - Returns the Restrictions that contains the meaning and position of the values in the restrictions array. + Writes a string to the Npgsql event log if msglevel is bigger then NpgsqlEventLog.Level - The Restrictions + The ResourceManager to get the localized resources + The name of the resource that should be fetched by the ResourceManager + The minimum LogLevel for which this message should be logged. + The additional parameters that shall be included into the log-message (must be compatible with the string in the resource): - + - Returns the Databases that contains a list of all accessable databases. + Writes the default log-message for the action of calling the Get-part of an Indexer to the log file. - The restrictions to filter the collection. - The Databases + The minimum LogLevel for which this message should be logged. + The name of the class that contains the Indexer + The parameter given to the Indexer - + - Returns the Tables that contains table and view names and the database and schema they come from. + Writes the default log-message for the action of calling the Set-part of an Indexer to the logfile. - The restrictions to filter the collection. - The Tables + The minimum LogLevel for which this message should be logged. + The name of the class that contains the Indexer + The parameter given to the Indexer + The value the Indexer is set to - + - Returns the Columns that contains information about columns in tables. + Writes the default log-message for the action of calling the Get-part of a Property to the logfile. - The restrictions to filter the collection. - The Columns. + The minimum LogLevel for which this message should be logged. + The name of the class that contains the Property + The name of the Property - + - Returns the Views that contains view names and the database and schema they come from. + Writes the default log-message for the action of calling the Set-part of a Property to the logfile. - The restrictions to filter the collection. - The Views + The minimum LogLevel for which this message should be logged. + The name of the class that contains the Property + The name of the Property + The value the Property is set to - + - Returns the Users containing user names and the sysid of those users. + Writes the default log-message for the action of calling a Method without Arguments to the logfile. - The restrictions to filter the collection. - The Users. + The minimum LogLevel for which this message should be logged. + The name of the class that contains the Method + The name of the Method - + - This is the abstract base class for NpgsqlAsciiRow and NpgsqlBinaryRow. + Writes the default log-message for the action of calling a Method with one Argument to the logfile. + The minimum LogLevel for which this message should be logged. + The name of the class that contains the Method + The name of the Method + The value of the Argument of the Method - + - Implements a bit string; a collection of zero or more bits which can each be 1 or 0. - BitString's behave as a list of bools, though like most strings and unlike most collections the position - tends to be of as much significance as the value. - BitStrings are often used as masks, and are commonly cast to and from other values. + Writes the default log-message for the action of calling a Method with two Arguments to the logfile. + The minimum LogLevel for which this message should be logged. + The name of the class that contains the Method + The name of the Method + The value of the first Argument of the Method + The value of the second Argument of the Method - + - Represents the empty string. + Writes the default log-message for the action of calling a Method with three Arguments to the logfile. + The minimum LogLevel for which this message should be logged. + The name of the class that contains the Method + The name of the Method + The value of the first Argument of the Method + The value of the second Argument of the Method + The value of the third Argument of the Method - + - Create a BitString from an enumeration of boolean values. The BitString will contain - those booleans in the order they came in. + Writes the default log-message for the action of calling a Method with more than three Arguments to the logfile. - The boolean values. + The minimum LogLevel for which this message should be logged. + The name of the class that contains the Method + The name of the Method + A Object-Array with zero or more Ojects that are Arguments of the Method. - + - Creates a BitString filled with a given number of true or false values. - - The value to fill the string with. - The number of bits to fill. + Sets/Returns the level of information to log to the logfile. + + The current LogLevel - + - Creats a bitstring from a string. - The string to copy from. - - + Sets/Returns the filename to use for logging. + + The filename of the current Log file. - + - Creates a single-bit element from a boolean value. - - The bool value which determines whether - the bit is 1 or 0. + Sets/Returns whether Log messages should be echoed to the console + + true if Log messages are echoed to the console, otherwise false - + - Creates a bitstring from an unsigned integer value. The string will be the shortest required to - contain the integer (e.g. 1 bit for 0 or 1, 2 for 2 or 3, 3 for 4-7, and so on). + The exception that is thrown when the PostgreSQL backend reports errors. - The integer. - This method is not CLS Compliant, and may not be available to some languages. - + - Creates a bitstring from an integer value. The string will be the shortest required to - contain the integer (e.g. 1 bit for 0 or 1, 2 for 2 or 3, 3 for 4-7, and so on). + Construct a backend error exception based on a list of one or more + backend errors. The basic Exception.Message will be built from the + first (usually the only) error in the list. - The integer. - + - Finds the first instance of a given value + Format a .NET style exception string. + Include all errors in the list, including any hints. - The value - whether true or false - to search for. - The index of the value found, or -1 if none are present. - + - True if there is at least one bit with the value looked for. + Append a line to the given Stream, first checking for zero-length. - The value - true or false - to detect. - True if at least one bit was the same as item, false otherwise. - + - Copies the bitstring to an array of bools. + Provide access to the entire list of errors provided by the PostgreSQL backend. - The boolean array to copy to. - The index in the array to start copying from. - + - Returns an enumerator that enumerates through the string. + Severity code. All versions. - The enumerator. - + - Creats a bitstring by concatenating another onto this one. + Error code. PostgreSQL 7.4 and up. - The string to append to this one. - The combined strings. - + - Returns a substring of this string. + Basic error message. All versions. - The position to start from, must be between 0 and the length of the string. - The length of the string to return, must be greater than zero, and may not be - so large that the start + length exceeds the bounds of this instance. - The Bitstring identified - + - Returns a substring of this string. + Detailed error message. PostgreSQL 7.4 and up. - The position to start from, must be between 0 and the length of the string, - the rest of the string is returned. - The Bitstring identified - + - A logical and between this string and another. The two strings must be the same length. + Suggestion to help resolve the error. PostgreSQL 7.4 and up. - Another BitString to AND with this one. - A bitstring with 1 where both BitStrings had 1 and 0 otherwise. - + - A logical or between this string and another. The two strings must be the same length. + Position (one based) within the query string where the error was encounterd. PostgreSQL 7.4 and up. - Another BitString to OR with this one. - A bitstring with 1 where either BitString had 1 and 0 otherwise. - + - A logical xor between this string and another. The two strings must be the same length. + Trace back information. PostgreSQL 7.4 and up. - Another BitString to XOR with this one. - A bitstring with 1 where one BitStrings and the other had 0, - and 0 where they both had 1 or both had 0. - + - A bitstring that is the logical inverse of this one. + Source file (in backend) reporting the error. PostgreSQL 7.4 and up. - A bitstring of the same length as this with 1 where this has 0 and vice-versa. - + - Shifts the string operand bits to the left, filling with zeros to produce a - string of the same length. + Source file line number (in backend) reporting the error. PostgreSQL 7.4 and up. - The number of bits to shift to the left. - A left-shifted bitstring. - The behaviour of LShift is closer to what one would expect from dealing - with PostgreSQL bit-strings than in using the same operations on integers in .NET - In particular, negative operands result in a right-shift, and operands greater than - the length of the string will shift it entirely, resulting in a zero-filled string. - - + - Shifts the string operand bits to the right, filling with zeros to produce a - string of the same length. + Source routine (in backend) reporting the error. PostgreSQL 7.4 and up. - The number of bits to shift to the right. - A right-shifted bitstring. - The behaviour of RShift is closer to what one would expect from dealing - with PostgreSQL bit-strings than in using the same operations on integers in .NET - In particular, negative operands result in a left-shift, and operands greater than - the length of the string will shift it entirely, resulting in a zero-filled string. It also performs - a logical shift, rather than an arithmetic shift, so it always sets the vacated bit positions to zero - (like PostgreSQL and like .NET for unsigned integers but not for signed integers). - - + - Returns true if the this string is identical to the argument passed. + Schema name which relates to the error. PostgreSQL 9.3 and up. - + - Compares two strings. Strings are compared as strings, so while 0 being less than 1 will - mean a comparison between two strings of the same size is the same as treating them as numbers, - in the case of two strings of differing lengths the comparison starts at the right-most (most significant) - bit, and if all bits of the shorter string are exhausted without finding a comparison, then the larger - string is deemed to be greater than the shorter (0010 is greater than 0001 but less than 00100). + Table name which relates to the error. PostgreSQL 9.3 and up. - Another string to compare with this one. - A value if the two strings are identical, an integer less - than zero if this is less than the argument, and an integer greater - than zero otherwise. - + - Compares the string with another object. + Column name which relates to the error. PostgreSQL 9.3 and up. - The object to compare with. - If the object is null then this string is considered greater. If the object is another BitString - then they are compared as in the explicit comparison for BitStrings - in any other case a is thrown. - + - Compares this BitString with an object for equality. + Data type of column which relates to the error. PostgreSQL 9.3 and up. - + - Returns a code for use in hashing operations. + Constraint name which relates to the error. PostgreSQL 9.3 and up. - + - Returns a string representation of the BitString. + String containing the sql sent which produced this error. - - A string which can contain a letter and optionally a number which sets a minimum size for the string - returned. In each case using the lower-case form of the letter will result in a lower-case string - being returned. - - - B - A string of 1s and 0s. - - - X - An hexadecimal string (will result in an error unless the string's length is divisible by 4). - - - G - A string of 1s and 0s in single-quotes preceded by 'B' (Postgres bit string literal syntax). - - Y - An hexadecimal string in single-quotes preceded by 'X' (Postgres bit literal syntax, will result in an error unless the string's length is divisible by 4. - - C - The format produced by format-string "Y" if legal, otherwise that produced by format-string "G". - E - The most compact safe representation for Postgres. If single bit will be either a 0 or a 1. Otherwise if it - can be that produce by format string "Y" it will, otherwise if there are less than 9bits in length it will be that - produced by format-string "G". For longer strings that cannot be represented in hexadecimal it will be a string - representing the first part of the string in format "Y" followed by the PostgreSQL concatenation operator, followed - by the final bits in the format "G". E.g. "X'13DCE'||B'110'" - If format is empty or null, it is treated as if "B" had been passed (the default repreesentation, and that - generally used by PostgreSQL for display). - - The formatted string. - + - Returns a string representation for the Bitstring + Returns the entire list of errors provided by the PostgreSQL backend. - A string containing '0' and '1' characters. - + + + This class represents the Execute message sent to PostgreSQL + server. + + + + - Returns the same string as . formatProvider is ignored. + A factory to create instances of various Npgsql objects. - + - Parses a string to produce a BitString. Most formats that can be produced by - can be accepted, but hexadecimal - can be interpreted with the preceding X' to mark the following characters as - being hexadecimal rather than binary. + Creates an NpgsqlCommand object. - + + + This class represents the Flush message sent to PostgreSQL + server. + + + + - Performs a logical AND on the two operands. + For classes representing simple messages, + consisting only of a message code and length identifier, + sent from the client to the server. - + - Performs a logcial OR on the two operands. - + This class is responsible for serving as bridge between the backend + protocol handling and the core classes. It is used as the mediator for + exchanging data generated/sent from/to backend. + + - + - Perofrms a logical EXCLUSIVE-OR on the two operands + EventArgs class to send Notification parameters. - + - Performs a logical NOT on the operand. + Process ID of the PostgreSQL backend that sent this notification. - + - Concatenates the operands. + Condition that triggered that notification. - + - Left-shifts the string BitString. + Additional Information From Notifiying Process (for future use, currently postgres always sets this to an empty string) - + - Right-shifts the string BitString. + This class represents a parameter to a command that will be sent to server - + - Compares the two operands. + Initializes a new instance of the NpgsqlParameter class. - + - Compares the two operands. + Initializes a new instance of the NpgsqlParameter + class with the parameter m_Name and a value of the new NpgsqlParameter. + The m_Name of the parameter to map. + An Object that is the value of the NpgsqlParameter. + +

When you specify an Object + in the value parameter, the DbType is + inferred from the .NET Framework type of the Object.

+

When using this constructor, you must be aware of a possible misuse of the constructor which takes a DbType parameter. + This happens when calling this constructor passing an int 0 and the compiler thinks you are passing a value of DbType. + Use Convert.ToInt32(value) for example to have compiler calling the correct constructor.

+
- + - Compares the two operands. + Initializes a new instance of the NpgsqlParameter + class with the parameter m_Name and the data type. + The m_Name of the parameter to map. + One of the DbType values. - + - Compares the two operands. + Initializes a new instance of the NpgsqlParameter + class with the parameter m_Name, the DbType, and the size. + The m_Name of the parameter to map. + One of the DbType values. + The length of the parameter. - + - Compares the two operands. + Initializes a new instance of the NpgsqlParameter + class with the parameter m_Name, the DbType, the size, + and the source column m_Name. + The m_Name of the parameter to map. + One of the DbType values. + The length of the parameter. + The m_Name of the source column. - + - Compares the two operands. + Initializes a new instance of the NpgsqlParameter + class with the parameter m_Name, the DbType, the size, + the source column m_Name, a ParameterDirection, + the precision of the parameter, the scale of the parameter, a + DataRowVersion to use, and the + value of the parameter. + The m_Name of the parameter to map. + One of the DbType values. + The length of the parameter. + The m_Name of the source column. + One of the ParameterDirection values. + true if the value of the field can be null, otherwise false. + The total number of digits to the left and right of the decimal point to which + Value is resolved. + The total number of decimal places to which + Value is resolved. + One of the DataRowVersion values. + An Object that is the value + of the NpgsqlParameter. - + - Interprets the bitstring as a series of bits in an encoded character string, - encoded according to the Encoding passed, and returns that string. - The bitstring must contain a whole number of octets(bytes) and also be - valid according to the Encoding passed. + Creates a new NpgsqlParameter that + is a copy of the current instance. - The to use in producing the string. - The string that was encoded in the BitString. + A new NpgsqlParameter that is a copy of this instance. - + - Interprets the bitstring as a series of octets (bytes) and returns those octets. Fails - if the Bitstring does not contain a whole number of octets (its length is not evenly - divisible by 8). + The collection to which this parameter belongs, if any. - + - Interprets the bitstring as a series of signed octets (bytes) and returns those octets. Fails - if the Bitstring does not contain a whole number of octets (its length is not evenly - divisible by 8). - This method is not CLS-Compliant and may not be available to languages that cannot - handle signed bytes. + Gets or sets the maximum number of digits used to represent the + Value property. + The maximum number of digits used to represent the + Value property. + The default value is 0, which indicates that the data provider + sets the precision for Value. - + - Interprets the bitstring as a series of unsigned 16-bit integers and returns those integers. - Fails if the Bitstring's length is not evenly divisible by 16. - This method is not CLS-Compliant and may not be available to languages that cannot - handle unsigned integers. + Gets or sets the number of decimal places to which + Value is resolved. + The number of decimal places to which + Value is resolved. The default is 0. - + - Interprets the bitstring as a series of 16-bit integers and returns those integers. - Fails if the Bitstring's length is not evenly divisible by 16. + Gets or sets the maximum size, in bytes, of the data within the column. + The maximum size, in bytes, of the data within the column. + The default value is inferred from the parameter value. - + - Interprets the bitstring as a series of unsigned 32-bit integers and returns those integers. - Fails if the Bitstring's length is not evenly divisible by 32. - This method is not CLS-Compliant and may not be available to languages that cannot - handle unsigned integers. + Gets or sets the DbType of the parameter. + One of the DbType values. The default is String. - + - Interprets the bitstring as a series of signed 32-bit integers and returns those integers. - Fails if the Bitstring's length is not evenly divisible by 32. + Gets or sets the DbType of the parameter. + One of the DbType values. The default is String. - + - Interprets the bitstring as a series of unsigned 64-bit integers and returns those integers. - Fails if the Bitstring's length is not evenly divisible by 64. - This method is not CLS-Compliant and may not be available to languages that cannot - handle unsigned integers. + Gets or sets a value indicating whether the parameter is input-only, + output-only, bidirectional, or a stored procedure return value parameter. + One of the ParameterDirection + values. The default is Input. - + - Interprets the bitstring as a series of signed 64-bit integers and returns those integers. - Fails if the Bitstring's length is not evenly divisible by 64. + Gets or sets a value indicating whether the parameter accepts null values. + true if null values are accepted; otherwise, false. The default is false. - + - The length of the string. + Gets or sets the m_Name of the NpgsqlParameter. + The m_Name of the NpgsqlParameter. + The default is an empty string. - + - Retrieves the value of the bit at the given index. + The m_Name scrubbed of any optional marker - + - C# implementation of the MD5 cryptographic hash function. + Gets or sets the m_Name of the source column that is mapped to the + DataSet and used for loading or + returning the Value. + The m_Name of the source column that is mapped to the + DataSet. The default is an empty string. - + - Creates a new MD5CryptoServiceProvider. + Gets or sets the DataRowVersion + to use when loading Value. + One of the DataRowVersion values. + The default is Current. - + - Drives the hashing function. + Gets or sets the value of the parameter. - Byte array containing the data to hash. - Where in the input buffer to start. - Size in bytes of the data in the buffer to hash. + An Object that is the value of the parameter. + The default value is null. - + - This finalizes the hash. Takes the data from the chaining variables and returns it. + Gets or sets the value of the parameter. + An Object that is the value of the parameter. + The default value is null. - + - Resets the class after use. Called automatically after hashing is done. + Represents a collection of parameters relevant to a NpgsqlCommand + as well as their respective mappings to columns in a DataSet. + This class cannot be inherited. - + - This is the meat of the hash function. It is what processes each block one at a time. + Initializes a new instance of the NpgsqlParameterCollection class. - Byte array to process data from. - Where in the byte array to start processing. - + - Pads and then processes the final block. + Invalidate the hash lookup tables. This should be done any time a change + may throw the lookups out of sync with the list. - Buffer to grab data from. - Position in buffer in bytes to get data from. - How much data in bytes in the buffer to use. - + - Stream for writing data to a table on a PostgreSQL version 7.4 or newer database during an active COPY FROM STDIN operation. - Passes data exactly as is and when given, so see to it that you use server encoding, correct format and reasonably sized writes! + Adds the specified NpgsqlParameter object to the NpgsqlParameterCollection. + The NpgsqlParameter to add to the collection. + The index of the new NpgsqlParameter object. - + - Created only by NpgsqlCopyInState.StartCopy() + Obsolete. Use AddWithValue instead. + + Use caution when using this overload of the + Add method to specify integer parameter values. + Because this overload takes a value of type Object, + you must convert the integral value to an Object + type when the value is zero, as the following C# example demonstrates. + parameters.Add(":pname", Convert.ToInt32(0)); + If you do not perform this conversion, the compiler will assume you + are attempting to call the NpgsqlParameterCollection.Add(string, DbType) overload. + - + - Successfully completes copying data to server. Returns after operation is finished. - Does nothing if this stream is not the active copy operation writer. + Adds a NpgsqlParameter to the NpgsqlParameterCollection given the specified parameter name and value. + The name of the NpgsqlParameter. + The Value of the NpgsqlParameter to add to the collection. + The paramater that was added. - + - Withdraws an already started copy operation. The operation will fail with given error message. - Does nothing if this stream is not the active copy operation writer. + Adds a NpgsqlParameter to the NpgsqlParameterCollection given the specified parameter name and value. + The name of the NpgsqlParameter. + The Value of the NpgsqlParameter to add to the collection. + One of the NpgsqlDbType values. + The paramater that was added. - + - Writes given bytes to server. - Fails if this stream is not the active copy operation writer. + Adds a NpgsqlParameter to the NpgsqlParameterCollection given the specified parameter name and value. + The name of the NpgsqlParameter. + The Value of the NpgsqlParameter to add to the collection. + One of the NpgsqlDbType values. + The length of the column. + The paramater that was added. - + - Flushes stream contents to server. - Fails if this stream is not the active copy operation writer. + Adds a NpgsqlParameter to the NpgsqlParameterCollection given the specified parameter name and value. + The name of the NpgsqlParameter. + The Value of the NpgsqlParameter to add to the collection. + One of the NpgsqlDbType values. + The length of the column. + The name of the source column. + The paramater that was added. - + - Not readable + Adds a NpgsqlParameter to the NpgsqlParameterCollection given the parameter name and the data type. + The name of the parameter. + One of the DbType values. + The index of the new NpgsqlParameter object. - + - Not seekable + Adds a NpgsqlParameter to the NpgsqlParameterCollection with the parameter name, the data type, and the column length. + The name of the parameter. + One of the DbType values. + The length of the column. + The index of the new NpgsqlParameter object. - + - Not supported + Adds a NpgsqlParameter to the NpgsqlParameterCollection with the parameter name, the data type, the column length, and the source column name. + The name of the parameter. + One of the DbType values. + The length of the column. + The name of the source column. + The index of the new NpgsqlParameter object. - + - True while this stream can be used to write copy data to server + Removes the specified NpgsqlParameter from the collection using the parameter name. + The name of the NpgsqlParameter object to retrieve. - + - False + Gets a value indicating whether a NpgsqlParameter with the specified parameter name exists in the collection. + The name of the NpgsqlParameter object to find. + true if the collection contains the parameter; otherwise, false. - + - True + Gets the location of the NpgsqlParameter in the collection with a specific parameter name. + The name of the NpgsqlParameter object to find. + The zero-based location of the NpgsqlParameter in the collection. - + - False + Removes the specified NpgsqlParameter from the collection using a specific index. + The zero-based index of the parameter. - + - Number of bytes written so far + Inserts a NpgsqlParameter into the collection at the specified index. + The zero-based index where the parameter is to be inserted within the collection. + The NpgsqlParameter to add to the collection. - + - Number of bytes written so far; not settable + Removes the specified NpgsqlParameter from the collection. + The name of the NpgsqlParameter to remove from the collection. - + - Represents a SQL statement or function (stored procedure) to execute - against a PostgreSQL database. This class cannot be inherited. + Removes the specified NpgsqlParameter from the collection. + The NpgsqlParameter to remove from the collection. - + - Initializes a new instance of the NpgsqlCommand class. + Gets a value indicating whether a NpgsqlParameter exists in the collection. + The value of the NpgsqlParameter object to find. + true if the collection contains the NpgsqlParameter object; otherwise, false. - + - Initializes a new instance of the NpgsqlCommand class with the text of the query. + Gets a value indicating whether a NpgsqlParameter with the specified parameter name exists in the collection. - The text of the query. + The name of the NpgsqlParameter object to find. + A reference to the requested parameter is returned in this out param if it is found in the list. This value is null if the parameter is not found. + true if the collection contains the parameter and param will contain the parameter; otherwise, false. - + - Initializes a new instance of the NpgsqlCommand class with the text of the query and a NpgsqlConnection. + Removes all items from the collection. - The text of the query. - A NpgsqlConnection that represents the connection to a PostgreSQL server. - + - Initializes a new instance of the NpgsqlCommand class with the text of the query, a NpgsqlConnection, and the NpgsqlTransaction. + Gets the location of a NpgsqlParameter in the collection. - The text of the query. - A NpgsqlConnection that represents the connection to a PostgreSQL server. - The NpgsqlTransaction in which the NpgsqlCommand executes. + The value of the NpgsqlParameter object to find. + The zero-based index of the NpgsqlParameter object in the collection. - + - Used to execute internal commands. + Adds the specified NpgsqlParameter object to the NpgsqlParameterCollection. + The NpgsqlParameter to add to the collection. + The zero-based index of the new NpgsqlParameter object. - + - Attempts to cancel the execution of a NpgsqlCommand. + Copies NpgsqlParameter objects from the NpgsqlParameterCollection to the specified array. - This Method isn't implemented yet. + An Array to which to copy the NpgsqlParameter objects in the collection. + The starting index of the array. - + - Create a new command based on this one. + Returns an enumerator that can iterate through the collection. - A new NpgsqlCommand object. + An IEnumerator that can be used to iterate through the collection. - + - Create a new command based on this one. + In methods taking an object as argument this method is used to verify + that the argument has the type NpgsqlParameter - A new NpgsqlCommand object. + The object to verify - + - Creates a new instance of an DbParameter object. + Gets the NpgsqlParameter with the specified name. - An DbParameter object. + The name of the NpgsqlParameter to retrieve. + The NpgsqlParameter with the specified name, or a null reference if the parameter is not found. - + - Creates a new instance of a NpgsqlParameter object. + Gets the NpgsqlParameter at the specified index. - A NpgsqlParameter object. + The zero-based index of the NpgsqlParameter to retrieve. + The NpgsqlParameter at the specified index. - + - Slightly optimised version of ExecuteNonQuery() for internal ues in cases where the number - of affected rows is of no interest. + Gets the number of NpgsqlParameter objects in the collection. + The number of NpgsqlParameter objects in the collection. - + + + This class represents the ParameterStatus message sent from PostgreSQL + server. + + + + + + This class represents the Parse message sent to PostgreSQL + server. + + + + - Executes a SQL statement against the connection and returns the number of rows affected. + This class represents a PasswordPacket message sent to backend + PostgreSQL. - The number of rows affected if known; -1 otherwise. - + - Sends the CommandText to - the Connection and builds a - NpgsqlDataReader - using one of the CommandBehavior values. + Used when a connection is closed - One of the CommandBehavior values. - A NpgsqlDataReader object. - + - Sends the CommandText to - the Connection and builds a - NpgsqlDataReader. + Summary description for NpgsqlQuery - A NpgsqlDataReader object. - + - Sends the CommandText to - the Connection and builds a - NpgsqlDataReader - using one of the CommandBehavior values. + This is the abstract base class for NpgsqlAsciiRow and NpgsqlBinaryRow. - One of the CommandBehavior values. - A NpgsqlDataReader object. - Currently the CommandBehavior parameter is ignored. - - - This method binds the parameters from parameters collection to the bind - message. + + + This class represents a RowDescription message sent from + the PostgreSQL. + - - - Executes the query, and returns the first column of the first row - in the result set returned by the query. Extra columns or rows are ignored. - - The first column of the first row in the result set, - or a null reference if the result set is empty. - - + - Creates a prepared version of the command on a PostgreSQL server. + This struct represents the internal data of the RowDescription message. - + - This method checks the connection state to see if the connection - is set or it is open. If one of this conditions is not met, throws - an InvalidOperationException + Provides the underlying mechanism for reading schema information. - + - This method substitutes the Parameters, if exist, in the command - to their actual values. - The parameter name format is :ParameterName. + Returns the MetaDataCollections that lists all possible collections. - A version of CommandText with the Parameters inserted. + The MetaDataCollections - + - Gets or sets the SQL statement or function (stored procedure) to execute at the data source. + Returns the Restrictions that contains the meaning and position of the values in the restrictions array. - The Transact-SQL statement or stored procedure to execute. The default is an empty string. + The Restrictions - + - Gets or sets the wait time before terminating the attempt - to execute a command and generating an error. + Returns the Databases that contains a list of all accessable databases. - The time (in seconds) to wait for the command to execute. - The default is 20 seconds. + The database connection on which to run the metadataquery. + The restrictions to filter the collection. + The Databases - + - Gets or sets a value indicating how the - CommandText property is to be interpreted. + Returns the Tables that contains table and view names and the database and schema they come from. - One of the CommandType values. The default is CommandType.Text. + The database connection on which to run the metadataquery. + The restrictions to filter the collection. + The Tables - + - Gets or sets the NpgsqlConnection - used by this instance of the NpgsqlCommand. + Returns the Columns that contains information about columns in tables. - The connection to a data source. The default value is a null reference. + The database connection on which to run the metadataquery. + The restrictions to filter the collection. + The Columns. - + - Gets the NpgsqlParameterCollection. + Returns the Views that contains view names and the database and schema they come from. - The parameters of the SQL statement or function (stored procedure). The default is an empty collection. + The database connection on which to run the metadataquery. + The restrictions to filter the collection. + The Views - + - Gets or sets the NpgsqlTransaction - within which the NpgsqlCommand executes. + Returns the Users containing user names and the sysid of those users. - The NpgsqlTransaction. - The default value is a null reference. + The database connection on which to run the metadataquery. + The restrictions to filter the collection. + The Users. - - - Gets or sets how command results are applied to the DataRow - when used by the Update - method of the DbDataAdapter. - - One of the UpdateRowSource values. + + + This class represents a StartupPacket message of PostgreSQL + protocol. + + - + - Returns oid of inserted row. This is only updated when using executenonQuery and when command inserts just a single row. If table is created without oids, this will always be 0. + Represents a completed response message. - + + + This class represents the Sync message sent to PostgreSQL + server. + + + + - Represents a collection of parameters relevant to a NpgsqlCommand - as well as their respective mappings to columns in a DataSet. - This class cannot be inherited. + Represents a transaction to be made in a PostgreSQL database. This class cannot be inherited. - + - Initializes a new instance of the NpgsqlParameterCollection class. + Commits the database transaction. - + - Adds the specified NpgsqlParameter object to the NpgsqlParameterCollection. + Rolls back a transaction from a pending state. - The NpgsqlParameter to add to the collection. - The index of the new NpgsqlParameter object. - + - Adds a NpgsqlParameter to the NpgsqlParameterCollection given the specified parameter name and value. + Rolls back a transaction from a pending savepoint state. - The name of the NpgsqlParameter. - The Value of the NpgsqlParameter to add to the collection. - The index of the new NpgsqlParameter object. - - Use caution when using this overload of the - Add method to specify integer parameter values. - Because this overload takes a value of type Object, - you must convert the integral value to an Object - type when the value is zero, as the following C# example demonstrates. - parameters.Add(":pname", Convert.ToInt32(0)); - If you do not perform this conversion, the compiler will assume you - are attempting to call the NpgsqlParameterCollection.Add(string, DbType) overload. - - + - Adds a NpgsqlParameter to the NpgsqlParameterCollection given the parameter name and the data type. + Creates a transaction save point. - The name of the parameter. - One of the DbType values. - The index of the new NpgsqlParameter object. - + - Adds a NpgsqlParameter to the NpgsqlParameterCollection with the parameter name, the data type, and the column length. + Cancel the transaction without telling the backend about it. This is + used to make the transaction go away when closing a connection. - The name of the parameter. - One of the DbType values. - The length of the column. - The index of the new NpgsqlParameter object. - + - Adds a NpgsqlParameter to the NpgsqlParameterCollection with the parameter name, the data type, the column length, and the source column name. + Gets the NpgsqlConnection + object associated with the transaction, or a null reference if the + transaction is no longer valid. - The name of the parameter. - One of the DbType values. - The length of the column. - The name of the source column. - The index of the new NpgsqlParameter object. + The NpgsqlConnection + object associated with the transaction. - + - Removes the specified NpgsqlParameter from the collection using the parameter name. + Specifies the IsolationLevel for this transaction. - The name of the NpgsqlParameter object to retrieve. + The IsolationLevel for this transaction. + The default is ReadCommitted. - + - Gets a value indicating whether a NpgsqlParameter with the specified parameter name exists in the collection. - - The name of the NpgsqlParameter object to find. - true if the collection contains the parameter; otherwise, false. + This class provides many util methods to handle + reading and writing of PostgreSQL protocol messages. + - + - Gets the location of the NpgsqlParameter in the collection with a specific parameter name. - - The name of the NpgsqlParameter object to find. - The zero-based location of the NpgsqlParameter in the collection. + This method takes a ProtocolVersion and returns an integer + version number that the Postgres backend will recognize in a + startup packet. + - + - Removes the specified NpgsqlParameter from the collection using a specific index. + This method takes a version string as returned by SELECT VERSION() and returns + a valid version string ("7.2.2" for example). + This is only needed when running protocol version 2. + This does not do any validity checks. - The zero-based index of the parameter. - + - Inserts a NpgsqlParameter into the collection at the specified index. - - The zero-based index where the parameter is to be inserted within the collection. - The NpgsqlParameter to add to the collection. + This method gets a C NULL terminated string from the network stream. + It keeps reading a byte in each time until a NULL byte is returned. + It returns the resultant string of bytes read. + This string is sent from backend. + - + - Removes the specified NpgsqlParameter from the collection. + Reads requested number of bytes from stream with retries until Stream.Read returns 0 or count is reached. - The NpgsqlParameter to remove from the collection. + Stream to read + byte buffer to fill + starting position to fill the buffer + number of bytes to read + The number of bytes read. May be less than count if no more bytes are available. - + - Gets a value indicating whether a NpgsqlParameter exists in the collection. + Reads requested number of bytes from . If output matches exactly, and == false, is returned directly. - The value of the NpgsqlParameter object to find. - true if the collection contains the NpgsqlParameter object; otherwise, false. + Source array. + Starting position to read from + Number of bytes to read + Force a copy, even if the output is an exact copy of . + byte[] containing data requested. - + - Gets a value indicating whether a NpgsqlParameter with the specified parameter name exists in the collection. - - The name of the NpgsqlParameter object to find. - A reference to the requested parameter is returned in this out param if it is found in the list. This value is null if the parameter is not found. - true if the collection contains the parameter and param will contain the parameter; otherwise, false. + This method writes a string to the network stream. + - + - Removes all items from the collection. - + This method writes a string to the network stream. + - + - Gets the location of a NpgsqlParameter in the collection. - - The value of the NpgsqlParameter object to find. - The zero-based index of the NpgsqlParameter object in the collection. + This method writes a C NULL terminated string to the network stream. + It appends a NULL terminator to the end of the String. + - + - Adds the specified NpgsqlParameter object to the NpgsqlParameterCollection. - - The NpgsqlParameter to add to the collection. - The zero-based index of the new NpgsqlParameter object. + This method writes a C NULL terminated string to the network stream. + It appends a NULL terminator to the end of the String. + - + - Copies NpgsqlParameter objects from the NpgsqlParameterCollection to the specified array. + This method writes a byte to the stream. It also enables logging of them. - An Array to which to copy the NpgsqlParameter objects in the collection. - The starting index of the array. - + - Returns an enumerator that can iterate through the collection. + This method writes a byte to the stream. It also enables logging of them. - An IEnumerator that can be used to iterate through the collection. - + - In methods taking an object as argument this method is used to verify - that the argument has the type NpgsqlParameter + This method writes a set of bytes to the stream. It also enables logging of them. - The object to verify - + - Gets the NpgsqlParameter with the specified name. + This method writes a set of bytes to the stream. It also enables logging of them. - The name of the NpgsqlParameter to retrieve. - The NpgsqlParameter with the specified name, or a null reference if the parameter is not found. - + - Gets the NpgsqlParameter at the specified index. - - The zero-based index of the NpgsqlParameter to retrieve. - The NpgsqlParameter at the specified index. + This method writes a C NULL terminated string limited in length to the + backend server. + It pads the string with null bytes to the size specified. + - + - Gets the number of NpgsqlParameter objects in the collection. - - The number of NpgsqlParameter objects in the collection. + This method writes a C NULL terminated byte[] limited in length to the + backend server. + It pads the string with null bytes to the size specified. + - + - Represents an ongoing COPY FROM STDIN operation. - Provides methods to push data to server and end or cancel the operation. + Write a 32-bit integer to the given stream in the correct byte order. - + - Called from NpgsqlState.ProcessBackendResponses upon CopyInResponse. - If CopyStream is already set, it is used to read data to push to server, after which the copy is completed. - Otherwise CopyStream is set to a writable NpgsqlCopyInStream that calls SendCopyData each time it is written to. + Read a 32-bit integer from the given stream in the correct byte order. - + - Sends given packet to server as a CopyData message. - Does not check for notifications! Use another thread for that. + Read a 32-bit integer from the given array in the correct byte order. - + - Sends CopyDone message to server. Handles responses, ie. may throw an exception. + Write a 16-bit integer to the given stream in the correct byte order. - + - Sends CopyFail message to server. Handles responses, ie. should always throw an exception: - in CopyIn state the server responds to CopyFail with an error response; - outside of a CopyIn state the server responds to CopyFail with an error response; - without network connection or whatever, there's going to eventually be a failure, timeout or user intervention. + Read a 16-bit integer from the given stream in the correct byte order. - + - Copy format information returned from server. + Read a 16-bit integer from the given array in the correct byte order. - + - Represents a PostgreSQL Point type + Copy and possibly reverse a byte array, depending on host architecture endienness. + Source byte array. + Force a copy even if no swap is performed. + , reversed if on a little-endian architecture, copied if required. - + - Represents a PostgreSQL Line Segment type. + Copy and possibly reverse a byte array, depending on host architecture endienness. + Source byte array. + Starting offset in source array. + Number of bytes to copy. + Force a copy even if no swap is performed. + , reversed if on a little-endian architecture, copied if required. - + - Represents a PostgreSQL Path type. + Represent the frontend/backend protocol version. - + + + Represent the backend server version. + As this class offers no functionality beyond that offered by it has been + deprecated in favour of that class. + + + + - Represents a PostgreSQL Polygon type. + Returns the string representation of this version in three place dot notation (Major.Minor.Patch). - + - Represents a PostgreSQL Circle type. + Server version major number. - + - Represents a PostgreSQL inet type. + Server version minor number. - + - Represents a PostgreSQL MacAddress type. + Server version patch level number. - + - + A class to handle everything associated with SSPI authentication - The macAddr parameter must contain a string that can only consist of numbers - and upper-case letters as hexadecimal digits. (See PhysicalAddress.Parse method on MSDN) - + - This class represents a PasswordPacket message sent to backend - PostgreSQL. + Simplified SecBufferDesc struct with only one SecBuffer
-- cgit v1.1