diff --git a/bin/Npgsql.dll b/bin/Npgsql.dll index 593e3669d4..693cccb425 100644 Binary files a/bin/Npgsql.dll and b/bin/Npgsql.dll differ diff --git a/bin/Npgsql.xml b/bin/Npgsql.xml index aec35c1079..81334301da 100644 --- a/bin/Npgsql.xml +++ b/bin/Npgsql.xml @@ -21,11 +21,22 @@ 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. @@ -61,9 +72,9 @@ for the element type. - + - Creates an array from pg representation. + Creates an array from pg text representation. @@ -75,21 +86,34 @@ Creates an n-dimensional array from an ArrayList of ArrayLists or - a 1-dimensional array from something else. + a 1-dimensional array from something else. to convert + Type of the elements in the list 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. + 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. @@ -121,7 +145,7 @@ Creats a bitstring from a string. The string to copy from. - + @@ -277,7 +301,7 @@ 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 + then they are compared as in the explicit comparison for BitStrings in any other case a is thrown. @@ -504,7 +528,7 @@ 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 + 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 . @@ -661,49 +685,49 @@ Creates an from a number of microseconds. - The number of microseconds in the interval. + 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. + 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. + 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. + 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. + 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. + 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. + The number of months in the interval. A d with the given number of months. @@ -773,7 +797,29 @@ 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 @@ -1233,91 +1279,84 @@ 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. - + - Binary data. + 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. - + - Provide event handlers to convert the basic native supported data types from - native form to backend representation. - - - - - Binary data. - - - - - Convert to a postgresql boolean. - - - - - 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 postgresql float4 or float8 to a System.Float or System.Double respectively. @@ -1326,225 +1365,211 @@ 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 - + - Represents a PostgreSQL Point type + Delegate called to convert the given backend text data to its native representation. - + - 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. - - - - - 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. - - 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. + Delegate called to convert the given backend binary data to its native representation. @@ -1553,22 +1578,34 @@ 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. + Data conversion handler for text encoding. + Data conversion handler for binary data. - + - Perform a data conversion from a backend representation to + 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. @@ -1601,6 +1638,16 @@ 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. @@ -1613,24 +1660,28 @@ described by the NpgsqlNativeTypeInfo supplied. - + Construct a new NpgsqlTypeInfo with the given attributes and conversion handlers. Type name provided by the backend server. + DbType + Quote NpgsqlDbType - Data conversion handler. + Data conversion handler for text backend encoding. + Data conversion handler for binary backend encoding (for extended queries). - + 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 + When Native .NET object to be converted. - Flag indicating if the conversion has to be done for - plain queries or extended queries + 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. @@ -1657,6 +1708,11 @@ Use parameter size information. + + + Reports whether a native to backend binary encoder is available for this type. + + Provide mapping between type OID, type name, and a NpgsqlBackendTypeInfo object that represents it. @@ -1677,15 +1733,17 @@ Add the given NpgsqlBackendTypeInfo to this mapping. - + Add a new NpgsqlBackendTypeInfo with the given attributes and conversion handlers to this mapping. 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. + Data conversion handler for text encoding. + Data conversion handler for binary data. @@ -1727,13 +1785,16 @@ 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 - Data conversion handler. + DbType + Quote + Data conversion handler for text backend encoding. + Data conversion handler for binary backend encoding (for extended query). @@ -1770,28 +1831,130 @@ Get the number of type infos held. - + - Given a join expression and a projection, fetch all columns in the projection - that reference columns in the join. + Represents a PostgreSQL Point type - + - Given an InputExpression append all from names (including nested joins) to the list. + Represents a PostgreSQL Line Segment type. - + - 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 + Represents a PostgreSQL Path type. - + - Every property accessed in the list of columns must be adjusted for a new scope + 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. + + + + + 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 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 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. + + 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. + Set Cache Size. The default value is 20. @@ -1805,6 +1968,57 @@ key + + + 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. + + + + + + This method is used by the states to change the state of the context. + + + + + Call ProcessBackendResponsesEnum(), and scan and discard all results. + + + + + 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. + Called from constructor of derived class. @@ -1952,21 +2166,26 @@ + + 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 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 + Reads part of a field, as needed (for + and @@ -2021,61 +2240,19 @@ - - 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. - - - - - 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. - - - - - - 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. - - - - 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. - - - Represents a SQL statement or function (stored procedure) to execute against a PostgreSQL database. This class cannot be inherited. + + Represents a SQL statement or function (stored procedure) to execute + against a PostgreSQL database. This class cannot be inherited. + + + Represents a SQL statement or function (stored procedure) to execute + against a PostgreSQL database. This class cannot be inherited. + @@ -2103,7 +2280,7 @@ A NpgsqlConnection that represents the connection to a PostgreSQL server. The NpgsqlTransaction in which the NpgsqlCommand executes. - + Used to execute internal commands. @@ -2140,8 +2317,10 @@ - Slightly optimised version of ExecuteNonQuery() for internal ues in cases where the number + 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. @@ -2213,6 +2392,36 @@ A version of CommandText with the Parameters inserted. + + + Process this.commandText, trimming each distinct command and substituting paramater + tokens. + + + + UTF8 encoded command ready to be sent to the backend. + + + + 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. + + + + 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. + + + Gets or sets the SQL statement or function (stored procedure) to execute at the data source. @@ -2273,20 +2482,194 @@ This class is responsible to create database commands for automatic insert, update and delete operations. + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + The adapter. + 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. NpgsqlCommand whose function parameters will be obtained. + + + Gets the automatically generated object required + to perform insertions at the data source. + + + The automatically generated object required to perform insertions. + + + + + 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. + + + + + Gets the automatically generated System.Data.Common.DbCommand object required + to perform updates at the data source. + + + The automatically generated System.Data.Common.DbCommand object required to perform updates. + + + + + 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. + + + + + 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. + + + + + 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. + + + + + Applies the parameter information. + + The parameter. + The row. + Type of the statement. + if set to true [where clause]. + + + + 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. + + + + + Returns the full parameter name, given the partial parameter name. + + The partial name of the parameter. + + The full parameter name corresponding to the partial parameter name requested. + + + + + Returns the placeholder for the parameter in the associated SQL statement. + + The number to be included as part of the parameter's name. + + The name of the parameter with the specified number appended. + + + + + Registers the to handle the event for a . + + The to be used for the update. + + + + Adds an event handler for the event. + + The sender + A instance containing information about the event. + + + + 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 + + + + 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 + + + + 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. + + + + + + + + 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. @@ -2316,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. @@ -2366,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. @@ -2403,6 +2800,11 @@ A new NpgsqlConnection object. + + + Returns a copy of the NpgsqlConnectionStringBuilder that contains the parsed connection string values. + + Default SSL CertificateSelectionCallback implementation. @@ -2423,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 @@ -2481,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. @@ -2636,6 +3065,24 @@ This can only be called when there is an active connection. + + + 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. + + + + + Report whether the backend understands the string literal E prefix (>= 8.1). + + + + + Report whether the backend understands the hex byte format (>= 9.0). + + The connector object connected to the backend. @@ -2666,12 +3113,20 @@ Return an exact copy of this NpgsqlConnectionString. - + + + No integrated security if we're on mono and .NET 4.5 because of ClaimsIdentity, + see https://github.com/npgsql/Npgsql/issues/133 + + + This function will set value for known key, both private member and base[key]. + + value, coerced as needed to the stored type. @@ -2679,29 +3134,190 @@ + value, coerced as needed to the stored type. + + + + The function will access private member only, not base[key]. + + + value. Clear the member and assign them to the default value. + + + Gets or sets the backend server host name. + + + + + Gets or sets the backend server port. + + + + + Gets or sets the specified backend communication protocol version. + + + + + Gets or sets the name of the database to be used after a connection is opened. + + The name of the database to be + used after a connection is opened. + + + + Gets or sets the login user name. + + + + + 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. + + + + + Gets or sets the login password as a UTF8 encoded byte array. + + + + + Sets the login password as a string. + + + + + Gets or sets a value indicating whether to attempt to use SSL. + + + + + Gets or sets a value indicating whether to attempt to use SSL. + + + + + Gets the backend encoding. Always returns "UTF8". + + + + + 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. + + + + Gets or sets the schema search path. + + + + + Gets or sets a value indicating whether connection pooling should be used. + + + + + 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. + + + + Gets or sets the minimum connection pool size. + + + + + Gets or sets the maximum connection pool size. + + + + + Gets or sets a value indicating whether to listen for notifications and report them between command activity. + + + + + 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. + + + + Gets or sets a value indicating whether datareaders are loaded in their entirety (for compatibility with earlier code). + + 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. + + + Gets or sets the ootional application name parameter to be sent to the backend during connection initiation. + + + + + Gets or sets a value indicating whether to silently Prepare() all commands before execution. + + Case insensative accessor for indivual connection string values. + + + Set both ImplicitDefault and ExplicitDefault to the 's default value. + + + + + + + + Set ImplicitDefault to the default value of 's type, + and ExplicitDefault to . + + + + + 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. + + + 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 + !!! Helper class, for compilation only. @@ -2714,6 +3330,8 @@ Constructor. + Connection string. + Pooled Controls whether the connector can be shared. @@ -2752,6 +3370,11 @@ Default SSL ProvideClientCertificatesCallback implementation. + + + Default SSL ValidateRemoteCertificateCallback implementation. + + This method is required to set all the version dependent features flags. @@ -2810,6 +3433,11 @@ Mono.Security.Protocol.Tls.PrivateKeySelectionCallback delegate. + + + Called to validate server's certificate during SSL handshake + + Gets the current state of the connection. @@ -2830,14 +3458,19 @@ Backend protocol version in use by this connector. - + + + The physical connection socket to the backend. + + + The physical connection stream to the backend. - + - The physical connection socket to the backend. + The top level stream to the backend. @@ -2860,6 +3493,12 @@ Report whether the current connection can support prepare functionality. + + + Options that control certain aspects of native to backend conversions that depend + on backend version and status. + + This class manages all connector objects, pooled AND non-pooled. @@ -2888,11 +3527,6 @@ pool for available connectors. A connector object. - - - Find a pooled connector. Handle locking and timeout here. - - Find a pooled connector. Handle shared/non-shared here. @@ -2907,48 +3541,25 @@ 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. - - - Release a pooled connector. Handle locking here. - - - + Release a pooled connector. Handle shared/non-shared here. - - - Create a connector without any pooling functionality. - - Find an available pooled connector in the non-shared pool, or create a new one if none found. - - - 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. - - - - - Close the connector. - - - Connector to release - - + Put a pooled connector into the pool queue. + Connection is leased to. Connector to pool @@ -3437,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. @@ -3491,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. @@ -3575,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, @@ -3671,7 +4283,20 @@ - This class represents the Parse message sent to PostgreSQL + This is the base class for NpgsqlDescribeStatement and NpgsqlDescribePortal. + + + + + + This class represents the Statement Describe message sent to PostgreSQL + server. + + + + + + This class represents the Portal Describe message sent to PostgreSQL server. @@ -3757,6 +4382,31 @@ Source routine (in backend) reporting the error. PostgreSQL 7.4 and up. + + + Schema name which relates to the error. PostgreSQL 9.3 and up. + + + + + Table name which relates to the error. PostgreSQL 9.3 and up. + + + + + Column name which relates to the error. PostgreSQL 9.3 and up. + + + + + Data type of column which relates to the error. PostgreSQL 9.3 and up. + + + + + Constraint name which relates to the error. PostgreSQL 9.3 and up. + + String containing the sql sent which produced this error. @@ -3767,6 +4417,116 @@ Backend protocol version in use. + + + Error and notice message field codes + + + + + 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. + + + + + Code: the SQLSTATE code for the error (see Appendix A). Not localizable. Always present. + + + + + Message: the primary human-readable error message. This should be accurate + but terse (typically one line). Always present. + + + + + Detail: an optional secondary error message carrying more detail about the problem. + Might run to multiple lines. + + + + + 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. + + + + + 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. + + + + + 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. + + + + + Internal query: the text of a failed internally-generated command. + This could be, for example, a SQL query issued by a PL/pgSQL function. + + + + + 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. + + + + + Schema name: if the error was associated with a specific database object, + the name of the schema containing that object, if any. + + + + + 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.) + + + + + 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.) + + + + + 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.) + + + + + 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.) + + + + + File: the file name of the source-code location where the error was reported. + + + + + Line: the line number of the source-code location where the error was reported. + + + + + Routine: the name of the source-code routine reporting the error. + + The level of verbosity of the NpgsqlEventLog @@ -3989,6 +4749,31 @@ Source routine (in backend) reporting the error. PostgreSQL 7.4 and up. + + + Schema name which relates to the error. PostgreSQL 9.3 and up. + + + + + Table name which relates to the error. PostgreSQL 9.3 and up. + + + + + Column name which relates to the error. PostgreSQL 9.3 and up. + + + + + Data type of column which relates to the error. PostgreSQL 9.3 and up. + + + + + Constraint name which relates to the error. PostgreSQL 9.3 and up. + + String containing the sql sent which produced this error. @@ -4001,7 +4786,7 @@ - This class represents the Parse message sent to PostgreSQL + This class represents the Execute message sent to PostgreSQL server. @@ -4018,11 +4803,18 @@ - This class represents the Parse message sent to PostgreSQL + This class represents the Flush message sent to PostgreSQL server. + + + For classes representing simple messages, + consisting only of a message code and length identifier, + sent from the client to the server. + + This class is responsible for serving as bridge between the backend @@ -4135,6 +4927,11 @@ A new NpgsqlParameter that is a copy of this instance. + + + The collection to which this parameter belongs, if any. + + Gets or sets the maximum number of digits used to represent the @@ -4241,6 +5038,12 @@ Initializes a new instance of the NpgsqlParameterCollection class. + + + Invalidate the hash lookup tables. This should be done any time a change + may throw the lookups out of sync with the list. + + Adds the specified NpgsqlParameter object to the NpgsqlParameterCollection. @@ -4250,11 +5053,8 @@ - Adds a NpgsqlParameter to the NpgsqlParameterCollection given the specified parameter name and value. + Obsolete. Use AddWithValue instead. - 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. @@ -4266,6 +5066,44 @@ are attempting to call the NpgsqlParameterCollection.Add(string, DbType) overload. + + + 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. + + + + 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. + + + + 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. + + + + 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. + Adds a NpgsqlParameter to the NpgsqlParameterCollection given the parameter name and the data type. @@ -4324,13 +5162,19 @@ 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. + The NpgsqlParameter to add to the collection. + + + + Removes the specified NpgsqlParameter from the collection. + + The name of the NpgsqlParameter to remove from the collection. Removes the specified NpgsqlParameter from the collection. - The NpgsqlParameter to remove from the collection. + The NpgsqlParameter to remove from the collection. @@ -4458,12 +5302,6 @@ Provides the underlying mechanism for reading schema information. - - - Creates an NpgsqlSchema that can read schema information from the database. - - An open database connection for reading metadata. - Returns the MetaDataCollections that lists all possible collections. @@ -4476,38 +5314,43 @@ The Restrictions - + Returns the Databases that contains a list of all accessable databases. + The database connection on which to run the metadataquery. The restrictions to filter the collection. The Databases - + Returns the Tables that contains table and view names and the database and schema they come from. + The database connection on which to run the metadataquery. The restrictions to filter the collection. The Tables - + - Returns the Columns that contains information about columns in tables. + Returns the Columns that contains information about columns in tables. + The database connection on which to run the metadataquery. The restrictions to filter the collection. The Columns. - + Returns the Views that contains view names and the database and schema they come from. + The database connection on which to run the metadataquery. The restrictions to filter the collection. The Views - + Returns the Users containing user names and the sysid of those users. + The database connection on which to run the metadataquery. The restrictions to filter the collection. The Users. @@ -4525,7 +5368,7 @@ - This class represents the Parse message sent to PostgreSQL + This class represents the Sync message sent to PostgreSQL server. @@ -4616,28 +5459,72 @@ number of bytes to read The number of bytes read. May be less than count if no more bytes are available. - + - This method writes a C NULL terminated string to the network stream. - It appends a NULL terminator to the end of the String. + Reads requested number of bytes from . If output matches exactly, and == false, is returned directly. + + 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. + + + + This method writes a string to the network stream. + + + + This method writes a string to the network stream. + + + 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. + + + + + This method writes a byte to the stream. It also enables logging of them. + + + + + This method writes a byte to the stream. It also enables logging of them. + + + This method writes a set of bytes to the stream. It also enables logging of them. - + + + This method writes a set of bytes to the stream. It also enables logging of them. + + + 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. + + + 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. + + Write a 32-bit integer to the given stream in the correct byte order. @@ -4648,6 +5535,11 @@ Read a 32-bit integer from the given stream in the correct byte order. + + + Read a 32-bit integer from the given array in the correct byte order. + + Write a 16-bit integer to the given stream in the correct byte order. @@ -4658,17 +5550,40 @@ Read a 16-bit integer from the given stream in the correct byte order. + + + Read a 16-bit integer from the given array in the correct byte order. + + + + + 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. + + + + 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. + 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. - + + Represent the backend server version. + As this class offers no functionality beyond that offered by it has been + deprecated in favour of that class. +