diff --git a/.vscode/tasks.json b/.vscode/tasks.json index 177e6e63..00e84101 100644 --- a/.vscode/tasks.json +++ b/.vscode/tasks.json @@ -4,7 +4,7 @@ "version": "0.1.0", "command": "xbuild", "args": [ - "/p:GenerateFullPaths=true /p:mysql=ON /p:pgsql=ON /p:graph=NPlot" + "/p:GenerateFullPaths=true" ], "taskSelector": "/t:", "showOutput": "silent", diff --git a/Makefile b/Makefile index b97f9a8f..fd3ff7f6 100644 --- a/Makefile +++ b/Makefile @@ -1,19 +1,11 @@ -# NTP Analyzer Makefile v0.3 - -FRAMEWORK= v4.0 -MYSQL= ON -PGSQL= ON -GRAPH= NPlot all: release debug: - xbuild /p:Configuration=Debug /p:TargetFrameworkVersion=${FRAMEWORK} \ - /p:MySql=${MYSQL} /p:PgSql=${PGSQL} /p:Graph=${GRAPH} Ntp.Analyzer.sln + xbuild /p:Configuration=Debug Ntp.Analyzer.sln release: - xbuild /p:Configuration=Release /p:TargetFrameworkVersion=${FRAMEWORK} \ - /p:MySql=${MYSQL} /p:PgSql=${PGSQL} /p:Graph=${GRAPH} Ntp.Analyzer.sln + xbuild /p:Configuration=Release Ntp.Analyzer.sln install: release install -d ${DESTDIR}$(PREFIX)/sbin diff --git a/Ntp.Analyzer.Process/Initializer.cs b/Ntp.Analyzer.Process/Initializer.cs index b0760fb9..30c12e18 100644 --- a/Ntp.Analyzer.Process/Initializer.cs +++ b/Ntp.Analyzer.Process/Initializer.cs @@ -51,7 +51,7 @@ namespace Ntp.Analyzer.Process public sealed class Initializer { /// - /// Initializes a new instance of the class. + /// Initializes a new instance of the class. /// /// Config file to use. /// Process ID. @@ -366,19 +366,6 @@ private bool InitializeLog() Severity.Info); } -#if !GRAPH - foreach (HostConfiguration server in config.Servers) - { - if (server.HostGraphs.Count() != 0 || - server.PeerGraphs.Count() != 0 || - server.TrafficGraphs.Count() != 0) - { - initlog.WriteLine(InitializationMessage.NoGraphBuild, Severity.Warn); - break; - } - } - #endif - return true; } diff --git a/Ntp.Analyzer.Process/InitializerText.cs b/Ntp.Analyzer.Process/InitializerText.cs index cbcab1e1..c7957092 100644 --- a/Ntp.Analyzer.Process/InitializerText.cs +++ b/Ntp.Analyzer.Process/InitializerText.cs @@ -47,7 +47,5 @@ public static class InitializationMessage public const string ConfigParseError = "Errors in configuration file:"; public const string LogFileError = "Cannot create log file. {0}"; public const string PidFileError = "Cannot create pid file. {0}"; - - public const string NoGraphBuild = "ntpa was not build with graph support but graphs are configured."; } } \ No newline at end of file diff --git a/Ntp.Analyzer/Ntp.Analyzer.csproj b/Ntp.Analyzer/Ntp.Analyzer.csproj index badcde74..28ba7676 100644 --- a/Ntp.Analyzer/Ntp.Analyzer.csproj +++ b/Ntp.Analyzer/Ntp.Analyzer.csproj @@ -30,12 +30,13 @@ false + + ..\packages\NPlot.0.9.10.0\lib\net20\NPlot.dll + True + - - ..\libbin\NPlot.dll - @@ -210,7 +211,9 @@ - + + + {02912378-E62D-4445-BA30-F56D3ABE9DA2} @@ -234,4 +237,4 @@ - + \ No newline at end of file diff --git a/Ntp.Analyzer/packages.config b/Ntp.Analyzer/packages.config new file mode 100644 index 00000000..27bcd6e3 --- /dev/null +++ b/Ntp.Analyzer/packages.config @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/Ntp.Common/IO/DirectoryCommand.cs b/Ntp.Common/IO/DirectoryCommand.cs index c3204e08..0712c759 100644 --- a/Ntp.Common/IO/DirectoryCommand.cs +++ b/Ntp.Common/IO/DirectoryCommand.cs @@ -19,18 +19,38 @@ // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN // THE SOFTWARE. -using System.IO; - -#if __MonoCS__ using System; -using System.Collections.Generic; +using System.IO; using System.Linq; -#endif namespace Ntp.Common.IO { public static class DirectoryCommand { + public static string CreateRecursive(string path) + { + string fullPath = path.Trim(); + if (fullPath.Length <= 1) + return null; + + string created = null; + char[] s = {'/'}; + var elements = fullPath.Split(s, StringSplitOptions.RemoveEmptyEntries).ToList(); + + string currentPath = string.Empty; + foreach (string element in elements) + { + currentPath = $"{currentPath}/{element}"; + if (Directory.Exists(currentPath)) + continue; + + Directory.CreateDirectory(currentPath); + created = currentPath; + } + + return created; + } + public static string CreateRecursiveFromFile(string file) { int pos = file.LastIndexOf('/'); @@ -40,36 +60,5 @@ public static string CreateRecursiveFromFile(string file) string path = file.Substring(0, pos); return CreateRecursive(path); } - -#if __MonoCS__ - public static string CreateRecursive(string path) - { - string fullPath = path.Trim (); - if (fullPath.Length <= 1) - return null; - - string created = null; - char[] s = new char[] { '/' }; - List elements = fullPath.Split (s, StringSplitOptions.RemoveEmptyEntries).ToList (); - - string currentPath = String.Empty; - foreach (string element in elements) { - currentPath = currentPath + "/" + element; - if (!Directory.Exists (currentPath)) { - Directory.CreateDirectory (currentPath); - created = currentPath; - } - } - - return created; - } - - #else - public static string CreateRecursive(string path) - { - Directory.CreateDirectory(path); - return null; - } -#endif } } \ No newline at end of file diff --git a/Ntp.Common/IO/Options.cs b/Ntp.Common/IO/Options.cs index d654bd2a..aad13017 100644 --- a/Ntp.Common/IO/Options.cs +++ b/Ntp.Common/IO/Options.cs @@ -183,25 +183,25 @@ private static IEnumerable CreateWrappedLinesIterator(string self, IEnum yield return string.Empty; yield break; } - using (IEnumerator ewidths = widths.GetEnumerator()) + using (var ewidths = widths.GetEnumerator()) { bool? hw = null; - int width = GetNextWidth(ewidths, int.MaxValue, ref hw); - int start = 0; + var width = GetNextWidth(ewidths, int.MaxValue, ref hw); + var start = 0; do { var end = GetLineEnd(start, width, self); - char c = self[end - 1]; + var c = self[end - 1]; if (char.IsWhiteSpace(c)) --end; - bool needContinuation = end != self.Length && !IsEolChar(c); - string continuation = ""; + var needContinuation = end != self.Length && !IsEolChar(c); + var continuation = ""; if (needContinuation) { --end; continuation = "-"; } - string line = self.Substring(start, end - start) + continuation; + var line = self.Substring(start, end - start) + continuation; yield return line; start = end; if (char.IsWhiteSpace(c)) @@ -213,9 +213,9 @@ private static IEnumerable CreateWrappedLinesIterator(string self, IEnum private static int GetLineEnd(int start, int length, string description) { - int end = Math.Min(start + length, description.Length); - int sep = -1; - for (int i = start; i < end; ++i) + var end = Math.Min(start + length, description.Length); + var sep = -1; + for (var i = start; i < end; ++i) { if (description[i] == '\n') return i + 1; @@ -549,33 +549,23 @@ public override string ToString() protected static T Parse(string value, OptionContext c) { - Type tt = typeof(T); -#if PCL - TypeInfo ti = tt.GetTypeInfo (); -#else - Type ti = tt; -#endif - bool nullable = + var tt = typeof(T); + var ti = tt; + + var nullable = ti.IsValueType && ti.IsGenericType && !ti.IsGenericTypeDefinition && ti.GetGenericTypeDefinition() == typeof(Nullable<>); -#if PCL - Type targetType = nullable ? tt.GenericTypeArguments [0] : tt; -#else - Type targetType = nullable ? tt.GetGenericArguments()[0] : tt; -#endif - T t = default(T); + + var targetType = nullable ? tt.GetGenericArguments()[0] : tt; + var t = default(T); try { if (value != null) { -#if PCL - t = (T) Convert.ChangeType (value, targetType); -#else - TypeConverter conv = TypeDescriptor.GetConverter(targetType); + var conv = TypeDescriptor.GetConverter(targetType); t = (T) conv.ConvertFromString(value); -#endif } } catch (Exception e) @@ -591,8 +581,8 @@ protected static T Parse(string value, OptionContext c) private static void AddSeparators(string name, int end, ICollection seps) { - int start = -1; - for (int i = end + 1; i < name.Length; ++i) + var start = -1; + for (var i = end + 1; i < name.Length; ++i) { switch (name[i]) { @@ -620,16 +610,16 @@ private static void AddSeparators(string name, int end, ICollection seps private OptionValueType ParsePrototype() { - char type = '\0'; - List seps = new List(); + var type = '\0'; + var seps = new List(); - for (int i = 0; i < Names.Length; ++i) + for (var i = 0; i < Names.Length; ++i) { - string name = Names[i]; + var name = Names[i]; if (name.Length == 0) throw new ArgumentException("Empty option names are not supported."); - int end = name.IndexOfAny(NameTerminator); + var end = name.IndexOfAny(NameTerminator); if (end == -1) continue; Names[i] = name.Substring(0, end); @@ -644,7 +634,8 @@ private OptionValueType ParsePrototype() return OptionValueType.None; if (MaxValueCount <= 1 && seps.Count != 0) - throw new ArgumentException($"Cannot provide key/value separators for Options taking {MaxValueCount} value(s)."); + throw new ArgumentException( + $"Cannot provide key/value separators for Options taking {MaxValueCount} value(s)."); if (MaxValueCount > 1) { @@ -682,20 +673,20 @@ private static IEnumerable GetArguments(TextReader reader, bool close) { try { - StringBuilder arg = new StringBuilder(); + var arg = new StringBuilder(); string line; while ((line = reader.ReadLine()) != null) { - int t = line.Length; + var t = line.Length; - for (int i = 0; i < t; i++) + for (var i = 0; i < t; i++) { - char c = line[i]; + var c = line[i]; if (c == '"' || c == '\'') { - char end = c; + var end = c; for (i++; i < t; i++) { @@ -732,7 +723,6 @@ private static IEnumerable GetArguments(TextReader reader, bool close) } } -#if !PCL public class ResponseFileSource : ArgumentSource { public override string Description => "Read response file for more options."; @@ -753,11 +743,8 @@ public override string[] GetNames() return new[] {"@file"}; } } -#endif -#if !PCL [Serializable] -#endif public class OptionException : Exception { public OptionException() @@ -776,16 +763,13 @@ public OptionException(string message, string optionName, Exception innerExcepti OptionName = optionName; } -#if !PCL protected OptionException(SerializationInfo info, StreamingContext context) : base(info, context) { OptionName = info.GetString("OptionName"); } -#endif public string OptionName { get; } -#if !PCL #pragma warning disable 618 // SecurityPermissionAttribute is obsolete [SecurityPermission(SecurityAction.LinkDemand, SerializationFormatter = true)] #pragma warning restore 618 @@ -794,7 +778,6 @@ public override void GetObjectData(SerializationInfo info, StreamingContext cont base.GetObjectData(info, context); info.AddValue("OptionName", OptionName); } -#endif } public delegate void OptionAction(TKey key, TValue value); @@ -913,14 +896,14 @@ public List Parse(IEnumerable arguments) if (arguments == null) throw new ArgumentNullException(nameof(arguments)); - OptionContext c = CreateOptionContext(); + var c = CreateOptionContext(); c.OptionIndex = -1; - bool process = true; - List unprocessed = new List(); - Option def = Contains("<>") ? this["<>"] : null; - ArgumentEnumerator ae = new ArgumentEnumerator(arguments); + var process = true; + var unprocessed = new List(); + var def = Contains("<>") ? this["<>"] : null; + var ae = new ArgumentEnumerator(arguments); - foreach (string argument in ae) + foreach (var argument in ae) { ++c.OptionIndex; if (argument == "--") @@ -945,14 +928,14 @@ public List Parse(IEnumerable arguments) public void WriteOptionDescriptions(TextWriter o) { - foreach (Option p in this) + foreach (var p in this) { - int written = 0; + var written = 0; if (p.Hidden) continue; - Category c = p as Category; + var c = p as Category; if (c != null) { WriteDescription(o, p.Description, "", 80, 80); @@ -974,17 +957,17 @@ public void WriteOptionDescriptions(TextWriter o) DescriptionFirstWidth, DescriptionRemWidth); } - foreach (ArgumentSource s in sources) + foreach (var s in sources) { - string[] names = s.GetNames(); + var names = s.GetNames(); if (names == null || names.Length == 0) continue; - int written = 0; + var written = 0; Write(o, ref written, " "); Write(o, ref written, names[0]); - for (int i = 1; i < names.Length; ++i) + for (var i = 1; i < names.Length; ++i) { Write(o, ref written, ", "); Write(o, ref written, names[i]); @@ -1042,7 +1025,7 @@ protected Option GetOptionForName(string option) throw new ArgumentNullException(nameof(argument)); flag = name = sep = value = null; - Match m = valueOption.Match(argument); + var m = valueOption.Match(argument); if (!m.Success) { return false; @@ -1100,10 +1083,10 @@ protected virtual bool Parse(string argument, OptionContext c) protected override void RemoveItem(int index) { - Option p = Items[index]; + var p = Items[index]; base.RemoveItem(index); // KeyedCollection.RemoveItem() handles the 0th item - for (int i = 1; i < p.Names.Length; ++i) + for (var i = 1; i < p.Names.Length; ++i) { Dictionary.Remove(p.Names[i]); } @@ -1119,11 +1102,11 @@ private void AddImpl(Option option) { if (option == null) throw new ArgumentNullException(nameof(option)); - List added = new List(option.Names.Length); + var added = new List(option.Names.Length); try { // KeyedCollection.InsertItem/SetItem handle the 0th name. - for (int i = 1; i < option.Names.Length; ++i) + for (var i = 1; i < option.Names.Length; ++i) { Dictionary.Add(option.Names[i], option); added.Add(option.Names[i]); @@ -1131,7 +1114,7 @@ private void AddImpl(Option option) } catch (Exception) { - foreach (string name in added) + foreach (var name in added) Dictionary.Remove(name); throw; } @@ -1139,7 +1122,7 @@ private void AddImpl(Option option) private bool AddSource(ArgumentEnumerator ae, string argument) { - foreach (ArgumentSource source in sources) + foreach (var source in sources) { IEnumerable replacement; if (!source.GetArguments(argument, out replacement)) @@ -1157,7 +1140,7 @@ private static string GetArgumentName(int index, int maxIndex, string descriptio var nameStart = maxIndex == 1 ? new[] {"{0:", "{"} : new[] {"{" + index + ":"}; - foreach (string t in nameStart) + foreach (var t in nameStart) { int start, j = 0; do @@ -1166,7 +1149,7 @@ private static string GetArgumentName(int index, int maxIndex, string descriptio } while (start >= 0 && j != 0 && description[j++ - 1] == '{'); if (start == -1) continue; - int end = description.IndexOf("}", start, StringComparison.Ordinal); + var end = description.IndexOf("}", start, StringComparison.Ordinal); if (end == -1) continue; return description.Substring(start + t.Length, end - start - t.Length); @@ -1179,9 +1162,9 @@ private static string GetDescription(string description) { if (description == null) return string.Empty; - StringBuilder sb = new StringBuilder(description.Length); - int start = -1; - for (int i = 0; i < description.Length; ++i) + var sb = new StringBuilder(description.Length); + var start = -1; + for (var i = 0; i < description.Length; ++i) { switch (description[i]) { @@ -1251,7 +1234,7 @@ private bool ParseBool(string option, string n, OptionContext c) Contains(rn = n.Substring(0, n.Length - 1))) { var p = this[rn]; - string v = n[n.Length - 1] == '+' ? option : null; + var v = n[n.Length - 1] == '+' ? option : null; c.OptionName = option; c.Option = p; c.OptionValues.Add(v); @@ -1265,10 +1248,10 @@ private bool ParseBundledValue(string f, string n, OptionContext c) { if (f != "-") return false; - for (int i = 0; i < n.Length; ++i) + for (var i = 0; i < n.Length; ++i) { - string opt = f + n[i]; - string rn = n[i].ToString(); + var opt = f + n[i]; + var rn = n[i].ToString(); if (!Contains(rn)) { if (i == 0) @@ -1285,7 +1268,7 @@ private bool ParseBundledValue(string f, string n, OptionContext c) case OptionValueType.Optional: case OptionValueType.Required: { - string v = n.Substring(i + 1); + var v = n.Substring(i + 1); c.Option = p; c.OptionName = opt; ParseValue(v.Length != 0 ? v : null, c); @@ -1301,7 +1284,7 @@ private bool ParseBundledValue(string f, string n, OptionContext c) private void ParseValue(string option, OptionContext c) { if (option != null) - foreach (string o in c.Option.ValueSeparators != null + foreach (var o in c.Option.ValueSeparators != null ? option.Split(c.Option.ValueSeparators, c.Option.MaxValueCount - c.OptionValues.Count, StringSplitOptions.None) : new[] {option}) @@ -1339,8 +1322,8 @@ private static void Write(TextWriter o, ref int n, string s) private void WriteDescription(TextWriter o, string value, string prefix, int firstWidth, int remWidth) { - bool indent = false; - foreach (string line in GetLines(MessageLocalizer(GetDescription(value)), firstWidth, remWidth)) + var indent = false; + foreach (var line in GetLines(MessageLocalizer(GetDescription(value)), firstWidth, remWidth)) { if (indent) o.Write(prefix); @@ -1351,9 +1334,9 @@ private void WriteDescription(TextWriter o, string value, string prefix, int fir private bool WriteOptionPrototype(TextWriter o, Option p, ref int written) { - string[] names = p.Names; + var names = p.Names; - int i = GetNextOptionIndex(names, 0); + var i = GetNextOptionIndex(names, 0); if (i == names.Length) return false; @@ -1385,10 +1368,10 @@ private bool WriteOptionPrototype(TextWriter o, Option p, ref int written) Write(o, ref written, MessageLocalizer("[")); } Write(o, ref written, MessageLocalizer("=" + GetArgumentName(0, p.MaxValueCount, p.Description))); - string sep = p.ValueSeparators != null && p.ValueSeparators.Length > 0 + var sep = p.ValueSeparators != null && p.ValueSeparators.Length > 0 ? p.ValueSeparators[0] : " "; - for (int c = 1; c < p.MaxValueCount; ++c) + for (var c = 1; c < p.MaxValueCount; ++c) { Write(o, ref written, MessageLocalizer(sep + GetArgumentName(c, p.MaxValueCount, p.Description))); } @@ -1486,7 +1469,7 @@ public IEnumerator GetEnumerator() { do { - IEnumerator c = sources[sources.Count - 1]; + var c = sources[sources.Count - 1]; if (c.MoveNext()) yield return c.Current; else diff --git a/Ntp.Common/IO/Permission.cs b/Ntp.Common/IO/Permission.cs index 70239284..6e2355a7 100644 --- a/Ntp.Common/IO/Permission.cs +++ b/Ntp.Common/IO/Permission.cs @@ -19,85 +19,47 @@ // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN // THE SOFTWARE. - -#if __MonoCS__ -using Mono.Unix; using Mono.Unix.Native; -#endif namespace Ntp.Common.IO { -#if __MonoCS__ public static class Permission { - public static uint? GetUserId(string userName) { - Passwd pw = Syscall.getpwnam(userName); - if (pw != null) { - return pw.pw_uid; - } - - return null; - } - - public static uint? GetGroupId(string groupName) { - Group gr = Syscall.getgrnam(groupName); - if (gr != null) { - return gr.gr_gid; - } - - return null; + public static bool ChangeFileMode(string file, uint mode) + { + var permissions = NativeConvert.FromOctalPermissionString(mode.ToString()); + return Syscall.chmod(file, permissions) == 0; } - public static bool SetUserId(uint userId) { - try { - Syscall.seteuid (userId); - } catch { + public static bool ChangeFileOwner(string file, uint user, uint? group) + { + return Syscall.chown(file, user, group ?? unchecked((uint) -1)) == 0; + } + + public static uint? GetGroupId(string groupName) + { + var gr = Syscall.getgrnam(groupName); + return gr?.gr_gid; + } + + public static uint? GetUserId(string userName) + { + var pw = Syscall.getpwnam(userName); + return pw?.pw_uid; + } + + public static bool SetUserId(uint userId) + { + try + { + Syscall.seteuid(userId); + } + catch + { return false; } return true; } - - public static bool ChangeFileMode(string file, uint mode) - { - FilePermissions permissions = NativeConvert.FromOctalPermissionString(mode.ToString()); - return (Syscall.chmod(file, permissions) == 0); - } - - public static bool ChangeFileOwner(string file, uint user, uint? group) - { - return (Syscall.chown(file, user, group ?? unchecked((uint)-1)) == 0); - } } -#else - - public static class Permission - { - public static bool ChangeFileMode(string file, uint mode) - { - return true; - } - - public static bool ChangeFileOwner(string file, uint user, uint? group) - { - return true; - } - - public static uint? GetGroupId(string groupName) - { - return null; - } - - public static uint? GetUserId(string userName) - { - return null; - } - - public static bool SetUserId(uint userId) - { - return true; - } - } - -#endif } \ No newline at end of file diff --git a/Ntp.Common/IO/ShellCommand.cs b/Ntp.Common/IO/ShellCommand.cs index 02b9037b..4f5d35ec 100644 --- a/Ntp.Common/IO/ShellCommand.cs +++ b/Ntp.Common/IO/ShellCommand.cs @@ -55,12 +55,12 @@ public StreamReader Execute() RedirectStandardError = true, WorkingDirectory = WorkingDirectory, FileName = command, - Arguments = " " + arguments + Arguments = $" {arguments}" } }; string error; - log.WriteLine("Executing: " + command + " " + arguments, Severity.Debug); + log.WriteLine($"Executing: {command} {arguments}", Severity.Debug); try { @@ -77,7 +77,7 @@ public StreamReader Execute() if (error == string.Empty) return proc.StandardOutput; - log.WriteLine(ErrorMessage + " " + error, Severity.Warn); + log.WriteLine($"{ErrorMessage} {error}", Severity.Warn); return null; } } diff --git a/Ntp.Common/Log/EventLog.cs b/Ntp.Common/Log/EventLog.cs index 42d89efb..a9671805 100644 --- a/Ntp.Common/Log/EventLog.cs +++ b/Ntp.Common/Log/EventLog.cs @@ -19,7 +19,6 @@ // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN // THE SOFTWARE. -#if !__MonoCS__ using System; using System.Diagnostics; using System.Security; @@ -122,6 +121,4 @@ private static EventLogEntryType GetEventLogEntryType(Severity severity) } } } -} - -#endif \ No newline at end of file +} \ No newline at end of file diff --git a/Ntp.Common/Log/LogFactory.cs b/Ntp.Common/Log/LogFactory.cs index c5c85fea..14c18347 100644 --- a/Ntp.Common/Log/LogFactory.cs +++ b/Ntp.Common/Log/LogFactory.cs @@ -21,6 +21,7 @@ using System; using System.Collections.Generic; +using Ntp.Common.System; namespace Ntp.Common.Log { @@ -87,15 +88,9 @@ public static LogBase CreateLog(IEnumerable configs) public static LogBase CreateSysLog(string name) { -#if __MonoCS__ - LogBase log = new SysLog(name, Severity.Notice); + var log = ProcessInfo.CreateSystemLog(name); Logs.Add(log); return log; -#else - LogBase log = new EventLog(name, Severity.Notice); - Logs.Add(log); - return log; -#endif } public static void Resume() @@ -122,12 +117,9 @@ private static LogBase CreateLogInternal(ILogConfiguration config) ShowTimeStamp = config.ShowTimestamp }; case LogType.Syslog: - case LogType.EventLog: -#if __MonoCS__ return new SysLog(ApplicationName, config.Treshold); -#else + case LogType.EventLog: return new EventLog(ApplicationName, config.Treshold); -#endif case LogType.File: return new FileLog(config.File, config.Treshold, config.TimeFormat) { diff --git a/Ntp.Common/Log/SysLog.cs b/Ntp.Common/Log/SysLog.cs index 53da6033..810f9d83 100644 --- a/Ntp.Common/Log/SysLog.cs +++ b/Ntp.Common/Log/SysLog.cs @@ -19,8 +19,6 @@ // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN // THE SOFTWARE. - -#if __MonoCS__ using System; using Mono.Unix; using Mono.Unix.Native; @@ -35,39 +33,39 @@ public SysLog(string name, Severity treshold) this.name = name; } - private readonly string name; - private static bool initialized = false; - private const SyslogFacility Facility = SyslogFacility.LOG_DAEMON; private const SyslogOptions Options = SyslogOptions.LOG_PID; + private static bool initialized; + + private readonly string name; + + public override void Close() + { + if (initialized) + return; + + Syscall.closelog(); + initialized = false; + } public override void Initialize() { if (initialized) return; - + string ident = name; Syscall.openlog(UnixMarshal.StringToHeap(ident), Options, Facility); initialized = true; } - public override void Suspend() - { - // SysLog cannot suspend - } - public override void Resume() { // SysLog cannot resume } - public override void Close() + public override void Suspend() { - if (initialized) - return; - - Syscall.closelog(); - initialized = false; + // SysLog cannot suspend } public override void WriteLine(Exception exception) @@ -88,10 +86,10 @@ public override void WriteLine(string text, Severity severity) if (severity < Treshold) return; - Syscall.syslog(Facility, GetSyslogLevel(severity), text); + Syscall.syslog(Facility, GetSyslogLevel(severity), text); } - private SyslogLevel GetSyslogLevel(Severity severity) + private static SyslogLevel GetSyslogLevel(Severity severity) { switch (severity) { @@ -104,12 +102,11 @@ private SyslogLevel GetSyslogLevel(Severity severity) case Severity.Info: return SyslogLevel.LOG_INFO; case Severity.Debug: + case Severity.Trace: return SyslogLevel.LOG_DEBUG; default: return SyslogLevel.LOG_DEBUG; } } } -} - -#endif \ No newline at end of file +} \ No newline at end of file diff --git a/Ntp.Common/Ntp.Common.csproj b/Ntp.Common/Ntp.Common.csproj index 412cb3b0..d486b2c5 100644 --- a/Ntp.Common/Ntp.Common.csproj +++ b/Ntp.Common/Ntp.Common.csproj @@ -30,8 +30,11 @@ false + + ..\packages\Mono.Posix.4.0.0.0\lib\net40\Mono.Posix.dll + True + - @@ -71,4 +74,7 @@ + + + \ No newline at end of file diff --git a/Ntp.Common/System/InterProcess.cs b/Ntp.Common/System/InterProcess.cs index d7ab5d08..f740b113 100644 --- a/Ntp.Common/System/InterProcess.cs +++ b/Ntp.Common/System/InterProcess.cs @@ -20,13 +20,9 @@ // THE SOFTWARE. using System; -using System.Threading; -using Ntp.Common.Log; - -#if __MonoCS__ using Mono.Unix; using Mono.Unix.Native; -#endif +using Ntp.Common.Log; namespace Ntp.Common.System { @@ -41,98 +37,69 @@ public enum Signal Notify } -#if __MonoCS__ - private static UnixSignal sigterm, sigquit, sigint, sighup, sigusr1, sigusr2; - private static UnixSignal[] signals = new UnixSignal[] { - sigint = new UnixSignal (Signum.SIGINT), - sigterm = new UnixSignal (Signum.SIGTERM), - sigquit = new UnixSignal (Signum.SIGQUIT), - sighup = new UnixSignal (Signum.SIGHUP), - sigusr1 = new UnixSignal (Signum.SIGUSR1), - sigusr2 = new UnixSignal (Signum.SIGUSR2) + + private static readonly UnixSignal[] Signals = + { + sigint = new UnixSignal(Signum.SIGINT), + sigterm = new UnixSignal(Signum.SIGTERM), + sigquit = new UnixSignal(Signum.SIGQUIT), + sighup = new UnixSignal(Signum.SIGHUP), + sigusr1 = new UnixSignal(Signum.SIGUSR1), + sigusr2 = new UnixSignal(Signum.SIGUSR2) }; - public static Signal Wait (string name, LogBase log) + public static Signal Wait(string name, LogBase log) { - int i = 0; - while (true) { - try { - i = UnixSignal.WaitAny (signals, -1); - } catch (Exception e) { - log.WriteLine ("Unrecoverable error in UnixSignal.WaitAny()", + while (true) + { + int i; + try + { + i = UnixSignal.WaitAny(Signals, -1); + } + catch (Exception e) + { + log.WriteLine("Unrecoverable error in UnixSignal.WaitAny()", Severity.Error); - log.WriteLine (e, Severity.Trace); + log.WriteLine(e, Severity.Trace); return Signal.Error; } - if (i < 0 || i >= signals.Length) { - log.WriteLine (String.Format ( - "Received unknown signal {0}", - signals [i].Signum.ToString ()), - Severity.Warn); + if (i < 0 || i >= Signals.Length) + { + log.WriteLine($"Received unknown signal {Signals[i].Signum}", Severity.Warn); continue; } - log.WriteLine (String.Format ( - "Received signal {0}", - signals [i].Signum.ToString ()), - Severity.Debug); + log.WriteLine($"Received signal {Signals[i].Signum}", Severity.Debug); - if (sigint.IsSet || sigterm.IsSet || sigquit.IsSet) { - sigint.Reset (); - sigterm.Reset (); - sigquit.Reset (); + if (sigint.IsSet || sigterm.IsSet || sigquit.IsSet) + { + sigint.Reset(); + sigterm.Reset(); + sigquit.Reset(); return Signal.Exit; - } else if (sighup.IsSet) { - sighup.Reset (); + } + + if (sighup.IsSet) + { + sighup.Reset(); return Signal.Refresh; - } else if (sigusr1.IsSet) { - sigusr1.Reset (); + } + + if (sigusr1.IsSet) + { + sigusr1.Reset(); return Signal.Reload; - } else if (sigusr2.IsSet) { - sigusr2.Reset (); + } + + if (sigusr2.IsSet) + { + sigusr2.Reset(); return Signal.Notify; } } } - - #else - - public static bool Release(string name, LogBase log) - { - try - { - EventWaitHandle handle = EventWaitHandle.OpenExisting(name); - handle.Set(); - return true; - } - catch (Exception e) - { - log.WriteLine("Error in mutex handling.", Severity.Error); - log.WriteLine(e, Severity.Trace); - return false; - } - } - - public static Signal Wait(string name, LogBase log) - { - try - { - var handle = new EventWaitHandle( - false, EventResetMode.ManualReset, - name); - handle.WaitOne(); - return Signal.Exit; - } - catch (Exception e) - { - log.WriteLine("Error in mutex handling.", Severity.Error); - log.WriteLine(e, Severity.Trace); - return Signal.Error; - } - } - -#endif } } \ No newline at end of file diff --git a/Ntp.Common/System/ProcessInfo.cs b/Ntp.Common/System/ProcessInfo.cs index 8fca6905..c23836cd 100644 --- a/Ntp.Common/System/ProcessInfo.cs +++ b/Ntp.Common/System/ProcessInfo.cs @@ -19,25 +19,24 @@ // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN // THE SOFTWARE. - -#if __MonoCS__ +using System; using Mono.Unix.Native; -#endif +using Ntp.Common.Log; namespace Ntp.Common.System { - public class ProcessInfo + public static class ProcessInfo { - public static int ProcessId + public static int ProcessId => + Environment.OSVersion.Platform == PlatformID.Unix + ? Syscall.getpid() + : global::System.Diagnostics.Process.GetCurrentProcess().Id; + + public static LogBase CreateSystemLog(string name) { - get - { -#if __MonoCS__ - return Syscall.getpid (); - #else - return global::System.Diagnostics.Process.GetCurrentProcess().Id; -#endif - } + return Environment.OSVersion.Platform == PlatformID.Unix + ? new SysLog(name, Severity.Notice) + : (LogBase) new EventLog("NTP Analyzer", Severity.Notice); } } } \ No newline at end of file diff --git a/Ntp.Common/packages.config b/Ntp.Common/packages.config new file mode 100644 index 00000000..0b385f1f --- /dev/null +++ b/Ntp.Common/packages.config @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/Ntp.Data.Provider/MySqlFactory.cs b/Ntp.Data.Provider/MySqlFactory.cs index c873d2e1..c4afc73e 100644 --- a/Ntp.Data.Provider/MySqlFactory.cs +++ b/Ntp.Data.Provider/MySqlFactory.cs @@ -19,7 +19,6 @@ // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN // THE SOFTWARE. -#if MYSQL using System.Data; using System.Diagnostics.CodeAnalysis; using System.Text; @@ -131,6 +130,4 @@ private static string BuildConnectionString(bool includeName = true) return b.ToString(); } } -} - -#endif \ No newline at end of file +} \ No newline at end of file diff --git a/Ntp.Data.Provider/Ntp.Data.Provider.csproj b/Ntp.Data.Provider/Ntp.Data.Provider.csproj index 84b8b2ea..e880cce9 100644 --- a/Ntp.Data.Provider/Ntp.Data.Provider.csproj +++ b/Ntp.Data.Provider/Ntp.Data.Provider.csproj @@ -51,28 +51,25 @@ - - - - ..\libbin\Npgsql.dll - - - + - - - - ..\libbin\MySql.Data.dll - - - + + + ..\packages\MySql.Data.6.9.9\lib\net45\MySql.Data.dll + True + + + ..\packages\Npgsql.3.1.7\lib\net451\Npgsql.dll + True + - + + @@ -85,4 +82,7 @@ Ntp.Data - + + + + \ No newline at end of file diff --git a/Ntp.Data.Provider/PostgreSqlFactory.cs b/Ntp.Data.Provider/PostgreSqlFactory.cs index 9c4cbc0f..dd704136 100644 --- a/Ntp.Data.Provider/PostgreSqlFactory.cs +++ b/Ntp.Data.Provider/PostgreSqlFactory.cs @@ -19,7 +19,6 @@ // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN // THE SOFTWARE. -#if PGSQL using System; using System.Data; using System.Diagnostics.CodeAnalysis; @@ -173,6 +172,4 @@ private static string BuildConnectionString(bool includeName = true) return b.ToString(); } } -} - -#endif \ No newline at end of file +} \ No newline at end of file diff --git a/Ntp.Data.Provider/SqlDatabaseFactory.cs b/Ntp.Data.Provider/SqlDatabaseFactory.cs index 0404ff4e..386484ac 100644 --- a/Ntp.Data.Provider/SqlDatabaseFactory.cs +++ b/Ntp.Data.Provider/SqlDatabaseFactory.cs @@ -35,17 +35,9 @@ public static SqlDatabaseFactory Instance switch (Config.Provider) { case SqlDatabaseProvider.MySql: -#if MYSQL return new MySqlFactory(); -#else - throw new NotSupportedException("Data access was not built with MySQL support."); -#endif case SqlDatabaseProvider.PostgreSql: -#if PGSQL return new PostgreSqlFactory(); -#else - throw new NotSupportedException("Data access was not built with PostgreSQL support."); -#endif case SqlDatabaseProvider.Unknown: throw new NotSupportedException("Unknown SQL data provider was configured."); default: diff --git a/Ntp.Data.Provider/packages.config b/Ntp.Data.Provider/packages.config new file mode 100644 index 00000000..6345d68c --- /dev/null +++ b/Ntp.Data.Provider/packages.config @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/libbin/MySql.Data.License b/libbin/MySql.Data.License deleted file mode 100644 index 563f4645..00000000 --- a/libbin/MySql.Data.License +++ /dev/null @@ -1,45 +0,0 @@ -MySQL Connector/Net 6.x - -This is a release of MySQL Connector/Net, Oracle's dual- -license ADO.Net Driver for MySQL. For the avoidance of -doubt, this particular copy of the software is released -under the version 2 of the GNU General Public License. -MySQL Connector/Net is brought to you by Oracle. - -Copyright (c) 2004, 2016, Oracle and/or its affiliates. All rights reserved. - -License information can be found in the COPYING file. - -MySQL FOSS License Exception -We want free and open source software applications under -certain licenses to be able to use the GPL-licensed MySQL -Connector/NET (specified GPL-licensed MySQL client libraries) -despite the fact that not all such FOSS licenses are -compatible with version 2 of the GNU General Public License. -Therefore there are special exceptions to the terms and -conditions of the GPLv2 as applied to these client libraries, -which are identified and described in more detail in the -FOSS License Exception at - - -This distribution may include materials developed by third -parties. For license and attribution notices for these -materials, please refer to the documentation that accompanies -this distribution (see the "Licenses for Third-Party Components" -appendix) or view the online documentation at - - -The accompanying documentation currently exists in MSDN help -format and is located in the 'doc' directory. - -GPLv2 Disclaimer -For the avoidance of doubt, except that if any license choice -other than GPL or LGPL is available it will apply instead, -Oracle elects to use only the General Public License version 2 -(GPLv2) at this time for any software where a choice of GPL -license versions is made available with the language indicating -that GPLv2 or any later version may be used, or where a choice -of which version of the GPL is applied is otherwise unspecified. - -This software is OSI Certified Open Source Software. -OSI Certified is a certification mark of the Open Source Initiative. diff --git a/libbin/NPlot.License b/libbin/NPlot.License deleted file mode 100644 index 90b4c6fb..00000000 --- a/libbin/NPlot.License +++ /dev/null @@ -1,27 +0,0 @@ -NPlot - A charting library for .NET -Copyright (C) 2003-2006 Matt Howlett and others. -Copyright (C) 2013-2016 Carsten Larsen. -All rights reserved. - -Redistribution and use in source and binary forms, with or without modification, -are permitted provided that the following conditions are met: - -1. Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. -2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. -3. Neither the name of NPlot nor the names of its contributors may - be used to endorse or promote products derived from this software without - specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. -IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, -INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, -BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF -LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE -OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED -OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/libbin/NPlot.dll b/libbin/NPlot.dll deleted file mode 100755 index e58700b6..00000000 Binary files a/libbin/NPlot.dll and /dev/null differ diff --git a/libbin/Npgsql.License b/libbin/Npgsql.License deleted file mode 100644 index 0a453649..00000000 --- a/libbin/Npgsql.License +++ /dev/null @@ -1,7 +0,0 @@ -Copyright (c) 2002-2016, The Npgsql Development Team - -Permission to use, copy, modify, and distribute this software and its documentation for any purpose, without fee, and without a written agreement is hereby granted, provided that the above copyright notice and this paragraph and the following two paragraphs appear in all copies. - -IN NO EVENT SHALL THE NPGSQL DEVELOPMENT TEAM BE LIABLE TO ANY PARTY FOR DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, INCLUDING LOST PROFITS, ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF THE NPGSQL DEVELOPMENT TEAM HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -THE NPGSQL DEVELOPMENT TEAM SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS ON AN "AS IS" BASIS, AND THE NPGSQL DEVELOPMENT TEAM HAS NO OBLIGATIONS TO PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. diff --git a/libbin/Npgsql.dll b/libbin/Npgsql.dll deleted file mode 100755 index 82a55244..00000000 Binary files a/libbin/Npgsql.dll and /dev/null differ diff --git a/packages/Mono.Posix.4.0.0.0/Mono.Posix.4.0.0.0.nupkg b/packages/Mono.Posix.4.0.0.0/Mono.Posix.4.0.0.0.nupkg new file mode 100644 index 00000000..9a2376e5 Binary files /dev/null and b/packages/Mono.Posix.4.0.0.0/Mono.Posix.4.0.0.0.nupkg differ diff --git a/packages/Mono.Posix.4.0.0.0/lib/net40/Mono.Posix.dll b/packages/Mono.Posix.4.0.0.0/lib/net40/Mono.Posix.dll new file mode 100644 index 00000000..8abe4e6d Binary files /dev/null and b/packages/Mono.Posix.4.0.0.0/lib/net40/Mono.Posix.dll differ diff --git a/packages/MySql.Data.6.9.9/CHANGES b/packages/MySql.Data.6.9.9/CHANGES new file mode 100644 index 00000000..cf22875a --- /dev/null +++ b/packages/MySql.Data.6.9.9/CHANGES @@ -0,0 +1,77 @@ +6.9.9 +- Fix for Nested transactions are not supported in Entity Framework (MySQL Bug #71502, Oracle Bug #22366266). +- Fix for EF5 and EF6 wrong SQL statement to set primary key (MySQL Bug 76292, Oracle Bug #20711384) +- Fixed problem where mysql.proc tables would not be used for metadata even though access was available (MySQL Bug #74116, Oracle Bug #20960373) +- Added support for TLSv1.1 and TLSv1.2 +- Fixed Fix for "Aborted connection" (MySQL Bug #80997, Oracle Bug # 23346197). + + +6.9.8 +- Added support for Chinese character set gb18030. (Oracle bug # 21098546). +- Added support for Json type. (WL # 8132). +- Added changes for metadata information in generated columns with 5.7 (WL #411) + +6.9.7 +- Changed default SSL mode to Preferred in connection string. Now the server connections will be using SSL if server allows it by default but it's possible to override this configuration. +- Changed handshake process to use bytes instead of encoded strings. +- Fix for Fabric connections (Oracle Bug #20983968). +- Fix for Fabric plugin: fabric server selection is broken when master is faulty (Oracle Bug #21203824). + + +6.9.6 +- Fix for Incorrect query result with Entity Framework 6 (MySql bug #74918, Oracle bug #20129927). +- Fix for GetTimeZoneOffset to use date and time to calculate timediff (MySQL Bug #74905, Oracle Bug #20065691). +- Fix for MySqlSimpleMembershipProvider keeps database connections open on some operations (MySQL Bug #74662, Oracle Bug #20109419) +- Fix for Any Call to RoleExists() returns true whether or not the role exists (MySql bug #75397, Oracle bug #20325391). +- Fix for all dateTimes set as UTC Kind (MySQL Bug #74134, Oracle Bug #20200662). +- Fix for Invalid SQL query when eager loading two nested collections (MySQL Bug #70941, Oracle bug #18049862). +- Fix for chinese characters used in the connection string when connecting to MySql Server (MySQL Bug #70041, Oracle Bug #18141356). + + + +6.9.5 +- Disabled installation on-demand in Installer (Oracle Bug #19670596). +- Fix for Generated SQL requests column that doesn't exist in LINQ to Entities (MySql bug #72004, Oracle bug #19681348). +- Fix for MySQL Connector/NET generates incorrect SQL for LINQ 'StartsWith' queries (MySql bug #72058, Oracle bug #19680236). +- Fix for Exception when using IEnumerable.Contains(model.property) in Where predicate (MySql bug #73643, Oracle bug #19690370). +- Fix for Generated Sql does not contain ORDER BY statement whose is requested by LINQ (MySql bug #73549, Oracle bug #19698010). +- Fix for Web providers registration in machine.config (removed v20 suffix) (MySQL Bug #74080, Oracle Bug #19715398) +- Fix for Error of "Every derived table must have an alias" in LINQ to Entities when using EF6 + DbFirst + View + Take + (MySql Bug #72148, Oracle bug #19356006). +- Fix for 'the method or operation is not implemented' when using linq with orderby (MySQL Bug #70722, Oracle Bug #19681723). +- Fix for Exception "The given key was not present in the dictionary" when using utf16le charset in a query. (MySql #72737, Oracle Bug #19355906) +- Fix for Memory leak in a loop opening a connection to the database and executing a command (MySql Bug #73122, Oracle Bug #19467233). +- Fix for Multiple issues caused by trailing and leading white space character in params using MySql Membership Provider (MySql Bug #73411, Oracle Bug #19453313) +- Fix for bad assumption leads to modify query adding CALL statement to the beginning of the sql query even when CommandType.Text is specified (MySql Bug #72736, Oracle Bug #19325120). + + +6.9.4 +- Added a new plugin for MySql Fabric 1.5 support + + +6.9.3 +- Fix for Web Parts Personalization provider +- Fix for changing the PK between two int columns (MySql Bug #71418, Oracle bug #18923294). +- Fix for Error when Calling MySqlConnection.GetSchema("PROCEDURES WITH PARAMETERS", ...) (Oracle bug #19285959). +- Fix for EF provider reports ManifestProviderToken = 5.6 for server 5.7 (Oracle bug #19453814). +- Fix for Fluent API DbModelBuilder.HasColumnType is ignored in EF6 (Oracle bug #19456229). +- Fix for Setting a PK GUID identity in Code First in EF6 no longer works in Server 5.7 (Oracle bug #19456452). +- Non PKs declared as Identity GUID have no GUID autogenerated (Oracle bug #19456415). + + +6.9.2 +- Add async/await compatible methods +- Fix for Unable to read geometry column when it has been set with a SRID value. (MySql Bug #71869, Oracle Bug #19137999) +- Fix for Exception adding a new column to an existing model as identity and PK fails when applying the migration (MySql Bug #71418, Oracle bug #18923294). +- Added SiteMap and Personalization configuration web providers to MySql.Web Nuget Package. + + +6.9.1 +- Fix for Exception of "duplicate entry" in MySqlSessionProvider (MySql Bug #70409, Oracle bug #18657550). + + +6.9.0 +- Added implementation of MySQLPersonalizationProvider. +- Added SiteMap Web provider. +- Added Simple Membership Web Provider. +- Fix for open sockets connections left when connection open fails, the error happens when the client try to get a connection when the max number of connections is reached in the server. (MySql #72025, Oracle Bug #18665388). diff --git a/packages/MySql.Data.6.9.9/MySql.Data.6.9.9.nupkg b/packages/MySql.Data.6.9.9/MySql.Data.6.9.9.nupkg new file mode 100644 index 00000000..a314a13b Binary files /dev/null and b/packages/MySql.Data.6.9.9/MySql.Data.6.9.9.nupkg differ diff --git a/packages/MySql.Data.6.9.9/Readme.txt b/packages/MySql.Data.6.9.9/Readme.txt new file mode 100644 index 00000000..a1f1be55 --- /dev/null +++ b/packages/MySql.Data.6.9.9/Readme.txt @@ -0,0 +1,15 @@ +Connector/Net 6.9 Release Notes +------------------------------------ + +Welcome to the release notes for Connector/Net 6.9 + +What's new in 6.9 +-------------------- + +- Simple Membership Web Provider +- Site Map Web Provider +- Personalization Web Provider +- MySql Fabric support + + +Be sure and check the documentation for more information on these new features. \ No newline at end of file diff --git a/packages/MySql.Data.6.9.9/content/app.config.transform b/packages/MySql.Data.6.9.9/content/app.config.transform new file mode 100644 index 00000000..f627a620 --- /dev/null +++ b/packages/MySql.Data.6.9.9/content/app.config.transform @@ -0,0 +1,9 @@ + + + + + + + + + \ No newline at end of file diff --git a/packages/MySql.Data.6.9.9/content/web.config.transform b/packages/MySql.Data.6.9.9/content/web.config.transform new file mode 100644 index 00000000..f627a620 --- /dev/null +++ b/packages/MySql.Data.6.9.9/content/web.config.transform @@ -0,0 +1,9 @@ + + + + + + + + + \ No newline at end of file diff --git a/packages/MySql.Data.6.9.9/lib/net40/MySql.Data.dll b/packages/MySql.Data.6.9.9/lib/net40/MySql.Data.dll new file mode 100644 index 00000000..c9f344a5 Binary files /dev/null and b/packages/MySql.Data.6.9.9/lib/net40/MySql.Data.dll differ diff --git a/libbin/MySql.Data.dll b/packages/MySql.Data.6.9.9/lib/net45/MySql.Data.dll old mode 100755 new mode 100644 similarity index 100% rename from libbin/MySql.Data.dll rename to packages/MySql.Data.6.9.9/lib/net45/MySql.Data.dll diff --git a/packages/NPlot.0.9.10.0/NPlot.0.9.10.0.nupkg b/packages/NPlot.0.9.10.0/NPlot.0.9.10.0.nupkg new file mode 100644 index 00000000..ab9daa57 Binary files /dev/null and b/packages/NPlot.0.9.10.0/NPlot.0.9.10.0.nupkg differ diff --git a/packages/NPlot.0.9.10.0/lib/net20/NPlot.dll b/packages/NPlot.0.9.10.0/lib/net20/NPlot.dll new file mode 100644 index 00000000..a627203c Binary files /dev/null and b/packages/NPlot.0.9.10.0/lib/net20/NPlot.dll differ diff --git a/packages/Npgsql.3.1.7/Npgsql.3.1.7.nupkg b/packages/Npgsql.3.1.7/Npgsql.3.1.7.nupkg new file mode 100644 index 00000000..5e341f12 Binary files /dev/null and b/packages/Npgsql.3.1.7/Npgsql.3.1.7.nupkg differ diff --git a/packages/Npgsql.3.1.7/lib/net45/Npgsql.dll b/packages/Npgsql.3.1.7/lib/net45/Npgsql.dll new file mode 100644 index 00000000..80e88e62 Binary files /dev/null and b/packages/Npgsql.3.1.7/lib/net45/Npgsql.dll differ diff --git a/packages/Npgsql.3.1.7/lib/net45/Npgsql.xml b/packages/Npgsql.3.1.7/lib/net45/Npgsql.xml new file mode 100644 index 00000000..8927239b --- /dev/null +++ b/packages/Npgsql.3.1.7/lib/net45/Npgsql.xml @@ -0,0 +1,6973 @@ + + + + Npgsql + + + + + Base class for all classes which represent a message sent by the PostgreSQL backend. + + + + + Base class for all classes which represent a message sent to the PostgreSQL backend. + Concrete classes which directly inherit this represent arbitrary-length messages which can chunked. + + + + the buffer into which to write the message. + + Whether there was enough space in the buffer to contain the entire message. + If false, the buffer should be flushed and write should be called again. + + + + + Represents a simple frontend message which is typically small and fits well within + the write buffer. The message is first queries for the number of bytes it requires, + and then writes itself out. + + + + + Returns the number of bytes needed to write this message. + + + + + Writes the message contents into the buffer. + + + + + Specifies the type of SQL statement, e.g. SELECT + + + + + The way how to order bytes. + + + + + Most significant byte first (XDR) + + + + + Less significant byte first (NDR) + + + + + Represents a SQL statement or function (stored procedure) to execute + against a PostgreSQL database. This class cannot be inherited. + + + + + Cached version of _connection.Connector, for performance + + + + + Returns details about each statement that this command has executed. + Is only populated when an Execute* method is called. + + + + + If part of the send happens asynchronously (see , + the Task for that remaining send is stored here. + + + + + Indicates whether this command has been prepared. + Never access this field directly, use instead. + + + + + For prepared commands, captures the connection's + at the time the command was prepared. This allows us to know whether the connection was + closed since the command was prepared. + + + + + Initializes a new instance of the NpgsqlCommand class. + + + + + Initializes a new instance of the NpgsqlCommand class with the text of the query. + + The text of the query. + + + + 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. + + + + 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. + + + + 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. + + + + 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 value is 30 seconds. + + + + Gets or sets a value indicating how the + CommandText property is to be interpreted. + + One of the CommandType values. The default is CommandType.Text. + + + + DB connection. + + + + + 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. + + + + Design time visible. + + + + + Gets or sets how command results are applied to the DataRow when used by the + DbDataAdapter.Update(DataSet) method. + + One of the UpdateRowSource values. + + + + Returns whether this query will execute as a prepared (compiled) query. + + + + + Marks all of the query's result columns as either known or unknown. + Unknown results column are requested them from PostgreSQL in text format, and Npgsql makes no + attempt to parse them. They will be accessible as strings only. + + + + + Marks the query's result columns as known or unknown, on a column-by-column basis. + Unknown results column are requested them from PostgreSQL in text format, and Npgsql makes no + attempt to parse them. They will be accessible as strings only. + + + If the query includes several queries (e.g. SELECT 1; SELECT 2), this will only apply to the first + one. The rest of the queries will be fetched and parsed as usual. + + The array size must correspond exactly to the number of result columns the query returns, or an + error will be raised. + + + + + Marks result types to be used when using GetValue on a data reader, on a column-by-column basis. + Used for Entity Framework 5-6 compability. + Only primitive numerical types and DateTimeOffset are supported. + Set the whole array or just a value to null to use default type. + + + + + Gets the current state of the connector + + + + + Creates a new instance of an DbParameter object. + + An DbParameter object. + + + + Creates a new instance of a NpgsqlParameter object. + + A NpgsqlParameter object. + + + + DB parameter collection. + + + + + Gets the NpgsqlParameterCollection. + + The parameters of the SQL statement or function (stored procedure). The default is an empty collection. + + + + Creates a prepared version of the command on a PostgreSQL server. + + + + + This method is used to asynchronously sends all remaining protocol messages for statements + beyond the first one, and *without* waiting for the send to complete. This technique is + used to avoid the deadlock described in #641 by allowing the user to read query results + while at the same time sending messages for later statements. + + + + + Populates the send buffer with protocol messages for the execution of non-prepared statement(s). + + + true whether all messages could be populated in the buffer, false otherwise (method needs to be + called again) + + + + + Populates the send buffer with protocol messages for the execution of prepared statement(s). + + + true whether all messages could be populated in the buffer, false otherwise (method needs to be + called again) + + + + + Populates the send buffer with Parse/Describe protocol messages, used for preparing commands + and for execution in SchemaOnly mode. + + + true whether all messages could be populated in the buffer, false otherwise (method needs to be + called again) + + + + + Populates the send buffer with Parse/Describe protocol messages, used for preparing commands + and for execution in SchemaOnly mode. + + + true whether all messages could be populated in the buffer, false otherwise (method needs to be + called again) + + + + + Executes a SQL statement against the connection and returns the number of rows affected. + + The number of rows affected if known; -1 otherwise. + + + + Asynchronous version of + + The token to monitor for cancellation requests. + A task representing the asynchronous operation, with the number of rows affected if known; -1 otherwise. + + + + 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. + + + + Asynchronous version of + + The token to monitor for cancellation requests. + A task representing the asynchronous operation, with the first column of the + first row in the result set, or a null reference if the result set is empty. + + + + Executes the CommandText against the Connection, and returns an DbDataReader. + + + Unlike the ADO.NET method which it replaces, this method returns a Npgsql-specific + DataReader. + + A DbDataReader object. + + + + Executes the CommandText against the Connection, and returns an DbDataReader using one + of the CommandBehavior values. + + + Unlike the ADO.NET method which it replaces, this method returns a Npgsql-specific + DataReader. + + A DbDataReader object. + + + + Executes the command text against the connection. + + An instance of . + A task representing the operation. + + + + + Executes the command text against the connection. + + + + + DB transaction. + + + + + Gets or sets the NpgsqlTransaction + within which the NpgsqlCommand executes. + + The NpgsqlTransaction. + The default value is a null reference. + + + + Attempts to cancel the execution of a NpgsqlCommand. + + As per the specs, no exception will be thrown by this method in case of failure + + + + Releases the resources used by the NpgsqlCommand. + + + + + Fixes up the text/binary flag on result columns. + Since Prepare() describes a statement rather than a portal, the resulting RowDescription + will have text format on all result columns. Fix that up. + + + Note that UnknownResultTypeList only applies to the first query, while AllResultTypesAreUnknown applies + to all of them. + + + + + Create a new command based on this one. + + A new NpgsqlCommand object. + + + + Create a new command based on this one. + + A new NpgsqlCommand object. + + + + This class represents a connection to a PostgreSQL server. + + + + + The parsed connection string set by the user + + + + + The actual string provided by the user for the connection string + + + + + The connector object connected to the backend. + + + + + A counter that gets incremented every time the connection is (re-)opened. + This allows us to identify an "instance" of connection, which is useful since + some resources are released when a connection is closed (e.g. prepared statements). + + + + + The default TCP/IP port for PostgreSQL. + + + + + Maximum value for connection timeout. + + + + + Initializes a new instance of the + NpgsqlConnection class. + + + + + Initializes a new instance of the + NpgsqlConnection class + and sets the ConnectionString. + + 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. + + + + Opens a database connection with the property settings specified by the + ConnectionString. + + + + + This is the asynchronous version of . + + + Do not invoke other methods and properties of the object until the returned Task is complete. + + The cancellation instruction. + A task representing the asynchronous operation. + + + + Gets or sets the string used to connect to a PostgreSQL database. See the manual for details. + + The connection string that includes the server name, + the database name, and other parameters needed to establish + the initial connection. The default value is an empty string. + + + + + Backend server host name. + + + + + Backend server port. + + + + + If true, the connection will attempt to use SslStream instead of an internal TlsClientStream. + + + + + Gets 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 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 the name of the current database or the database to be used after a connection is opened. + + The name of the current database or the name of the database to be + used after a connection is opened. The default value is the empty string. + + + + Gets the string identifying the database server (host and port) + + + + + Whether to use Windows integrated security to log in. + + + + + User name. + + + + + Gets the current state of the connection. + + A bitwise combination of the ConnectionState values. The default is Closed. + + + + Gets whether the current state of the connection is Open or Closed + + ConnectionState.Open, ConnectionState.Closed or ConnectionState.Connecting + + + + Creates and returns a DbCommand + object associated with the IDbConnection. + + A DbCommand object. + + + + Creates and returns a NpgsqlCommand + object associated with the NpgsqlConnection. + + A NpgsqlCommand object. + + + + Begins a database transaction with the specified isolation level. + + The isolation level under which the transaction should run. + An DbTransaction + object representing the new transaction. + + Currently the IsolationLevel ReadCommitted and Serializable are supported by the PostgreSQL backend. + There's no support for nested transactions. + + + + + Begins a database transaction. + + A NpgsqlTransaction + object representing the new transaction. + + Currently there's no support for nested transactions. Transactions created by this method will have Read Committed isolation level. + + + + + Begins a database transaction with the specified isolation level. + + The isolation level under which the transaction should run. + A NpgsqlTransaction + object representing the new transaction. + + Currently the IsolationLevel ReadCommitted and Serializable are supported by the PostgreSQL backend. + There's no support for nested transactions. + + + + + 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. + + + + + Enlist transation. + + + + + + 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. + + + + + Closes ongoing operations, i.e. an open reader exists or a COPY operation still in progress, as + part of a connection close. + Does nothing if the thread has been aborted - the connector will be closed immediately. + + + + + Releases all resources used by the + NpgsqlConnection. + + true when called from Dispose(); + false when being called from the finalizer. + + + + Occurs on NoticeResponses from the PostgreSQL backend. + + + + + Occurs on NotificationResponses from the PostgreSQL backend. + + + + + Returns whether SSL is being used for the connection. + + + + + Selects the local Secure Sockets Layer (SSL) certificate used for authentication. + + + See + + + + + Verifies the remote Secure Sockets Layer (SSL) certificate used for authentication. + Ignored if is set. + + + See + + + + + Version of the PostgreSQL backend. + This can only be called when there is an active connection. + + + + + PostgreSQL server version. + + + + + Process id of backend server. + 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). + + + + + Begins a binary COPY FROM STDIN operation, a high-performance data import mechanism to a PostgreSQL table. + + A COPY FROM STDIN SQL command + A which can be used to write rows and columns + + See http://www.postgresql.org/docs/current/static/sql-copy.html. + + + + + Begins a binary COPY TO STDOUT operation, a high-performance data export mechanism from a PostgreSQL table. + + A COPY TO STDOUT SQL command + A which can be used to read rows and columns + + See http://www.postgresql.org/docs/current/static/sql-copy.html. + + + + + Begins a textual COPY FROM STDIN operation, a data import mechanism to a PostgreSQL table. + It is the user's responsibility to send the textual input according to the format specified + in . + + A COPY FROM STDIN SQL command + + A TextWriter that can be used to send textual data. + + See http://www.postgresql.org/docs/current/static/sql-copy.html. + + + + + Begins a textual COPY TO STDOUT operation, a data export mechanism from a PostgreSQL table. + It is the user's responsibility to parse the textual input according to the format specified + in . + + A COPY TO STDOUT SQL command + + A TextReader that can be used to read textual data. + + See http://www.postgresql.org/docs/current/static/sql-copy.html. + + + + + Begins a raw binary COPY operation (TO STDOUT or FROM STDIN), a high-performance data export/import mechanism to a PostgreSQL table. + Note that unlike the other COPY API methods, doesn't implement any encoding/decoding + and is unsuitable for structured import/export operation. It is useful mainly for exporting a table as an opaque + blob, for the purpose of importing it back later. + + A COPY TO STDOUT or COPY FROM STDIN SQL command + A that can be used to read or write raw binary data. + + See http://www.postgresql.org/docs/current/static/sql-copy.html. + + + + + Maps a CLR enum to a PostgreSQL enum type for use with this connection. + + + CLR enum labels are mapped by name to PostgreSQL enum labels. + The translation strategy can be controlled by the parameter, + which defaults to . + You can also use the on your enum fields to manually specify a PostgreSQL enum label. + If there is a discrepancy between the .NET and database labels while an enum is read or written, + an exception will be raised. + + Can only be invoked on an open connection; if the connection is closed the mapping is lost. + + To avoid mapping the type for each connection, use the method. + + + A PostgreSQL type name for the corresponding enum type in the database. + If null, the name translator given in will be used. + + + A component which will be used to translate CLR names (e.g. SomeClass) into database names (e.g. some_class). + Defaults to + + The .NET enum type to be mapped + + + + Maps a CLR enum to a PostgreSQL enum type for use with all connections created from now on. Existing connections aren't affected. + + + CLR enum labels are mapped by name to PostgreSQL enum labels. + The translation strategy can be controlled by the parameter, + which defaults to . + You can also use the on your enum fields to manually specify a PostgreSQL enum label. + If there is a discrepancy between the .NET and database labels while an enum is read or written, + an exception will be raised. + + To map the type for a specific connection, use the method. + + + A PostgreSQL type name for the corresponding enum type in the database. + If null, the name translator given in will be used. + + + A component which will be used to translate CLR names (e.g. SomeClass) into database names (e.g. some_class). + Defaults to + + The .NET enum type to be mapped + + + + Removes a previous global enum mapping. + + + A PostgreSQL type name for the corresponding enum type in the database. + If null, the name translator given in will be used. + + + A component which will be used to translate CLR names (e.g. SomeClass) into database names (e.g. some_class). + Defaults to + + + + + Maps a CLR type to a PostgreSQL composite type for use with this connection. + + + CLR fields and properties by string to PostgreSQL enum labels. + The translation strategy can be controlled by the parameter, + which defaults to . + You can also use the on your members to manually specify a PostgreSQL enum label. + If there is a discrepancy between the .NET and database labels while a composite is read or written, + an exception will be raised. + + Can only be invoked on an open connection; if the connection is closed the mapping is lost. + + To avoid mapping the type for each connection, use the method. + + + A PostgreSQL type name for the corresponding enum type in the database. + If null, the name translator given in will be used. + + + A component which will be used to translate CLR names (e.g. SomeClass) into database names (e.g. some_class). + Defaults to + + The .NET type to be mapped + + + + Maps a CLR type to a PostgreSQL composite type for use with all connections created from now on. Existing connections aren't affected. + + + CLR fields and properties by string to PostgreSQL enum labels. + The translation strategy can be controlled by the parameter, + which defaults to . + You can also use the on your members to manually specify a PostgreSQL enum label. + If there is a discrepancy between the .NET and database labels while a composite is read or written, + an exception will be raised. + + To map the type for a specific connection, use the method. + + + A PostgreSQL type name for the corresponding enum type in the database. + If null, the name translator given in will be used. + + + A component which will be used to translate CLR names (e.g. SomeClass) into database names (e.g. some_class). + Defaults to + + The .NET type to be mapped + + + + Removes a previous global enum mapping. + + + A PostgreSQL type name for the corresponding enum type in the database. + If null, the name translator given in will be used. + + + A component which will be used to translate CLR names (e.g. SomeClass) into database names (e.g. some_class). + Defaults to + + + + + Waits until an asynchronous PostgreSQL messages (e.g. a notification) arrives, and + exits immediately. The asynchronous message is delivered via the normal events + (, ). + + + The time-out value, in milliseconds, passed to . + The default value is 0, which indicates an infinite time-out period. + Specifying -1 also indicates an infinite time-out period. + + true if an asynchronous message was received, false if timed out. + + + + Waits until an asynchronous PostgreSQL messages (e.g. a notification) arrives, and + exits immediately. The asynchronous message is delivered via the normal events + (, ). + + + The time-out value is passed to . + + true if an asynchronous message was received, false if timed out. + + + + Waits until an asynchronous PostgreSQL messages (e.g. a notification) arrives, and + exits immediately. The asynchronous message is delivered via the normal events + (, ). + + + + + Waits asynchronously until an asynchronous PostgreSQL messages (e.g. a notification) + arrives, and exist immediately. The asynchronous message is delivered via the normal events + (, ). + + + + + Waits asynchronously until an asynchronous PostgreSQL messages (e.g. a notification) + arrives, and exist immediately. The asynchronous message is delivered via the normal events + (, ). + + + + + Returns the supported collections + + + + + Returns the schema collection specified by the collection name. + + The collection name. + The collection specified. + + + + Returns the schema collection specified by the collection name filtered by the restrictions. + + The collection name. + + The restriction values to filter the results. A description of the restrictions is contained + in the Restrictions collection. + + The collection specified. + + + + Remove password from externally-visible ConnectionString, but leave it in + the internally visible one - we need it for the connection pool key, Clone() etc. + + + + + Creates a closed connection with the connection string and authentication details of this message. + + + + + Clones this connection, replacing its connection string with the given one. + This allows creating a new connection with the same security information + (password, SSL callbacks) while changing other connection parameters (e.g. + database or pooling) + + + + + This method changes the current database by disconnecting from the actual + database and connecting to the specified. + + The name of the database to use in place of the current database. + + + + DB provider factory. + + + + + Clear connection pool. + + + + + Clear all connection pools. + + + + + Flushes the type cache for this connection's connection string and reloads the + types for this connection only. + + + + + Represents a connection to a PostgreSQL backend. Unlike NpgsqlConnection objects, which are + exposed to users, connectors are internal to Npgsql and are recycled by the connection pool. + + + Represents a connection to a PostgreSQL backend. Unlike NpgsqlConnection objects, which are + exposed to users, connectors are internal to Npgsql and are recycled by the connection pool. + + + + + The physical connection socket to the backend. + + + + + The physical connection stream to the backend, without anything on top. + + + + + The physical connection stream to the backend, layered with an SSL/TLS stream if in secure mode. + + + + + Contains the clear text password which was extracted from the user-provided connection string. + If non-cleartext authentication is requested from the server, this is set to null. + + + + + Buffer used for reading data. + + + + + Buffer used for writing data. + + + + + Version of backend server this connector is connected to. + + + + + The secret key of the backend for this connector, used for query cancellation. + + + + + The process ID of the backend for this connector. + + + + + A unique ID identifying this connector, used for logging. Currently mapped to BackendProcessId + + + + + The current transaction status for this connector. + + + + + The transaction currently in progress, if any. + + + + Note that this doesn't mean a transaction request has actually been sent to the backend - for + efficiency we defer sending the request to the first query after BeginTransaction is called. + See for the actual transaction status. + + + Also, the user can initiate a transaction in SQL (i.e. BEGIN), in which case there will be no + NpgsqlTransaction instance. As a result, never check to know whether + a transaction is in progress, check instead. + + + + + + The NpgsqlConnection that (currently) owns this connector. Null if the connector isn't + owned (i.e. idle in the pool) + + + + + The number of messages that were prepended to the current message chain, but not yet sent. + Note that this only tracks messages which produce a ReadyForQuery message + + + + + If the connector is currently in COPY mode, holds a reference to the importer/exporter object. + Otherwise null. + + + + + Holds all run-time parameters received from the backend (via ParameterStatus messages) + + + + + The timeout for reading messages that are part of the user's command + (i.e. which aren't internal prepended commands). + + + + + Contains the current value of the socket's ReceiveTimeout, used to determine whether + we need to change it when commands are received. + + + + + A lock that's taken while a user action is in progress, e.g. a command being executed. + + + + + A lock that's taken while a connection keepalive is in progress. Used to make sure + keepalives and user actions don't interfere with one another. + + + + + A lock that's taken while a cancellation is being delivered; new queries are blocked until the + cancellation is delivered. This reduces the chance that a cancellation meant for a previous + command will accidentally cancel a later one, see #615. + + + + + If pooled, the timestamp when this connector was returned to the pool. + + + + + The minimum timeout that can be set on internal commands such as COMMIT, ROLLBACK. + + + + + Creates a new connector with the given connection string. + + The connection string. + The clear-text password or null if not using a password. + + + + Gets the current state of the connector + + + + + Returns whether the connector is open, regardless of any task it is currently performing + + + + + Totally temporary until the connection pool is rewritten with timeout support + + + + + Opens the physical connection to the server. + + Usually called by the RequestConnector + Method of the connection pool manager. + + + + Performs a step in the PostgreSQL authentication protocol + + The username being used to connect. + A message read from the server, instructing us on the required response + a PasswordMessage to be sent, or null if authentication has completed successfully + + + + Prepends a message to be sent at the beginning of the next message chain. + + + + + Sends a single frontend message, used for simple messages such as rollback, etc. + Note that additional prepend messages may be previously enqueued, and will be sent along + with this message. + + + + + + Reads backend messages and discards them, stopping only after a message of the given type has + been seen. + + + + + Reads backend messages and discards them, stopping only after a message of the given types has + been seen. + + + + + Reads a single message, expecting it to be of type . + Any other message causes an exception to be raised and the connector to be broken. + Asynchronous messages (e.g. Notice) are treated and ignored. ErrorResponses raise an + exception but do not cause the connector to break. + + + + + Reads a PostgreSQL asynchronous message (e.g. notification). + This has nothing to do with .NET async processing of messages or queries. + + + + + Handles a new transaction indicator received on a ReadyForQuery message + + + + + Occurs on NoticeResponses from the PostgreSQL backend. + + + + + Occurs on NotificationResponses from the PostgreSQL backend. + + + + + Returns whether SSL is being used for the connection + + + + + Creates another connector and sends a cancel request through it for this connector. + + + + + Called when an unexpected message has been received during an action. Breaks the + connector and returns the appropriate message. + + + + + Called when a connector becomes completely unusable, e.g. when an unexpected I/O exception is raised or when + we lose protocol sync. + Note that fatal errors during the Open phase do *not* pass through here. + + + + + Closes the socket and cleans up client-side resources associated with this connector. + + + + + Called when a pooled connection is closed, and its connector is returned to the pool. + Resets the connector back to its initial state, releasing server-side sources + (e.g. prepared statements), resetting parameters to their defaults, and resetting client-side + state + + + + + An IDisposable wrapper around and + . + + + + + Whether the backend is an AWS Redshift instance + + + + + Returns next plan index. + + + + + Reads a forward-only stream of rows from a data source. + + + Reads a forward-only stream of rows from a data source. + + + + + Holds the list of statements being executed by this reader. + + + + + The index of the current query resultset we're processing (within a multiquery) + + + + + The RowDescription message for the current resultset being processed + + + + + Indicates that at least one row has been read across all result sets + + + + + Whether the current result set has rows + + + + + If HasRows was called before any rows were read, it was forced to read messages. A pending + message may be stored here for processing in the next Read() or NextResult(). + + + + + If has been called, its results are cached here. + + + + + Is raised whenever Close() is called. + + + + + In non-sequential mode, contains the cached values already read from the current row + + + + + The first row in a stored procedure command that has output parameters needs to be traversed twice - + once for populating the output parameters and once for the actual result set traversal. So in this + case we can't be sequential. + + + + + Advances the reader to the next record in a result set. + + true if there are more rows; otherwise false. + + The default position of a data reader is before the first record. Therefore, you must call Read to begin accessing data. + + + + + This is the asynchronous version of The cancellation token is currently ignored. + + Ignored for now. + A task representing the asynchronous operation. + + + + Advances the reader to the next result when reading the results of a batch of statements. + + + + + + This is the asynchronous version of NextResult. + The parameter is currently ignored. + + Currently ignored. + A task representing the asynchronous operation. + + + + Note that in SchemaOnly mode there are no resultsets, and we read nothing from the backend (all + RowDescriptions have already been processed and are available) + + + + + Gets a value indicating the depth of nesting for the current row. Always returns zero. + + + + + Gets a value indicating whether the data reader is closed. + + + + + Gets the number of rows changed, inserted, or deleted by execution of the SQL statement. + + + + + Returns details about each statement that this reader will or has executed. + + + Note that some fields (i.e. rows and oid) are only populated as the reader + traverses the result. + + For commands with multiple queries, this exposes the number of rows affected on + a statement-by-statement basis, unlike + which exposes an aggregation across all statements. + + + + + Gets a value that indicates whether this DbDataReader contains one or more rows. + + + + + Indicates whether the reader is currently positioned on a row, i.e. whether reading a + column is possible. + This property is different from in that will + return true even if attempting to read a column will fail, e.g. before + has been called + + + + + Gets the name of the column, given the zero-based column ordinal. + + The zero-based column ordinal. + The name of the specified column. + + + + Gets the number of columns in the current row. + + + + + Consumes all result sets for this reader, leaving the connector ready for sending and processing further + queries + + + + + Releases the resources used by the NpgsqlDataReader. + + + + + Closes the object. + + + + + Returns the current row, or throws an exception if a row isn't available + + + + + Gets the value of the specified column as a Boolean. + + The zero-based column ordinal. + The value of the specified column. + + + + Gets the value of the specified column as a byte. + + The zero-based column ordinal. + The value of the specified column. + + + + Gets the value of the specified column as a single character. + + The zero-based column ordinal. + The value of the specified column. + + + + Gets the value of the specified column as a 16-bit signed integer. + + The zero-based column ordinal. + The value of the specified column. + + + + Gets the value of the specified column as a 32-bit signed integer. + + The zero-based column ordinal. + The value of the specified column. + + + + Gets the value of the specified column as a 64-bit signed integer. + + The zero-based column ordinal. + The value of the specified column. + + + + Gets the value of the specified column as a object. + + The zero-based column ordinal. + The value of the specified column. + + + + Gets the value of the specified column as an instance of . + + The zero-based column ordinal. + The value of the specified column. + + + + Gets the value of the specified column as a object. + + The zero-based column ordinal. + The value of the specified column. + + + + Gets the value of the specified column as a double-precision floating point number. + + The zero-based column ordinal. + The value of the specified column. + + + + Gets the value of the specified column as a single-precision floating point number. + + The zero-based column ordinal. + The value of the specified column. + + + + Gets the value of the specified column as a globally-unique identifier (GUID). + + The zero-based column ordinal. + The value of the specified column. + + + + Populates an array of objects with the column values of the current row. + + An array of Object into which to copy the attribute columns. + The number of instances of in the array. + + + + Gets the value of the specified column as an instance of . + + The zero-based column ordinal. + The value of the specified column. + + + + Gets the value of the specified column as an , + Npgsql's provider-specific type for dates. + + + PostgreSQL's date type represents dates from 4713 BC to 5874897 AD, while .NET's DateTime + only supports years from 1 to 1999. If you require years outside this range use this accessor. + The standard method will also return this type, but has + the disadvantage of boxing the value. + See http://www.postgresql.org/docs/current/static/datatype-datetime.html + + The zero-based column ordinal. + The value of the specified column. + + + + Gets the value of the specified column as a TimeSpan, + + + PostgreSQL's interval type has has a resolution of 1 microsecond and ranges from + -178000000 to 178000000 years, while .NET's TimeSpan has a resolution of 100 nanoseconds + and ranges from roughly -29247 to 29247 years. + See http://www.postgresql.org/docs/current/static/datatype-datetime.html + + The zero-based column ordinal. + The value of the specified column. + + + + Gets the value of the specified column as an , + Npgsql's provider-specific type for time spans. + + + PostgreSQL's interval type has has a resolution of 1 microsecond and ranges from + -178000000 to 178000000 years, while .NET's TimeSpan has a resolution of 100 nanoseconds + and ranges from roughly -29247 to 29247 years. If you require values from outside TimeSpan's + range use this accessor. + The standard ADO.NET method will also return this + type, but has the disadvantage of boxing the value. + See http://www.postgresql.org/docs/current/static/datatype-datetime.html + + The zero-based column ordinal. + The value of the specified column. + + + + Gets the value of the specified column as an , + Npgsql's provider-specific type for date/time timestamps. Note that this type covers + both PostgreSQL's "timestamp with time zone" and "timestamp without time zone" types, + which differ only in how they are converted upon input/output. + + + PostgreSQL's timestamp type represents dates from 4713 BC to 5874897 AD, while .NET's DateTime + only supports years from 1 to 1999. If you require years outside this range use this accessor. + The standard method will also return this type, but has + the disadvantage of boxing the value. + See http://www.postgresql.org/docs/current/static/datatype-datetime.html + + The zero-based column ordinal. + The value of the specified column. + + + + Reads a stream of bytes from the specified column, starting at location indicated by dataOffset, into the buffer, starting at the location indicated by bufferOffset. + + The zero-based column ordinal. + The index within the row from which to begin the read operation. + The buffer into which to copy the data. + The index with the buffer to which the data will be copied. + The maximum number of characters to read. + The actual number of bytes read. + + + + Retrieves data as a . + + The zero-based column ordinal. + The returned object. + + + + Reads a stream of characters from the specified column, starting at location indicated by dataOffset, into the buffer, starting at the location indicated by bufferOffset. + + The zero-based column ordinal. + The index within the row from which to begin the read operation. + The buffer into which to copy the data. + The index with the buffer to which the data will be copied. + The maximum number of characters to read. + The actual number of characters read. + + + + Retrieves data as a . + + The zero-based column ordinal. + The returned object. + + + + Gets a value that indicates whether the column contains nonexistent or missing values. + + The zero-based column ordinal. + true if the specified column is equivalent to ; otherwise false. + + + + An asynchronous version of , which gets a value that indicates whether the column contains non-existent or missing values. + The parameter is currently ignored. + + The zero-based column to be retrieved. + Currently ignored. + true if the specified column value is equivalent to otherwise false. + + + + Gets the value of the specified column as an instance of . + + The name of the column. + The value of the specified column. + + + + Gets the column ordinal given the name of the column. + + The name of the column. + The zero-based column ordinal. + + + + Gets the data type information for the specified field. + This will be the PostgreSQL type name (e.g. int4) as in the pg_type table, + not the .NET type (see for that). + + The zero-based column index. + + + + + Gets the OID for the PostgreSQL type for the specified field, as it appears in the pg_type table. + + + This is a PostgreSQL-internal value that should not be relied upon and should only be used for + debugging purposes. + + The zero-based column index. + + + + + Gets the data type of the specified column. + + The zero-based column ordinal. + The data type of the specified column. + + + + Returns the provider-specific field type of the specified column. + + The zero-based column ordinal. + The Type object that describes the data type of the specified column. + + + + Gets the value of the specified column as an instance of . + + The zero-based column ordinal. + The value of the specified column. + + + + Synchronously gets the value of the specified column as a type. + + Synchronously gets the value of the specified column as a type. + The column to be retrieved. + The column to be retrieved. + + + + Asynchronously gets the value of the specified column as a type. + The parameter is currently ignored. + + The type of the value to be returned. + The column to be retrieved. + Currently ignored. + A task representing the asynchronous operation. + + + + Gets the value of the specified column as an instance of . + + The zero-based column ordinal. + The value of the specified column. + + + + Gets all provider-specific attribute columns in the collection for the current row. + + An array of Object into which to copy the attribute columns. + The number of instances of in the array. + + + + Returns an that can be used to iterate through the rows in the data reader. + + An that can be used to iterate through the rows in the data reader. + + + + Returns schema information for the columns in the current resultset. + + + + + + Returns a System.Data.DataTable that describes the column metadata of the DataReader. + + + + + Contains the column names as the keys + + + + + Contains all unique columns + + + + + Large object manager. This class can be used to store very large files in a PostgreSQL database. + + + Large object manager. This class can be used to store very large files in a PostgreSQL database. + + + + + The largest chunk size (in bytes) read and write operations will read/write each roundtrip to the network. Default 4 MB. + + + + + Creates an NpgsqlLargeObjectManager for this connection. The connection must be opened to perform remote operations. + + + + + + Execute a function + + + + + + + + Execute a function that returns a byte array + + + + + + Create an empty large object in the database. If an oid is specified but is already in use, an PostgresException will be thrown. + + A preferred oid, or specify 0 if one should be automatically assigned + The oid for the large object created + If an oid is already in use + + + + Opens a large object on the backend, returning a stream controlling this remote object. + A transaction snapshot is taken by the backend when the object is opened with only read permissions. + When reading from this object, the contents reflects the time when the snapshot was taken. + Note that this method, as well as operations on the stream must be wrapped inside a transaction. + + Oid of the object + An NpgsqlLargeObjectStream + + + + Opens a large object on the backend, returning a stream controlling this remote object. + Note that this method, as well as operations on the stream must be wrapped inside a transaction. + + Oid of the object + An NpgsqlLargeObjectStream + + + + Deletes a large object on the backend. + + Oid of the object to delete + + + + Exports a large object stored in the database to a file on the backend. This requires superuser permissions. + + Oid of the object to export + Path to write the file on the backend + + + + Imports a large object to be stored as a large object in the database from a file stored on the backend. This requires superuser permissions. + + Path to read the file on the backend + A preferred oid, or specify 0 if one should be automatically assigned + + + + Since PostgreSQL 9.3, large objects larger than 2GB can be handled, up to 4TB. + This property returns true whether the PostgreSQL version is >= 9.3. + + + + + An interface to remotely control the seekable stream for an opened large object on a PostgreSQL server. + Note that the OpenRead/OpenReadWrite method as well as all operations performed on this stream must be wrapped inside a database transaction. + + + An interface to remotely control the seekable stream for an opened large object on a PostgreSQL server. + Note that the OpenRead/OpenReadWrite method as well as all operations performed on this stream must be wrapped inside a database transaction. + + + + + Since PostgreSQL 9.3, large objects larger than 2GB can be handled, up to 4TB. + This property returns true whether the PostgreSQL version is >= 9.3. + + + + + Reads count bytes from the large object. The only case when fewer bytes are read is when end of stream is reached. + + The buffer where read data should be stored. + The offset in the buffer where the first byte should be read. + The maximum number of bytes that should be read. + How many bytes actually read, or 0 if end of file was already reached. + + + + Writes count bytes to the large object. + + The buffer to write data from. + The offset in the buffer at which to begin copying bytes. + The number of bytes to write. + + + + CanTimeout always returns false. + + + + + CanRead always returns true, unless the stream has been closed. + + + + + CanWrite returns true if the stream was opened with write permissions, and the stream has not been closed. + + + + + CanSeek always returns true, unless the stream has been closed. + + + + + Returns the current position in the stream. Getting the current position does not need a round-trip to the server, however setting the current position does. + + + + + Gets the length of the large object. This internally seeks to the end of the stream to retrieve the length, and then back again. + + + + + Seeks in the stream to the specified position. This requires a round-trip to the backend. + + A byte offset relative to the origin parameter. + A value of type SeekOrigin indicating the reference point used to obtain the new position. + + + + + Does nothing. + + + + + Truncates or enlarges the large object to the given size. If enlarging, the large object is extended with null bytes. + For PostgreSQL versions earlier than 9.3, the value must fit in an Int32. + + Number of bytes to either truncate or enlarge the large object. + + + + Releases resources at the backend allocated for this stream. + + + + + Releases resources at the backend allocated for this stream, iff disposing is true. + + Whether to release resources allocated at the backend. + + + + Represents a transaction to be made in a PostgreSQL database. This class cannot be inherited. + + + Represents a transaction to be made in a PostgreSQL database. This class cannot be inherited. + + + + + Specifies the object associated with the transaction. + + The object associated with the transaction. + + + + Specifies the completion state of the transaction. + + The completion state of the transaction. + + + + Specifies the object associated with the transaction. + + The object associated with the transaction. + + + + Specifies the IsolationLevel for this transaction. + + The IsolationLevel for this transaction. + The default is ReadCommitted. + + + + Commits the database transaction. + + + + + Commits the database transaction. + + + + + Commits the database transaction. + + + + + Rolls back a transaction from a pending state. + + + + + Rolls back a transaction from a pending state. + + + + + Rolls back a transaction from a pending state. + + + + + Creates a transaction save point. + + + + + Rolls back a transaction from a pending savepoint state. + + + + + Rolls back a transaction from a pending savepoint state. + + + + + Dispose. + + + + + + Open connectors waiting to be requested by new connections + + + + + Incremented every time this pool is cleared via or + . Allows us to identify connections which were + created before the clear. + + + + + Attempts to ensure, on a best-effort basis, that there are enough connections to meet MinPoolSize. + This method never throws an exception. + + + + + The total byte length of the buffer. + + + + + Used for internal temporary purposes + + + + + The minimum buffer size possible. + + + + + Reads in the requested bytes into the buffer, or if the buffer isn't big enough, allocates a new + temporary buffer and reads into it. Returns the buffer that contains the data (either itself or the + temp buffer). Used in cases where we absolutely have to have an entire value in memory and cannot + read it in sequentially. + + + + + Seeks the first null terminator (\0) and returns the string up to it. The buffer must already + contain the entire string and its terminator. + + + + + Seeks the first null terminator (\0) and returns the string up to it. The buffer must already + contain the entire string and its terminator. + + Decodes the messages with this encoding. + + + + Note that unlike the primitive readers, this reader can read any length, looping internally + and reading directly from the underlying stream. + + output buffer to fill + offset in the output buffer in which to start writing + number of character to be read into the output buffer + number of bytes left in the field. This method will not read bytes + beyond this count + The number of bytes actually read. + The number of characters actually read. + the number of bytes read + + + + Skips over characters in the buffer, reading from the underlying stream as necessary. + + the number of characters to skip over. + int.MaxValue means all available characters (limited only by ). + + the maximal number of bytes to process + The number of bytes actually skipped. + The number of characters actually skipped. + the number of bytes read + + + + Seeks within the current in-memory data. Does not read any data from the underlying. + + + + + + + Creates a type handler for arrays of this handler's type. + + + + + Creates a type handler for ranges of this handler's type. + + + + + + + + + + + + + + + + + + + A type handler may implement ISimpleTypeHandler for types other than its primary one. + This is why this method has type parameter T2 and not T. + + + + the value to be examined + a cache in which to store length(s) of values to be written + + the containing . Consulted for settings + which impact how to send the parameter, e.g. . Can be null. + + + + the value to be written + + a cache in which to store length(s) of values to be written + + the containing . Consulted for settings + which impact how to send the parameter, e.g. . Can be null. + . + + + + + A type handler may implement IChunkingTypeHandler for types other than its primary one. + This is why this method has type parameter T2 and not T. + + + + + Maps CLR types to their type handlers. + + + + + Maps CLR types to their array handlers. + + + + + A counter that is updated when this registry activates its global mappings. + Tracks , allows us to know when a pooled + connection's mappings are no longer up to date because a global mapping change has + occurred. + + + + + A counter that is incremented whenever a global mapping change occurs (e.g. + , . + + + + + + Caches, for each connection string, the results of the backend type query in the form of a list of type + info structs keyed by the PG name. + Repeated connections to the same connection string reuse the query results and avoid an additional + roundtrip at open-time. + + + + + Looks up a type handler by its PostgreSQL type's OID. + + A PostgreSQL type OID + A type handler that can be used to encode and decode values. + + + + A structure holding information about all PostgreSQL types found in an actual database. + Only contains instances and not actual , and is shared between + all connections using the same connection string. Consulted when a type handler needs to be created. + + + + + Indexes backend types by their PostgreSQL name, including namespace (e.g. pg_catalog.int4). + Only used for enums and composites. + + + + + Indexes backend types by their PostgreSQL name, not including namespace. + If more than one type exists with the same name (i.e. in different namespaces) this + table will contain an entry with a null value. + Only used for enums and composites. + + + + + Represents a single PostgreSQL data type, as discovered from pg_type. + Note that this simply a data structure describing a type and not a handler, and is shared between connectors + having the same connection string. + + + + + For base types, contains the handler type. + If null, this backend type isn't supported by Npgsql. + + + + + Returns a string that represents the current object. + + + + + Constructs an unsupported base type (no handler exists in Npgsql for this type) + + + + + Instantiate the type handler. If it has a constructor that accepts a TypeHandlerRegistry, use that to allow + the handler to make connector-specific adjustments. Otherwise (the normal case), use the default constructor. + + + + + + + Holds the name and OID for all fields. + Populated on the first activation of the composite. + + + + + Represents a PostgreSQL domain type. + + + When PostgreSQL returns a RowDescription for a domain type, the type OID is the base type's + (so fetching a domain type over text returns a RowDescription for text). + However, when a composite type is returned, the type OID there is that of the domain, + so we provide "clean" support for domain types. + + + + + Clears the internal type cache. + Useful for forcing a reload of the types after loading an extension. + + + + + Clears the internal type cache. + Useful for forcing a reload of the types after loading an extension. + + + + + The total byte length of the buffer. + + + + + During copy operations, the buffer's usable size is smaller than its total size because of the CopyData + message header. This distinction is important since some type handlers check how much space is left + in the buffer in their decision making. + + + + + The minimum buffer size possible. + + + + + A stream that has been opened on this colun, and needs to be disposed of when the column is consumed. + + + + + Places our position at the beginning of the given column, after the 4-byte length. + The length is available in ColumnLen. + + + + + Note that this message doesn't actually contain the data, but only the length. Data is processed + directly from the connector's buffer. + + + + + Note: This message is both a frontend and a backend message + + + + + The number of columns in the current row + + + + + The index of the column that we're on, i.e. that has already been parsed, is + is memory and can be retrieved. Initialized to -1 + + + + + For streaming types (e.g. bytea, text), holds the current byte position within the column. + Does not include the length prefix. + + + + + For streaming types (e.g. bytea), holds the byte length of the column. + Does not include the length prefix. + + + + + Places our position at the beginning of the given column, after the 4-byte length. + The length is available in ColumnLen. + + + + + Returns a stream for the current column. + + + + + Consumes the current row, allowing the reader to read in the next one. + + + + + Consumes the current row asynchronously, allowing the reader to read in the next one. + + + + + List of all streams that have been opened on this row, and need to be disposed of when the row + is consumed. + + + + + Error and notice message field codes + + + + + A RowDescription message sent from the backend. + + + See http://www.postgresql.org/docs/current/static/protocol-message-formats.html + + + + + Given a string name, returns the field's ordinal index in the row. + + + + + Given a string name, returns the field's ordinal index in the row. + + + + + A descriptive record on a single field received from PostgreSQL. + See RowDescription in http://www.postgresql.org/docs/current/static/protocol-message-formats.html + + + + + The field name. + + + + + The object ID of the field's data type. + + + + + The data type size (see pg_type.typlen). Note that negative values denote variable-width types. + + + + + The type modifier (see pg_attribute.atttypmod). The meaning of the modifier is type-specific. + + + + + If the field can be identified as a column of a specific table, the object ID of the table; otherwise zero. + + + + + If the field can be identified as a column of a specific table, the attribute number of the column; otherwise zero. + + + + + The format code being used for the field. + Currently will be zero (text) or one (binary). + In a RowDescription returned from the statement variant of Describe, the format code is not yet known and will always be zero. + + + + + The Npgsql type handler assigned to handle this field. + Returns for fields with format text. + + + + + The type handler resolved for this field, regardless of whether it's binary or text. + + + + + An array of cached lengths for the parameters sending process. + + When sending parameters, lengths need to be calculated more than once (once for Bind, once for + an array, once for the string within that array). This cache optimized that. Lengths are added + to the cache, and then retrieved at the same order. + + + + + Provides an API for a binary COPY TO operation, a high-performance data export mechanism from + a PostgreSQL table. Initiated by + + + + + The number of columns, as returned from the backend in the CopyInResponse. + + + + + Starts reading a single row, must be invoked before reading any columns. + + + The number of columns in the row. -1 if there are no further rows. + Note: This will currently be the same value for all rows, but this may change in the future. + + + + + Reads the current column, returns its value and moves ahead to the next column. + If the column is null an exception is thrown. + + + The type of the column to be read. This must correspond to the actual type or data + corruption will occur. If in doubt, use to manually + specify the type. + + The value of the column + + + + Reads the current column, returns its value according to and + moves ahead to the next column. + If the column is null an exception is thrown. + + + In some cases isn't enough to infer the data type coming in from the + database. This parameter and be used to unambiguously specify the type. An example is the JSONB + type, for which will be a simple string but for which + must be specified as . + + The .NET type of the column to be read. + The value of the column + + + + Returns whether the current column is null. + + + + + Skips the current column without interpreting its value. + + + + + Cancels an ongoing export. + + + + + Completes that binary export and sets the connection back to idle state + + + + + Provides an API for a binary COPY FROM operation, a high-performance data import mechanism to + a PostgreSQL table. Initiated by + + + See http://www.postgresql.org/docs/current/static/sql-copy.html. + + + + + The number of columns in the current (not-yet-written) row. + + + + + The number of columns, as returned from the backend in the CopyInResponse. + + + + + NpgsqlParameter instance needed in order to pass the from + the validation phase to the writing phase. + + + + + Starts writing a single row, must be invoked before writing any columns. + + + + + Writes a single column in the current row. + + The value to be written + + The type of the column to be written. This must correspond to the actual type or data + corruption will occur. If in doubt, use to manually + specify the type. + + + + + Writes a single column in the current row as type . + + The value to be written + + In some cases isn't enough to infer the data type to be written to + the database. This parameter and be used to unambiguously specify the type. An example is + the JSONB type, for which will be a simple string but for which + must be specified as . + + The .NET type of the column to be written. + + + + Writes a single null column value. + + + + + Writes an entire row of columns. + Equivalent to calling , followed by multiple + on each value. + + An array of column values to be written as a single row + + + + Cancels and terminates an ongoing import. Any data already written will be discarded. + + + + + Completes that binary import and sets the connection back to idle state + + + + + Completes the import process and signals to the database to write everything. + + + + + 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. + + + + 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. + + + + + + + + + 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, ... + + 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 + + + + Represents the method that handles the Notice events. + + The source of the event. + A NpgsqlNoticeEventArgs that contains the event data. + + + + Represents the method that handles the Notification events. + + The source of the event. + A NpgsqlNotificationEventArgs that contains the event data. + + + + Represents the method that allows the application to provide a certificate collection to be used for SSL client authentication + + A X509CertificateCollection to be filled with one or more client certificates. + + + + Provides a simple way to create and manage the contents of connection strings used by + the class. + + + + + Makes all valid keywords for a property to that property (e.g. User Name -> Username, UserId -> Username...) + + + + + Maps CLR property names (e.g. BufferSize) to their canonical keyword name, which is the + property's [DisplayName] (e.g. Buffer Size) + + + + + Maps each property to its [DefaultValue] + + + + + Initializes a new instance of the NpgsqlConnectionStringBuilder class. + + + + + Initializes a new instance of the NpgsqlConnectionStringBuilder class, optionally using ODBC rules for quoting values. + + true to use {} to delimit fields; false to use quotation marks. + + + + Initializes a new instance of the NpgsqlConnectionStringBuilder class and sets its . + + + + + Gets or sets the value associated with the specified key. + + The key of the item to get or set. + The value associated with the specified key. + + + + Removes the entry with the specified key from the DbConnectionStringBuilder instance. + + The key of the key/value pair to be removed from the connection string in this DbConnectionStringBuilder. + true if the key existed within the connection string and was removed; false if the key did not exist. + + + + Clears the contents of the instance. + + + + + Determines whether the contains a specific key. + + The key to locate in the . + true if the contains an entry with the specified key; otherwise false. + + + + Retrieves a value corresponding to the supplied key from this . + + The key of the item to retrieve. + The value corresponding to the key. + true if keyword was found within the connection string, false otherwise. + + + + The hostname or IP address of the PostgreSQL server to connect to. + + + + + The TCP/IP port of the PostgreSQL server. + + + + + The PostgreSQL database to connect to. + + + + + The username to connect with. Not required if using IntegratedSecurity. + + + + + The password to connect with. Not required if using IntegratedSecurity. + + + + + The optional application name parameter to be sent to the backend during connection initiation. + + + + + Whether to enlist in an ambient TransactionScope. + + + + + Gets or sets the schema search path. + + + + + Gets or sets the schema search path. + + + + + Controls whether SSL is required, disabled or preferred, depending on server support. + + + + + Whether to trust the server certificate without validating it. + + + + + Npgsql uses its own internal implementation of TLS/SSL. Turn this on to use .NET SslStream instead. + + + + + Whether to use Windows integrated security to log in. + + + + + The Kerberos service name to be used for authentication. + + + + + The Kerberos realm to be used for authentication. + + + + + Gets or sets a Boolean value that indicates if security-sensitive information, such as the password, is not returned as part of the connection if the connection is open or has ever been in an open state. + + + + + Whether connection pooling should be used. + + + + + The minimum connection pool size. + + + + + The maximum connection pool size. + + + + + The time to wait before closing idle connections in the pool if the count + of all connections exceeds MinPoolSize. + + The time (in seconds) to wait. The default value is 300. + + + + How many seconds the pool waits before attempting to prune idle connections that are beyond + idle lifetime (. + + The interval (in seconds). The default value is 10. + + + + The time to wait (in seconds) while trying to establish a connection before terminating the attempt and generating an error. + Defaults to 15 seconds. + + + + + The time to wait (in seconds) while trying to execute a command before terminating the attempt and generating an error. + Defaults to 30 seconds. + + + + + The time to wait (in seconds) while trying to execute a an internal command before terminating the attempt and generating an error. + + + + + The database template to specify when creating a database in Entity Framework. If not specified, + PostgreSQL defaults to "template1". + + + http://www.postgresql.org/docs/current/static/manage-ag-templatedbs.html + + + + + The database admin to specify when creating and dropping a database in Entity Framework. This is needed because + Npgsql needs to connect to a database in order to send the create/drop database command. + If not specified, defaults to "template1". Check NpgsqlServices.UsingPostgresDBConnection for more information. + + + + + The number of seconds of connection inactivity before Npgsql sends a keepalive query. + Set to 0 (the default) to disable. + + + + + Gets or sets the buffer size. + + + + + A compatibility mode for special PostgreSQL server types. + + + + + Makes MaxValue and MinValue timestamps and dates readable as infinity and negative infinity. + + + + + Obsolete, see http://www.npgsql.org/doc/3.1/migration.html + + + + + Obsolete, see http://www.npgsql.org/doc/3.1/migration.html + + + + + Obsolete, see http://www.npgsql.org/doc/3.1/migration.html + + + + + Obsolete, see http://www.npgsql.org/doc/3.0/migration.html + + + + + Obsolete, see http://www.npgsql.org/doc/3.0/migration.html + + + + + Determines whether the specified object is equal to the current object. + + + + + Hash function. + + + + + + An option specified in the connection string that activates special compatibility features. + + + + + No special server compatibility mode is active + + + + + The server is an Amazon Redshift instance. + + + + + Specifies how to manage SSL. + + + + + SSL is disabled. If the server requires SSL, the connection will fail. + + + + + Prefer SSL connections if the server allows them, but allow connections without SSL. + + + + + Fail the connection if the server doesn't suppotr SSL. + + + + + Expresses the exact state of a connector. + + + + + The connector has either not yet been opened or has been closed. + + + + + The connector is currently connecting to a Postgresql server. + + + + + The connector is connected and may be used to send a new query. + + + + + The connector is waiting for a response to a query which has been sent to the server. + + + + + The connector is currently fetching and processing query results. + + + + + The connector is currently waiting for asynchronous notifications to arrive. + + + + + The connection was broken because an unexpected error occurred which left it in an unknown state. + This state isn't implemented yet. + + + + + The connector is engaged in a COPY operation. + + + + + Currently not in a transaction block + + + + + Currently in a transaction block + + + + + Currently in a failed transaction block (queries will be rejected until block is ended) + + + + + A new transaction has been requested but not yet transmitted to the backend. It will be transmitted + prepended to the next query. + This is a client-side state option only, and is never transmitted from the backend. + + + + + Specifies how to load/parse DataRow messages as they're received from the backend. + + + + + Load DataRows in non-sequential mode + + + + + Load DataRows in sequential mode + + + + + Skip DataRow messages altogether + + + + + Represents the method that handles the RowUpdated events. + + The source of the event. + A NpgsqlRowUpdatedEventArgs that contains the event data. + + + + Represents the method that handles the RowUpdating events. + + 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. + + + + + Row updated event. + + + + + Row updating event. + + + + + Default constructor. + + + + + Constructor. + + + + + + Constructor. + + + + + + + Constructor. + + + + + + + Create row updated event. + + + + + Create row updating event. + + + + + Raise the RowUpdated event. + + + + + + Raise the RowUpdating event. + + + + + + Delete command. + + + + + Select command. + + + + + Update command. + + + + + Insert command. + + + + + The exception that is thrown when server-related issues occur. + + + PostgreSQL errors (e.g. query SQL issues, constraint violations) are raised via + which is a subclass of this class. + Purely Npgsql-related issues which aren't related to the server will be raised + via the standard CLR exceptions (e.g. ArgumentException). + + + + + Same as , for backwards-compatibility with Npgsql 2.x and Hangfire. + + + Until Hangfire fix themselves: https://github.com/frankhommers/Hangfire.PostgreSql/issues/33 + + + + + A factory to create instances of various Npgsql objects. + + + + + Creates an NpgsqlCommand object. + + + + + EventArgs class to send Notification parameters. + + + + + Process ID of the PostgreSQL backend that sent this notification. + + + + + Condition that triggered that notification. + + + + + Additional information. + + + + + This class represents a parameter to a command that will be sent to server + + + + + Can be used to communicate a value from the validation phase to the writing phase. + + + + + Initializes a new instance of the NpgsqlParameter class. + + + + + Initializes a new instance of the NpgsqlParameter + class with the parameter name and a value of the new NpgsqlParameter. + + The 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.

+
+
+ + + Initializes a new instance of the NpgsqlParameter + class with the parameter name and the data type. + + The name of the parameter to map. + One of the DbType values. + + + + Initializes a new instance of the NpgsqlParameter. + + The name of the parameter to map. + One of the DbType values. + + + + Initializes a new instance of the NpgsqlParameter. + + The name of the parameter to map. + One of the NpgsqlDbType values. + The length of the parameter. + + + + Initializes a new instance of the NpgsqlParameter. + + The name of the parameter to map. + One of the DbType values. + The length of the parameter. + + + + Initializes a new instance of the NpgsqlParameter + + The name of the parameter to map. + One of the NpgsqlDbType values. + The length of the parameter. + The name of the source column. + + + + Initializes a new instance of the NpgsqlParameter. + + The name of the parameter to map. + One of the DbType values. + The length of the parameter. + The name of the source column. + + + + Initializes a new instance of the NpgsqlParameter. + + The name of the parameter to map. + One of the NpgsqlDbType values. + The length of the parameter. + The 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. + + + + Initializes a new instance of the NpgsqlParameter. + + The name of the parameter to map. + One of the DbType values. + The length of the parameter. + The 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. + + + + Gets or sets the value of the parameter. + + 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. + + + + Gets or sets a value that indicates whether the parameter accepts null values. + + + + + 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. + + + + 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. + + + + 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. + + + + 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. + + + + Gets or sets the DbType of the parameter. + + One of the DbType values. The default is Object. + + + + Gets or sets the NpgsqlDbType of the parameter. + + One of the NpgsqlDbType values. The default is Unknown. + + + + Gets or sets The name of the NpgsqlParameter. + + The name of the NpgsqlParameter. + The default is an empty string. + + + + Gets or sets The name of the source column that is mapped to the + DataSet and used for loading or + returning the Value. + + The 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. + + One of the DataRowVersion values. + The default is Current. + + + + Source column mapping. + + + + + Used in combination with NpgsqlDbType.Enum or NpgsqlDbType.Array | NpgsqlDbType.Enum to indicate the enum type. + For other NpgsqlDbTypes, this field is not used. + + + + + Used in combination with NpgsqlDbType.Enum or NpgsqlDbType.Composite to indicate the specific enum or composite type. + For other NpgsqlDbTypes, this field is not used. + + + + + The collection to which this parameter belongs, if any. + + + + + The name scrubbed of any optional marker + + + + + Returns whether this parameter has had its type set explicitly via DbType or NpgsqlDbType + (and not via type inference) + + + + + Reset DBType. + + + + + Creates a new NpgsqlParameter that + is a copy of the current instance. + + A new NpgsqlParameter that is a copy of this instance. + + + + 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. + + + + + 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. + + + + + Gets the NpgsqlParameter with the specified name. + + 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. + + + + Adds the specified NpgsqlParameter object to the NpgsqlParameterCollection. + + 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. + + 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, data type and value. + + The name of the NpgsqlParameter. + One of the NpgsqlDbType values. + 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 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 specified value. + + The Value of the NpgsqlParameter to add to the collection. + The paramater that was added. + + + + Adds a NpgsqlParameter to the NpgsqlParameterCollection given the specified data type and value. + + One of the NpgsqlDbType values. + The Value of the NpgsqlParameter to add to the collection. + The paramater that was added. + + + + 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. + + + + 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. + + + + 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. + + + + Removes the specified NpgsqlParameter from the collection using the parameter name. + + The name of the NpgsqlParameter object to retrieve. + + + + 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. + + + + 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. + + + + Report whether the collection is read only. Always false. + + + + + Removes the specified NpgsqlParameter from the collection using a specific index. + + 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. + + + + 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. + + + + 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. + + + + 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. + + + + Removes all items from the collection. + + + + + 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. + + + + Adds the specified NpgsqlParameter object to the NpgsqlParameterCollection. + + The NpgsqlParameter to add to the collection. + The zero-based index of the new NpgsqlParameter object. + + + + Report whether the collection is fixed size. Always false. + + + + + Report whether the collection is synchronized. + + + + + Gets the number of NpgsqlParameter objects in the collection. + + The number of NpgsqlParameter objects in the collection. + + + + Copies NpgsqlParameter objects from the NpgsqlParameterCollection to the specified array. + + An Array to which to copy the NpgsqlParameter objects in the collection. + The starting index of the array. + + + + Sync root. + + + + + Returns an enumerator that can iterate through the collection. + + An IEnumerator that can be used to iterate through the collection. + + + + Add an Array of parameters to the collection. + + Parameters to add. + + + + Get parameter. + + + + + + + Get parameter. + + + + + + + Set parameter. + + + + + + + Set parameter. + + + + + + + Report the offset within the collection of the given parameter. + + Parameter to find. + Index of the parameter, or -1 if the parameter is not present. + + + + Insert the specified parameter into the collection. + + Index of the existing parameter before which to insert the new one. + Parameter to insert. + + + + Report whether the specified parameter is present in the collection. + + Parameter to find. + True if the parameter was found, otherwise false. + + + + Remove the specified parameter from the collection. + + Parameter to remove. + True if the parameter was found and removed, otherwise false. + + + + Convert collection to a System.Array. + + Destination array. + Starting index in destination array. + + + + Convert collection to a System.Array. + + NpgsqlParameter[] + + + + Used when a connection is closed + + + + + Provides an API for a raw binary COPY operation, a high-performance data import/export mechanism to + a PostgreSQL table. Initiated by + + + See http://www.postgresql.org/docs/current/static/sql-copy.html. + + + + + The copy binary format header signature + + + + + Cancels and terminates an ongoing operation. Any data already written will be discarded. + + + + + Writer for a text import, initiated by . + + + See http://www.postgresql.org/docs/current/static/sql-copy.html. + + + + + Cancels and terminates an ongoing import. Any data already written will be discarded. + + + + + Reader for a text export, initiated by . + + + See http://www.postgresql.org/docs/current/static/sql-copy.html. + + + + + Cancels and terminates an ongoing import. + + + + + Provides the underlying mechanism for reading schema information. + + + + + Returns the MetaDataCollections that lists all possible collections. + + The MetaDataCollections + + + + Returns the Restrictions that contains the meaning and position of the values in the restrictions array. + + 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. + + 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. + + + + List of keywords taken from PostgreSQL 9.0 reserved words documentation. + + + + + Represents a single SQL statement within Npgsql. + + Instances aren't constructed directly; users should construct an + object and populate its property as in standard ADO.NET. + Npgsql will analyze that property and constructed instances of + internally. + + Users can retrieve instances from + and access information about statement execution (e.g. affected rows). + + + + + The SQL text of the statement. + + + + + Specifies the type of query, e.g. SELECT. + + + + + The number of rows affected or retrieved. + + + See the command tag in the CommandComplete message, + http://www.postgresql.org/docs/current/static/protocol-message-formats.html + + + + + For an INSERT, the object ID of the inserted row if is 1 and + the target table has OIDs; otherwise 0. + + + + + The RowDescription message for this query. If null, the query does not return rows (e.g. INSERT) + + + + + For prepared statements, holds the server-side prepared statement name. + + + + + Returns the SQL text of the statement. + + + + + Creates a Task<TResult> that's completed successfully with the specified result. + + + In .NET 4.5 Task provides this. In .NET 4.0 with BCL.Async, TaskEx provides this. This + method wraps the two. + + The type of the result returned by the task. + The result to store into the completed task. + The successfully completed task. + + + + Throws an exception with the given string and also invokes a contract failure, allowing the static checker + to detect scenarios leading up to this error. + + See http://blogs.msdn.com/b/francesco/archive/2014/09/12/how-to-use-cccheck-to-prove-no-case-is-forgotten.aspx + + the exception message + an exception to be thrown + + + + Represents a timeout that will expire at some point. + + + + + Holds connector pools indexed by their connection strings. + + + + + Maximum number of possible connections in the pool. + + + + + The exception that is thrown when the PostgreSQL backend reports errors (e.g. query + SQL issues, constraint violations). + + + This exception only corresponds to a PostgreSQL-delivered error. + Other errors (e.g. network issues) will be raised via , + and purely Npgsql-related issues which aren't related to the server will be raised + via the standard CLR exceptions (e.g. ArgumentException). + + See http://www.postgresql.org/docs/current/static/errcodes-appendix.html, + http://www.postgresql.org/docs/current/static/protocol-error-fields.html + + + + + Severity of the error or notice. + Always present. + + + + + The SQLSTATE code for the error. + + + Always present. + See http://www.postgresql.org/docs/current/static/errcodes-appendix.html + + + + + The SQLSTATE code for the error. + + + Always present. + See http://www.postgresql.org/docs/current/static/errcodes-appendix.html + + + + + The primary human-readable error message. This should be accurate but terse. + + + Always present. + + + + + An optional secondary error message carrying more detail about the problem. + May run to multiple lines. + + + + + 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. + May run to multiple lines. + + + + + 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. + 0 means not provided. + + + + + This is defined the same as the field, but it is used when the cursor position refers to an internally generated command rather than the one submitted by the client. + The field will always appear when this field appears. + 0 means not provided. + + + + + The text of a failed internally-generated command. + This could be, for example, a SQL query issued by a PL/pgSQL function. + + + + + An indication of the context in which the error occurred. + Presently this includes a call stack traceback of active PL functions. + The trace is one entry per line, most recent first. + + + + + If the error was associated with a specific database object, the name of the schema containing that object, if any. + + PostgreSQL 9.3 and up. + + + + 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.) + + PostgreSQL 9.3 and up. + + + + 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.) + + PostgreSQL 9.3 and up. + + + + 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.) + + PostgreSQL 9.3 and up. + + + + 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.) + + PostgreSQL 9.3 and up. + + + + The file name of the source-code location where the error was reported. + + PostgreSQL 9.3 and up. + + + + The line number of the source-code location where the error was reported. + + + + + The name of the source-code routine reporting the error. + + + + + Gets a the PostgreSQL error message and code. + + + + + Returns the statement which triggered this exception. + + + + + Gets a collection of key/value pairs that provide additional PostgreSQL fields about the exception. + + + + + Populates a with the data needed to serialize the target object. + + The to populate with data. + The destination (see ) for this serialization. + + + + A non-critical (warning or info) message generated by the backend. + Can be synchronous (i.e. in response to a query) or asynchronous (a totally unrelated + backend-side event). + + + http://www.postgresql.org/docs/current/static/protocol-flow.html#PROTOCOL-ASYNC + + + + + Severity of the error or notice. + Always present. + + + + + The SQLSTATE code for the error. + + + Always present. + See http://www.postgresql.org/docs/current/static/errcodes-appendix.html + + + + + The SQLSTATE code for the error. + + + Always present. + See http://www.postgresql.org/docs/current/static/errcodes-appendix.html + + + + + The primary human-readable error message. This should be accurate but terse. + + + Always present. + + + + + An optional secondary error message carrying more detail about the problem. + May run to multiple lines. + + + + + 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. + May run to multiple lines. + + + + + 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. + 0 means not provided. + + + + + This is defined the same as the field, but it is used when the cursor position refers to an internally generated command rather than the one submitted by the client. + The field will always appear when this field appears. + 0 means not provided. + + + + + The text of a failed internally-generated command. + This could be, for example, a SQL query issued by a PL/pgSQL function. + + + + + An indication of the context in which the error occurred. + Presently this includes a call stack traceback of active PL functions. + The trace is one entry per line, most recent first. + + + + + If the error was associated with a specific database object, the name of the schema containing that object, if any. + + PostgreSQL 9.3 and up. + + + + 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.) + + PostgreSQL 9.3 and up. + + + + 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.) + + PostgreSQL 9.3 and up. + + + + 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.) + + PostgreSQL 9.3 and up. + + + + 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.) + + PostgreSQL 9.3 and up. + + + + The file name of the source-code location where the error was reported. + + PostgreSQL 9.3 and up. + + + + The line number of the source-code location where the error was reported. + + + + + The name of the source-code routine reporting the error. + + + + + Provides data for a notice event. + + + + + The Notice that was sent from the database. + + + + + Receives a raw SQL query as passed in by the user, and performs some processing necessary + before sending to the backend. + This includes doing parameter placebolder processing (@p => $1), and splitting the query + up by semicolons if needed (SELECT 1; SELECT 2) + + Raw user-provided query. + Whether the PostgreSQL session is configured to use standard conformant strings. + The parameters configured on the of this query. + An empty list to be populated with the queries parsed by this method + + + + A class to handle everything associated with SSPI authentication + + + + + Simplified SecBufferDesc struct with only one SecBuffer + + + + + Utility that simplifies awaiting a task with a timeout. If the given task does not + complete within , a is thrown. + + The task to be awaited + How much time to allow to complete before throwing a + An awaitable task that represents the original task plus the timeout + + + + Utility that simplifies awaiting a task with a timeout. If the given task does not + complete within , a is thrown. + + The task to be awaited + How much time to allow to complete before throwing a + An awaitable task that represents the original task plus the timeout + + + + Allows you to cancel awaiting for a non-cancellable task. + + + Read http://blogs.msdn.com/b/pfxteam/archive/2012/10/05/how-do-i-cancel-non-cancelable-async-operations.aspx + and be very careful with this. + + + + + Allows you to cancel awaiting for a non-cancellable task. + + + Read http://blogs.msdn.com/b/pfxteam/archive/2012/10/05/how-do-i-cancel-non-cancelable-async-operations.aspx + and be very careful with this. + + + + + Type handlers that wish to support reading other types in additional to the main one can + implement this interface for all those types. + + + + + A type handler that supports a provider-specific value which is different from the regular value (e.g. + NpgsqlDate and DateTime) + + the regular value type returned by this type handler + the type of the provider-specific value returned by this type handler + + + + A marking interface to allow us to know whether a given type handler has a provider-specific type + distinct from its regular type + + + + + Type handlers that wish to support reading other types in additional to the main one can + implement this interface for all those types. + + + + + Implemented by handlers which support , returns a standard + TextReader given a binary Stream. + + + + + Can be thrown by readers to indicate that interpreting the value failed, but the value was read wholly + and it is safe to continue reading. Any other exception is assumed to leave the row in an unknown state + and the connector is therefore set to Broken. + Note that an inner exception is mandatory, and will get thrown to the user instead of the SafeReadException. + + + + + Maps an Npgsql type handler to a PostgreSQL type. + + A PostgreSQL type name as it appears in the pg_type table. + + A member of which represents this PostgreSQL type. + An with set to + this value will be sent with the type handler mapped by this attribute. + + + All members of which represent this PostgreSQL type. + An with set to + one of these values will be sent with the type handler mapped by this attribute. + + + Any .NET type which corresponds to this PostgreSQL type. + An with set to + one of these values will be sent with the type handler mapped by this attribute. + + + The "primary" which best corresponds to this PostgreSQL type. + When or + set, will be set to this value. + + + + + Read-only parameter + + + + + Returns a string that represents the current object. + + + + + + The name of the destination portal (an empty string selects the unnamed portal). + + + + + The name of the source prepared statement (an empty string selects the unnamed prepared statement). + + + + + Bind is a special message in that it supports the "direct buffer" optimization, which allows us to write + user byte[] data directly to the stream rather than copying it into our buffer. It therefore has its own + special overload of Write below. + + + + + + + The name of the prepared statement or portal to close (an empty string selects the unnamed prepared statement or portal). + + + + + Whether to close a statement or a portal + + + + + The name of the prepared statement or portal to describe (an empty string selects the unnamed prepared statement or portal). + + + + + Whether to describe a statement or a portal + + + + + The query string to be parsed. + + + + + The name of the destination prepared statement (an empty string selects the unnamed prepared statement). + + + + + Creates an MD5 password message. + This is the password, hashed with the username as salt, and hashed again with the backend-provided + salt. + + + + + A frontend message of an arbitrary type that has been pregenerated for efficiency - it is kept + in byte[] form and doesn't have to be serialized for each send. + + + + + Constructs a new pregenerated message. + + The data to be sent for this message, not including the 4-byte length. + Optional string form/description for debugging + + + + A simple query message. + + + + + An logging provider that outputs Npgsql logging messages to standard error. + + + + + Constructs a new + + Only messages of this level of higher will be logged + If true, will output the log level (e.g. WARN). Defaults to false. + If true, will output the connector ID. Defaults to false. + + + + Creates a new instance of the given name. + + + + Used to create logger instances of the given name. + + + + Creates a new INpgsqlLogger instance of the given name. + + + + + A generic interface for logging. + + + + + Manages logging for Npgsql, used to set the loggging provider. + + + + + The logging provider used for logging in Npgsql. + + + + + Determines whether parameter contents will be logged alongside SQL statements - this may reveal sensitive information. + Defaults to false. + + + + + A component which translates a CLR name (e.g. SomeClass) into a database name (e.g. some_class) + according to some scheme. + Used for mapping enum and composite types. + + + + + Given a CLR type name (e.g class, struct, enum), translates its name to a database type name. + + + + + Given a CLR member name (property or field), translates its name to a database type name. + + + + + A name translator which preserves CLR names (e.g. SomeClass) when mapping names to the database. + + + + + Given a CLR type name (e.g class, struct, enum), translates its name to a database type name. + + + + + Given a CLR member name (property or field), translates its name to a database type name. + + + + + A name translator which converts standard CLR names (e.g. SomeClass) to snake-case database + names (some_class) + + + + + Given a CLR type name (e.g class, struct, enum), translates its name to a database type name. + + + + + Given a CLR member name (property or field), translates its name to a database type name. + + + + + A copy of corefx's DbColumn, used only in .NET Framework where we don't have it. + + + See https://github.com/dotnet/corefx/blob/master/src/System.Data.Common/src/System/Data/Common/DbColumn.cs + + + + + Performs some post-setup configuration that's common to both table columns and non-columns. + + + + + Provides schema information about a column. + (e.g. SELECT 8); + + + Note that this can correspond to a field returned in a query which isn't an actual table column + + See https://msdn.microsoft.com/en-us/library/system.data.sqlclient.sqldatareader.getschematable(v=vs.110).aspx + for information on the meaning of the different fields. + + + + + Base class for all type handlers which handle PostgreSQL arrays. + + + http://www.postgresql.org/docs/current/static/arrays.html + + + + + The lower bound value sent to the backend when writing arrays. Normally 1 (the PG default) but + is 0 for OIDVector. + + + + + The type of the elements contained within this array + + + + + + The provider-specific type of the elements contained within this array, + + + + + + The type handler for the element that this array type holds + + + + + Optimized population for one-dimensional arrays without boxing/unboxing + + + + + Recursively populates an array from PB binary data representation. + + + + + http://www.postgresql.org/docs/current/static/arrays.html + + The .NET type contained as an element within this array + The .NET provider-specific type contained as an element within this array + + + + The provider-specific type of the elements contained within this array, + + + + + + Handler for the PostgreSQL bit string type. + Note that for BIT(1), this handler will return a bool by default, to align with SQLClient + (see discussion https://github.com/npgsql/npgsql/pull/362#issuecomment-59622101). + + + http://www.postgresql.org/docs/current/static/datatype-bit.html + + + + + Reads a BitArray from a binary PostgreSQL value. First 32-bit big endian length, + then the data in big-endian. Zero-padded low bits in the end if length is not multiple of 8. + + + + + A special handler for arrays of bit strings. + Differs from the standard array handlers in that it returns arrays of bool for BIT(1) and arrays + of BitArray otherwise (just like the scalar BitStringHandler does). + + + + + http://www.postgresql.org/docs/current/static/datatype-boolean.html + + + + + http://www.postgresql.org/docs/current/static/datatype-binary.html + + + + + Interface implemented by all concrete handlers which handle enums + + + + + The CLR type mapped to the PostgreSQL composite type. + + + + + Type handler for PostgreSQL composite types + + + http://www.postgresql.org/docs/current/static/rowtypes.html + + Encoding: + A 32-bit integer with the number of columns, then for each column: + * An OID indicating the type of the column + * The length of the column(32-bit integer), or -1 if null + * The column data encoded as binary + + the CLR type to map to the PostgreSQL composite type + + + + Interface implemented by all concrete handlers which handle enums + + + + + The CLR enum type mapped to the PostgreSQL enum + + + + + The text handler to which we delegate encoding/decoding of the actual strings + + + + + Type handler for the Postgresql "char" type, used only internally + + + http://www.postgresql.org/docs/current/static/datatype-character.html + + + + + JSONB binary encoding is a simple UTF8 string, but prepended with a version number. + + + + + Prepended to the string in the wire encoding + + + + + Indicates whether the prepended version byte has already been read or written + + + + + The text handler which does most of the encoding/decoding work. + + + + + http://www.postgresql.org/docs/current/static/datatype-money.html + + + + + Type Handler for the postgis geometry type. + + + + + Type handler for PostgreSQL range types + + + Introduced in PostgreSQL 9.2. + http://www.postgresql.org/docs/current/static/rangetypes.html + + the range subtype + + + + The type handler for the element that this range type holds + + + + + Type handler for PostgreSQL record types. + + + http://www.postgresql.org/docs/current/static/datatype-pseudo.html + + Encoding (identical to composite): + A 32-bit integer with the number of columns, then for each column: + * An OID indicating the type of the column + * The length of the column(32-bit integer), or -1 if null + * The column data encoded as binary + + + + + Handles "conversions" for columns sent by the database with unknown OIDs. + This differs from TextHandler in that its a text-only handler (we don't want to receive binary + representations of the types registered here). + Note that this handler is also used in the very initial query that loads the OID mappings + (chicken and egg problem). + Also used for sending parameters with unknown types (OID=0) + + + + + http://www.postgresql.org/docs/current/static/datatype-uuid.html + + + + + http://www.postgresql.org/docs/current/static/datatype-boolean.html + + + + + http://www.postgresql.org/docs/current/static/datatype-datetime.html + + + + + Whether to convert positive and negative infinity values to DateTime.{Max,Min}Value when + a DateTime is requested + + + + + Copied wholesale from Postgresql backend/utils/adt/datetime.c:j2date + + + + + http://www.postgresql.org/docs/current/static/datatype-datetime.html + + + + + A deprecated compile-time option of PostgreSQL switches to a floating-point representation of some date/time + fields. Npgsql (currently) does not support this mode. + + + + + http://www.postgresql.org/docs/current/static/datatype-datetime.html + + + + + A deprecated compile-time option of PostgreSQL switches to a floating-point representation of some date/time + fields. Npgsql (currently) does not support this mode. + + + + + http://www.postgresql.org/docs/current/static/datatype-datetime.html + + + + + A deprecated compile-time option of PostgreSQL switches to a floating-point representation of some date/time + fields. Npgsql (currently) does not support this mode. + + + + + Whether to convert positive and negative infinity values to DateTime.{Max,Min}Value when + a DateTime is requested + + + + + http://www.postgresql.org/docs/current/static/datatype-datetime.html + + + + + http://www.postgresql.org/docs/current/static/datatype-datetime.html + + + + + http://www.postgresql.org/docs/current/static/datatype-textsearch.html + + + + + http://www.postgresql.org/docs/current/static/datatype-textsearch.html + + + + + Type handler for the PostgreSQL geometric box type. + + + http://www.postgresql.org/docs/current/static/datatype-geometric.html + + + + + Type handler for the PostgreSQL geometric circle type. + + + http://www.postgresql.org/docs/current/static/datatype-geometric.html + + + + + Type handler for the PostgreSQL geometric line type. + + + http://www.postgresql.org/docs/current/static/datatype-geometric.html + + + + + Type handler for the PostgreSQL geometric line segment type. + + + http://www.postgresql.org/docs/current/static/datatype-geometric.html + + + + + Type handler for the PostgreSQL geometric path segment type (open or closed). + + + http://www.postgresql.org/docs/current/static/datatype-geometric.html + + + + + Type handler for the PostgreSQL geometric point type. + + + http://www.postgresql.org/docs/current/static/datatype-geometric.html + + + + + Type handler for the PostgreSQL geometric polygon type. + + + http://www.postgresql.org/docs/current/static/datatype-geometric.html + + + + + An int2vector is simply a regular array of shorts, with the sole exception that its lower bound must + be 0 (we send 1 for regular arrays). + + + + + An OIDVector is simply a regular array of uints, with the sole exception that its lower bound must + be 0 (we send 1 for regular arrays). + + + + + http://www.postgresql.org/docs/current/static/datatype-net-types.html + + + + + http://www.postgresql.org/docs/current/static/datatype-net-types.html + + + + + http://www.postgresql.org/docs/current/static/datatype-net-types.html + + + + + http://www.postgresql.org/docs/current/static/datatype-numeric.html + + + + + http://www.postgresql.org/docs/current/static/datatype-numeric.html + + + + + http://www.postgresql.org/docs/current/static/datatype-numeric.html + + + + + http://www.postgresql.org/docs/current/static/datatype-numeric.html + + + + + http://www.postgresql.org/docs/current/static/datatype-numeric.html + + + + + http://www.postgresql.org/docs/current/static/datatype-numeric.html + + + + + http://www.postgresql.org/docs/current/static/datatype-oid.html + + + + + Creates a new TlsClientStream with the given underlying stream. + The handshake must be manually initiated with the method PerformInitialHandshake. + + Base stream + + + + Makes sure there is at least one full record available at _readStart. + Also sets _packetLen (does not include packet header of 5 bytes). + + True on success, false on End Of Stream. + + + + Encrypts a record. + A header should be at startPos containing TLS record type and version. + At startPos + 5 + ivLen the plaintext should start. + + Should point to the beginning of the record (content type) + Plaintext length (without header) + The byte position after the last byte in this encrypted record + + + + This method checks whether there are at least 1 byte that can be read in the buffer. + If not, but there are renegotiation messages in the buffer, these are first processed. + This method should be called between each Read and Write to make sure the buffer is empty before writing. + Only when this method returns false it is safe to call Write. + + Whether we should also look in the underlying NetworkStream + Whether there is available application data + + + + hmac should be initialized with the secret key + + + + + + + + + + Represents the date 1970-01-01 + + + + + Represents the date 0001-01-01 + + + + + A struct similar to .NET DateTime but capable of storing PostgreSQL's timestamp and timestamptz types. + DateTime is capable of storing values from year 1 to 9999 at 100-nanosecond precision, + while PostgreSQL's timestamps store values from 4713BC to 5874897AD with 1-microsecond precision. + + + + + Cast of an to a . + + An equivalent . + + + + Converts the value of the current object to Coordinated Universal Time (UTC). + + + See the MSDN documentation for DateTime.ToUniversalTime(). + Note: this method only takes into account the time zone's base offset, and does + not respect daylight savings. See https://github.com/npgsql/npgsql/pull/684 for more + details. + + + + + Converts the value of the current object to local time. + + + See the MSDN documentation for DateTime.ToLocalTime(). + Note: this method only takes into account the time zone's base offset, and does + not respect daylight savings. See https://github.com/npgsql/npgsql/pull/684 for more + details. + + + + + Returns a new that adds the value of the specified TimeSpan to the value of this instance. + + A positive or negative time interval. + An object whose value is the sum of the date and time represented by this instance and the time interval represented by value. + + + + Returns a new that adds the value of the specified to the value of this instance. + + A positive or negative time interval. + An object whose value is the sum of the date and time represented by this instance and the time interval represented by value. + + + + Returns a new that adds the specified number of years to the value of this instance. + + A number of years. The value parameter can be negative or positive. + An object whose value is the sum of the date and time represented by this instance and the number of years represented by value. + + + + Returns a new that adds the specified number of months to the value of this instance. + + A number of months. The months parameter can be negative or positive. + An object whose value is the sum of the date and time represented by this instance and months. + + + + Returns a new that adds the specified number of days to the value of this instance. + + A number of whole and fractional days. The value parameter can be negative or positive. + An object whose value is the sum of the date and time represented by this instance and the number of days represented by value. + + + + Returns a new that adds the specified number of hours to the value of this instance. + + A number of whole and fractional hours. The value parameter can be negative or positive. + An object whose value is the sum of the date and time represented by this instance and the number of hours represented by value. + + + + Returns a new that adds the specified number of minutes to the value of this instance. + + A number of whole and fractional minutes. The value parameter can be negative or positive. + An object whose value is the sum of the date and time represented by this instance and the number of minutes represented by value. + + + + Returns a new that adds the specified number of minutes to the value of this instance. + + A number of whole and fractional minutes. The value parameter can be negative or positive. + An object whose value is the sum of the date and time represented by this instance and the number of minutes represented by value. + + + + Returns a new that adds the specified number of milliseconds to the value of this instance. + + A number of whole and fractional milliseconds. The value parameter can be negative or positive. Note that this value is rounded to the nearest integer. + An object whose value is the sum of the date and time represented by this instance and the number of milliseconds represented by value. + + + + Returns a new that adds the specified number of ticks to the value of this instance. + + A number of 100-nanosecond ticks. The value parameter can be positive or negative. + An object whose value is the sum of the date and time represented by this instance and the time represented by value. + + + + Implicit cast of a to an + + A + An equivalent . + + + + Explicit cast of an to a . + + An . + An equivalent . + + + + Represents a PostgreSQL data type that can be written or read to the database. + Used in places such as to unambiguously specify + how to encode or decode values. + + See http://www.postgresql.org/docs/current/static/datatype.html + + + + Corresponds to the PostgreSQL 8-byte "bigint" type. + + See http://www.postgresql.org/docs/current/static/datatype-numeric.html + + + + Corresponds to the PostgreSQL 8-byte floating-point "double" type. + + See http://www.postgresql.org/docs/current/static/datatype-numeric.html + + + + Corresponds to the PostgreSQL 4-byte "integer" type. + + See http://www.postgresql.org/docs/current/static/datatype-numeric.html + + + + Corresponds to the PostgreSQL arbitrary-precision "numeric" type. + + See http://www.postgresql.org/docs/current/static/datatype-numeric.html + + + + Corresponds to the PostgreSQL floating-point "real" type. + + See http://www.postgresql.org/docs/current/static/datatype-numeric.html + + + + Corresponds to the PostgreSQL 2-byte "smallint" type. + + See http://www.postgresql.org/docs/current/static/datatype-numeric.html + + + + Corresponds to the PostgreSQL "boolean" type. + + See http://www.postgresql.org/docs/current/static/datatype-boolean.html + + + + Corresponds to the PostgreSQL "enum" type. + + See http://www.postgresql.org/docs/current/static/datatype-enum.html + + + + Corresponds to the PostgreSQL geometric "box" type. + + See http://www.postgresql.org/docs/current/static/datatype-geometric.html + + + + Corresponds to the PostgreSQL geometric "circle" type. + + See http://www.postgresql.org/docs/current/static/datatype-geometric.html + + + + Corresponds to the PostgreSQL geometric "line" type. + + See http://www.postgresql.org/docs/current/static/datatype-geometric.html + + + + Corresponds to the PostgreSQL geometric "lseg" type. + + See http://www.postgresql.org/docs/current/static/datatype-geometric.html + + + + Corresponds to the PostgreSQL geometric "path" type. + + See http://www.postgresql.org/docs/current/static/datatype-geometric.html + + + + Corresponds to the PostgreSQL geometric "point" type. + + See http://www.postgresql.org/docs/current/static/datatype-geometric.html + + + + Corresponds to the PostgreSQL geometric "polygon" type. + + See http://www.postgresql.org/docs/current/static/datatype-geometric.html + + + + Corresponds to the PostgreSQL "money" type. + + See http://www.postgresql.org/docs/current/static/datatype-money.html + + + + Corresponds to the PostgreSQL "char(n)"type. + + See http://www.postgresql.org/docs/current/static/datatype-character.html + + + + Corresponds to the PostgreSQL "text" type. + + See http://www.postgresql.org/docs/current/static/datatype-character.html + + + + Corresponds to the PostgreSQL "varchar" type. + + See http://www.postgresql.org/docs/current/static/datatype-character.html + + + + Corresponds to the PostgreSQL internal "name" type. + + See http://www.postgresql.org/docs/current/static/datatype-character.html + + + + Corresponds to the PostgreSQL "citext" type for the citext module. + + See http://www.postgresql.org/docs/current/static/citext.html + + + + Corresponds to the PostgreSQL "char" type. + + + This is an internal field and should normally not be used for regular applications. + + See http://www.postgresql.org/docs/current/static/datatype-text.html + + + + + Corresponds to the PostgreSQL "bytea" type, holding a raw byte string. + + See http://www.postgresql.org/docs/current/static/datatype-binary.html + + + + Corresponds to the PostgreSQL "date" type. + + See http://www.postgresql.org/docs/current/static/datatype-datetime.html + + + + Corresponds to the PostgreSQL "time" type. + + See http://www.postgresql.org/docs/current/static/datatype-datetime.html + + + + Corresponds to the PostgreSQL "timestamp" type. + + See http://www.postgresql.org/docs/current/static/datatype-datetime.html + + + + Corresponds to the PostgreSQL "timestamp with time zone" type. + + See http://www.postgresql.org/docs/current/static/datatype-datetime.html + + + + Corresponds to the PostgreSQL "interval" type. + + See http://www.postgresql.org/docs/current/static/datatype-datetime.html + + + + Corresponds to the PostgreSQL "time with time zone" type. + + See http://www.postgresql.org/docs/current/static/datatype-datetime.html + + + + Corresponds to the obsolete PostgreSQL "abstime" type. + + See http://www.postgresql.org/docs/current/static/datatype-datetime.html + + + + Corresponds to the PostgreSQL "inet" type. + + See http://www.postgresql.org/docs/current/static/datatype-net-types.html + + + + Corresponds to the PostgreSQL "cidr" type, a field storing an IPv4 or IPv6 network. + + See http://www.postgresql.org/docs/current/static/datatype-net-types.html + + + + Corresponds to the PostgreSQL "macaddr" type, a field storing a 6-byte physical address. + + See http://www.postgresql.org/docs/current/static/datatype-net-types.html + + + + Corresponds to the PostgreSQL "bit" type. + + See http://www.postgresql.org/docs/current/static/datatype-bit.html + + + + Corresponds to the PostgreSQL "varbit" type, a field storing a variable-length string of bits. + + See http://www.postgresql.org/docs/current/static/datatype-boolean.html + + + + Corresponds to the PostgreSQL "tsvector" type. + + See http://www.postgresql.org/docs/current/static/datatype-textsearch.html + + + + Corresponds to the PostgreSQL "tsquery" type. + + See http://www.postgresql.org/docs/current/static/datatype-textsearch.html + + + + Corresponds to the PostgreSQL "uuid" type. + + See http://www.postgresql.org/docs/current/static/datatype-uuid.html + + + + Corresponds to the PostgreSQL "xml" type. + + See http://www.postgresql.org/docs/current/static/datatype-xml.html + + + + Corresponds to the PostgreSQL "json" type, a field storing JSON in text format. + + See http://www.postgresql.org/docs/current/static/datatype-json.html + + + + + Corresponds to the PostgreSQL "jsonb" type, a field storing JSON in an optimized binary + format. + + + Supported since PostgreSQL 9.4. + See http://www.postgresql.org/docs/current/static/datatype-json.html + + + + + Corresponds to the PostgreSQL "hstore" type, a dictionary of string key-value pairs. + + See http://www.postgresql.org/docs/current/static/hstore.html + + + + Corresponds to the PostgreSQL "array" type, a variable-length multidimensional array of + another type. This value must be combined with another value from + via a bit OR (e.g. NpgsqlDbType.Array | NpgsqlDbType.Integer) + + See http://www.postgresql.org/docs/current/static/arrays.html + + + + Corresponds to the PostgreSQL "composite" type. + + See http://www.postgresql.org/docs/current/static/rowtypes.html + + + + Corresponds to the PostgreSQL "array" type, a variable-length multidimensional array of + another type. This value must be combined with another value from + via a bit OR (e.g. NpgsqlDbType.Array | NpgsqlDbType.Integer) + + + Supported since PostgreSQL 9.2. + See http://www.postgresql.org/docs/9.2/static/rangetypes.html + + + + + Corresponds to the PostgreSQL "refcursor" type. + + + + + Corresponds to the PostgreSQL internal "oidvector" type. + + See http://www.postgresql.org/docs/current/static/datatype-oid.html + + + + Corresponds to the PostgreSQL internal "int2vector" type. + + + + + Corresponds to the PostgreSQL "oid" type. + + See http://www.postgresql.org/docs/current/static/datatype-oid.html + + + + Corresponds to the PostgreSQL "xid" type, an internal transaction identifier. + + See http://www.postgresql.org/docs/current/static/datatype-oid.html + + + + Corresponds to the PostgreSQL "cid" type, an internal command identifier. + + See http://www.postgresql.org/docs/current/static/datatype-oid.html + + + + Corresponds to the PostgreSQL "regtype" type, a numeric (OID) ID of a type in the pg_type table. + + + + + Corresponds to the PostgreSQL "tid" type, a tuple id identifying the physical location of a row within its table. + + + + + A special value that can be used to send parameter values to the database without + specifying their type, allowing the database to cast them to another value based on context. + The value will be converted to a string and send as text. + + + This value shouldn't ordinarily be used, and makes sense only when sending a data type + unsupported by Npgsql. + + + + + The geometry type for postgresql spatial extension postgis. + + + + + 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. + + + + 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. + + + + + 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, . + + + + Explicit 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. + + + + Represents a PostgreSQL tsquery. This is the base class for lexeme, not, and and or nodes. + + + + + Node kind + + + + + NodeKind + + + + + Lexeme + + + + + Not operator + + + + + And operator + + + + + Or operator + + + + + Represents the empty tsquery. Should only be used at top level. + + + + + Writes the tsquery in PostgreSQL's text format. + + + + + + Parses a tsquery in PostgreSQL's text format. + + + + + + + TsQuery Lexeme node. + + + + + Lexeme text. + + + + + Weights is a bitmask of the Weight enum. + + + + + Prefix search. + + + + + Creates a tsquery lexeme with only lexeme text. + + Lexeme text. + + + + Creates a tsquery lexeme with lexeme text and weights. + + Lexeme text. + Bitmask of enum Weight. + + + + Creates a tsquery lexeme with lexeme text, weights and prefix search flag. + + Lexeme text. + Bitmask of enum Weight. + Is prefix search? + + + + Weight enum, can be OR'ed together. + + + + + None + + + + + D + + + + + C + + + + + B + + + + + A + + + + + TsQuery Not node. + + + + + Child node + + + + + Creates a not operator, with a given child node. + + + + + + Base class for TsQuery binary operators (& and |). + + + + + Left child + + + + + Right child + + + + + TsQuery And node. + + + + + Creates an and operator, with two given child nodes. + + + + + + + TsQuery Or Node. + + + + + Creates an or operator, with two given child nodes. + + + + + + + Represents an empty tsquery. Shold only be used as top node. + + + + + Creates a tsquery that represents an empty query. Should not be used as child node. + + + + + Represents a PostgreSQL tsvector. + + + + + Constructs an NpgsqlTsVector from a list of lexemes. This also sorts and remove duplicates. + + + + + + Parses a tsvector in PostgreSQL's text format. + + + + + + + Returns the lexeme at a specific index + + + + + + + Gets the number of lexemes. + + + + + Returns an enumerator. + + + + + + Returns an enumerator. + + + + + + Gets a string representation in PostgreSQL's format. + + + + + + Represents a lexeme. A lexeme consists of a text string and optional word entry positions. + + + + + Creates a lexeme with no word entry positions. + + + + + + Creates a lexeme with word entry positions. + + + + + + + Gets or sets the text. + + + + + Gets a word entry position. + + + + + + + Gets the number of word entry positions. + + + + + Creates a string representation in PostgreSQL's format. + + + + + + Represents a word entry position and an optional weight. + + + + + Creates a WordEntryPos with a given position and weight. + + Position values can range from 1 to 16383; larger numbers are silently set to 16383. + A weight labeled between A and D. + + + + The weight is labeled from A to D. D is the default, and not printed. + + + + + The position is a 14-bit unsigned integer indicating the position in the text this lexeme occurs. Cannot be 0. + + + + + Prints this lexeme in PostgreSQL's format, i.e. position is followed by weight (weight is only printed if A, B or C). + + + + + + The weight is labeled from A to D. D is the default, and not printed. + + + + + D, the default + + + + + C + + + + + B + + + + + A + + + + + Represents a PostgreSQL point type. + + + See http://www.postgresql.org/docs/current/static/datatype-geometric.html + + + + + Represents a PostgreSQL line type. + + + See http://www.postgresql.org/docs/current/static/datatype-geometric.html + + + + + Represents a PostgreSQL Line Segment type. + + + + + Represents a PostgreSQL box type. + + + See http://www.postgresql.org/docs/current/static/datatype-geometric.html + + + + + Represents a PostgreSQL Path type. + + + + + Represents a PostgreSQL Polygon type. + + + + + Represents a PostgreSQL Circle type. + + + + + Represents a PostgreSQL inet type, which is a combination of an IPAddress and a + subnet mask. + + + http://www.postgresql.org/docs/current/static/datatype-net-types.html + + + + + Represents a PostgreSQL tid value + + + http://www.postgresql.org/docs/current/static/datatype-oid.html + + + + + Block number + + + + + Tuple index within block + + + + + Indicates that this property or field correspond to a PostgreSQL field with the specified name + + + + + The name of PostgreSQL field that corresponds to this CLR property or field + + + + + Indicates that this property or field correspond to a PostgreSQL field with the specified name + + The name of PostgreSQL field that corresponds to this CLR property or field + + + + Represents the identifier of the Well Known Binary representation of a geographical feature specified by the OGC. + http://portal.opengeospatial.org/files/?artifact_id=13227 Chapter 6.3.2.7 + + + + + The modifiers used by postgis to extend the geomtry's binary representation + + + + + A structure representing a 2D double precision floating point coordinate; + + + + + X coordinate. + + + + + Y coordinate. + + + + + Generates a new BBpoint with the specified coordinates. + + X coordinate + Y coordinate + + + + Represents an Postgis feature. + + + + + returns the binary length of the data structure without header. + + + + + + The Spatial Reference System Identifier of the geometry (0 if unspecified). + + + + + Represents an Postgis 2D Point + + + + + Represents an Ogc 2D LineString + + + + + Represents an Postgis 2D Polygon. + + + + + Represents a Postgis 2D MultiPoint + + + + + Represents a Postgis 2D MultiLineString + + + + + Represents a Postgis 2D MultiPolygon. + + + + + Represents a collection of Postgis feature. + + + + + Indicates that the value of the marked element could be null sometimes, + so the check for null is necessary before its usage. + + + [CanBeNull] public object Test() { return null; } + public void UseTest() { + var p = Test(); + var s = p.ToString(); // Warning: Possible 'System.NullReferenceException' + } + + + + + Indicates that the value of the marked element could never be null. + + + [NotNull] public object Foo() { + return null; // Warning: Possible 'null' assignment + } + + + + + Can be appplied to symbols of types derived from IEnumerable as well as to symbols of Task + and Lazy classes to indicate that the value of a collection item, of the Task.Result property + or of the Lazy.Value property can never be null. + + + + + Can be appplied to symbols of types derived from IEnumerable as well as to symbols of Task + and Lazy classes to indicate that the value of a collection item, of the Task.Result property + or of the Lazy.Value property can be null. + + + + + Indicates that the marked symbol is used implicitly (e.g. via reflection, in external library), + so this symbol will not be marked as unused (as well as by other usage inspections). + + + + + Should be used on attributes and causes ReSharper to not mark symbols marked with such attributes + as unused (as well as by other usage inspections) + + + + Only entity marked with attribute considered used. + + + Indicates implicit assignment to a member. + + + + Indicates implicit instantiation of a type with fixed constructor signature. + That means any unused constructor parameters won't be reported as such. + + + + Indicates implicit instantiation of a type. + + + + Specify what is considered used implicitly when marked + with or . + + + + Members of entity marked with attribute are considered used. + + + Entity marked with attribute and all its members considered used. + + + + This attribute is intended to mark publicly available API + which should not be removed and so is treated as used. + + + + + Describes dependency between method input and output. + + +

Function Definition Table syntax:

+ + FDT ::= FDTRow [;FDTRow]* + FDTRow ::= Input => Output | Output <= Input + Input ::= ParameterName: Value [, Input]* + Output ::= [ParameterName: Value]* {halt|stop|void|nothing|Value} + Value ::= true | false | null | notnull | canbenull + + If method has single input parameter, it's name could be omitted.
+ Using halt (or void/nothing, which is the same) + for method output means that the methos doesn't return normally.
+ canbenull annotation is only applicable for output parameters.
+ You can use multiple [ContractAnnotation] for each FDT row, + or use single attribute with rows separated by semicolon.
+
+ + + [ContractAnnotation("=> halt")] + public void TerminationMethod() + + + [ContractAnnotation("halt <= condition: false")] + public void Assert(bool condition, string text) // regular assertion method + + + [ContractAnnotation("s:null => true")] + public bool IsNullOrEmpty(string s) // string.IsNullOrEmpty() + + + // A method that returns null if the parameter is null, + // and not null if the parameter is not null + [ContractAnnotation("null => null; notnull => notnull")] + public object Transform(object data) + + + [ContractAnnotation("s:null=>false; =>true,result:notnull; =>false, result:null")] + public bool TryParse(string s, out Person result) + + +
+ + + Indicates that the function argument should be string literal and match one + of the parameters of the caller function. For example, ReSharper annotates + the parameter of . + + + public void Foo(string param) { + if (param == null) + throw new ArgumentNullException("par"); // Warning: Cannot resolve symbol + } + + + + + Indicates that IEnumerable, passed as parameter, is not enumerated. + + +
+
diff --git a/packages/Npgsql.3.1.7/lib/net451/Npgsql.dll b/packages/Npgsql.3.1.7/lib/net451/Npgsql.dll new file mode 100644 index 00000000..96b3035d Binary files /dev/null and b/packages/Npgsql.3.1.7/lib/net451/Npgsql.dll differ diff --git a/packages/Npgsql.3.1.7/lib/net451/Npgsql.xml b/packages/Npgsql.3.1.7/lib/net451/Npgsql.xml new file mode 100644 index 00000000..8927239b --- /dev/null +++ b/packages/Npgsql.3.1.7/lib/net451/Npgsql.xml @@ -0,0 +1,6973 @@ + + + + Npgsql + + + + + Base class for all classes which represent a message sent by the PostgreSQL backend. + + + + + Base class for all classes which represent a message sent to the PostgreSQL backend. + Concrete classes which directly inherit this represent arbitrary-length messages which can chunked. + + + + the buffer into which to write the message. + + Whether there was enough space in the buffer to contain the entire message. + If false, the buffer should be flushed and write should be called again. + + + + + Represents a simple frontend message which is typically small and fits well within + the write buffer. The message is first queries for the number of bytes it requires, + and then writes itself out. + + + + + Returns the number of bytes needed to write this message. + + + + + Writes the message contents into the buffer. + + + + + Specifies the type of SQL statement, e.g. SELECT + + + + + The way how to order bytes. + + + + + Most significant byte first (XDR) + + + + + Less significant byte first (NDR) + + + + + Represents a SQL statement or function (stored procedure) to execute + against a PostgreSQL database. This class cannot be inherited. + + + + + Cached version of _connection.Connector, for performance + + + + + Returns details about each statement that this command has executed. + Is only populated when an Execute* method is called. + + + + + If part of the send happens asynchronously (see , + the Task for that remaining send is stored here. + + + + + Indicates whether this command has been prepared. + Never access this field directly, use instead. + + + + + For prepared commands, captures the connection's + at the time the command was prepared. This allows us to know whether the connection was + closed since the command was prepared. + + + + + Initializes a new instance of the NpgsqlCommand class. + + + + + Initializes a new instance of the NpgsqlCommand class with the text of the query. + + The text of the query. + + + + 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. + + + + 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. + + + + 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. + + + + 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 value is 30 seconds. + + + + Gets or sets a value indicating how the + CommandText property is to be interpreted. + + One of the CommandType values. The default is CommandType.Text. + + + + DB connection. + + + + + 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. + + + + Design time visible. + + + + + Gets or sets how command results are applied to the DataRow when used by the + DbDataAdapter.Update(DataSet) method. + + One of the UpdateRowSource values. + + + + Returns whether this query will execute as a prepared (compiled) query. + + + + + Marks all of the query's result columns as either known or unknown. + Unknown results column are requested them from PostgreSQL in text format, and Npgsql makes no + attempt to parse them. They will be accessible as strings only. + + + + + Marks the query's result columns as known or unknown, on a column-by-column basis. + Unknown results column are requested them from PostgreSQL in text format, and Npgsql makes no + attempt to parse them. They will be accessible as strings only. + + + If the query includes several queries (e.g. SELECT 1; SELECT 2), this will only apply to the first + one. The rest of the queries will be fetched and parsed as usual. + + The array size must correspond exactly to the number of result columns the query returns, or an + error will be raised. + + + + + Marks result types to be used when using GetValue on a data reader, on a column-by-column basis. + Used for Entity Framework 5-6 compability. + Only primitive numerical types and DateTimeOffset are supported. + Set the whole array or just a value to null to use default type. + + + + + Gets the current state of the connector + + + + + Creates a new instance of an DbParameter object. + + An DbParameter object. + + + + Creates a new instance of a NpgsqlParameter object. + + A NpgsqlParameter object. + + + + DB parameter collection. + + + + + Gets the NpgsqlParameterCollection. + + The parameters of the SQL statement or function (stored procedure). The default is an empty collection. + + + + Creates a prepared version of the command on a PostgreSQL server. + + + + + This method is used to asynchronously sends all remaining protocol messages for statements + beyond the first one, and *without* waiting for the send to complete. This technique is + used to avoid the deadlock described in #641 by allowing the user to read query results + while at the same time sending messages for later statements. + + + + + Populates the send buffer with protocol messages for the execution of non-prepared statement(s). + + + true whether all messages could be populated in the buffer, false otherwise (method needs to be + called again) + + + + + Populates the send buffer with protocol messages for the execution of prepared statement(s). + + + true whether all messages could be populated in the buffer, false otherwise (method needs to be + called again) + + + + + Populates the send buffer with Parse/Describe protocol messages, used for preparing commands + and for execution in SchemaOnly mode. + + + true whether all messages could be populated in the buffer, false otherwise (method needs to be + called again) + + + + + Populates the send buffer with Parse/Describe protocol messages, used for preparing commands + and for execution in SchemaOnly mode. + + + true whether all messages could be populated in the buffer, false otherwise (method needs to be + called again) + + + + + Executes a SQL statement against the connection and returns the number of rows affected. + + The number of rows affected if known; -1 otherwise. + + + + Asynchronous version of + + The token to monitor for cancellation requests. + A task representing the asynchronous operation, with the number of rows affected if known; -1 otherwise. + + + + 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. + + + + Asynchronous version of + + The token to monitor for cancellation requests. + A task representing the asynchronous operation, with the first column of the + first row in the result set, or a null reference if the result set is empty. + + + + Executes the CommandText against the Connection, and returns an DbDataReader. + + + Unlike the ADO.NET method which it replaces, this method returns a Npgsql-specific + DataReader. + + A DbDataReader object. + + + + Executes the CommandText against the Connection, and returns an DbDataReader using one + of the CommandBehavior values. + + + Unlike the ADO.NET method which it replaces, this method returns a Npgsql-specific + DataReader. + + A DbDataReader object. + + + + Executes the command text against the connection. + + An instance of . + A task representing the operation. + + + + + Executes the command text against the connection. + + + + + DB transaction. + + + + + Gets or sets the NpgsqlTransaction + within which the NpgsqlCommand executes. + + The NpgsqlTransaction. + The default value is a null reference. + + + + Attempts to cancel the execution of a NpgsqlCommand. + + As per the specs, no exception will be thrown by this method in case of failure + + + + Releases the resources used by the NpgsqlCommand. + + + + + Fixes up the text/binary flag on result columns. + Since Prepare() describes a statement rather than a portal, the resulting RowDescription + will have text format on all result columns. Fix that up. + + + Note that UnknownResultTypeList only applies to the first query, while AllResultTypesAreUnknown applies + to all of them. + + + + + Create a new command based on this one. + + A new NpgsqlCommand object. + + + + Create a new command based on this one. + + A new NpgsqlCommand object. + + + + This class represents a connection to a PostgreSQL server. + + + + + The parsed connection string set by the user + + + + + The actual string provided by the user for the connection string + + + + + The connector object connected to the backend. + + + + + A counter that gets incremented every time the connection is (re-)opened. + This allows us to identify an "instance" of connection, which is useful since + some resources are released when a connection is closed (e.g. prepared statements). + + + + + The default TCP/IP port for PostgreSQL. + + + + + Maximum value for connection timeout. + + + + + Initializes a new instance of the + NpgsqlConnection class. + + + + + Initializes a new instance of the + NpgsqlConnection class + and sets the ConnectionString. + + 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. + + + + Opens a database connection with the property settings specified by the + ConnectionString. + + + + + This is the asynchronous version of . + + + Do not invoke other methods and properties of the object until the returned Task is complete. + + The cancellation instruction. + A task representing the asynchronous operation. + + + + Gets or sets the string used to connect to a PostgreSQL database. See the manual for details. + + The connection string that includes the server name, + the database name, and other parameters needed to establish + the initial connection. The default value is an empty string. + + + + + Backend server host name. + + + + + Backend server port. + + + + + If true, the connection will attempt to use SslStream instead of an internal TlsClientStream. + + + + + Gets 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 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 the name of the current database or the database to be used after a connection is opened. + + The name of the current database or the name of the database to be + used after a connection is opened. The default value is the empty string. + + + + Gets the string identifying the database server (host and port) + + + + + Whether to use Windows integrated security to log in. + + + + + User name. + + + + + Gets the current state of the connection. + + A bitwise combination of the ConnectionState values. The default is Closed. + + + + Gets whether the current state of the connection is Open or Closed + + ConnectionState.Open, ConnectionState.Closed or ConnectionState.Connecting + + + + Creates and returns a DbCommand + object associated with the IDbConnection. + + A DbCommand object. + + + + Creates and returns a NpgsqlCommand + object associated with the NpgsqlConnection. + + A NpgsqlCommand object. + + + + Begins a database transaction with the specified isolation level. + + The isolation level under which the transaction should run. + An DbTransaction + object representing the new transaction. + + Currently the IsolationLevel ReadCommitted and Serializable are supported by the PostgreSQL backend. + There's no support for nested transactions. + + + + + Begins a database transaction. + + A NpgsqlTransaction + object representing the new transaction. + + Currently there's no support for nested transactions. Transactions created by this method will have Read Committed isolation level. + + + + + Begins a database transaction with the specified isolation level. + + The isolation level under which the transaction should run. + A NpgsqlTransaction + object representing the new transaction. + + Currently the IsolationLevel ReadCommitted and Serializable are supported by the PostgreSQL backend. + There's no support for nested transactions. + + + + + 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. + + + + + Enlist transation. + + + + + + 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. + + + + + Closes ongoing operations, i.e. an open reader exists or a COPY operation still in progress, as + part of a connection close. + Does nothing if the thread has been aborted - the connector will be closed immediately. + + + + + Releases all resources used by the + NpgsqlConnection. + + true when called from Dispose(); + false when being called from the finalizer. + + + + Occurs on NoticeResponses from the PostgreSQL backend. + + + + + Occurs on NotificationResponses from the PostgreSQL backend. + + + + + Returns whether SSL is being used for the connection. + + + + + Selects the local Secure Sockets Layer (SSL) certificate used for authentication. + + + See + + + + + Verifies the remote Secure Sockets Layer (SSL) certificate used for authentication. + Ignored if is set. + + + See + + + + + Version of the PostgreSQL backend. + This can only be called when there is an active connection. + + + + + PostgreSQL server version. + + + + + Process id of backend server. + 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). + + + + + Begins a binary COPY FROM STDIN operation, a high-performance data import mechanism to a PostgreSQL table. + + A COPY FROM STDIN SQL command + A which can be used to write rows and columns + + See http://www.postgresql.org/docs/current/static/sql-copy.html. + + + + + Begins a binary COPY TO STDOUT operation, a high-performance data export mechanism from a PostgreSQL table. + + A COPY TO STDOUT SQL command + A which can be used to read rows and columns + + See http://www.postgresql.org/docs/current/static/sql-copy.html. + + + + + Begins a textual COPY FROM STDIN operation, a data import mechanism to a PostgreSQL table. + It is the user's responsibility to send the textual input according to the format specified + in . + + A COPY FROM STDIN SQL command + + A TextWriter that can be used to send textual data. + + See http://www.postgresql.org/docs/current/static/sql-copy.html. + + + + + Begins a textual COPY TO STDOUT operation, a data export mechanism from a PostgreSQL table. + It is the user's responsibility to parse the textual input according to the format specified + in . + + A COPY TO STDOUT SQL command + + A TextReader that can be used to read textual data. + + See http://www.postgresql.org/docs/current/static/sql-copy.html. + + + + + Begins a raw binary COPY operation (TO STDOUT or FROM STDIN), a high-performance data export/import mechanism to a PostgreSQL table. + Note that unlike the other COPY API methods, doesn't implement any encoding/decoding + and is unsuitable for structured import/export operation. It is useful mainly for exporting a table as an opaque + blob, for the purpose of importing it back later. + + A COPY TO STDOUT or COPY FROM STDIN SQL command + A that can be used to read or write raw binary data. + + See http://www.postgresql.org/docs/current/static/sql-copy.html. + + + + + Maps a CLR enum to a PostgreSQL enum type for use with this connection. + + + CLR enum labels are mapped by name to PostgreSQL enum labels. + The translation strategy can be controlled by the parameter, + which defaults to . + You can also use the on your enum fields to manually specify a PostgreSQL enum label. + If there is a discrepancy between the .NET and database labels while an enum is read or written, + an exception will be raised. + + Can only be invoked on an open connection; if the connection is closed the mapping is lost. + + To avoid mapping the type for each connection, use the method. + + + A PostgreSQL type name for the corresponding enum type in the database. + If null, the name translator given in will be used. + + + A component which will be used to translate CLR names (e.g. SomeClass) into database names (e.g. some_class). + Defaults to + + The .NET enum type to be mapped + + + + Maps a CLR enum to a PostgreSQL enum type for use with all connections created from now on. Existing connections aren't affected. + + + CLR enum labels are mapped by name to PostgreSQL enum labels. + The translation strategy can be controlled by the parameter, + which defaults to . + You can also use the on your enum fields to manually specify a PostgreSQL enum label. + If there is a discrepancy between the .NET and database labels while an enum is read or written, + an exception will be raised. + + To map the type for a specific connection, use the method. + + + A PostgreSQL type name for the corresponding enum type in the database. + If null, the name translator given in will be used. + + + A component which will be used to translate CLR names (e.g. SomeClass) into database names (e.g. some_class). + Defaults to + + The .NET enum type to be mapped + + + + Removes a previous global enum mapping. + + + A PostgreSQL type name for the corresponding enum type in the database. + If null, the name translator given in will be used. + + + A component which will be used to translate CLR names (e.g. SomeClass) into database names (e.g. some_class). + Defaults to + + + + + Maps a CLR type to a PostgreSQL composite type for use with this connection. + + + CLR fields and properties by string to PostgreSQL enum labels. + The translation strategy can be controlled by the parameter, + which defaults to . + You can also use the on your members to manually specify a PostgreSQL enum label. + If there is a discrepancy between the .NET and database labels while a composite is read or written, + an exception will be raised. + + Can only be invoked on an open connection; if the connection is closed the mapping is lost. + + To avoid mapping the type for each connection, use the method. + + + A PostgreSQL type name for the corresponding enum type in the database. + If null, the name translator given in will be used. + + + A component which will be used to translate CLR names (e.g. SomeClass) into database names (e.g. some_class). + Defaults to + + The .NET type to be mapped + + + + Maps a CLR type to a PostgreSQL composite type for use with all connections created from now on. Existing connections aren't affected. + + + CLR fields and properties by string to PostgreSQL enum labels. + The translation strategy can be controlled by the parameter, + which defaults to . + You can also use the on your members to manually specify a PostgreSQL enum label. + If there is a discrepancy between the .NET and database labels while a composite is read or written, + an exception will be raised. + + To map the type for a specific connection, use the method. + + + A PostgreSQL type name for the corresponding enum type in the database. + If null, the name translator given in will be used. + + + A component which will be used to translate CLR names (e.g. SomeClass) into database names (e.g. some_class). + Defaults to + + The .NET type to be mapped + + + + Removes a previous global enum mapping. + + + A PostgreSQL type name for the corresponding enum type in the database. + If null, the name translator given in will be used. + + + A component which will be used to translate CLR names (e.g. SomeClass) into database names (e.g. some_class). + Defaults to + + + + + Waits until an asynchronous PostgreSQL messages (e.g. a notification) arrives, and + exits immediately. The asynchronous message is delivered via the normal events + (, ). + + + The time-out value, in milliseconds, passed to . + The default value is 0, which indicates an infinite time-out period. + Specifying -1 also indicates an infinite time-out period. + + true if an asynchronous message was received, false if timed out. + + + + Waits until an asynchronous PostgreSQL messages (e.g. a notification) arrives, and + exits immediately. The asynchronous message is delivered via the normal events + (, ). + + + The time-out value is passed to . + + true if an asynchronous message was received, false if timed out. + + + + Waits until an asynchronous PostgreSQL messages (e.g. a notification) arrives, and + exits immediately. The asynchronous message is delivered via the normal events + (, ). + + + + + Waits asynchronously until an asynchronous PostgreSQL messages (e.g. a notification) + arrives, and exist immediately. The asynchronous message is delivered via the normal events + (, ). + + + + + Waits asynchronously until an asynchronous PostgreSQL messages (e.g. a notification) + arrives, and exist immediately. The asynchronous message is delivered via the normal events + (, ). + + + + + Returns the supported collections + + + + + Returns the schema collection specified by the collection name. + + The collection name. + The collection specified. + + + + Returns the schema collection specified by the collection name filtered by the restrictions. + + The collection name. + + The restriction values to filter the results. A description of the restrictions is contained + in the Restrictions collection. + + The collection specified. + + + + Remove password from externally-visible ConnectionString, but leave it in + the internally visible one - we need it for the connection pool key, Clone() etc. + + + + + Creates a closed connection with the connection string and authentication details of this message. + + + + + Clones this connection, replacing its connection string with the given one. + This allows creating a new connection with the same security information + (password, SSL callbacks) while changing other connection parameters (e.g. + database or pooling) + + + + + This method changes the current database by disconnecting from the actual + database and connecting to the specified. + + The name of the database to use in place of the current database. + + + + DB provider factory. + + + + + Clear connection pool. + + + + + Clear all connection pools. + + + + + Flushes the type cache for this connection's connection string and reloads the + types for this connection only. + + + + + Represents a connection to a PostgreSQL backend. Unlike NpgsqlConnection objects, which are + exposed to users, connectors are internal to Npgsql and are recycled by the connection pool. + + + Represents a connection to a PostgreSQL backend. Unlike NpgsqlConnection objects, which are + exposed to users, connectors are internal to Npgsql and are recycled by the connection pool. + + + + + The physical connection socket to the backend. + + + + + The physical connection stream to the backend, without anything on top. + + + + + The physical connection stream to the backend, layered with an SSL/TLS stream if in secure mode. + + + + + Contains the clear text password which was extracted from the user-provided connection string. + If non-cleartext authentication is requested from the server, this is set to null. + + + + + Buffer used for reading data. + + + + + Buffer used for writing data. + + + + + Version of backend server this connector is connected to. + + + + + The secret key of the backend for this connector, used for query cancellation. + + + + + The process ID of the backend for this connector. + + + + + A unique ID identifying this connector, used for logging. Currently mapped to BackendProcessId + + + + + The current transaction status for this connector. + + + + + The transaction currently in progress, if any. + + + + Note that this doesn't mean a transaction request has actually been sent to the backend - for + efficiency we defer sending the request to the first query after BeginTransaction is called. + See for the actual transaction status. + + + Also, the user can initiate a transaction in SQL (i.e. BEGIN), in which case there will be no + NpgsqlTransaction instance. As a result, never check to know whether + a transaction is in progress, check instead. + + + + + + The NpgsqlConnection that (currently) owns this connector. Null if the connector isn't + owned (i.e. idle in the pool) + + + + + The number of messages that were prepended to the current message chain, but not yet sent. + Note that this only tracks messages which produce a ReadyForQuery message + + + + + If the connector is currently in COPY mode, holds a reference to the importer/exporter object. + Otherwise null. + + + + + Holds all run-time parameters received from the backend (via ParameterStatus messages) + + + + + The timeout for reading messages that are part of the user's command + (i.e. which aren't internal prepended commands). + + + + + Contains the current value of the socket's ReceiveTimeout, used to determine whether + we need to change it when commands are received. + + + + + A lock that's taken while a user action is in progress, e.g. a command being executed. + + + + + A lock that's taken while a connection keepalive is in progress. Used to make sure + keepalives and user actions don't interfere with one another. + + + + + A lock that's taken while a cancellation is being delivered; new queries are blocked until the + cancellation is delivered. This reduces the chance that a cancellation meant for a previous + command will accidentally cancel a later one, see #615. + + + + + If pooled, the timestamp when this connector was returned to the pool. + + + + + The minimum timeout that can be set on internal commands such as COMMIT, ROLLBACK. + + + + + Creates a new connector with the given connection string. + + The connection string. + The clear-text password or null if not using a password. + + + + Gets the current state of the connector + + + + + Returns whether the connector is open, regardless of any task it is currently performing + + + + + Totally temporary until the connection pool is rewritten with timeout support + + + + + Opens the physical connection to the server. + + Usually called by the RequestConnector + Method of the connection pool manager. + + + + Performs a step in the PostgreSQL authentication protocol + + The username being used to connect. + A message read from the server, instructing us on the required response + a PasswordMessage to be sent, or null if authentication has completed successfully + + + + Prepends a message to be sent at the beginning of the next message chain. + + + + + Sends a single frontend message, used for simple messages such as rollback, etc. + Note that additional prepend messages may be previously enqueued, and will be sent along + with this message. + + + + + + Reads backend messages and discards them, stopping only after a message of the given type has + been seen. + + + + + Reads backend messages and discards them, stopping only after a message of the given types has + been seen. + + + + + Reads a single message, expecting it to be of type . + Any other message causes an exception to be raised and the connector to be broken. + Asynchronous messages (e.g. Notice) are treated and ignored. ErrorResponses raise an + exception but do not cause the connector to break. + + + + + Reads a PostgreSQL asynchronous message (e.g. notification). + This has nothing to do with .NET async processing of messages or queries. + + + + + Handles a new transaction indicator received on a ReadyForQuery message + + + + + Occurs on NoticeResponses from the PostgreSQL backend. + + + + + Occurs on NotificationResponses from the PostgreSQL backend. + + + + + Returns whether SSL is being used for the connection + + + + + Creates another connector and sends a cancel request through it for this connector. + + + + + Called when an unexpected message has been received during an action. Breaks the + connector and returns the appropriate message. + + + + + Called when a connector becomes completely unusable, e.g. when an unexpected I/O exception is raised or when + we lose protocol sync. + Note that fatal errors during the Open phase do *not* pass through here. + + + + + Closes the socket and cleans up client-side resources associated with this connector. + + + + + Called when a pooled connection is closed, and its connector is returned to the pool. + Resets the connector back to its initial state, releasing server-side sources + (e.g. prepared statements), resetting parameters to their defaults, and resetting client-side + state + + + + + An IDisposable wrapper around and + . + + + + + Whether the backend is an AWS Redshift instance + + + + + Returns next plan index. + + + + + Reads a forward-only stream of rows from a data source. + + + Reads a forward-only stream of rows from a data source. + + + + + Holds the list of statements being executed by this reader. + + + + + The index of the current query resultset we're processing (within a multiquery) + + + + + The RowDescription message for the current resultset being processed + + + + + Indicates that at least one row has been read across all result sets + + + + + Whether the current result set has rows + + + + + If HasRows was called before any rows were read, it was forced to read messages. A pending + message may be stored here for processing in the next Read() or NextResult(). + + + + + If has been called, its results are cached here. + + + + + Is raised whenever Close() is called. + + + + + In non-sequential mode, contains the cached values already read from the current row + + + + + The first row in a stored procedure command that has output parameters needs to be traversed twice - + once for populating the output parameters and once for the actual result set traversal. So in this + case we can't be sequential. + + + + + Advances the reader to the next record in a result set. + + true if there are more rows; otherwise false. + + The default position of a data reader is before the first record. Therefore, you must call Read to begin accessing data. + + + + + This is the asynchronous version of The cancellation token is currently ignored. + + Ignored for now. + A task representing the asynchronous operation. + + + + Advances the reader to the next result when reading the results of a batch of statements. + + + + + + This is the asynchronous version of NextResult. + The parameter is currently ignored. + + Currently ignored. + A task representing the asynchronous operation. + + + + Note that in SchemaOnly mode there are no resultsets, and we read nothing from the backend (all + RowDescriptions have already been processed and are available) + + + + + Gets a value indicating the depth of nesting for the current row. Always returns zero. + + + + + Gets a value indicating whether the data reader is closed. + + + + + Gets the number of rows changed, inserted, or deleted by execution of the SQL statement. + + + + + Returns details about each statement that this reader will or has executed. + + + Note that some fields (i.e. rows and oid) are only populated as the reader + traverses the result. + + For commands with multiple queries, this exposes the number of rows affected on + a statement-by-statement basis, unlike + which exposes an aggregation across all statements. + + + + + Gets a value that indicates whether this DbDataReader contains one or more rows. + + + + + Indicates whether the reader is currently positioned on a row, i.e. whether reading a + column is possible. + This property is different from in that will + return true even if attempting to read a column will fail, e.g. before + has been called + + + + + Gets the name of the column, given the zero-based column ordinal. + + The zero-based column ordinal. + The name of the specified column. + + + + Gets the number of columns in the current row. + + + + + Consumes all result sets for this reader, leaving the connector ready for sending and processing further + queries + + + + + Releases the resources used by the NpgsqlDataReader. + + + + + Closes the object. + + + + + Returns the current row, or throws an exception if a row isn't available + + + + + Gets the value of the specified column as a Boolean. + + The zero-based column ordinal. + The value of the specified column. + + + + Gets the value of the specified column as a byte. + + The zero-based column ordinal. + The value of the specified column. + + + + Gets the value of the specified column as a single character. + + The zero-based column ordinal. + The value of the specified column. + + + + Gets the value of the specified column as a 16-bit signed integer. + + The zero-based column ordinal. + The value of the specified column. + + + + Gets the value of the specified column as a 32-bit signed integer. + + The zero-based column ordinal. + The value of the specified column. + + + + Gets the value of the specified column as a 64-bit signed integer. + + The zero-based column ordinal. + The value of the specified column. + + + + Gets the value of the specified column as a object. + + The zero-based column ordinal. + The value of the specified column. + + + + Gets the value of the specified column as an instance of . + + The zero-based column ordinal. + The value of the specified column. + + + + Gets the value of the specified column as a object. + + The zero-based column ordinal. + The value of the specified column. + + + + Gets the value of the specified column as a double-precision floating point number. + + The zero-based column ordinal. + The value of the specified column. + + + + Gets the value of the specified column as a single-precision floating point number. + + The zero-based column ordinal. + The value of the specified column. + + + + Gets the value of the specified column as a globally-unique identifier (GUID). + + The zero-based column ordinal. + The value of the specified column. + + + + Populates an array of objects with the column values of the current row. + + An array of Object into which to copy the attribute columns. + The number of instances of in the array. + + + + Gets the value of the specified column as an instance of . + + The zero-based column ordinal. + The value of the specified column. + + + + Gets the value of the specified column as an , + Npgsql's provider-specific type for dates. + + + PostgreSQL's date type represents dates from 4713 BC to 5874897 AD, while .NET's DateTime + only supports years from 1 to 1999. If you require years outside this range use this accessor. + The standard method will also return this type, but has + the disadvantage of boxing the value. + See http://www.postgresql.org/docs/current/static/datatype-datetime.html + + The zero-based column ordinal. + The value of the specified column. + + + + Gets the value of the specified column as a TimeSpan, + + + PostgreSQL's interval type has has a resolution of 1 microsecond and ranges from + -178000000 to 178000000 years, while .NET's TimeSpan has a resolution of 100 nanoseconds + and ranges from roughly -29247 to 29247 years. + See http://www.postgresql.org/docs/current/static/datatype-datetime.html + + The zero-based column ordinal. + The value of the specified column. + + + + Gets the value of the specified column as an , + Npgsql's provider-specific type for time spans. + + + PostgreSQL's interval type has has a resolution of 1 microsecond and ranges from + -178000000 to 178000000 years, while .NET's TimeSpan has a resolution of 100 nanoseconds + and ranges from roughly -29247 to 29247 years. If you require values from outside TimeSpan's + range use this accessor. + The standard ADO.NET method will also return this + type, but has the disadvantage of boxing the value. + See http://www.postgresql.org/docs/current/static/datatype-datetime.html + + The zero-based column ordinal. + The value of the specified column. + + + + Gets the value of the specified column as an , + Npgsql's provider-specific type for date/time timestamps. Note that this type covers + both PostgreSQL's "timestamp with time zone" and "timestamp without time zone" types, + which differ only in how they are converted upon input/output. + + + PostgreSQL's timestamp type represents dates from 4713 BC to 5874897 AD, while .NET's DateTime + only supports years from 1 to 1999. If you require years outside this range use this accessor. + The standard method will also return this type, but has + the disadvantage of boxing the value. + See http://www.postgresql.org/docs/current/static/datatype-datetime.html + + The zero-based column ordinal. + The value of the specified column. + + + + Reads a stream of bytes from the specified column, starting at location indicated by dataOffset, into the buffer, starting at the location indicated by bufferOffset. + + The zero-based column ordinal. + The index within the row from which to begin the read operation. + The buffer into which to copy the data. + The index with the buffer to which the data will be copied. + The maximum number of characters to read. + The actual number of bytes read. + + + + Retrieves data as a . + + The zero-based column ordinal. + The returned object. + + + + Reads a stream of characters from the specified column, starting at location indicated by dataOffset, into the buffer, starting at the location indicated by bufferOffset. + + The zero-based column ordinal. + The index within the row from which to begin the read operation. + The buffer into which to copy the data. + The index with the buffer to which the data will be copied. + The maximum number of characters to read. + The actual number of characters read. + + + + Retrieves data as a . + + The zero-based column ordinal. + The returned object. + + + + Gets a value that indicates whether the column contains nonexistent or missing values. + + The zero-based column ordinal. + true if the specified column is equivalent to ; otherwise false. + + + + An asynchronous version of , which gets a value that indicates whether the column contains non-existent or missing values. + The parameter is currently ignored. + + The zero-based column to be retrieved. + Currently ignored. + true if the specified column value is equivalent to otherwise false. + + + + Gets the value of the specified column as an instance of . + + The name of the column. + The value of the specified column. + + + + Gets the column ordinal given the name of the column. + + The name of the column. + The zero-based column ordinal. + + + + Gets the data type information for the specified field. + This will be the PostgreSQL type name (e.g. int4) as in the pg_type table, + not the .NET type (see for that). + + The zero-based column index. + + + + + Gets the OID for the PostgreSQL type for the specified field, as it appears in the pg_type table. + + + This is a PostgreSQL-internal value that should not be relied upon and should only be used for + debugging purposes. + + The zero-based column index. + + + + + Gets the data type of the specified column. + + The zero-based column ordinal. + The data type of the specified column. + + + + Returns the provider-specific field type of the specified column. + + The zero-based column ordinal. + The Type object that describes the data type of the specified column. + + + + Gets the value of the specified column as an instance of . + + The zero-based column ordinal. + The value of the specified column. + + + + Synchronously gets the value of the specified column as a type. + + Synchronously gets the value of the specified column as a type. + The column to be retrieved. + The column to be retrieved. + + + + Asynchronously gets the value of the specified column as a type. + The parameter is currently ignored. + + The type of the value to be returned. + The column to be retrieved. + Currently ignored. + A task representing the asynchronous operation. + + + + Gets the value of the specified column as an instance of . + + The zero-based column ordinal. + The value of the specified column. + + + + Gets all provider-specific attribute columns in the collection for the current row. + + An array of Object into which to copy the attribute columns. + The number of instances of in the array. + + + + Returns an that can be used to iterate through the rows in the data reader. + + An that can be used to iterate through the rows in the data reader. + + + + Returns schema information for the columns in the current resultset. + + + + + + Returns a System.Data.DataTable that describes the column metadata of the DataReader. + + + + + Contains the column names as the keys + + + + + Contains all unique columns + + + + + Large object manager. This class can be used to store very large files in a PostgreSQL database. + + + Large object manager. This class can be used to store very large files in a PostgreSQL database. + + + + + The largest chunk size (in bytes) read and write operations will read/write each roundtrip to the network. Default 4 MB. + + + + + Creates an NpgsqlLargeObjectManager for this connection. The connection must be opened to perform remote operations. + + + + + + Execute a function + + + + + + + + Execute a function that returns a byte array + + + + + + Create an empty large object in the database. If an oid is specified but is already in use, an PostgresException will be thrown. + + A preferred oid, or specify 0 if one should be automatically assigned + The oid for the large object created + If an oid is already in use + + + + Opens a large object on the backend, returning a stream controlling this remote object. + A transaction snapshot is taken by the backend when the object is opened with only read permissions. + When reading from this object, the contents reflects the time when the snapshot was taken. + Note that this method, as well as operations on the stream must be wrapped inside a transaction. + + Oid of the object + An NpgsqlLargeObjectStream + + + + Opens a large object on the backend, returning a stream controlling this remote object. + Note that this method, as well as operations on the stream must be wrapped inside a transaction. + + Oid of the object + An NpgsqlLargeObjectStream + + + + Deletes a large object on the backend. + + Oid of the object to delete + + + + Exports a large object stored in the database to a file on the backend. This requires superuser permissions. + + Oid of the object to export + Path to write the file on the backend + + + + Imports a large object to be stored as a large object in the database from a file stored on the backend. This requires superuser permissions. + + Path to read the file on the backend + A preferred oid, or specify 0 if one should be automatically assigned + + + + Since PostgreSQL 9.3, large objects larger than 2GB can be handled, up to 4TB. + This property returns true whether the PostgreSQL version is >= 9.3. + + + + + An interface to remotely control the seekable stream for an opened large object on a PostgreSQL server. + Note that the OpenRead/OpenReadWrite method as well as all operations performed on this stream must be wrapped inside a database transaction. + + + An interface to remotely control the seekable stream for an opened large object on a PostgreSQL server. + Note that the OpenRead/OpenReadWrite method as well as all operations performed on this stream must be wrapped inside a database transaction. + + + + + Since PostgreSQL 9.3, large objects larger than 2GB can be handled, up to 4TB. + This property returns true whether the PostgreSQL version is >= 9.3. + + + + + Reads count bytes from the large object. The only case when fewer bytes are read is when end of stream is reached. + + The buffer where read data should be stored. + The offset in the buffer where the first byte should be read. + The maximum number of bytes that should be read. + How many bytes actually read, or 0 if end of file was already reached. + + + + Writes count bytes to the large object. + + The buffer to write data from. + The offset in the buffer at which to begin copying bytes. + The number of bytes to write. + + + + CanTimeout always returns false. + + + + + CanRead always returns true, unless the stream has been closed. + + + + + CanWrite returns true if the stream was opened with write permissions, and the stream has not been closed. + + + + + CanSeek always returns true, unless the stream has been closed. + + + + + Returns the current position in the stream. Getting the current position does not need a round-trip to the server, however setting the current position does. + + + + + Gets the length of the large object. This internally seeks to the end of the stream to retrieve the length, and then back again. + + + + + Seeks in the stream to the specified position. This requires a round-trip to the backend. + + A byte offset relative to the origin parameter. + A value of type SeekOrigin indicating the reference point used to obtain the new position. + + + + + Does nothing. + + + + + Truncates or enlarges the large object to the given size. If enlarging, the large object is extended with null bytes. + For PostgreSQL versions earlier than 9.3, the value must fit in an Int32. + + Number of bytes to either truncate or enlarge the large object. + + + + Releases resources at the backend allocated for this stream. + + + + + Releases resources at the backend allocated for this stream, iff disposing is true. + + Whether to release resources allocated at the backend. + + + + Represents a transaction to be made in a PostgreSQL database. This class cannot be inherited. + + + Represents a transaction to be made in a PostgreSQL database. This class cannot be inherited. + + + + + Specifies the object associated with the transaction. + + The object associated with the transaction. + + + + Specifies the completion state of the transaction. + + The completion state of the transaction. + + + + Specifies the object associated with the transaction. + + The object associated with the transaction. + + + + Specifies the IsolationLevel for this transaction. + + The IsolationLevel for this transaction. + The default is ReadCommitted. + + + + Commits the database transaction. + + + + + Commits the database transaction. + + + + + Commits the database transaction. + + + + + Rolls back a transaction from a pending state. + + + + + Rolls back a transaction from a pending state. + + + + + Rolls back a transaction from a pending state. + + + + + Creates a transaction save point. + + + + + Rolls back a transaction from a pending savepoint state. + + + + + Rolls back a transaction from a pending savepoint state. + + + + + Dispose. + + + + + + Open connectors waiting to be requested by new connections + + + + + Incremented every time this pool is cleared via or + . Allows us to identify connections which were + created before the clear. + + + + + Attempts to ensure, on a best-effort basis, that there are enough connections to meet MinPoolSize. + This method never throws an exception. + + + + + The total byte length of the buffer. + + + + + Used for internal temporary purposes + + + + + The minimum buffer size possible. + + + + + Reads in the requested bytes into the buffer, or if the buffer isn't big enough, allocates a new + temporary buffer and reads into it. Returns the buffer that contains the data (either itself or the + temp buffer). Used in cases where we absolutely have to have an entire value in memory and cannot + read it in sequentially. + + + + + Seeks the first null terminator (\0) and returns the string up to it. The buffer must already + contain the entire string and its terminator. + + + + + Seeks the first null terminator (\0) and returns the string up to it. The buffer must already + contain the entire string and its terminator. + + Decodes the messages with this encoding. + + + + Note that unlike the primitive readers, this reader can read any length, looping internally + and reading directly from the underlying stream. + + output buffer to fill + offset in the output buffer in which to start writing + number of character to be read into the output buffer + number of bytes left in the field. This method will not read bytes + beyond this count + The number of bytes actually read. + The number of characters actually read. + the number of bytes read + + + + Skips over characters in the buffer, reading from the underlying stream as necessary. + + the number of characters to skip over. + int.MaxValue means all available characters (limited only by ). + + the maximal number of bytes to process + The number of bytes actually skipped. + The number of characters actually skipped. + the number of bytes read + + + + Seeks within the current in-memory data. Does not read any data from the underlying. + + + + + + + Creates a type handler for arrays of this handler's type. + + + + + Creates a type handler for ranges of this handler's type. + + + + + + + + + + + + + + + + + + + A type handler may implement ISimpleTypeHandler for types other than its primary one. + This is why this method has type parameter T2 and not T. + + + + the value to be examined + a cache in which to store length(s) of values to be written + + the containing . Consulted for settings + which impact how to send the parameter, e.g. . Can be null. + + + + the value to be written + + a cache in which to store length(s) of values to be written + + the containing . Consulted for settings + which impact how to send the parameter, e.g. . Can be null. + . + + + + + A type handler may implement IChunkingTypeHandler for types other than its primary one. + This is why this method has type parameter T2 and not T. + + + + + Maps CLR types to their type handlers. + + + + + Maps CLR types to their array handlers. + + + + + A counter that is updated when this registry activates its global mappings. + Tracks , allows us to know when a pooled + connection's mappings are no longer up to date because a global mapping change has + occurred. + + + + + A counter that is incremented whenever a global mapping change occurs (e.g. + , . + + + + + + Caches, for each connection string, the results of the backend type query in the form of a list of type + info structs keyed by the PG name. + Repeated connections to the same connection string reuse the query results and avoid an additional + roundtrip at open-time. + + + + + Looks up a type handler by its PostgreSQL type's OID. + + A PostgreSQL type OID + A type handler that can be used to encode and decode values. + + + + A structure holding information about all PostgreSQL types found in an actual database. + Only contains instances and not actual , and is shared between + all connections using the same connection string. Consulted when a type handler needs to be created. + + + + + Indexes backend types by their PostgreSQL name, including namespace (e.g. pg_catalog.int4). + Only used for enums and composites. + + + + + Indexes backend types by their PostgreSQL name, not including namespace. + If more than one type exists with the same name (i.e. in different namespaces) this + table will contain an entry with a null value. + Only used for enums and composites. + + + + + Represents a single PostgreSQL data type, as discovered from pg_type. + Note that this simply a data structure describing a type and not a handler, and is shared between connectors + having the same connection string. + + + + + For base types, contains the handler type. + If null, this backend type isn't supported by Npgsql. + + + + + Returns a string that represents the current object. + + + + + Constructs an unsupported base type (no handler exists in Npgsql for this type) + + + + + Instantiate the type handler. If it has a constructor that accepts a TypeHandlerRegistry, use that to allow + the handler to make connector-specific adjustments. Otherwise (the normal case), use the default constructor. + + + + + + + Holds the name and OID for all fields. + Populated on the first activation of the composite. + + + + + Represents a PostgreSQL domain type. + + + When PostgreSQL returns a RowDescription for a domain type, the type OID is the base type's + (so fetching a domain type over text returns a RowDescription for text). + However, when a composite type is returned, the type OID there is that of the domain, + so we provide "clean" support for domain types. + + + + + Clears the internal type cache. + Useful for forcing a reload of the types after loading an extension. + + + + + Clears the internal type cache. + Useful for forcing a reload of the types after loading an extension. + + + + + The total byte length of the buffer. + + + + + During copy operations, the buffer's usable size is smaller than its total size because of the CopyData + message header. This distinction is important since some type handlers check how much space is left + in the buffer in their decision making. + + + + + The minimum buffer size possible. + + + + + A stream that has been opened on this colun, and needs to be disposed of when the column is consumed. + + + + + Places our position at the beginning of the given column, after the 4-byte length. + The length is available in ColumnLen. + + + + + Note that this message doesn't actually contain the data, but only the length. Data is processed + directly from the connector's buffer. + + + + + Note: This message is both a frontend and a backend message + + + + + The number of columns in the current row + + + + + The index of the column that we're on, i.e. that has already been parsed, is + is memory and can be retrieved. Initialized to -1 + + + + + For streaming types (e.g. bytea, text), holds the current byte position within the column. + Does not include the length prefix. + + + + + For streaming types (e.g. bytea), holds the byte length of the column. + Does not include the length prefix. + + + + + Places our position at the beginning of the given column, after the 4-byte length. + The length is available in ColumnLen. + + + + + Returns a stream for the current column. + + + + + Consumes the current row, allowing the reader to read in the next one. + + + + + Consumes the current row asynchronously, allowing the reader to read in the next one. + + + + + List of all streams that have been opened on this row, and need to be disposed of when the row + is consumed. + + + + + Error and notice message field codes + + + + + A RowDescription message sent from the backend. + + + See http://www.postgresql.org/docs/current/static/protocol-message-formats.html + + + + + Given a string name, returns the field's ordinal index in the row. + + + + + Given a string name, returns the field's ordinal index in the row. + + + + + A descriptive record on a single field received from PostgreSQL. + See RowDescription in http://www.postgresql.org/docs/current/static/protocol-message-formats.html + + + + + The field name. + + + + + The object ID of the field's data type. + + + + + The data type size (see pg_type.typlen). Note that negative values denote variable-width types. + + + + + The type modifier (see pg_attribute.atttypmod). The meaning of the modifier is type-specific. + + + + + If the field can be identified as a column of a specific table, the object ID of the table; otherwise zero. + + + + + If the field can be identified as a column of a specific table, the attribute number of the column; otherwise zero. + + + + + The format code being used for the field. + Currently will be zero (text) or one (binary). + In a RowDescription returned from the statement variant of Describe, the format code is not yet known and will always be zero. + + + + + The Npgsql type handler assigned to handle this field. + Returns for fields with format text. + + + + + The type handler resolved for this field, regardless of whether it's binary or text. + + + + + An array of cached lengths for the parameters sending process. + + When sending parameters, lengths need to be calculated more than once (once for Bind, once for + an array, once for the string within that array). This cache optimized that. Lengths are added + to the cache, and then retrieved at the same order. + + + + + Provides an API for a binary COPY TO operation, a high-performance data export mechanism from + a PostgreSQL table. Initiated by + + + + + The number of columns, as returned from the backend in the CopyInResponse. + + + + + Starts reading a single row, must be invoked before reading any columns. + + + The number of columns in the row. -1 if there are no further rows. + Note: This will currently be the same value for all rows, but this may change in the future. + + + + + Reads the current column, returns its value and moves ahead to the next column. + If the column is null an exception is thrown. + + + The type of the column to be read. This must correspond to the actual type or data + corruption will occur. If in doubt, use to manually + specify the type. + + The value of the column + + + + Reads the current column, returns its value according to and + moves ahead to the next column. + If the column is null an exception is thrown. + + + In some cases isn't enough to infer the data type coming in from the + database. This parameter and be used to unambiguously specify the type. An example is the JSONB + type, for which will be a simple string but for which + must be specified as . + + The .NET type of the column to be read. + The value of the column + + + + Returns whether the current column is null. + + + + + Skips the current column without interpreting its value. + + + + + Cancels an ongoing export. + + + + + Completes that binary export and sets the connection back to idle state + + + + + Provides an API for a binary COPY FROM operation, a high-performance data import mechanism to + a PostgreSQL table. Initiated by + + + See http://www.postgresql.org/docs/current/static/sql-copy.html. + + + + + The number of columns in the current (not-yet-written) row. + + + + + The number of columns, as returned from the backend in the CopyInResponse. + + + + + NpgsqlParameter instance needed in order to pass the from + the validation phase to the writing phase. + + + + + Starts writing a single row, must be invoked before writing any columns. + + + + + Writes a single column in the current row. + + The value to be written + + The type of the column to be written. This must correspond to the actual type or data + corruption will occur. If in doubt, use to manually + specify the type. + + + + + Writes a single column in the current row as type . + + The value to be written + + In some cases isn't enough to infer the data type to be written to + the database. This parameter and be used to unambiguously specify the type. An example is + the JSONB type, for which will be a simple string but for which + must be specified as . + + The .NET type of the column to be written. + + + + Writes a single null column value. + + + + + Writes an entire row of columns. + Equivalent to calling , followed by multiple + on each value. + + An array of column values to be written as a single row + + + + Cancels and terminates an ongoing import. Any data already written will be discarded. + + + + + Completes that binary import and sets the connection back to idle state + + + + + Completes the import process and signals to the database to write everything. + + + + + 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. + + + + 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. + + + + + + + + + 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, ... + + 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 + + + + Represents the method that handles the Notice events. + + The source of the event. + A NpgsqlNoticeEventArgs that contains the event data. + + + + Represents the method that handles the Notification events. + + The source of the event. + A NpgsqlNotificationEventArgs that contains the event data. + + + + Represents the method that allows the application to provide a certificate collection to be used for SSL client authentication + + A X509CertificateCollection to be filled with one or more client certificates. + + + + Provides a simple way to create and manage the contents of connection strings used by + the class. + + + + + Makes all valid keywords for a property to that property (e.g. User Name -> Username, UserId -> Username...) + + + + + Maps CLR property names (e.g. BufferSize) to their canonical keyword name, which is the + property's [DisplayName] (e.g. Buffer Size) + + + + + Maps each property to its [DefaultValue] + + + + + Initializes a new instance of the NpgsqlConnectionStringBuilder class. + + + + + Initializes a new instance of the NpgsqlConnectionStringBuilder class, optionally using ODBC rules for quoting values. + + true to use {} to delimit fields; false to use quotation marks. + + + + Initializes a new instance of the NpgsqlConnectionStringBuilder class and sets its . + + + + + Gets or sets the value associated with the specified key. + + The key of the item to get or set. + The value associated with the specified key. + + + + Removes the entry with the specified key from the DbConnectionStringBuilder instance. + + The key of the key/value pair to be removed from the connection string in this DbConnectionStringBuilder. + true if the key existed within the connection string and was removed; false if the key did not exist. + + + + Clears the contents of the instance. + + + + + Determines whether the contains a specific key. + + The key to locate in the . + true if the contains an entry with the specified key; otherwise false. + + + + Retrieves a value corresponding to the supplied key from this . + + The key of the item to retrieve. + The value corresponding to the key. + true if keyword was found within the connection string, false otherwise. + + + + The hostname or IP address of the PostgreSQL server to connect to. + + + + + The TCP/IP port of the PostgreSQL server. + + + + + The PostgreSQL database to connect to. + + + + + The username to connect with. Not required if using IntegratedSecurity. + + + + + The password to connect with. Not required if using IntegratedSecurity. + + + + + The optional application name parameter to be sent to the backend during connection initiation. + + + + + Whether to enlist in an ambient TransactionScope. + + + + + Gets or sets the schema search path. + + + + + Gets or sets the schema search path. + + + + + Controls whether SSL is required, disabled or preferred, depending on server support. + + + + + Whether to trust the server certificate without validating it. + + + + + Npgsql uses its own internal implementation of TLS/SSL. Turn this on to use .NET SslStream instead. + + + + + Whether to use Windows integrated security to log in. + + + + + The Kerberos service name to be used for authentication. + + + + + The Kerberos realm to be used for authentication. + + + + + Gets or sets a Boolean value that indicates if security-sensitive information, such as the password, is not returned as part of the connection if the connection is open or has ever been in an open state. + + + + + Whether connection pooling should be used. + + + + + The minimum connection pool size. + + + + + The maximum connection pool size. + + + + + The time to wait before closing idle connections in the pool if the count + of all connections exceeds MinPoolSize. + + The time (in seconds) to wait. The default value is 300. + + + + How many seconds the pool waits before attempting to prune idle connections that are beyond + idle lifetime (. + + The interval (in seconds). The default value is 10. + + + + The time to wait (in seconds) while trying to establish a connection before terminating the attempt and generating an error. + Defaults to 15 seconds. + + + + + The time to wait (in seconds) while trying to execute a command before terminating the attempt and generating an error. + Defaults to 30 seconds. + + + + + The time to wait (in seconds) while trying to execute a an internal command before terminating the attempt and generating an error. + + + + + The database template to specify when creating a database in Entity Framework. If not specified, + PostgreSQL defaults to "template1". + + + http://www.postgresql.org/docs/current/static/manage-ag-templatedbs.html + + + + + The database admin to specify when creating and dropping a database in Entity Framework. This is needed because + Npgsql needs to connect to a database in order to send the create/drop database command. + If not specified, defaults to "template1". Check NpgsqlServices.UsingPostgresDBConnection for more information. + + + + + The number of seconds of connection inactivity before Npgsql sends a keepalive query. + Set to 0 (the default) to disable. + + + + + Gets or sets the buffer size. + + + + + A compatibility mode for special PostgreSQL server types. + + + + + Makes MaxValue and MinValue timestamps and dates readable as infinity and negative infinity. + + + + + Obsolete, see http://www.npgsql.org/doc/3.1/migration.html + + + + + Obsolete, see http://www.npgsql.org/doc/3.1/migration.html + + + + + Obsolete, see http://www.npgsql.org/doc/3.1/migration.html + + + + + Obsolete, see http://www.npgsql.org/doc/3.0/migration.html + + + + + Obsolete, see http://www.npgsql.org/doc/3.0/migration.html + + + + + Determines whether the specified object is equal to the current object. + + + + + Hash function. + + + + + + An option specified in the connection string that activates special compatibility features. + + + + + No special server compatibility mode is active + + + + + The server is an Amazon Redshift instance. + + + + + Specifies how to manage SSL. + + + + + SSL is disabled. If the server requires SSL, the connection will fail. + + + + + Prefer SSL connections if the server allows them, but allow connections without SSL. + + + + + Fail the connection if the server doesn't suppotr SSL. + + + + + Expresses the exact state of a connector. + + + + + The connector has either not yet been opened or has been closed. + + + + + The connector is currently connecting to a Postgresql server. + + + + + The connector is connected and may be used to send a new query. + + + + + The connector is waiting for a response to a query which has been sent to the server. + + + + + The connector is currently fetching and processing query results. + + + + + The connector is currently waiting for asynchronous notifications to arrive. + + + + + The connection was broken because an unexpected error occurred which left it in an unknown state. + This state isn't implemented yet. + + + + + The connector is engaged in a COPY operation. + + + + + Currently not in a transaction block + + + + + Currently in a transaction block + + + + + Currently in a failed transaction block (queries will be rejected until block is ended) + + + + + A new transaction has been requested but not yet transmitted to the backend. It will be transmitted + prepended to the next query. + This is a client-side state option only, and is never transmitted from the backend. + + + + + Specifies how to load/parse DataRow messages as they're received from the backend. + + + + + Load DataRows in non-sequential mode + + + + + Load DataRows in sequential mode + + + + + Skip DataRow messages altogether + + + + + Represents the method that handles the RowUpdated events. + + The source of the event. + A NpgsqlRowUpdatedEventArgs that contains the event data. + + + + Represents the method that handles the RowUpdating events. + + 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. + + + + + Row updated event. + + + + + Row updating event. + + + + + Default constructor. + + + + + Constructor. + + + + + + Constructor. + + + + + + + Constructor. + + + + + + + Create row updated event. + + + + + Create row updating event. + + + + + Raise the RowUpdated event. + + + + + + Raise the RowUpdating event. + + + + + + Delete command. + + + + + Select command. + + + + + Update command. + + + + + Insert command. + + + + + The exception that is thrown when server-related issues occur. + + + PostgreSQL errors (e.g. query SQL issues, constraint violations) are raised via + which is a subclass of this class. + Purely Npgsql-related issues which aren't related to the server will be raised + via the standard CLR exceptions (e.g. ArgumentException). + + + + + Same as , for backwards-compatibility with Npgsql 2.x and Hangfire. + + + Until Hangfire fix themselves: https://github.com/frankhommers/Hangfire.PostgreSql/issues/33 + + + + + A factory to create instances of various Npgsql objects. + + + + + Creates an NpgsqlCommand object. + + + + + EventArgs class to send Notification parameters. + + + + + Process ID of the PostgreSQL backend that sent this notification. + + + + + Condition that triggered that notification. + + + + + Additional information. + + + + + This class represents a parameter to a command that will be sent to server + + + + + Can be used to communicate a value from the validation phase to the writing phase. + + + + + Initializes a new instance of the NpgsqlParameter class. + + + + + Initializes a new instance of the NpgsqlParameter + class with the parameter name and a value of the new NpgsqlParameter. + + The 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.

+
+
+ + + Initializes a new instance of the NpgsqlParameter + class with the parameter name and the data type. + + The name of the parameter to map. + One of the DbType values. + + + + Initializes a new instance of the NpgsqlParameter. + + The name of the parameter to map. + One of the DbType values. + + + + Initializes a new instance of the NpgsqlParameter. + + The name of the parameter to map. + One of the NpgsqlDbType values. + The length of the parameter. + + + + Initializes a new instance of the NpgsqlParameter. + + The name of the parameter to map. + One of the DbType values. + The length of the parameter. + + + + Initializes a new instance of the NpgsqlParameter + + The name of the parameter to map. + One of the NpgsqlDbType values. + The length of the parameter. + The name of the source column. + + + + Initializes a new instance of the NpgsqlParameter. + + The name of the parameter to map. + One of the DbType values. + The length of the parameter. + The name of the source column. + + + + Initializes a new instance of the NpgsqlParameter. + + The name of the parameter to map. + One of the NpgsqlDbType values. + The length of the parameter. + The 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. + + + + Initializes a new instance of the NpgsqlParameter. + + The name of the parameter to map. + One of the DbType values. + The length of the parameter. + The 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. + + + + Gets or sets the value of the parameter. + + 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. + + + + Gets or sets a value that indicates whether the parameter accepts null values. + + + + + 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. + + + + 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. + + + + 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. + + + + 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. + + + + Gets or sets the DbType of the parameter. + + One of the DbType values. The default is Object. + + + + Gets or sets the NpgsqlDbType of the parameter. + + One of the NpgsqlDbType values. The default is Unknown. + + + + Gets or sets The name of the NpgsqlParameter. + + The name of the NpgsqlParameter. + The default is an empty string. + + + + Gets or sets The name of the source column that is mapped to the + DataSet and used for loading or + returning the Value. + + The 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. + + One of the DataRowVersion values. + The default is Current. + + + + Source column mapping. + + + + + Used in combination with NpgsqlDbType.Enum or NpgsqlDbType.Array | NpgsqlDbType.Enum to indicate the enum type. + For other NpgsqlDbTypes, this field is not used. + + + + + Used in combination with NpgsqlDbType.Enum or NpgsqlDbType.Composite to indicate the specific enum or composite type. + For other NpgsqlDbTypes, this field is not used. + + + + + The collection to which this parameter belongs, if any. + + + + + The name scrubbed of any optional marker + + + + + Returns whether this parameter has had its type set explicitly via DbType or NpgsqlDbType + (and not via type inference) + + + + + Reset DBType. + + + + + Creates a new NpgsqlParameter that + is a copy of the current instance. + + A new NpgsqlParameter that is a copy of this instance. + + + + 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. + + + + + 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. + + + + + Gets the NpgsqlParameter with the specified name. + + 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. + + + + Adds the specified NpgsqlParameter object to the NpgsqlParameterCollection. + + 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. + + 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, data type and value. + + The name of the NpgsqlParameter. + One of the NpgsqlDbType values. + 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 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 specified value. + + The Value of the NpgsqlParameter to add to the collection. + The paramater that was added. + + + + Adds a NpgsqlParameter to the NpgsqlParameterCollection given the specified data type and value. + + One of the NpgsqlDbType values. + The Value of the NpgsqlParameter to add to the collection. + The paramater that was added. + + + + 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. + + + + 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. + + + + 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. + + + + Removes the specified NpgsqlParameter from the collection using the parameter name. + + The name of the NpgsqlParameter object to retrieve. + + + + 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. + + + + 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. + + + + Report whether the collection is read only. Always false. + + + + + Removes the specified NpgsqlParameter from the collection using a specific index. + + 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. + + + + 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. + + + + 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. + + + + 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. + + + + Removes all items from the collection. + + + + + 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. + + + + Adds the specified NpgsqlParameter object to the NpgsqlParameterCollection. + + The NpgsqlParameter to add to the collection. + The zero-based index of the new NpgsqlParameter object. + + + + Report whether the collection is fixed size. Always false. + + + + + Report whether the collection is synchronized. + + + + + Gets the number of NpgsqlParameter objects in the collection. + + The number of NpgsqlParameter objects in the collection. + + + + Copies NpgsqlParameter objects from the NpgsqlParameterCollection to the specified array. + + An Array to which to copy the NpgsqlParameter objects in the collection. + The starting index of the array. + + + + Sync root. + + + + + Returns an enumerator that can iterate through the collection. + + An IEnumerator that can be used to iterate through the collection. + + + + Add an Array of parameters to the collection. + + Parameters to add. + + + + Get parameter. + + + + + + + Get parameter. + + + + + + + Set parameter. + + + + + + + Set parameter. + + + + + + + Report the offset within the collection of the given parameter. + + Parameter to find. + Index of the parameter, or -1 if the parameter is not present. + + + + Insert the specified parameter into the collection. + + Index of the existing parameter before which to insert the new one. + Parameter to insert. + + + + Report whether the specified parameter is present in the collection. + + Parameter to find. + True if the parameter was found, otherwise false. + + + + Remove the specified parameter from the collection. + + Parameter to remove. + True if the parameter was found and removed, otherwise false. + + + + Convert collection to a System.Array. + + Destination array. + Starting index in destination array. + + + + Convert collection to a System.Array. + + NpgsqlParameter[] + + + + Used when a connection is closed + + + + + Provides an API for a raw binary COPY operation, a high-performance data import/export mechanism to + a PostgreSQL table. Initiated by + + + See http://www.postgresql.org/docs/current/static/sql-copy.html. + + + + + The copy binary format header signature + + + + + Cancels and terminates an ongoing operation. Any data already written will be discarded. + + + + + Writer for a text import, initiated by . + + + See http://www.postgresql.org/docs/current/static/sql-copy.html. + + + + + Cancels and terminates an ongoing import. Any data already written will be discarded. + + + + + Reader for a text export, initiated by . + + + See http://www.postgresql.org/docs/current/static/sql-copy.html. + + + + + Cancels and terminates an ongoing import. + + + + + Provides the underlying mechanism for reading schema information. + + + + + Returns the MetaDataCollections that lists all possible collections. + + The MetaDataCollections + + + + Returns the Restrictions that contains the meaning and position of the values in the restrictions array. + + 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. + + 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. + + + + List of keywords taken from PostgreSQL 9.0 reserved words documentation. + + + + + Represents a single SQL statement within Npgsql. + + Instances aren't constructed directly; users should construct an + object and populate its property as in standard ADO.NET. + Npgsql will analyze that property and constructed instances of + internally. + + Users can retrieve instances from + and access information about statement execution (e.g. affected rows). + + + + + The SQL text of the statement. + + + + + Specifies the type of query, e.g. SELECT. + + + + + The number of rows affected or retrieved. + + + See the command tag in the CommandComplete message, + http://www.postgresql.org/docs/current/static/protocol-message-formats.html + + + + + For an INSERT, the object ID of the inserted row if is 1 and + the target table has OIDs; otherwise 0. + + + + + The RowDescription message for this query. If null, the query does not return rows (e.g. INSERT) + + + + + For prepared statements, holds the server-side prepared statement name. + + + + + Returns the SQL text of the statement. + + + + + Creates a Task<TResult> that's completed successfully with the specified result. + + + In .NET 4.5 Task provides this. In .NET 4.0 with BCL.Async, TaskEx provides this. This + method wraps the two. + + The type of the result returned by the task. + The result to store into the completed task. + The successfully completed task. + + + + Throws an exception with the given string and also invokes a contract failure, allowing the static checker + to detect scenarios leading up to this error. + + See http://blogs.msdn.com/b/francesco/archive/2014/09/12/how-to-use-cccheck-to-prove-no-case-is-forgotten.aspx + + the exception message + an exception to be thrown + + + + Represents a timeout that will expire at some point. + + + + + Holds connector pools indexed by their connection strings. + + + + + Maximum number of possible connections in the pool. + + + + + The exception that is thrown when the PostgreSQL backend reports errors (e.g. query + SQL issues, constraint violations). + + + This exception only corresponds to a PostgreSQL-delivered error. + Other errors (e.g. network issues) will be raised via , + and purely Npgsql-related issues which aren't related to the server will be raised + via the standard CLR exceptions (e.g. ArgumentException). + + See http://www.postgresql.org/docs/current/static/errcodes-appendix.html, + http://www.postgresql.org/docs/current/static/protocol-error-fields.html + + + + + Severity of the error or notice. + Always present. + + + + + The SQLSTATE code for the error. + + + Always present. + See http://www.postgresql.org/docs/current/static/errcodes-appendix.html + + + + + The SQLSTATE code for the error. + + + Always present. + See http://www.postgresql.org/docs/current/static/errcodes-appendix.html + + + + + The primary human-readable error message. This should be accurate but terse. + + + Always present. + + + + + An optional secondary error message carrying more detail about the problem. + May run to multiple lines. + + + + + 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. + May run to multiple lines. + + + + + 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. + 0 means not provided. + + + + + This is defined the same as the field, but it is used when the cursor position refers to an internally generated command rather than the one submitted by the client. + The field will always appear when this field appears. + 0 means not provided. + + + + + The text of a failed internally-generated command. + This could be, for example, a SQL query issued by a PL/pgSQL function. + + + + + An indication of the context in which the error occurred. + Presently this includes a call stack traceback of active PL functions. + The trace is one entry per line, most recent first. + + + + + If the error was associated with a specific database object, the name of the schema containing that object, if any. + + PostgreSQL 9.3 and up. + + + + 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.) + + PostgreSQL 9.3 and up. + + + + 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.) + + PostgreSQL 9.3 and up. + + + + 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.) + + PostgreSQL 9.3 and up. + + + + 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.) + + PostgreSQL 9.3 and up. + + + + The file name of the source-code location where the error was reported. + + PostgreSQL 9.3 and up. + + + + The line number of the source-code location where the error was reported. + + + + + The name of the source-code routine reporting the error. + + + + + Gets a the PostgreSQL error message and code. + + + + + Returns the statement which triggered this exception. + + + + + Gets a collection of key/value pairs that provide additional PostgreSQL fields about the exception. + + + + + Populates a with the data needed to serialize the target object. + + The to populate with data. + The destination (see ) for this serialization. + + + + A non-critical (warning or info) message generated by the backend. + Can be synchronous (i.e. in response to a query) or asynchronous (a totally unrelated + backend-side event). + + + http://www.postgresql.org/docs/current/static/protocol-flow.html#PROTOCOL-ASYNC + + + + + Severity of the error or notice. + Always present. + + + + + The SQLSTATE code for the error. + + + Always present. + See http://www.postgresql.org/docs/current/static/errcodes-appendix.html + + + + + The SQLSTATE code for the error. + + + Always present. + See http://www.postgresql.org/docs/current/static/errcodes-appendix.html + + + + + The primary human-readable error message. This should be accurate but terse. + + + Always present. + + + + + An optional secondary error message carrying more detail about the problem. + May run to multiple lines. + + + + + 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. + May run to multiple lines. + + + + + 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. + 0 means not provided. + + + + + This is defined the same as the field, but it is used when the cursor position refers to an internally generated command rather than the one submitted by the client. + The field will always appear when this field appears. + 0 means not provided. + + + + + The text of a failed internally-generated command. + This could be, for example, a SQL query issued by a PL/pgSQL function. + + + + + An indication of the context in which the error occurred. + Presently this includes a call stack traceback of active PL functions. + The trace is one entry per line, most recent first. + + + + + If the error was associated with a specific database object, the name of the schema containing that object, if any. + + PostgreSQL 9.3 and up. + + + + 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.) + + PostgreSQL 9.3 and up. + + + + 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.) + + PostgreSQL 9.3 and up. + + + + 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.) + + PostgreSQL 9.3 and up. + + + + 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.) + + PostgreSQL 9.3 and up. + + + + The file name of the source-code location where the error was reported. + + PostgreSQL 9.3 and up. + + + + The line number of the source-code location where the error was reported. + + + + + The name of the source-code routine reporting the error. + + + + + Provides data for a notice event. + + + + + The Notice that was sent from the database. + + + + + Receives a raw SQL query as passed in by the user, and performs some processing necessary + before sending to the backend. + This includes doing parameter placebolder processing (@p => $1), and splitting the query + up by semicolons if needed (SELECT 1; SELECT 2) + + Raw user-provided query. + Whether the PostgreSQL session is configured to use standard conformant strings. + The parameters configured on the of this query. + An empty list to be populated with the queries parsed by this method + + + + A class to handle everything associated with SSPI authentication + + + + + Simplified SecBufferDesc struct with only one SecBuffer + + + + + Utility that simplifies awaiting a task with a timeout. If the given task does not + complete within , a is thrown. + + The task to be awaited + How much time to allow to complete before throwing a + An awaitable task that represents the original task plus the timeout + + + + Utility that simplifies awaiting a task with a timeout. If the given task does not + complete within , a is thrown. + + The task to be awaited + How much time to allow to complete before throwing a + An awaitable task that represents the original task plus the timeout + + + + Allows you to cancel awaiting for a non-cancellable task. + + + Read http://blogs.msdn.com/b/pfxteam/archive/2012/10/05/how-do-i-cancel-non-cancelable-async-operations.aspx + and be very careful with this. + + + + + Allows you to cancel awaiting for a non-cancellable task. + + + Read http://blogs.msdn.com/b/pfxteam/archive/2012/10/05/how-do-i-cancel-non-cancelable-async-operations.aspx + and be very careful with this. + + + + + Type handlers that wish to support reading other types in additional to the main one can + implement this interface for all those types. + + + + + A type handler that supports a provider-specific value which is different from the regular value (e.g. + NpgsqlDate and DateTime) + + the regular value type returned by this type handler + the type of the provider-specific value returned by this type handler + + + + A marking interface to allow us to know whether a given type handler has a provider-specific type + distinct from its regular type + + + + + Type handlers that wish to support reading other types in additional to the main one can + implement this interface for all those types. + + + + + Implemented by handlers which support , returns a standard + TextReader given a binary Stream. + + + + + Can be thrown by readers to indicate that interpreting the value failed, but the value was read wholly + and it is safe to continue reading. Any other exception is assumed to leave the row in an unknown state + and the connector is therefore set to Broken. + Note that an inner exception is mandatory, and will get thrown to the user instead of the SafeReadException. + + + + + Maps an Npgsql type handler to a PostgreSQL type. + + A PostgreSQL type name as it appears in the pg_type table. + + A member of which represents this PostgreSQL type. + An with set to + this value will be sent with the type handler mapped by this attribute. + + + All members of which represent this PostgreSQL type. + An with set to + one of these values will be sent with the type handler mapped by this attribute. + + + Any .NET type which corresponds to this PostgreSQL type. + An with set to + one of these values will be sent with the type handler mapped by this attribute. + + + The "primary" which best corresponds to this PostgreSQL type. + When or + set, will be set to this value. + + + + + Read-only parameter + + + + + Returns a string that represents the current object. + + + + + + The name of the destination portal (an empty string selects the unnamed portal). + + + + + The name of the source prepared statement (an empty string selects the unnamed prepared statement). + + + + + Bind is a special message in that it supports the "direct buffer" optimization, which allows us to write + user byte[] data directly to the stream rather than copying it into our buffer. It therefore has its own + special overload of Write below. + + + + + + + The name of the prepared statement or portal to close (an empty string selects the unnamed prepared statement or portal). + + + + + Whether to close a statement or a portal + + + + + The name of the prepared statement or portal to describe (an empty string selects the unnamed prepared statement or portal). + + + + + Whether to describe a statement or a portal + + + + + The query string to be parsed. + + + + + The name of the destination prepared statement (an empty string selects the unnamed prepared statement). + + + + + Creates an MD5 password message. + This is the password, hashed with the username as salt, and hashed again with the backend-provided + salt. + + + + + A frontend message of an arbitrary type that has been pregenerated for efficiency - it is kept + in byte[] form and doesn't have to be serialized for each send. + + + + + Constructs a new pregenerated message. + + The data to be sent for this message, not including the 4-byte length. + Optional string form/description for debugging + + + + A simple query message. + + + + + An logging provider that outputs Npgsql logging messages to standard error. + + + + + Constructs a new + + Only messages of this level of higher will be logged + If true, will output the log level (e.g. WARN). Defaults to false. + If true, will output the connector ID. Defaults to false. + + + + Creates a new instance of the given name. + + + + Used to create logger instances of the given name. + + + + Creates a new INpgsqlLogger instance of the given name. + + + + + A generic interface for logging. + + + + + Manages logging for Npgsql, used to set the loggging provider. + + + + + The logging provider used for logging in Npgsql. + + + + + Determines whether parameter contents will be logged alongside SQL statements - this may reveal sensitive information. + Defaults to false. + + + + + A component which translates a CLR name (e.g. SomeClass) into a database name (e.g. some_class) + according to some scheme. + Used for mapping enum and composite types. + + + + + Given a CLR type name (e.g class, struct, enum), translates its name to a database type name. + + + + + Given a CLR member name (property or field), translates its name to a database type name. + + + + + A name translator which preserves CLR names (e.g. SomeClass) when mapping names to the database. + + + + + Given a CLR type name (e.g class, struct, enum), translates its name to a database type name. + + + + + Given a CLR member name (property or field), translates its name to a database type name. + + + + + A name translator which converts standard CLR names (e.g. SomeClass) to snake-case database + names (some_class) + + + + + Given a CLR type name (e.g class, struct, enum), translates its name to a database type name. + + + + + Given a CLR member name (property or field), translates its name to a database type name. + + + + + A copy of corefx's DbColumn, used only in .NET Framework where we don't have it. + + + See https://github.com/dotnet/corefx/blob/master/src/System.Data.Common/src/System/Data/Common/DbColumn.cs + + + + + Performs some post-setup configuration that's common to both table columns and non-columns. + + + + + Provides schema information about a column. + (e.g. SELECT 8); + + + Note that this can correspond to a field returned in a query which isn't an actual table column + + See https://msdn.microsoft.com/en-us/library/system.data.sqlclient.sqldatareader.getschematable(v=vs.110).aspx + for information on the meaning of the different fields. + + + + + Base class for all type handlers which handle PostgreSQL arrays. + + + http://www.postgresql.org/docs/current/static/arrays.html + + + + + The lower bound value sent to the backend when writing arrays. Normally 1 (the PG default) but + is 0 for OIDVector. + + + + + The type of the elements contained within this array + + + + + + The provider-specific type of the elements contained within this array, + + + + + + The type handler for the element that this array type holds + + + + + Optimized population for one-dimensional arrays without boxing/unboxing + + + + + Recursively populates an array from PB binary data representation. + + + + + http://www.postgresql.org/docs/current/static/arrays.html + + The .NET type contained as an element within this array + The .NET provider-specific type contained as an element within this array + + + + The provider-specific type of the elements contained within this array, + + + + + + Handler for the PostgreSQL bit string type. + Note that for BIT(1), this handler will return a bool by default, to align with SQLClient + (see discussion https://github.com/npgsql/npgsql/pull/362#issuecomment-59622101). + + + http://www.postgresql.org/docs/current/static/datatype-bit.html + + + + + Reads a BitArray from a binary PostgreSQL value. First 32-bit big endian length, + then the data in big-endian. Zero-padded low bits in the end if length is not multiple of 8. + + + + + A special handler for arrays of bit strings. + Differs from the standard array handlers in that it returns arrays of bool for BIT(1) and arrays + of BitArray otherwise (just like the scalar BitStringHandler does). + + + + + http://www.postgresql.org/docs/current/static/datatype-boolean.html + + + + + http://www.postgresql.org/docs/current/static/datatype-binary.html + + + + + Interface implemented by all concrete handlers which handle enums + + + + + The CLR type mapped to the PostgreSQL composite type. + + + + + Type handler for PostgreSQL composite types + + + http://www.postgresql.org/docs/current/static/rowtypes.html + + Encoding: + A 32-bit integer with the number of columns, then for each column: + * An OID indicating the type of the column + * The length of the column(32-bit integer), or -1 if null + * The column data encoded as binary + + the CLR type to map to the PostgreSQL composite type + + + + Interface implemented by all concrete handlers which handle enums + + + + + The CLR enum type mapped to the PostgreSQL enum + + + + + The text handler to which we delegate encoding/decoding of the actual strings + + + + + Type handler for the Postgresql "char" type, used only internally + + + http://www.postgresql.org/docs/current/static/datatype-character.html + + + + + JSONB binary encoding is a simple UTF8 string, but prepended with a version number. + + + + + Prepended to the string in the wire encoding + + + + + Indicates whether the prepended version byte has already been read or written + + + + + The text handler which does most of the encoding/decoding work. + + + + + http://www.postgresql.org/docs/current/static/datatype-money.html + + + + + Type Handler for the postgis geometry type. + + + + + Type handler for PostgreSQL range types + + + Introduced in PostgreSQL 9.2. + http://www.postgresql.org/docs/current/static/rangetypes.html + + the range subtype + + + + The type handler for the element that this range type holds + + + + + Type handler for PostgreSQL record types. + + + http://www.postgresql.org/docs/current/static/datatype-pseudo.html + + Encoding (identical to composite): + A 32-bit integer with the number of columns, then for each column: + * An OID indicating the type of the column + * The length of the column(32-bit integer), or -1 if null + * The column data encoded as binary + + + + + Handles "conversions" for columns sent by the database with unknown OIDs. + This differs from TextHandler in that its a text-only handler (we don't want to receive binary + representations of the types registered here). + Note that this handler is also used in the very initial query that loads the OID mappings + (chicken and egg problem). + Also used for sending parameters with unknown types (OID=0) + + + + + http://www.postgresql.org/docs/current/static/datatype-uuid.html + + + + + http://www.postgresql.org/docs/current/static/datatype-boolean.html + + + + + http://www.postgresql.org/docs/current/static/datatype-datetime.html + + + + + Whether to convert positive and negative infinity values to DateTime.{Max,Min}Value when + a DateTime is requested + + + + + Copied wholesale from Postgresql backend/utils/adt/datetime.c:j2date + + + + + http://www.postgresql.org/docs/current/static/datatype-datetime.html + + + + + A deprecated compile-time option of PostgreSQL switches to a floating-point representation of some date/time + fields. Npgsql (currently) does not support this mode. + + + + + http://www.postgresql.org/docs/current/static/datatype-datetime.html + + + + + A deprecated compile-time option of PostgreSQL switches to a floating-point representation of some date/time + fields. Npgsql (currently) does not support this mode. + + + + + http://www.postgresql.org/docs/current/static/datatype-datetime.html + + + + + A deprecated compile-time option of PostgreSQL switches to a floating-point representation of some date/time + fields. Npgsql (currently) does not support this mode. + + + + + Whether to convert positive and negative infinity values to DateTime.{Max,Min}Value when + a DateTime is requested + + + + + http://www.postgresql.org/docs/current/static/datatype-datetime.html + + + + + http://www.postgresql.org/docs/current/static/datatype-datetime.html + + + + + http://www.postgresql.org/docs/current/static/datatype-textsearch.html + + + + + http://www.postgresql.org/docs/current/static/datatype-textsearch.html + + + + + Type handler for the PostgreSQL geometric box type. + + + http://www.postgresql.org/docs/current/static/datatype-geometric.html + + + + + Type handler for the PostgreSQL geometric circle type. + + + http://www.postgresql.org/docs/current/static/datatype-geometric.html + + + + + Type handler for the PostgreSQL geometric line type. + + + http://www.postgresql.org/docs/current/static/datatype-geometric.html + + + + + Type handler for the PostgreSQL geometric line segment type. + + + http://www.postgresql.org/docs/current/static/datatype-geometric.html + + + + + Type handler for the PostgreSQL geometric path segment type (open or closed). + + + http://www.postgresql.org/docs/current/static/datatype-geometric.html + + + + + Type handler for the PostgreSQL geometric point type. + + + http://www.postgresql.org/docs/current/static/datatype-geometric.html + + + + + Type handler for the PostgreSQL geometric polygon type. + + + http://www.postgresql.org/docs/current/static/datatype-geometric.html + + + + + An int2vector is simply a regular array of shorts, with the sole exception that its lower bound must + be 0 (we send 1 for regular arrays). + + + + + An OIDVector is simply a regular array of uints, with the sole exception that its lower bound must + be 0 (we send 1 for regular arrays). + + + + + http://www.postgresql.org/docs/current/static/datatype-net-types.html + + + + + http://www.postgresql.org/docs/current/static/datatype-net-types.html + + + + + http://www.postgresql.org/docs/current/static/datatype-net-types.html + + + + + http://www.postgresql.org/docs/current/static/datatype-numeric.html + + + + + http://www.postgresql.org/docs/current/static/datatype-numeric.html + + + + + http://www.postgresql.org/docs/current/static/datatype-numeric.html + + + + + http://www.postgresql.org/docs/current/static/datatype-numeric.html + + + + + http://www.postgresql.org/docs/current/static/datatype-numeric.html + + + + + http://www.postgresql.org/docs/current/static/datatype-numeric.html + + + + + http://www.postgresql.org/docs/current/static/datatype-oid.html + + + + + Creates a new TlsClientStream with the given underlying stream. + The handshake must be manually initiated with the method PerformInitialHandshake. + + Base stream + + + + Makes sure there is at least one full record available at _readStart. + Also sets _packetLen (does not include packet header of 5 bytes). + + True on success, false on End Of Stream. + + + + Encrypts a record. + A header should be at startPos containing TLS record type and version. + At startPos + 5 + ivLen the plaintext should start. + + Should point to the beginning of the record (content type) + Plaintext length (without header) + The byte position after the last byte in this encrypted record + + + + This method checks whether there are at least 1 byte that can be read in the buffer. + If not, but there are renegotiation messages in the buffer, these are first processed. + This method should be called between each Read and Write to make sure the buffer is empty before writing. + Only when this method returns false it is safe to call Write. + + Whether we should also look in the underlying NetworkStream + Whether there is available application data + + + + hmac should be initialized with the secret key + + + + + + + + + + Represents the date 1970-01-01 + + + + + Represents the date 0001-01-01 + + + + + A struct similar to .NET DateTime but capable of storing PostgreSQL's timestamp and timestamptz types. + DateTime is capable of storing values from year 1 to 9999 at 100-nanosecond precision, + while PostgreSQL's timestamps store values from 4713BC to 5874897AD with 1-microsecond precision. + + + + + Cast of an to a . + + An equivalent . + + + + Converts the value of the current object to Coordinated Universal Time (UTC). + + + See the MSDN documentation for DateTime.ToUniversalTime(). + Note: this method only takes into account the time zone's base offset, and does + not respect daylight savings. See https://github.com/npgsql/npgsql/pull/684 for more + details. + + + + + Converts the value of the current object to local time. + + + See the MSDN documentation for DateTime.ToLocalTime(). + Note: this method only takes into account the time zone's base offset, and does + not respect daylight savings. See https://github.com/npgsql/npgsql/pull/684 for more + details. + + + + + Returns a new that adds the value of the specified TimeSpan to the value of this instance. + + A positive or negative time interval. + An object whose value is the sum of the date and time represented by this instance and the time interval represented by value. + + + + Returns a new that adds the value of the specified to the value of this instance. + + A positive or negative time interval. + An object whose value is the sum of the date and time represented by this instance and the time interval represented by value. + + + + Returns a new that adds the specified number of years to the value of this instance. + + A number of years. The value parameter can be negative or positive. + An object whose value is the sum of the date and time represented by this instance and the number of years represented by value. + + + + Returns a new that adds the specified number of months to the value of this instance. + + A number of months. The months parameter can be negative or positive. + An object whose value is the sum of the date and time represented by this instance and months. + + + + Returns a new that adds the specified number of days to the value of this instance. + + A number of whole and fractional days. The value parameter can be negative or positive. + An object whose value is the sum of the date and time represented by this instance and the number of days represented by value. + + + + Returns a new that adds the specified number of hours to the value of this instance. + + A number of whole and fractional hours. The value parameter can be negative or positive. + An object whose value is the sum of the date and time represented by this instance and the number of hours represented by value. + + + + Returns a new that adds the specified number of minutes to the value of this instance. + + A number of whole and fractional minutes. The value parameter can be negative or positive. + An object whose value is the sum of the date and time represented by this instance and the number of minutes represented by value. + + + + Returns a new that adds the specified number of minutes to the value of this instance. + + A number of whole and fractional minutes. The value parameter can be negative or positive. + An object whose value is the sum of the date and time represented by this instance and the number of minutes represented by value. + + + + Returns a new that adds the specified number of milliseconds to the value of this instance. + + A number of whole and fractional milliseconds. The value parameter can be negative or positive. Note that this value is rounded to the nearest integer. + An object whose value is the sum of the date and time represented by this instance and the number of milliseconds represented by value. + + + + Returns a new that adds the specified number of ticks to the value of this instance. + + A number of 100-nanosecond ticks. The value parameter can be positive or negative. + An object whose value is the sum of the date and time represented by this instance and the time represented by value. + + + + Implicit cast of a to an + + A + An equivalent . + + + + Explicit cast of an to a . + + An . + An equivalent . + + + + Represents a PostgreSQL data type that can be written or read to the database. + Used in places such as to unambiguously specify + how to encode or decode values. + + See http://www.postgresql.org/docs/current/static/datatype.html + + + + Corresponds to the PostgreSQL 8-byte "bigint" type. + + See http://www.postgresql.org/docs/current/static/datatype-numeric.html + + + + Corresponds to the PostgreSQL 8-byte floating-point "double" type. + + See http://www.postgresql.org/docs/current/static/datatype-numeric.html + + + + Corresponds to the PostgreSQL 4-byte "integer" type. + + See http://www.postgresql.org/docs/current/static/datatype-numeric.html + + + + Corresponds to the PostgreSQL arbitrary-precision "numeric" type. + + See http://www.postgresql.org/docs/current/static/datatype-numeric.html + + + + Corresponds to the PostgreSQL floating-point "real" type. + + See http://www.postgresql.org/docs/current/static/datatype-numeric.html + + + + Corresponds to the PostgreSQL 2-byte "smallint" type. + + See http://www.postgresql.org/docs/current/static/datatype-numeric.html + + + + Corresponds to the PostgreSQL "boolean" type. + + See http://www.postgresql.org/docs/current/static/datatype-boolean.html + + + + Corresponds to the PostgreSQL "enum" type. + + See http://www.postgresql.org/docs/current/static/datatype-enum.html + + + + Corresponds to the PostgreSQL geometric "box" type. + + See http://www.postgresql.org/docs/current/static/datatype-geometric.html + + + + Corresponds to the PostgreSQL geometric "circle" type. + + See http://www.postgresql.org/docs/current/static/datatype-geometric.html + + + + Corresponds to the PostgreSQL geometric "line" type. + + See http://www.postgresql.org/docs/current/static/datatype-geometric.html + + + + Corresponds to the PostgreSQL geometric "lseg" type. + + See http://www.postgresql.org/docs/current/static/datatype-geometric.html + + + + Corresponds to the PostgreSQL geometric "path" type. + + See http://www.postgresql.org/docs/current/static/datatype-geometric.html + + + + Corresponds to the PostgreSQL geometric "point" type. + + See http://www.postgresql.org/docs/current/static/datatype-geometric.html + + + + Corresponds to the PostgreSQL geometric "polygon" type. + + See http://www.postgresql.org/docs/current/static/datatype-geometric.html + + + + Corresponds to the PostgreSQL "money" type. + + See http://www.postgresql.org/docs/current/static/datatype-money.html + + + + Corresponds to the PostgreSQL "char(n)"type. + + See http://www.postgresql.org/docs/current/static/datatype-character.html + + + + Corresponds to the PostgreSQL "text" type. + + See http://www.postgresql.org/docs/current/static/datatype-character.html + + + + Corresponds to the PostgreSQL "varchar" type. + + See http://www.postgresql.org/docs/current/static/datatype-character.html + + + + Corresponds to the PostgreSQL internal "name" type. + + See http://www.postgresql.org/docs/current/static/datatype-character.html + + + + Corresponds to the PostgreSQL "citext" type for the citext module. + + See http://www.postgresql.org/docs/current/static/citext.html + + + + Corresponds to the PostgreSQL "char" type. + + + This is an internal field and should normally not be used for regular applications. + + See http://www.postgresql.org/docs/current/static/datatype-text.html + + + + + Corresponds to the PostgreSQL "bytea" type, holding a raw byte string. + + See http://www.postgresql.org/docs/current/static/datatype-binary.html + + + + Corresponds to the PostgreSQL "date" type. + + See http://www.postgresql.org/docs/current/static/datatype-datetime.html + + + + Corresponds to the PostgreSQL "time" type. + + See http://www.postgresql.org/docs/current/static/datatype-datetime.html + + + + Corresponds to the PostgreSQL "timestamp" type. + + See http://www.postgresql.org/docs/current/static/datatype-datetime.html + + + + Corresponds to the PostgreSQL "timestamp with time zone" type. + + See http://www.postgresql.org/docs/current/static/datatype-datetime.html + + + + Corresponds to the PostgreSQL "interval" type. + + See http://www.postgresql.org/docs/current/static/datatype-datetime.html + + + + Corresponds to the PostgreSQL "time with time zone" type. + + See http://www.postgresql.org/docs/current/static/datatype-datetime.html + + + + Corresponds to the obsolete PostgreSQL "abstime" type. + + See http://www.postgresql.org/docs/current/static/datatype-datetime.html + + + + Corresponds to the PostgreSQL "inet" type. + + See http://www.postgresql.org/docs/current/static/datatype-net-types.html + + + + Corresponds to the PostgreSQL "cidr" type, a field storing an IPv4 or IPv6 network. + + See http://www.postgresql.org/docs/current/static/datatype-net-types.html + + + + Corresponds to the PostgreSQL "macaddr" type, a field storing a 6-byte physical address. + + See http://www.postgresql.org/docs/current/static/datatype-net-types.html + + + + Corresponds to the PostgreSQL "bit" type. + + See http://www.postgresql.org/docs/current/static/datatype-bit.html + + + + Corresponds to the PostgreSQL "varbit" type, a field storing a variable-length string of bits. + + See http://www.postgresql.org/docs/current/static/datatype-boolean.html + + + + Corresponds to the PostgreSQL "tsvector" type. + + See http://www.postgresql.org/docs/current/static/datatype-textsearch.html + + + + Corresponds to the PostgreSQL "tsquery" type. + + See http://www.postgresql.org/docs/current/static/datatype-textsearch.html + + + + Corresponds to the PostgreSQL "uuid" type. + + See http://www.postgresql.org/docs/current/static/datatype-uuid.html + + + + Corresponds to the PostgreSQL "xml" type. + + See http://www.postgresql.org/docs/current/static/datatype-xml.html + + + + Corresponds to the PostgreSQL "json" type, a field storing JSON in text format. + + See http://www.postgresql.org/docs/current/static/datatype-json.html + + + + + Corresponds to the PostgreSQL "jsonb" type, a field storing JSON in an optimized binary + format. + + + Supported since PostgreSQL 9.4. + See http://www.postgresql.org/docs/current/static/datatype-json.html + + + + + Corresponds to the PostgreSQL "hstore" type, a dictionary of string key-value pairs. + + See http://www.postgresql.org/docs/current/static/hstore.html + + + + Corresponds to the PostgreSQL "array" type, a variable-length multidimensional array of + another type. This value must be combined with another value from + via a bit OR (e.g. NpgsqlDbType.Array | NpgsqlDbType.Integer) + + See http://www.postgresql.org/docs/current/static/arrays.html + + + + Corresponds to the PostgreSQL "composite" type. + + See http://www.postgresql.org/docs/current/static/rowtypes.html + + + + Corresponds to the PostgreSQL "array" type, a variable-length multidimensional array of + another type. This value must be combined with another value from + via a bit OR (e.g. NpgsqlDbType.Array | NpgsqlDbType.Integer) + + + Supported since PostgreSQL 9.2. + See http://www.postgresql.org/docs/9.2/static/rangetypes.html + + + + + Corresponds to the PostgreSQL "refcursor" type. + + + + + Corresponds to the PostgreSQL internal "oidvector" type. + + See http://www.postgresql.org/docs/current/static/datatype-oid.html + + + + Corresponds to the PostgreSQL internal "int2vector" type. + + + + + Corresponds to the PostgreSQL "oid" type. + + See http://www.postgresql.org/docs/current/static/datatype-oid.html + + + + Corresponds to the PostgreSQL "xid" type, an internal transaction identifier. + + See http://www.postgresql.org/docs/current/static/datatype-oid.html + + + + Corresponds to the PostgreSQL "cid" type, an internal command identifier. + + See http://www.postgresql.org/docs/current/static/datatype-oid.html + + + + Corresponds to the PostgreSQL "regtype" type, a numeric (OID) ID of a type in the pg_type table. + + + + + Corresponds to the PostgreSQL "tid" type, a tuple id identifying the physical location of a row within its table. + + + + + A special value that can be used to send parameter values to the database without + specifying their type, allowing the database to cast them to another value based on context. + The value will be converted to a string and send as text. + + + This value shouldn't ordinarily be used, and makes sense only when sending a data type + unsupported by Npgsql. + + + + + The geometry type for postgresql spatial extension postgis. + + + + + 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. + + + + 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. + + + + + 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, . + + + + Explicit 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. + + + + Represents a PostgreSQL tsquery. This is the base class for lexeme, not, and and or nodes. + + + + + Node kind + + + + + NodeKind + + + + + Lexeme + + + + + Not operator + + + + + And operator + + + + + Or operator + + + + + Represents the empty tsquery. Should only be used at top level. + + + + + Writes the tsquery in PostgreSQL's text format. + + + + + + Parses a tsquery in PostgreSQL's text format. + + + + + + + TsQuery Lexeme node. + + + + + Lexeme text. + + + + + Weights is a bitmask of the Weight enum. + + + + + Prefix search. + + + + + Creates a tsquery lexeme with only lexeme text. + + Lexeme text. + + + + Creates a tsquery lexeme with lexeme text and weights. + + Lexeme text. + Bitmask of enum Weight. + + + + Creates a tsquery lexeme with lexeme text, weights and prefix search flag. + + Lexeme text. + Bitmask of enum Weight. + Is prefix search? + + + + Weight enum, can be OR'ed together. + + + + + None + + + + + D + + + + + C + + + + + B + + + + + A + + + + + TsQuery Not node. + + + + + Child node + + + + + Creates a not operator, with a given child node. + + + + + + Base class for TsQuery binary operators (& and |). + + + + + Left child + + + + + Right child + + + + + TsQuery And node. + + + + + Creates an and operator, with two given child nodes. + + + + + + + TsQuery Or Node. + + + + + Creates an or operator, with two given child nodes. + + + + + + + Represents an empty tsquery. Shold only be used as top node. + + + + + Creates a tsquery that represents an empty query. Should not be used as child node. + + + + + Represents a PostgreSQL tsvector. + + + + + Constructs an NpgsqlTsVector from a list of lexemes. This also sorts and remove duplicates. + + + + + + Parses a tsvector in PostgreSQL's text format. + + + + + + + Returns the lexeme at a specific index + + + + + + + Gets the number of lexemes. + + + + + Returns an enumerator. + + + + + + Returns an enumerator. + + + + + + Gets a string representation in PostgreSQL's format. + + + + + + Represents a lexeme. A lexeme consists of a text string and optional word entry positions. + + + + + Creates a lexeme with no word entry positions. + + + + + + Creates a lexeme with word entry positions. + + + + + + + Gets or sets the text. + + + + + Gets a word entry position. + + + + + + + Gets the number of word entry positions. + + + + + Creates a string representation in PostgreSQL's format. + + + + + + Represents a word entry position and an optional weight. + + + + + Creates a WordEntryPos with a given position and weight. + + Position values can range from 1 to 16383; larger numbers are silently set to 16383. + A weight labeled between A and D. + + + + The weight is labeled from A to D. D is the default, and not printed. + + + + + The position is a 14-bit unsigned integer indicating the position in the text this lexeme occurs. Cannot be 0. + + + + + Prints this lexeme in PostgreSQL's format, i.e. position is followed by weight (weight is only printed if A, B or C). + + + + + + The weight is labeled from A to D. D is the default, and not printed. + + + + + D, the default + + + + + C + + + + + B + + + + + A + + + + + Represents a PostgreSQL point type. + + + See http://www.postgresql.org/docs/current/static/datatype-geometric.html + + + + + Represents a PostgreSQL line type. + + + See http://www.postgresql.org/docs/current/static/datatype-geometric.html + + + + + Represents a PostgreSQL Line Segment type. + + + + + Represents a PostgreSQL box type. + + + See http://www.postgresql.org/docs/current/static/datatype-geometric.html + + + + + Represents a PostgreSQL Path type. + + + + + Represents a PostgreSQL Polygon type. + + + + + Represents a PostgreSQL Circle type. + + + + + Represents a PostgreSQL inet type, which is a combination of an IPAddress and a + subnet mask. + + + http://www.postgresql.org/docs/current/static/datatype-net-types.html + + + + + Represents a PostgreSQL tid value + + + http://www.postgresql.org/docs/current/static/datatype-oid.html + + + + + Block number + + + + + Tuple index within block + + + + + Indicates that this property or field correspond to a PostgreSQL field with the specified name + + + + + The name of PostgreSQL field that corresponds to this CLR property or field + + + + + Indicates that this property or field correspond to a PostgreSQL field with the specified name + + The name of PostgreSQL field that corresponds to this CLR property or field + + + + Represents the identifier of the Well Known Binary representation of a geographical feature specified by the OGC. + http://portal.opengeospatial.org/files/?artifact_id=13227 Chapter 6.3.2.7 + + + + + The modifiers used by postgis to extend the geomtry's binary representation + + + + + A structure representing a 2D double precision floating point coordinate; + + + + + X coordinate. + + + + + Y coordinate. + + + + + Generates a new BBpoint with the specified coordinates. + + X coordinate + Y coordinate + + + + Represents an Postgis feature. + + + + + returns the binary length of the data structure without header. + + + + + + The Spatial Reference System Identifier of the geometry (0 if unspecified). + + + + + Represents an Postgis 2D Point + + + + + Represents an Ogc 2D LineString + + + + + Represents an Postgis 2D Polygon. + + + + + Represents a Postgis 2D MultiPoint + + + + + Represents a Postgis 2D MultiLineString + + + + + Represents a Postgis 2D MultiPolygon. + + + + + Represents a collection of Postgis feature. + + + + + Indicates that the value of the marked element could be null sometimes, + so the check for null is necessary before its usage. + + + [CanBeNull] public object Test() { return null; } + public void UseTest() { + var p = Test(); + var s = p.ToString(); // Warning: Possible 'System.NullReferenceException' + } + + + + + Indicates that the value of the marked element could never be null. + + + [NotNull] public object Foo() { + return null; // Warning: Possible 'null' assignment + } + + + + + Can be appplied to symbols of types derived from IEnumerable as well as to symbols of Task + and Lazy classes to indicate that the value of a collection item, of the Task.Result property + or of the Lazy.Value property can never be null. + + + + + Can be appplied to symbols of types derived from IEnumerable as well as to symbols of Task + and Lazy classes to indicate that the value of a collection item, of the Task.Result property + or of the Lazy.Value property can be null. + + + + + Indicates that the marked symbol is used implicitly (e.g. via reflection, in external library), + so this symbol will not be marked as unused (as well as by other usage inspections). + + + + + Should be used on attributes and causes ReSharper to not mark symbols marked with such attributes + as unused (as well as by other usage inspections) + + + + Only entity marked with attribute considered used. + + + Indicates implicit assignment to a member. + + + + Indicates implicit instantiation of a type with fixed constructor signature. + That means any unused constructor parameters won't be reported as such. + + + + Indicates implicit instantiation of a type. + + + + Specify what is considered used implicitly when marked + with or . + + + + Members of entity marked with attribute are considered used. + + + Entity marked with attribute and all its members considered used. + + + + This attribute is intended to mark publicly available API + which should not be removed and so is treated as used. + + + + + Describes dependency between method input and output. + + +

Function Definition Table syntax:

+ + FDT ::= FDTRow [;FDTRow]* + FDTRow ::= Input => Output | Output <= Input + Input ::= ParameterName: Value [, Input]* + Output ::= [ParameterName: Value]* {halt|stop|void|nothing|Value} + Value ::= true | false | null | notnull | canbenull + + If method has single input parameter, it's name could be omitted.
+ Using halt (or void/nothing, which is the same) + for method output means that the methos doesn't return normally.
+ canbenull annotation is only applicable for output parameters.
+ You can use multiple [ContractAnnotation] for each FDT row, + or use single attribute with rows separated by semicolon.
+
+ + + [ContractAnnotation("=> halt")] + public void TerminationMethod() + + + [ContractAnnotation("halt <= condition: false")] + public void Assert(bool condition, string text) // regular assertion method + + + [ContractAnnotation("s:null => true")] + public bool IsNullOrEmpty(string s) // string.IsNullOrEmpty() + + + // A method that returns null if the parameter is null, + // and not null if the parameter is not null + [ContractAnnotation("null => null; notnull => notnull")] + public object Transform(object data) + + + [ContractAnnotation("s:null=>false; =>true,result:notnull; =>false, result:null")] + public bool TryParse(string s, out Person result) + + +
+ + + Indicates that the function argument should be string literal and match one + of the parameters of the caller function. For example, ReSharper annotates + the parameter of . + + + public void Foo(string param) { + if (param == null) + throw new ArgumentNullException("par"); // Warning: Cannot resolve symbol + } + + + + + Indicates that IEnumerable, passed as parameter, is not enumerated. + + +
+
diff --git a/packages/Npgsql.3.1.7/lib/netstandard1.3/Npgsql.dll b/packages/Npgsql.3.1.7/lib/netstandard1.3/Npgsql.dll new file mode 100644 index 00000000..fcf62659 Binary files /dev/null and b/packages/Npgsql.3.1.7/lib/netstandard1.3/Npgsql.dll differ diff --git a/packages/Npgsql.3.1.7/lib/netstandard1.3/Npgsql.xml b/packages/Npgsql.3.1.7/lib/netstandard1.3/Npgsql.xml new file mode 100644 index 00000000..afc43e11 --- /dev/null +++ b/packages/Npgsql.3.1.7/lib/netstandard1.3/Npgsql.xml @@ -0,0 +1,6482 @@ + + + + Npgsql + + + + + Base class for all classes which represent a message sent by the PostgreSQL backend. + + + + + Base class for all classes which represent a message sent to the PostgreSQL backend. + Concrete classes which directly inherit this represent arbitrary-length messages which can chunked. + + + + the buffer into which to write the message. + + Whether there was enough space in the buffer to contain the entire message. + If false, the buffer should be flushed and write should be called again. + + + + + Represents a simple frontend message which is typically small and fits well within + the write buffer. The message is first queries for the number of bytes it requires, + and then writes itself out. + + + + + Returns the number of bytes needed to write this message. + + + + + Writes the message contents into the buffer. + + + + + Specifies the type of SQL statement, e.g. SELECT + + + + + The way how to order bytes. + + + + + Most significant byte first (XDR) + + + + + Less significant byte first (NDR) + + + + + Represents a SQL statement or function (stored procedure) to execute + against a PostgreSQL database. This class cannot be inherited. + + + + + Cached version of _connection.Connector, for performance + + + + + Returns details about each statement that this command has executed. + Is only populated when an Execute* method is called. + + + + + If part of the send happens asynchronously (see , + the Task for that remaining send is stored here. + + + + + Indicates whether this command has been prepared. + Never access this field directly, use instead. + + + + + For prepared commands, captures the connection's + at the time the command was prepared. This allows us to know whether the connection was + closed since the command was prepared. + + + + + Initializes a new instance of the NpgsqlCommand class. + + + + + Initializes a new instance of the NpgsqlCommand class with the text of the query. + + The text of the query. + + + + 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. + + + + 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. + + + + 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. + + + + 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 value is 30 seconds. + + + + Gets or sets a value indicating how the + CommandText property is to be interpreted. + + One of the CommandType values. The default is CommandType.Text. + + + + DB connection. + + + + + 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. + + + + Design time visible. + + + + + Gets or sets how command results are applied to the DataRow when used by the + DbDataAdapter.Update(DataSet) method. + + One of the UpdateRowSource values. + + + + Returns whether this query will execute as a prepared (compiled) query. + + + + + Marks all of the query's result columns as either known or unknown. + Unknown results column are requested them from PostgreSQL in text format, and Npgsql makes no + attempt to parse them. They will be accessible as strings only. + + + + + Marks the query's result columns as known or unknown, on a column-by-column basis. + Unknown results column are requested them from PostgreSQL in text format, and Npgsql makes no + attempt to parse them. They will be accessible as strings only. + + + If the query includes several queries (e.g. SELECT 1; SELECT 2), this will only apply to the first + one. The rest of the queries will be fetched and parsed as usual. + + The array size must correspond exactly to the number of result columns the query returns, or an + error will be raised. + + + + + Marks result types to be used when using GetValue on a data reader, on a column-by-column basis. + Used for Entity Framework 5-6 compability. + Only primitive numerical types and DateTimeOffset are supported. + Set the whole array or just a value to null to use default type. + + + + + Gets the current state of the connector + + + + + Creates a new instance of an DbParameter object. + + An DbParameter object. + + + + Creates a new instance of a NpgsqlParameter object. + + A NpgsqlParameter object. + + + + DB parameter collection. + + + + + Gets the NpgsqlParameterCollection. + + The parameters of the SQL statement or function (stored procedure). The default is an empty collection. + + + + Creates a prepared version of the command on a PostgreSQL server. + + + + + This method is used to asynchronously sends all remaining protocol messages for statements + beyond the first one, and *without* waiting for the send to complete. This technique is + used to avoid the deadlock described in #641 by allowing the user to read query results + while at the same time sending messages for later statements. + + + + + Populates the send buffer with protocol messages for the execution of non-prepared statement(s). + + + true whether all messages could be populated in the buffer, false otherwise (method needs to be + called again) + + + + + Populates the send buffer with protocol messages for the execution of prepared statement(s). + + + true whether all messages could be populated in the buffer, false otherwise (method needs to be + called again) + + + + + Populates the send buffer with Parse/Describe protocol messages, used for preparing commands + and for execution in SchemaOnly mode. + + + true whether all messages could be populated in the buffer, false otherwise (method needs to be + called again) + + + + + Populates the send buffer with Parse/Describe protocol messages, used for preparing commands + and for execution in SchemaOnly mode. + + + true whether all messages could be populated in the buffer, false otherwise (method needs to be + called again) + + + + + Executes a SQL statement against the connection and returns the number of rows affected. + + The number of rows affected if known; -1 otherwise. + + + + Asynchronous version of + + The token to monitor for cancellation requests. + A task representing the asynchronous operation, with the number of rows affected if known; -1 otherwise. + + + + 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. + + + + Asynchronous version of + + The token to monitor for cancellation requests. + A task representing the asynchronous operation, with the first column of the + first row in the result set, or a null reference if the result set is empty. + + + + Executes the CommandText against the Connection, and returns an DbDataReader. + + + Unlike the ADO.NET method which it replaces, this method returns a Npgsql-specific + DataReader. + + A DbDataReader object. + + + + Executes the CommandText against the Connection, and returns an DbDataReader using one + of the CommandBehavior values. + + + Unlike the ADO.NET method which it replaces, this method returns a Npgsql-specific + DataReader. + + A DbDataReader object. + + + + Executes the command text against the connection. + + An instance of . + A task representing the operation. + + + + + Executes the command text against the connection. + + + + + DB transaction. + + + + + Gets or sets the NpgsqlTransaction + within which the NpgsqlCommand executes. + + The NpgsqlTransaction. + The default value is a null reference. + + + + Attempts to cancel the execution of a NpgsqlCommand. + + As per the specs, no exception will be thrown by this method in case of failure + + + + Releases the resources used by the NpgsqlCommand. + + + + + Fixes up the text/binary flag on result columns. + Since Prepare() describes a statement rather than a portal, the resulting RowDescription + will have text format on all result columns. Fix that up. + + + Note that UnknownResultTypeList only applies to the first query, while AllResultTypesAreUnknown applies + to all of them. + + + + + Create a new command based on this one. + + A new NpgsqlCommand object. + + + + This class represents a connection to a PostgreSQL server. + + + + + The parsed connection string set by the user + + + + + The actual string provided by the user for the connection string + + + + + The connector object connected to the backend. + + + + + A counter that gets incremented every time the connection is (re-)opened. + This allows us to identify an "instance" of connection, which is useful since + some resources are released when a connection is closed (e.g. prepared statements). + + + + + The default TCP/IP port for PostgreSQL. + + + + + Maximum value for connection timeout. + + + + + Initializes a new instance of the + NpgsqlConnection class. + + + + + Initializes a new instance of the + NpgsqlConnection class + and sets the ConnectionString. + + 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. + + + + Opens a database connection with the property settings specified by the + ConnectionString. + + + + + This is the asynchronous version of . + + + Do not invoke other methods and properties of the object until the returned Task is complete. + + The cancellation instruction. + A task representing the asynchronous operation. + + + + Gets or sets the string used to connect to a PostgreSQL database. See the manual for details. + + The connection string that includes the server name, + the database name, and other parameters needed to establish + the initial connection. The default value is an empty string. + + + + + Backend server host name. + + + + + Backend server port. + + + + + If true, the connection will attempt to use SslStream instead of an internal TlsClientStream. + + + + + Gets 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 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 the name of the current database or the database to be used after a connection is opened. + + The name of the current database or the name of the database to be + used after a connection is opened. The default value is the empty string. + + + + Gets the string identifying the database server (host and port) + + + + + Whether to use Windows integrated security to log in. + + + + + User name. + + + + + Gets the current state of the connection. + + A bitwise combination of the ConnectionState values. The default is Closed. + + + + Gets whether the current state of the connection is Open or Closed + + ConnectionState.Open, ConnectionState.Closed or ConnectionState.Connecting + + + + Creates and returns a DbCommand + object associated with the IDbConnection. + + A DbCommand object. + + + + Creates and returns a NpgsqlCommand + object associated with the NpgsqlConnection. + + A NpgsqlCommand object. + + + + Begins a database transaction with the specified isolation level. + + The isolation level under which the transaction should run. + An DbTransaction + object representing the new transaction. + + Currently the IsolationLevel ReadCommitted and Serializable are supported by the PostgreSQL backend. + There's no support for nested transactions. + + + + + Begins a database transaction. + + A NpgsqlTransaction + object representing the new transaction. + + Currently there's no support for nested transactions. Transactions created by this method will have Read Committed isolation level. + + + + + Begins a database transaction with the specified isolation level. + + The isolation level under which the transaction should run. + A NpgsqlTransaction + object representing the new transaction. + + Currently the IsolationLevel ReadCommitted and Serializable are supported by the PostgreSQL backend. + There's no support for nested transactions. + + + + + 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. + + + + + 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. + + + + + Closes ongoing operations, i.e. an open reader exists or a COPY operation still in progress, as + part of a connection close. + Does nothing if the thread has been aborted - the connector will be closed immediately. + + + + + Releases all resources used by the + NpgsqlConnection. + + true when called from Dispose(); + false when being called from the finalizer. + + + + Occurs on NoticeResponses from the PostgreSQL backend. + + + + + Occurs on NotificationResponses from the PostgreSQL backend. + + + + + Returns whether SSL is being used for the connection. + + + + + Selects the local Secure Sockets Layer (SSL) certificate used for authentication. + + + See + + + + + Verifies the remote Secure Sockets Layer (SSL) certificate used for authentication. + Ignored if is set. + + + See + + + + + Version of the PostgreSQL backend. + This can only be called when there is an active connection. + + + + + PostgreSQL server version. + + + + + Process id of backend server. + 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). + + + + + Begins a binary COPY FROM STDIN operation, a high-performance data import mechanism to a PostgreSQL table. + + A COPY FROM STDIN SQL command + A which can be used to write rows and columns + + See http://www.postgresql.org/docs/current/static/sql-copy.html. + + + + + Begins a binary COPY TO STDOUT operation, a high-performance data export mechanism from a PostgreSQL table. + + A COPY TO STDOUT SQL command + A which can be used to read rows and columns + + See http://www.postgresql.org/docs/current/static/sql-copy.html. + + + + + Begins a textual COPY FROM STDIN operation, a data import mechanism to a PostgreSQL table. + It is the user's responsibility to send the textual input according to the format specified + in . + + A COPY FROM STDIN SQL command + + A TextWriter that can be used to send textual data. + + See http://www.postgresql.org/docs/current/static/sql-copy.html. + + + + + Begins a textual COPY TO STDOUT operation, a data export mechanism from a PostgreSQL table. + It is the user's responsibility to parse the textual input according to the format specified + in . + + A COPY TO STDOUT SQL command + + A TextReader that can be used to read textual data. + + See http://www.postgresql.org/docs/current/static/sql-copy.html. + + + + + Begins a raw binary COPY operation (TO STDOUT or FROM STDIN), a high-performance data export/import mechanism to a PostgreSQL table. + Note that unlike the other COPY API methods, doesn't implement any encoding/decoding + and is unsuitable for structured import/export operation. It is useful mainly for exporting a table as an opaque + blob, for the purpose of importing it back later. + + A COPY TO STDOUT or COPY FROM STDIN SQL command + A that can be used to read or write raw binary data. + + See http://www.postgresql.org/docs/current/static/sql-copy.html. + + + + + Maps a CLR enum to a PostgreSQL enum type for use with this connection. + + + CLR enum labels are mapped by name to PostgreSQL enum labels. + The translation strategy can be controlled by the parameter, + which defaults to . + You can also use the on your enum fields to manually specify a PostgreSQL enum label. + If there is a discrepancy between the .NET and database labels while an enum is read or written, + an exception will be raised. + + Can only be invoked on an open connection; if the connection is closed the mapping is lost. + + To avoid mapping the type for each connection, use the method. + + + A PostgreSQL type name for the corresponding enum type in the database. + If null, the name translator given in will be used. + + + A component which will be used to translate CLR names (e.g. SomeClass) into database names (e.g. some_class). + Defaults to + + The .NET enum type to be mapped + + + + Maps a CLR enum to a PostgreSQL enum type for use with all connections created from now on. Existing connections aren't affected. + + + CLR enum labels are mapped by name to PostgreSQL enum labels. + The translation strategy can be controlled by the parameter, + which defaults to . + You can also use the on your enum fields to manually specify a PostgreSQL enum label. + If there is a discrepancy between the .NET and database labels while an enum is read or written, + an exception will be raised. + + To map the type for a specific connection, use the method. + + + A PostgreSQL type name for the corresponding enum type in the database. + If null, the name translator given in will be used. + + + A component which will be used to translate CLR names (e.g. SomeClass) into database names (e.g. some_class). + Defaults to + + The .NET enum type to be mapped + + + + Removes a previous global enum mapping. + + + A PostgreSQL type name for the corresponding enum type in the database. + If null, the name translator given in will be used. + + + A component which will be used to translate CLR names (e.g. SomeClass) into database names (e.g. some_class). + Defaults to + + + + + Maps a CLR type to a PostgreSQL composite type for use with this connection. + + + CLR fields and properties by string to PostgreSQL enum labels. + The translation strategy can be controlled by the parameter, + which defaults to . + You can also use the on your members to manually specify a PostgreSQL enum label. + If there is a discrepancy between the .NET and database labels while a composite is read or written, + an exception will be raised. + + Can only be invoked on an open connection; if the connection is closed the mapping is lost. + + To avoid mapping the type for each connection, use the method. + + + A PostgreSQL type name for the corresponding enum type in the database. + If null, the name translator given in will be used. + + + A component which will be used to translate CLR names (e.g. SomeClass) into database names (e.g. some_class). + Defaults to + + The .NET type to be mapped + + + + Maps a CLR type to a PostgreSQL composite type for use with all connections created from now on. Existing connections aren't affected. + + + CLR fields and properties by string to PostgreSQL enum labels. + The translation strategy can be controlled by the parameter, + which defaults to . + You can also use the on your members to manually specify a PostgreSQL enum label. + If there is a discrepancy between the .NET and database labels while a composite is read or written, + an exception will be raised. + + To map the type for a specific connection, use the method. + + + A PostgreSQL type name for the corresponding enum type in the database. + If null, the name translator given in will be used. + + + A component which will be used to translate CLR names (e.g. SomeClass) into database names (e.g. some_class). + Defaults to + + The .NET type to be mapped + + + + Removes a previous global enum mapping. + + + A PostgreSQL type name for the corresponding enum type in the database. + If null, the name translator given in will be used. + + + A component which will be used to translate CLR names (e.g. SomeClass) into database names (e.g. some_class). + Defaults to + + + + + Waits until an asynchronous PostgreSQL messages (e.g. a notification) arrives, and + exits immediately. The asynchronous message is delivered via the normal events + (, ). + + + The time-out value, in milliseconds, passed to . + The default value is 0, which indicates an infinite time-out period. + Specifying -1 also indicates an infinite time-out period. + + true if an asynchronous message was received, false if timed out. + + + + Waits until an asynchronous PostgreSQL messages (e.g. a notification) arrives, and + exits immediately. The asynchronous message is delivered via the normal events + (, ). + + + The time-out value is passed to . + + true if an asynchronous message was received, false if timed out. + + + + Waits until an asynchronous PostgreSQL messages (e.g. a notification) arrives, and + exits immediately. The asynchronous message is delivered via the normal events + (, ). + + + + + Waits asynchronously until an asynchronous PostgreSQL messages (e.g. a notification) + arrives, and exist immediately. The asynchronous message is delivered via the normal events + (, ). + + + + + Waits asynchronously until an asynchronous PostgreSQL messages (e.g. a notification) + arrives, and exist immediately. The asynchronous message is delivered via the normal events + (, ). + + + + + Remove password from externally-visible ConnectionString, but leave it in + the internally visible one - we need it for the connection pool key, Clone() etc. + + + + + Creates a closed connection with the connection string and authentication details of this message. + + + + + Clones this connection, replacing its connection string with the given one. + This allows creating a new connection with the same security information + (password, SSL callbacks) while changing other connection parameters (e.g. + database or pooling) + + + + + This method changes the current database by disconnecting from the actual + database and connecting to the specified. + + The name of the database to use in place of the current database. + + + + Clear connection pool. + + + + + Clear all connection pools. + + + + + Flushes the type cache for this connection's connection string and reloads the + types for this connection only. + + + + + Represents a connection to a PostgreSQL backend. Unlike NpgsqlConnection objects, which are + exposed to users, connectors are internal to Npgsql and are recycled by the connection pool. + + + Represents a connection to a PostgreSQL backend. Unlike NpgsqlConnection objects, which are + exposed to users, connectors are internal to Npgsql and are recycled by the connection pool. + + + + + The physical connection socket to the backend. + + + + + The physical connection stream to the backend, without anything on top. + + + + + The physical connection stream to the backend, layered with an SSL/TLS stream if in secure mode. + + + + + Contains the clear text password which was extracted from the user-provided connection string. + If non-cleartext authentication is requested from the server, this is set to null. + + + + + Buffer used for reading data. + + + + + Buffer used for writing data. + + + + + Version of backend server this connector is connected to. + + + + + The secret key of the backend for this connector, used for query cancellation. + + + + + The process ID of the backend for this connector. + + + + + A unique ID identifying this connector, used for logging. Currently mapped to BackendProcessId + + + + + The current transaction status for this connector. + + + + + The transaction currently in progress, if any. + + + + Note that this doesn't mean a transaction request has actually been sent to the backend - for + efficiency we defer sending the request to the first query after BeginTransaction is called. + See for the actual transaction status. + + + Also, the user can initiate a transaction in SQL (i.e. BEGIN), in which case there will be no + NpgsqlTransaction instance. As a result, never check to know whether + a transaction is in progress, check instead. + + + + + + The NpgsqlConnection that (currently) owns this connector. Null if the connector isn't + owned (i.e. idle in the pool) + + + + + The number of messages that were prepended to the current message chain, but not yet sent. + Note that this only tracks messages which produce a ReadyForQuery message + + + + + If the connector is currently in COPY mode, holds a reference to the importer/exporter object. + Otherwise null. + + + + + Holds all run-time parameters received from the backend (via ParameterStatus messages) + + + + + The timeout for reading messages that are part of the user's command + (i.e. which aren't internal prepended commands). + + + + + Contains the current value of the socket's ReceiveTimeout, used to determine whether + we need to change it when commands are received. + + + + + A lock that's taken while a user action is in progress, e.g. a command being executed. + + + + + A lock that's taken while a connection keepalive is in progress. Used to make sure + keepalives and user actions don't interfere with one another. + + + + + A lock that's taken while a cancellation is being delivered; new queries are blocked until the + cancellation is delivered. This reduces the chance that a cancellation meant for a previous + command will accidentally cancel a later one, see #615. + + + + + If pooled, the timestamp when this connector was returned to the pool. + + + + + The minimum timeout that can be set on internal commands such as COMMIT, ROLLBACK. + + + + + Creates a new connector with the given connection string. + + The connection string. + The clear-text password or null if not using a password. + + + + Gets the current state of the connector + + + + + Returns whether the connector is open, regardless of any task it is currently performing + + + + + Totally temporary until the connection pool is rewritten with timeout support + + + + + Opens the physical connection to the server. + + Usually called by the RequestConnector + Method of the connection pool manager. + + + + Performs a step in the PostgreSQL authentication protocol + + The username being used to connect. + A message read from the server, instructing us on the required response + a PasswordMessage to be sent, or null if authentication has completed successfully + + + + Prepends a message to be sent at the beginning of the next message chain. + + + + + Sends a single frontend message, used for simple messages such as rollback, etc. + Note that additional prepend messages may be previously enqueued, and will be sent along + with this message. + + + + + + Reads backend messages and discards them, stopping only after a message of the given type has + been seen. + + + + + Reads backend messages and discards them, stopping only after a message of the given types has + been seen. + + + + + Reads a single message, expecting it to be of type . + Any other message causes an exception to be raised and the connector to be broken. + Asynchronous messages (e.g. Notice) are treated and ignored. ErrorResponses raise an + exception but do not cause the connector to break. + + + + + Reads a PostgreSQL asynchronous message (e.g. notification). + This has nothing to do with .NET async processing of messages or queries. + + + + + Handles a new transaction indicator received on a ReadyForQuery message + + + + + Occurs on NoticeResponses from the PostgreSQL backend. + + + + + Occurs on NotificationResponses from the PostgreSQL backend. + + + + + Returns whether SSL is being used for the connection + + + + + Creates another connector and sends a cancel request through it for this connector. + + + + + Called when an unexpected message has been received during an action. Breaks the + connector and returns the appropriate message. + + + + + Called when a connector becomes completely unusable, e.g. when an unexpected I/O exception is raised or when + we lose protocol sync. + Note that fatal errors during the Open phase do *not* pass through here. + + + + + Closes the socket and cleans up client-side resources associated with this connector. + + + + + Called when a pooled connection is closed, and its connector is returned to the pool. + Resets the connector back to its initial state, releasing server-side sources + (e.g. prepared statements), resetting parameters to their defaults, and resetting client-side + state + + + + + An IDisposable wrapper around and + . + + + + + Whether the backend is an AWS Redshift instance + + + + + Returns next plan index. + + + + + Reads a forward-only stream of rows from a data source. + + + Reads a forward-only stream of rows from a data source. + + + + + Holds the list of statements being executed by this reader. + + + + + The index of the current query resultset we're processing (within a multiquery) + + + + + The RowDescription message for the current resultset being processed + + + + + Indicates that at least one row has been read across all result sets + + + + + Whether the current result set has rows + + + + + If HasRows was called before any rows were read, it was forced to read messages. A pending + message may be stored here for processing in the next Read() or NextResult(). + + + + + Is raised whenever Close() is called. + + + + + In non-sequential mode, contains the cached values already read from the current row + + + + + The first row in a stored procedure command that has output parameters needs to be traversed twice - + once for populating the output parameters and once for the actual result set traversal. So in this + case we can't be sequential. + + + + + Advances the reader to the next record in a result set. + + true if there are more rows; otherwise false. + + The default position of a data reader is before the first record. Therefore, you must call Read to begin accessing data. + + + + + This is the asynchronous version of The cancellation token is currently ignored. + + Ignored for now. + A task representing the asynchronous operation. + + + + Advances the reader to the next result when reading the results of a batch of statements. + + + + + + This is the asynchronous version of NextResult. + The parameter is currently ignored. + + Currently ignored. + A task representing the asynchronous operation. + + + + Note that in SchemaOnly mode there are no resultsets, and we read nothing from the backend (all + RowDescriptions have already been processed and are available) + + + + + Gets a value indicating the depth of nesting for the current row. Always returns zero. + + + + + Gets a value indicating whether the data reader is closed. + + + + + Gets the number of rows changed, inserted, or deleted by execution of the SQL statement. + + + + + Returns details about each statement that this reader will or has executed. + + + Note that some fields (i.e. rows and oid) are only populated as the reader + traverses the result. + + For commands with multiple queries, this exposes the number of rows affected on + a statement-by-statement basis, unlike + which exposes an aggregation across all statements. + + + + + Gets a value that indicates whether this DbDataReader contains one or more rows. + + + + + Indicates whether the reader is currently positioned on a row, i.e. whether reading a + column is possible. + This property is different from in that will + return true even if attempting to read a column will fail, e.g. before + has been called + + + + + Gets the name of the column, given the zero-based column ordinal. + + The zero-based column ordinal. + The name of the specified column. + + + + Gets the number of columns in the current row. + + + + + Consumes all result sets for this reader, leaving the connector ready for sending and processing further + queries + + + + + Releases the resources used by the NpgsqlDataReader. + + + + + Closes the object. + + + + + Returns the current row, or throws an exception if a row isn't available + + + + + Gets the value of the specified column as a Boolean. + + The zero-based column ordinal. + The value of the specified column. + + + + Gets the value of the specified column as a byte. + + The zero-based column ordinal. + The value of the specified column. + + + + Gets the value of the specified column as a single character. + + The zero-based column ordinal. + The value of the specified column. + + + + Gets the value of the specified column as a 16-bit signed integer. + + The zero-based column ordinal. + The value of the specified column. + + + + Gets the value of the specified column as a 32-bit signed integer. + + The zero-based column ordinal. + The value of the specified column. + + + + Gets the value of the specified column as a 64-bit signed integer. + + The zero-based column ordinal. + The value of the specified column. + + + + Gets the value of the specified column as a object. + + The zero-based column ordinal. + The value of the specified column. + + + + Gets the value of the specified column as an instance of . + + The zero-based column ordinal. + The value of the specified column. + + + + Gets the value of the specified column as a object. + + The zero-based column ordinal. + The value of the specified column. + + + + Gets the value of the specified column as a double-precision floating point number. + + The zero-based column ordinal. + The value of the specified column. + + + + Gets the value of the specified column as a single-precision floating point number. + + The zero-based column ordinal. + The value of the specified column. + + + + Gets the value of the specified column as a globally-unique identifier (GUID). + + The zero-based column ordinal. + The value of the specified column. + + + + Populates an array of objects with the column values of the current row. + + An array of Object into which to copy the attribute columns. + The number of instances of in the array. + + + + Gets the value of the specified column as an instance of . + + The zero-based column ordinal. + The value of the specified column. + + + + Gets the value of the specified column as an , + Npgsql's provider-specific type for dates. + + + PostgreSQL's date type represents dates from 4713 BC to 5874897 AD, while .NET's DateTime + only supports years from 1 to 1999. If you require years outside this range use this accessor. + The standard method will also return this type, but has + the disadvantage of boxing the value. + See http://www.postgresql.org/docs/current/static/datatype-datetime.html + + The zero-based column ordinal. + The value of the specified column. + + + + Gets the value of the specified column as a TimeSpan, + + + PostgreSQL's interval type has has a resolution of 1 microsecond and ranges from + -178000000 to 178000000 years, while .NET's TimeSpan has a resolution of 100 nanoseconds + and ranges from roughly -29247 to 29247 years. + See http://www.postgresql.org/docs/current/static/datatype-datetime.html + + The zero-based column ordinal. + The value of the specified column. + + + + Gets the value of the specified column as an , + Npgsql's provider-specific type for time spans. + + + PostgreSQL's interval type has has a resolution of 1 microsecond and ranges from + -178000000 to 178000000 years, while .NET's TimeSpan has a resolution of 100 nanoseconds + and ranges from roughly -29247 to 29247 years. If you require values from outside TimeSpan's + range use this accessor. + The standard ADO.NET method will also return this + type, but has the disadvantage of boxing the value. + See http://www.postgresql.org/docs/current/static/datatype-datetime.html + + The zero-based column ordinal. + The value of the specified column. + + + + Gets the value of the specified column as an , + Npgsql's provider-specific type for date/time timestamps. Note that this type covers + both PostgreSQL's "timestamp with time zone" and "timestamp without time zone" types, + which differ only in how they are converted upon input/output. + + + PostgreSQL's timestamp type represents dates from 4713 BC to 5874897 AD, while .NET's DateTime + only supports years from 1 to 1999. If you require years outside this range use this accessor. + The standard method will also return this type, but has + the disadvantage of boxing the value. + See http://www.postgresql.org/docs/current/static/datatype-datetime.html + + The zero-based column ordinal. + The value of the specified column. + + + + Reads a stream of bytes from the specified column, starting at location indicated by dataOffset, into the buffer, starting at the location indicated by bufferOffset. + + The zero-based column ordinal. + The index within the row from which to begin the read operation. + The buffer into which to copy the data. + The index with the buffer to which the data will be copied. + The maximum number of characters to read. + The actual number of bytes read. + + + + Retrieves data as a . + + The zero-based column ordinal. + The returned object. + + + + Reads a stream of characters from the specified column, starting at location indicated by dataOffset, into the buffer, starting at the location indicated by bufferOffset. + + The zero-based column ordinal. + The index within the row from which to begin the read operation. + The buffer into which to copy the data. + The index with the buffer to which the data will be copied. + The maximum number of characters to read. + The actual number of characters read. + + + + Retrieves data as a . + + The zero-based column ordinal. + The returned object. + + + + Gets a value that indicates whether the column contains nonexistent or missing values. + + The zero-based column ordinal. + true if the specified column is equivalent to ; otherwise false. + + + + An asynchronous version of , which gets a value that indicates whether the column contains non-existent or missing values. + The parameter is currently ignored. + + The zero-based column to be retrieved. + Currently ignored. + true if the specified column value is equivalent to otherwise false. + + + + Gets the value of the specified column as an instance of . + + The name of the column. + The value of the specified column. + + + + Gets the column ordinal given the name of the column. + + The name of the column. + The zero-based column ordinal. + + + + Gets the data type information for the specified field. + This will be the PostgreSQL type name (e.g. int4) as in the pg_type table, + not the .NET type (see for that). + + The zero-based column index. + + + + + Gets the OID for the PostgreSQL type for the specified field, as it appears in the pg_type table. + + + This is a PostgreSQL-internal value that should not be relied upon and should only be used for + debugging purposes. + + The zero-based column index. + + + + + Gets the data type of the specified column. + + The zero-based column ordinal. + The data type of the specified column. + + + + Returns the provider-specific field type of the specified column. + + The zero-based column ordinal. + The Type object that describes the data type of the specified column. + + + + Gets the value of the specified column as an instance of . + + The zero-based column ordinal. + The value of the specified column. + + + + Synchronously gets the value of the specified column as a type. + + Synchronously gets the value of the specified column as a type. + The column to be retrieved. + The column to be retrieved. + + + + Asynchronously gets the value of the specified column as a type. + The parameter is currently ignored. + + The type of the value to be returned. + The column to be retrieved. + Currently ignored. + A task representing the asynchronous operation. + + + + Gets the value of the specified column as an instance of . + + The zero-based column ordinal. + The value of the specified column. + + + + Gets all provider-specific attribute columns in the collection for the current row. + + An array of Object into which to copy the attribute columns. + The number of instances of in the array. + + + + Returns an that can be used to iterate through the rows in the data reader. + + An that can be used to iterate through the rows in the data reader. + + + + Returns schema information for the columns in the current resultset. + + + + + + Large object manager. This class can be used to store very large files in a PostgreSQL database. + + + Large object manager. This class can be used to store very large files in a PostgreSQL database. + + + + + The largest chunk size (in bytes) read and write operations will read/write each roundtrip to the network. Default 4 MB. + + + + + Creates an NpgsqlLargeObjectManager for this connection. The connection must be opened to perform remote operations. + + + + + + Execute a function + + + + + + + + Execute a function that returns a byte array + + + + + + Create an empty large object in the database. If an oid is specified but is already in use, an PostgresException will be thrown. + + A preferred oid, or specify 0 if one should be automatically assigned + The oid for the large object created + If an oid is already in use + + + + Opens a large object on the backend, returning a stream controlling this remote object. + A transaction snapshot is taken by the backend when the object is opened with only read permissions. + When reading from this object, the contents reflects the time when the snapshot was taken. + Note that this method, as well as operations on the stream must be wrapped inside a transaction. + + Oid of the object + An NpgsqlLargeObjectStream + + + + Opens a large object on the backend, returning a stream controlling this remote object. + Note that this method, as well as operations on the stream must be wrapped inside a transaction. + + Oid of the object + An NpgsqlLargeObjectStream + + + + Deletes a large object on the backend. + + Oid of the object to delete + + + + Exports a large object stored in the database to a file on the backend. This requires superuser permissions. + + Oid of the object to export + Path to write the file on the backend + + + + Imports a large object to be stored as a large object in the database from a file stored on the backend. This requires superuser permissions. + + Path to read the file on the backend + A preferred oid, or specify 0 if one should be automatically assigned + + + + Since PostgreSQL 9.3, large objects larger than 2GB can be handled, up to 4TB. + This property returns true whether the PostgreSQL version is >= 9.3. + + + + + An interface to remotely control the seekable stream for an opened large object on a PostgreSQL server. + Note that the OpenRead/OpenReadWrite method as well as all operations performed on this stream must be wrapped inside a database transaction. + + + An interface to remotely control the seekable stream for an opened large object on a PostgreSQL server. + Note that the OpenRead/OpenReadWrite method as well as all operations performed on this stream must be wrapped inside a database transaction. + + + + + Since PostgreSQL 9.3, large objects larger than 2GB can be handled, up to 4TB. + This property returns true whether the PostgreSQL version is >= 9.3. + + + + + Reads count bytes from the large object. The only case when fewer bytes are read is when end of stream is reached. + + The buffer where read data should be stored. + The offset in the buffer where the first byte should be read. + The maximum number of bytes that should be read. + How many bytes actually read, or 0 if end of file was already reached. + + + + Writes count bytes to the large object. + + The buffer to write data from. + The offset in the buffer at which to begin copying bytes. + The number of bytes to write. + + + + CanTimeout always returns false. + + + + + CanRead always returns true, unless the stream has been closed. + + + + + CanWrite returns true if the stream was opened with write permissions, and the stream has not been closed. + + + + + CanSeek always returns true, unless the stream has been closed. + + + + + Returns the current position in the stream. Getting the current position does not need a round-trip to the server, however setting the current position does. + + + + + Gets the length of the large object. This internally seeks to the end of the stream to retrieve the length, and then back again. + + + + + Seeks in the stream to the specified position. This requires a round-trip to the backend. + + A byte offset relative to the origin parameter. + A value of type SeekOrigin indicating the reference point used to obtain the new position. + + + + + Does nothing. + + + + + Truncates or enlarges the large object to the given size. If enlarging, the large object is extended with null bytes. + For PostgreSQL versions earlier than 9.3, the value must fit in an Int32. + + Number of bytes to either truncate or enlarge the large object. + + + + Releases resources at the backend allocated for this stream. + + + + + Releases resources at the backend allocated for this stream, iff disposing is true. + + Whether to release resources allocated at the backend. + + + + Represents a transaction to be made in a PostgreSQL database. This class cannot be inherited. + + + Represents a transaction to be made in a PostgreSQL database. This class cannot be inherited. + + + + + Specifies the object associated with the transaction. + + The object associated with the transaction. + + + + Specifies the completion state of the transaction. + + The completion state of the transaction. + + + + Specifies the object associated with the transaction. + + The object associated with the transaction. + + + + Specifies the IsolationLevel for this transaction. + + The IsolationLevel for this transaction. + The default is ReadCommitted. + + + + Commits the database transaction. + + + + + Commits the database transaction. + + + + + Commits the database transaction. + + + + + Rolls back a transaction from a pending state. + + + + + Rolls back a transaction from a pending state. + + + + + Rolls back a transaction from a pending state. + + + + + Creates a transaction save point. + + + + + Rolls back a transaction from a pending savepoint state. + + + + + Rolls back a transaction from a pending savepoint state. + + + + + Dispose. + + + + + + Open connectors waiting to be requested by new connections + + + + + Incremented every time this pool is cleared via or + . Allows us to identify connections which were + created before the clear. + + + + + Attempts to ensure, on a best-effort basis, that there are enough connections to meet MinPoolSize. + This method never throws an exception. + + + + + The total byte length of the buffer. + + + + + Used for internal temporary purposes + + + + + The minimum buffer size possible. + + + + + Reads in the requested bytes into the buffer, or if the buffer isn't big enough, allocates a new + temporary buffer and reads into it. Returns the buffer that contains the data (either itself or the + temp buffer). Used in cases where we absolutely have to have an entire value in memory and cannot + read it in sequentially. + + + + + Seeks the first null terminator (\0) and returns the string up to it. The buffer must already + contain the entire string and its terminator. + + + + + Seeks the first null terminator (\0) and returns the string up to it. The buffer must already + contain the entire string and its terminator. + + Decodes the messages with this encoding. + + + + Note that unlike the primitive readers, this reader can read any length, looping internally + and reading directly from the underlying stream. + + output buffer to fill + offset in the output buffer in which to start writing + number of character to be read into the output buffer + number of bytes left in the field. This method will not read bytes + beyond this count + The number of bytes actually read. + The number of characters actually read. + the number of bytes read + + + + Skips over characters in the buffer, reading from the underlying stream as necessary. + + the number of characters to skip over. + int.MaxValue means all available characters (limited only by ). + + the maximal number of bytes to process + The number of bytes actually skipped. + The number of characters actually skipped. + the number of bytes read + + + + Seeks within the current in-memory data. Does not read any data from the underlying. + + + + + + + Creates a type handler for arrays of this handler's type. + + + + + Creates a type handler for ranges of this handler's type. + + + + + + + + + + + + + + + + + + + A type handler may implement ISimpleTypeHandler for types other than its primary one. + This is why this method has type parameter T2 and not T. + + + + the value to be examined + a cache in which to store length(s) of values to be written + + the containing . Consulted for settings + which impact how to send the parameter, e.g. . Can be null. + + + + the value to be written + + a cache in which to store length(s) of values to be written + + the containing . Consulted for settings + which impact how to send the parameter, e.g. . Can be null. + . + + + + + A type handler may implement IChunkingTypeHandler for types other than its primary one. + This is why this method has type parameter T2 and not T. + + + + + Maps CLR types to their type handlers. + + + + + Maps CLR types to their array handlers. + + + + + A counter that is updated when this registry activates its global mappings. + Tracks , allows us to know when a pooled + connection's mappings are no longer up to date because a global mapping change has + occurred. + + + + + A counter that is incremented whenever a global mapping change occurs (e.g. + , . + + + + + + Caches, for each connection string, the results of the backend type query in the form of a list of type + info structs keyed by the PG name. + Repeated connections to the same connection string reuse the query results and avoid an additional + roundtrip at open-time. + + + + + Looks up a type handler by its PostgreSQL type's OID. + + A PostgreSQL type OID + A type handler that can be used to encode and decode values. + + + + A structure holding information about all PostgreSQL types found in an actual database. + Only contains instances and not actual , and is shared between + all connections using the same connection string. Consulted when a type handler needs to be created. + + + + + Indexes backend types by their PostgreSQL name, including namespace (e.g. pg_catalog.int4). + Only used for enums and composites. + + + + + Indexes backend types by their PostgreSQL name, not including namespace. + If more than one type exists with the same name (i.e. in different namespaces) this + table will contain an entry with a null value. + Only used for enums and composites. + + + + + Represents a single PostgreSQL data type, as discovered from pg_type. + Note that this simply a data structure describing a type and not a handler, and is shared between connectors + having the same connection string. + + + + + For base types, contains the handler type. + If null, this backend type isn't supported by Npgsql. + + + + + Returns a string that represents the current object. + + + + + Constructs an unsupported base type (no handler exists in Npgsql for this type) + + + + + Instantiate the type handler. If it has a constructor that accepts a TypeHandlerRegistry, use that to allow + the handler to make connector-specific adjustments. Otherwise (the normal case), use the default constructor. + + + + + + + Holds the name and OID for all fields. + Populated on the first activation of the composite. + + + + + Represents a PostgreSQL domain type. + + + When PostgreSQL returns a RowDescription for a domain type, the type OID is the base type's + (so fetching a domain type over text returns a RowDescription for text). + However, when a composite type is returned, the type OID there is that of the domain, + so we provide "clean" support for domain types. + + + + + Clears the internal type cache. + Useful for forcing a reload of the types after loading an extension. + + + + + Clears the internal type cache. + Useful for forcing a reload of the types after loading an extension. + + + + + The total byte length of the buffer. + + + + + During copy operations, the buffer's usable size is smaller than its total size because of the CopyData + message header. This distinction is important since some type handlers check how much space is left + in the buffer in their decision making. + + + + + The minimum buffer size possible. + + + + + A stream that has been opened on this colun, and needs to be disposed of when the column is consumed. + + + + + Places our position at the beginning of the given column, after the 4-byte length. + The length is available in ColumnLen. + + + + + Note that this message doesn't actually contain the data, but only the length. Data is processed + directly from the connector's buffer. + + + + + Note: This message is both a frontend and a backend message + + + + + The number of columns in the current row + + + + + The index of the column that we're on, i.e. that has already been parsed, is + is memory and can be retrieved. Initialized to -1 + + + + + For streaming types (e.g. bytea, text), holds the current byte position within the column. + Does not include the length prefix. + + + + + For streaming types (e.g. bytea), holds the byte length of the column. + Does not include the length prefix. + + + + + Places our position at the beginning of the given column, after the 4-byte length. + The length is available in ColumnLen. + + + + + Returns a stream for the current column. + + + + + Consumes the current row, allowing the reader to read in the next one. + + + + + Consumes the current row asynchronously, allowing the reader to read in the next one. + + + + + List of all streams that have been opened on this row, and need to be disposed of when the row + is consumed. + + + + + Error and notice message field codes + + + + + A RowDescription message sent from the backend. + + + See http://www.postgresql.org/docs/current/static/protocol-message-formats.html + + + + + Given a string name, returns the field's ordinal index in the row. + + + + + Given a string name, returns the field's ordinal index in the row. + + + + + A descriptive record on a single field received from PostgreSQL. + See RowDescription in http://www.postgresql.org/docs/current/static/protocol-message-formats.html + + + + + The field name. + + + + + The object ID of the field's data type. + + + + + The data type size (see pg_type.typlen). Note that negative values denote variable-width types. + + + + + The type modifier (see pg_attribute.atttypmod). The meaning of the modifier is type-specific. + + + + + If the field can be identified as a column of a specific table, the object ID of the table; otherwise zero. + + + + + If the field can be identified as a column of a specific table, the attribute number of the column; otherwise zero. + + + + + The format code being used for the field. + Currently will be zero (text) or one (binary). + In a RowDescription returned from the statement variant of Describe, the format code is not yet known and will always be zero. + + + + + The Npgsql type handler assigned to handle this field. + Returns for fields with format text. + + + + + The type handler resolved for this field, regardless of whether it's binary or text. + + + + + An array of cached lengths for the parameters sending process. + + When sending parameters, lengths need to be calculated more than once (once for Bind, once for + an array, once for the string within that array). This cache optimized that. Lengths are added + to the cache, and then retrieved at the same order. + + + + + Provides an API for a binary COPY TO operation, a high-performance data export mechanism from + a PostgreSQL table. Initiated by + + + + + The number of columns, as returned from the backend in the CopyInResponse. + + + + + Starts reading a single row, must be invoked before reading any columns. + + + The number of columns in the row. -1 if there are no further rows. + Note: This will currently be the same value for all rows, but this may change in the future. + + + + + Reads the current column, returns its value and moves ahead to the next column. + If the column is null an exception is thrown. + + + The type of the column to be read. This must correspond to the actual type or data + corruption will occur. If in doubt, use to manually + specify the type. + + The value of the column + + + + Reads the current column, returns its value according to and + moves ahead to the next column. + If the column is null an exception is thrown. + + + In some cases isn't enough to infer the data type coming in from the + database. This parameter and be used to unambiguously specify the type. An example is the JSONB + type, for which will be a simple string but for which + must be specified as . + + The .NET type of the column to be read. + The value of the column + + + + Returns whether the current column is null. + + + + + Skips the current column without interpreting its value. + + + + + Cancels an ongoing export. + + + + + Completes that binary export and sets the connection back to idle state + + + + + Provides an API for a binary COPY FROM operation, a high-performance data import mechanism to + a PostgreSQL table. Initiated by + + + See http://www.postgresql.org/docs/current/static/sql-copy.html. + + + + + The number of columns in the current (not-yet-written) row. + + + + + The number of columns, as returned from the backend in the CopyInResponse. + + + + + NpgsqlParameter instance needed in order to pass the from + the validation phase to the writing phase. + + + + + Starts writing a single row, must be invoked before writing any columns. + + + + + Writes a single column in the current row. + + The value to be written + + The type of the column to be written. This must correspond to the actual type or data + corruption will occur. If in doubt, use to manually + specify the type. + + + + + Writes a single column in the current row as type . + + The value to be written + + In some cases isn't enough to infer the data type to be written to + the database. This parameter and be used to unambiguously specify the type. An example is + the JSONB type, for which will be a simple string but for which + must be specified as . + + The .NET type of the column to be written. + + + + Writes a single null column value. + + + + + Writes an entire row of columns. + Equivalent to calling , followed by multiple + on each value. + + An array of column values to be written as a single row + + + + Cancels and terminates an ongoing import. Any data already written will be discarded. + + + + + Completes that binary import and sets the connection back to idle state + + + + + Completes the import process and signals to the database to write everything. + + + + + Represents the method that handles the Notice events. + + The source of the event. + A NpgsqlNoticeEventArgs that contains the event data. + + + + Represents the method that handles the Notification events. + + The source of the event. + A NpgsqlNotificationEventArgs that contains the event data. + + + + Represents the method that allows the application to provide a certificate collection to be used for SSL client authentication + + A X509CertificateCollection to be filled with one or more client certificates. + + + + Provides a simple way to create and manage the contents of connection strings used by + the class. + + + + + Makes all valid keywords for a property to that property (e.g. User Name -> Username, UserId -> Username...) + + + + + Maps CLR property names (e.g. BufferSize) to their canonical keyword name, which is the + property's [DisplayName] (e.g. Buffer Size) + + + + + Maps each property to its [DefaultValue] + + + + + Initializes a new instance of the NpgsqlConnectionStringBuilder class. + + + + + Initializes a new instance of the NpgsqlConnectionStringBuilder class and sets its . + + + + + Gets or sets the value associated with the specified key. + + The key of the item to get or set. + The value associated with the specified key. + + + + Removes the entry with the specified key from the DbConnectionStringBuilder instance. + + The key of the key/value pair to be removed from the connection string in this DbConnectionStringBuilder. + true if the key existed within the connection string and was removed; false if the key did not exist. + + + + Clears the contents of the instance. + + + + + Determines whether the contains a specific key. + + The key to locate in the . + true if the contains an entry with the specified key; otherwise false. + + + + Retrieves a value corresponding to the supplied key from this . + + The key of the item to retrieve. + The value corresponding to the key. + true if keyword was found within the connection string, false otherwise. + + + + The hostname or IP address of the PostgreSQL server to connect to. + + + + + The TCP/IP port of the PostgreSQL server. + + + + + The PostgreSQL database to connect to. + + + + + The username to connect with. Not required if using IntegratedSecurity. + + + + + The password to connect with. Not required if using IntegratedSecurity. + + + + + The optional application name parameter to be sent to the backend during connection initiation. + + + + + Whether to enlist in an ambient TransactionScope. + + + + + Gets or sets the schema search path. + + + + + Gets or sets the schema search path. + + + + + Controls whether SSL is required, disabled or preferred, depending on server support. + + + + + Whether to trust the server certificate without validating it. + + + + + Npgsql uses its own internal implementation of TLS/SSL. Turn this on to use .NET SslStream instead. + + + + + Whether to use Windows integrated security to log in. + + + + + The Kerberos service name to be used for authentication. + + + + + The Kerberos realm to be used for authentication. + + + + + Gets or sets a Boolean value that indicates if security-sensitive information, such as the password, is not returned as part of the connection if the connection is open or has ever been in an open state. + + + + + Whether connection pooling should be used. + + + + + The minimum connection pool size. + + + + + The maximum connection pool size. + + + + + The time to wait before closing idle connections in the pool if the count + of all connections exceeds MinPoolSize. + + The time (in seconds) to wait. The default value is 300. + + + + How many seconds the pool waits before attempting to prune idle connections that are beyond + idle lifetime (. + + The interval (in seconds). The default value is 10. + + + + The time to wait (in seconds) while trying to establish a connection before terminating the attempt and generating an error. + Defaults to 15 seconds. + + + + + The time to wait (in seconds) while trying to execute a command before terminating the attempt and generating an error. + Defaults to 30 seconds. + + + + + The time to wait (in seconds) while trying to execute a an internal command before terminating the attempt and generating an error. + + + + + The database template to specify when creating a database in Entity Framework. If not specified, + PostgreSQL defaults to "template1". + + + http://www.postgresql.org/docs/current/static/manage-ag-templatedbs.html + + + + + The database admin to specify when creating and dropping a database in Entity Framework. This is needed because + Npgsql needs to connect to a database in order to send the create/drop database command. + If not specified, defaults to "template1". Check NpgsqlServices.UsingPostgresDBConnection for more information. + + + + + The number of seconds of connection inactivity before Npgsql sends a keepalive query. + Set to 0 (the default) to disable. + + + + + Gets or sets the buffer size. + + + + + A compatibility mode for special PostgreSQL server types. + + + + + Makes MaxValue and MinValue timestamps and dates readable as infinity and negative infinity. + + + + + Obsolete, see http://www.npgsql.org/doc/3.1/migration.html + + + + + Obsolete, see http://www.npgsql.org/doc/3.1/migration.html + + + + + Obsolete, see http://www.npgsql.org/doc/3.1/migration.html + + + + + Obsolete, see http://www.npgsql.org/doc/3.0/migration.html + + + + + Obsolete, see http://www.npgsql.org/doc/3.0/migration.html + + + + + Determines whether the specified object is equal to the current object. + + + + + Hash function. + + + + + + An option specified in the connection string that activates special compatibility features. + + + + + No special server compatibility mode is active + + + + + The server is an Amazon Redshift instance. + + + + + Specifies how to manage SSL. + + + + + SSL is disabled. If the server requires SSL, the connection will fail. + + + + + Prefer SSL connections if the server allows them, but allow connections without SSL. + + + + + Fail the connection if the server doesn't suppotr SSL. + + + + + Expresses the exact state of a connector. + + + + + The connector has either not yet been opened or has been closed. + + + + + The connector is currently connecting to a Postgresql server. + + + + + The connector is connected and may be used to send a new query. + + + + + The connector is waiting for a response to a query which has been sent to the server. + + + + + The connector is currently fetching and processing query results. + + + + + The connector is currently waiting for asynchronous notifications to arrive. + + + + + The connection was broken because an unexpected error occurred which left it in an unknown state. + This state isn't implemented yet. + + + + + The connector is engaged in a COPY operation. + + + + + Currently not in a transaction block + + + + + Currently in a transaction block + + + + + Currently in a failed transaction block (queries will be rejected until block is ended) + + + + + A new transaction has been requested but not yet transmitted to the backend. It will be transmitted + prepended to the next query. + This is a client-side state option only, and is never transmitted from the backend. + + + + + Specifies how to load/parse DataRow messages as they're received from the backend. + + + + + Load DataRows in non-sequential mode + + + + + Load DataRows in sequential mode + + + + + Skip DataRow messages altogether + + + + + The exception that is thrown when server-related issues occur. + + + PostgreSQL errors (e.g. query SQL issues, constraint violations) are raised via + which is a subclass of this class. + Purely Npgsql-related issues which aren't related to the server will be raised + via the standard CLR exceptions (e.g. ArgumentException). + + + + + Same as , for backwards-compatibility with Npgsql 2.x and Hangfire. + + + Until Hangfire fix themselves: https://github.com/frankhommers/Hangfire.PostgreSql/issues/33 + + + + + A factory to create instances of various Npgsql objects. + + + + + Creates an NpgsqlCommand object. + + + + + EventArgs class to send Notification parameters. + + + + + Process ID of the PostgreSQL backend that sent this notification. + + + + + Condition that triggered that notification. + + + + + Additional information. + + + + + This class represents a parameter to a command that will be sent to server + + + + + Can be used to communicate a value from the validation phase to the writing phase. + + + + + Initializes a new instance of the NpgsqlParameter class. + + + + + Initializes a new instance of the NpgsqlParameter + class with the parameter name and a value of the new NpgsqlParameter. + + The 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.

+
+
+ + + Initializes a new instance of the NpgsqlParameter + class with the parameter name and the data type. + + The name of the parameter to map. + One of the DbType values. + + + + Initializes a new instance of the NpgsqlParameter. + + The name of the parameter to map. + One of the DbType values. + + + + Initializes a new instance of the NpgsqlParameter. + + The name of the parameter to map. + One of the NpgsqlDbType values. + The length of the parameter. + + + + Initializes a new instance of the NpgsqlParameter. + + The name of the parameter to map. + One of the DbType values. + The length of the parameter. + + + + Initializes a new instance of the NpgsqlParameter + + The name of the parameter to map. + One of the NpgsqlDbType values. + The length of the parameter. + The name of the source column. + + + + Initializes a new instance of the NpgsqlParameter. + + The name of the parameter to map. + One of the DbType values. + The length of the parameter. + The name of the source column. + + + + Gets or sets the value of the parameter. + + 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. + + + + Gets or sets a value that indicates whether the parameter accepts null values. + + + + + 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. + + + + 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. + + + + 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. + + + + 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. + + + + Gets or sets the DbType of the parameter. + + One of the DbType values. The default is Object. + + + + Gets or sets the NpgsqlDbType of the parameter. + + One of the NpgsqlDbType values. The default is Unknown. + + + + Gets or sets The name of the NpgsqlParameter. + + The name of the NpgsqlParameter. + The default is an empty string. + + + + Gets or sets The name of the source column that is mapped to the + DataSet and used for loading or + returning the Value. + + The name of the source column that is mapped to the DataSet. + The default is an empty string. + + + + Source column mapping. + + + + + Used in combination with NpgsqlDbType.Enum or NpgsqlDbType.Array | NpgsqlDbType.Enum to indicate the enum type. + For other NpgsqlDbTypes, this field is not used. + + + + + Used in combination with NpgsqlDbType.Enum or NpgsqlDbType.Composite to indicate the specific enum or composite type. + For other NpgsqlDbTypes, this field is not used. + + + + + The collection to which this parameter belongs, if any. + + + + + The name scrubbed of any optional marker + + + + + Returns whether this parameter has had its type set explicitly via DbType or NpgsqlDbType + (and not via type inference) + + + + + Reset DBType. + + + + + Creates a new NpgsqlParameter that + is a copy of the current instance. + + A new NpgsqlParameter that is a copy of this instance. + + + + 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. + + + + + 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. + + + + + Gets the NpgsqlParameter with the specified name. + + 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. + + + + Adds the specified NpgsqlParameter object to the NpgsqlParameterCollection. + + 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. + + 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, data type and value. + + The name of the NpgsqlParameter. + One of the NpgsqlDbType values. + 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 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 specified value. + + The Value of the NpgsqlParameter to add to the collection. + The paramater that was added. + + + + Adds a NpgsqlParameter to the NpgsqlParameterCollection given the specified data type and value. + + One of the NpgsqlDbType values. + The Value of the NpgsqlParameter to add to the collection. + The paramater that was added. + + + + 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. + + + + 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. + + + + 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. + + + + Removes the specified NpgsqlParameter from the collection using the parameter name. + + The name of the NpgsqlParameter object to retrieve. + + + + 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. + + + + 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. + + + + Removes the specified NpgsqlParameter from the collection using a specific index. + + 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. + + + + 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. + + + + 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. + + + + 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. + + + + Removes all items from the collection. + + + + + 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. + + + + Adds the specified NpgsqlParameter object to the NpgsqlParameterCollection. + + The NpgsqlParameter to add to the collection. + The zero-based index of the new NpgsqlParameter object. + + + + Gets the number of NpgsqlParameter objects in the collection. + + The number of NpgsqlParameter objects in the collection. + + + + Copies NpgsqlParameter objects from the NpgsqlParameterCollection to the specified array. + + An Array to which to copy the NpgsqlParameter objects in the collection. + The starting index of the array. + + + + Sync root. + + + + + Returns an enumerator that can iterate through the collection. + + An IEnumerator that can be used to iterate through the collection. + + + + Add an Array of parameters to the collection. + + Parameters to add. + + + + Get parameter. + + + + + + + Get parameter. + + + + + + + Set parameter. + + + + + + + Set parameter. + + + + + + + Report the offset within the collection of the given parameter. + + Parameter to find. + Index of the parameter, or -1 if the parameter is not present. + + + + Insert the specified parameter into the collection. + + Index of the existing parameter before which to insert the new one. + Parameter to insert. + + + + Report whether the specified parameter is present in the collection. + + Parameter to find. + True if the parameter was found, otherwise false. + + + + Remove the specified parameter from the collection. + + Parameter to remove. + True if the parameter was found and removed, otherwise false. + + + + Convert collection to a System.Array. + + Destination array. + Starting index in destination array. + + + + Convert collection to a System.Array. + + NpgsqlParameter[] + + + + Provides an API for a raw binary COPY operation, a high-performance data import/export mechanism to + a PostgreSQL table. Initiated by + + + See http://www.postgresql.org/docs/current/static/sql-copy.html. + + + + + The copy binary format header signature + + + + + Cancels and terminates an ongoing operation. Any data already written will be discarded. + + + + + Writer for a text import, initiated by . + + + See http://www.postgresql.org/docs/current/static/sql-copy.html. + + + + + Cancels and terminates an ongoing import. Any data already written will be discarded. + + + + + Reader for a text export, initiated by . + + + See http://www.postgresql.org/docs/current/static/sql-copy.html. + + + + + Cancels and terminates an ongoing import. + + + + + Represents a single SQL statement within Npgsql. + + Instances aren't constructed directly; users should construct an + object and populate its property as in standard ADO.NET. + Npgsql will analyze that property and constructed instances of + internally. + + Users can retrieve instances from + and access information about statement execution (e.g. affected rows). + + + + + The SQL text of the statement. + + + + + Specifies the type of query, e.g. SELECT. + + + + + The number of rows affected or retrieved. + + + See the command tag in the CommandComplete message, + http://www.postgresql.org/docs/current/static/protocol-message-formats.html + + + + + For an INSERT, the object ID of the inserted row if is 1 and + the target table has OIDs; otherwise 0. + + + + + The RowDescription message for this query. If null, the query does not return rows (e.g. INSERT) + + + + + For prepared statements, holds the server-side prepared statement name. + + + + + Returns the SQL text of the statement. + + + + + Creates a Task<TResult> that's completed successfully with the specified result. + + + In .NET 4.5 Task provides this. In .NET 4.0 with BCL.Async, TaskEx provides this. This + method wraps the two. + + The type of the result returned by the task. + The result to store into the completed task. + The successfully completed task. + + + + Throws an exception with the given string and also invokes a contract failure, allowing the static checker + to detect scenarios leading up to this error. + + See http://blogs.msdn.com/b/francesco/archive/2014/09/12/how-to-use-cccheck-to-prove-no-case-is-forgotten.aspx + + the exception message + an exception to be thrown + + + + Represents a timeout that will expire at some point. + + + + + Holds connector pools indexed by their connection strings. + + + + + Maximum number of possible connections in the pool. + + + + + The exception that is thrown when the PostgreSQL backend reports errors (e.g. query + SQL issues, constraint violations). + + + This exception only corresponds to a PostgreSQL-delivered error. + Other errors (e.g. network issues) will be raised via , + and purely Npgsql-related issues which aren't related to the server will be raised + via the standard CLR exceptions (e.g. ArgumentException). + + See http://www.postgresql.org/docs/current/static/errcodes-appendix.html, + http://www.postgresql.org/docs/current/static/protocol-error-fields.html + + + + + Severity of the error or notice. + Always present. + + + + + The SQLSTATE code for the error. + + + Always present. + See http://www.postgresql.org/docs/current/static/errcodes-appendix.html + + + + + The SQLSTATE code for the error. + + + Always present. + See http://www.postgresql.org/docs/current/static/errcodes-appendix.html + + + + + The primary human-readable error message. This should be accurate but terse. + + + Always present. + + + + + An optional secondary error message carrying more detail about the problem. + May run to multiple lines. + + + + + 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. + May run to multiple lines. + + + + + 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. + 0 means not provided. + + + + + This is defined the same as the field, but it is used when the cursor position refers to an internally generated command rather than the one submitted by the client. + The field will always appear when this field appears. + 0 means not provided. + + + + + The text of a failed internally-generated command. + This could be, for example, a SQL query issued by a PL/pgSQL function. + + + + + An indication of the context in which the error occurred. + Presently this includes a call stack traceback of active PL functions. + The trace is one entry per line, most recent first. + + + + + If the error was associated with a specific database object, the name of the schema containing that object, if any. + + PostgreSQL 9.3 and up. + + + + 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.) + + PostgreSQL 9.3 and up. + + + + 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.) + + PostgreSQL 9.3 and up. + + + + 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.) + + PostgreSQL 9.3 and up. + + + + 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.) + + PostgreSQL 9.3 and up. + + + + The file name of the source-code location where the error was reported. + + PostgreSQL 9.3 and up. + + + + The line number of the source-code location where the error was reported. + + + + + The name of the source-code routine reporting the error. + + + + + Gets a the PostgreSQL error message and code. + + + + + Returns the statement which triggered this exception. + + + + + Gets a collection of key/value pairs that provide additional PostgreSQL fields about the exception. + + + + + A non-critical (warning or info) message generated by the backend. + Can be synchronous (i.e. in response to a query) or asynchronous (a totally unrelated + backend-side event). + + + http://www.postgresql.org/docs/current/static/protocol-flow.html#PROTOCOL-ASYNC + + + + + Severity of the error or notice. + Always present. + + + + + The SQLSTATE code for the error. + + + Always present. + See http://www.postgresql.org/docs/current/static/errcodes-appendix.html + + + + + The SQLSTATE code for the error. + + + Always present. + See http://www.postgresql.org/docs/current/static/errcodes-appendix.html + + + + + The primary human-readable error message. This should be accurate but terse. + + + Always present. + + + + + An optional secondary error message carrying more detail about the problem. + May run to multiple lines. + + + + + 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. + May run to multiple lines. + + + + + 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. + 0 means not provided. + + + + + This is defined the same as the field, but it is used when the cursor position refers to an internally generated command rather than the one submitted by the client. + The field will always appear when this field appears. + 0 means not provided. + + + + + The text of a failed internally-generated command. + This could be, for example, a SQL query issued by a PL/pgSQL function. + + + + + An indication of the context in which the error occurred. + Presently this includes a call stack traceback of active PL functions. + The trace is one entry per line, most recent first. + + + + + If the error was associated with a specific database object, the name of the schema containing that object, if any. + + PostgreSQL 9.3 and up. + + + + 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.) + + PostgreSQL 9.3 and up. + + + + 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.) + + PostgreSQL 9.3 and up. + + + + 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.) + + PostgreSQL 9.3 and up. + + + + 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.) + + PostgreSQL 9.3 and up. + + + + The file name of the source-code location where the error was reported. + + PostgreSQL 9.3 and up. + + + + The line number of the source-code location where the error was reported. + + + + + The name of the source-code routine reporting the error. + + + + + Provides data for a notice event. + + + + + The Notice that was sent from the database. + + + + + Receives a raw SQL query as passed in by the user, and performs some processing necessary + before sending to the backend. + This includes doing parameter placebolder processing (@p => $1), and splitting the query + up by semicolons if needed (SELECT 1; SELECT 2) + + Raw user-provided query. + Whether the PostgreSQL session is configured to use standard conformant strings. + The parameters configured on the of this query. + An empty list to be populated with the queries parsed by this method + + + + A class to handle everything associated with SSPI authentication + + + + + Simplified SecBufferDesc struct with only one SecBuffer + + + + + Utility that simplifies awaiting a task with a timeout. If the given task does not + complete within , a is thrown. + + The task to be awaited + How much time to allow to complete before throwing a + An awaitable task that represents the original task plus the timeout + + + + Utility that simplifies awaiting a task with a timeout. If the given task does not + complete within , a is thrown. + + The task to be awaited + How much time to allow to complete before throwing a + An awaitable task that represents the original task plus the timeout + + + + Allows you to cancel awaiting for a non-cancellable task. + + + Read http://blogs.msdn.com/b/pfxteam/archive/2012/10/05/how-do-i-cancel-non-cancelable-async-operations.aspx + and be very careful with this. + + + + + Allows you to cancel awaiting for a non-cancellable task. + + + Read http://blogs.msdn.com/b/pfxteam/archive/2012/10/05/how-do-i-cancel-non-cancelable-async-operations.aspx + and be very careful with this. + + + + + Type handlers that wish to support reading other types in additional to the main one can + implement this interface for all those types. + + + + + A type handler that supports a provider-specific value which is different from the regular value (e.g. + NpgsqlDate and DateTime) + + the regular value type returned by this type handler + the type of the provider-specific value returned by this type handler + + + + A marking interface to allow us to know whether a given type handler has a provider-specific type + distinct from its regular type + + + + + Type handlers that wish to support reading other types in additional to the main one can + implement this interface for all those types. + + + + + Implemented by handlers which support , returns a standard + TextReader given a binary Stream. + + + + + Can be thrown by readers to indicate that interpreting the value failed, but the value was read wholly + and it is safe to continue reading. Any other exception is assumed to leave the row in an unknown state + and the connector is therefore set to Broken. + Note that an inner exception is mandatory, and will get thrown to the user instead of the SafeReadException. + + + + + Maps an Npgsql type handler to a PostgreSQL type. + + A PostgreSQL type name as it appears in the pg_type table. + + A member of which represents this PostgreSQL type. + An with set to + this value will be sent with the type handler mapped by this attribute. + + + All members of which represent this PostgreSQL type. + An with set to + one of these values will be sent with the type handler mapped by this attribute. + + + Any .NET type which corresponds to this PostgreSQL type. + An with set to + one of these values will be sent with the type handler mapped by this attribute. + + + The "primary" which best corresponds to this PostgreSQL type. + When or + set, will be set to this value. + + + + + Read-only parameter + + + + + Returns a string that represents the current object. + + + + + + The name of the destination portal (an empty string selects the unnamed portal). + + + + + The name of the source prepared statement (an empty string selects the unnamed prepared statement). + + + + + Bind is a special message in that it supports the "direct buffer" optimization, which allows us to write + user byte[] data directly to the stream rather than copying it into our buffer. It therefore has its own + special overload of Write below. + + + + + + + The name of the prepared statement or portal to close (an empty string selects the unnamed prepared statement or portal). + + + + + Whether to close a statement or a portal + + + + + The name of the prepared statement or portal to describe (an empty string selects the unnamed prepared statement or portal). + + + + + Whether to describe a statement or a portal + + + + + The query string to be parsed. + + + + + The name of the destination prepared statement (an empty string selects the unnamed prepared statement). + + + + + Creates an MD5 password message. + This is the password, hashed with the username as salt, and hashed again with the backend-provided + salt. + + + + + A frontend message of an arbitrary type that has been pregenerated for efficiency - it is kept + in byte[] form and doesn't have to be serialized for each send. + + + + + Constructs a new pregenerated message. + + The data to be sent for this message, not including the 4-byte length. + Optional string form/description for debugging + + + + A simple query message. + + + + + An logging provider that outputs Npgsql logging messages to standard error. + + + + + Constructs a new + + Only messages of this level of higher will be logged + If true, will output the log level (e.g. WARN). Defaults to false. + If true, will output the connector ID. Defaults to false. + + + + Creates a new instance of the given name. + + + + Used to create logger instances of the given name. + + + + Creates a new INpgsqlLogger instance of the given name. + + + + + A generic interface for logging. + + + + + Manages logging for Npgsql, used to set the loggging provider. + + + + + The logging provider used for logging in Npgsql. + + + + + Determines whether parameter contents will be logged alongside SQL statements - this may reveal sensitive information. + Defaults to false. + + + + + A component which translates a CLR name (e.g. SomeClass) into a database name (e.g. some_class) + according to some scheme. + Used for mapping enum and composite types. + + + + + Given a CLR type name (e.g class, struct, enum), translates its name to a database type name. + + + + + Given a CLR member name (property or field), translates its name to a database type name. + + + + + A name translator which preserves CLR names (e.g. SomeClass) when mapping names to the database. + + + + + Given a CLR type name (e.g class, struct, enum), translates its name to a database type name. + + + + + Given a CLR member name (property or field), translates its name to a database type name. + + + + + A name translator which converts standard CLR names (e.g. SomeClass) to snake-case database + names (some_class) + + + + + Given a CLR type name (e.g class, struct, enum), translates its name to a database type name. + + + + + Given a CLR member name (property or field), translates its name to a database type name. + + + + + Performs some post-setup configuration that's common to both table columns and non-columns. + + + + + Provides schema information about a column. + (e.g. SELECT 8); + + + Note that this can correspond to a field returned in a query which isn't an actual table column + + See https://msdn.microsoft.com/en-us/library/system.data.sqlclient.sqldatareader.getschematable(v=vs.110).aspx + for information on the meaning of the different fields. + + + + + Base class for all type handlers which handle PostgreSQL arrays. + + + http://www.postgresql.org/docs/current/static/arrays.html + + + + + The lower bound value sent to the backend when writing arrays. Normally 1 (the PG default) but + is 0 for OIDVector. + + + + + The type of the elements contained within this array + + + + + + The provider-specific type of the elements contained within this array, + + + + + + The type handler for the element that this array type holds + + + + + Optimized population for one-dimensional arrays without boxing/unboxing + + + + + Recursively populates an array from PB binary data representation. + + + + + http://www.postgresql.org/docs/current/static/arrays.html + + The .NET type contained as an element within this array + The .NET provider-specific type contained as an element within this array + + + + The provider-specific type of the elements contained within this array, + + + + + + Handler for the PostgreSQL bit string type. + Note that for BIT(1), this handler will return a bool by default, to align with SQLClient + (see discussion https://github.com/npgsql/npgsql/pull/362#issuecomment-59622101). + + + http://www.postgresql.org/docs/current/static/datatype-bit.html + + + + + Reads a BitArray from a binary PostgreSQL value. First 32-bit big endian length, + then the data in big-endian. Zero-padded low bits in the end if length is not multiple of 8. + + + + + A special handler for arrays of bit strings. + Differs from the standard array handlers in that it returns arrays of bool for BIT(1) and arrays + of BitArray otherwise (just like the scalar BitStringHandler does). + + + + + http://www.postgresql.org/docs/current/static/datatype-boolean.html + + + + + http://www.postgresql.org/docs/current/static/datatype-binary.html + + + + + Interface implemented by all concrete handlers which handle enums + + + + + The CLR type mapped to the PostgreSQL composite type. + + + + + Type handler for PostgreSQL composite types + + + http://www.postgresql.org/docs/current/static/rowtypes.html + + Encoding: + A 32-bit integer with the number of columns, then for each column: + * An OID indicating the type of the column + * The length of the column(32-bit integer), or -1 if null + * The column data encoded as binary + + the CLR type to map to the PostgreSQL composite type + + + + Interface implemented by all concrete handlers which handle enums + + + + + The CLR enum type mapped to the PostgreSQL enum + + + + + The text handler to which we delegate encoding/decoding of the actual strings + + + + + Type handler for the Postgresql "char" type, used only internally + + + http://www.postgresql.org/docs/current/static/datatype-character.html + + + + + JSONB binary encoding is a simple UTF8 string, but prepended with a version number. + + + + + Prepended to the string in the wire encoding + + + + + Indicates whether the prepended version byte has already been read or written + + + + + The text handler which does most of the encoding/decoding work. + + + + + http://www.postgresql.org/docs/current/static/datatype-money.html + + + + + Type Handler for the postgis geometry type. + + + + + Type handler for PostgreSQL range types + + + Introduced in PostgreSQL 9.2. + http://www.postgresql.org/docs/current/static/rangetypes.html + + the range subtype + + + + The type handler for the element that this range type holds + + + + + Type handler for PostgreSQL record types. + + + http://www.postgresql.org/docs/current/static/datatype-pseudo.html + + Encoding (identical to composite): + A 32-bit integer with the number of columns, then for each column: + * An OID indicating the type of the column + * The length of the column(32-bit integer), or -1 if null + * The column data encoded as binary + + + + + Handles "conversions" for columns sent by the database with unknown OIDs. + This differs from TextHandler in that its a text-only handler (we don't want to receive binary + representations of the types registered here). + Note that this handler is also used in the very initial query that loads the OID mappings + (chicken and egg problem). + Also used for sending parameters with unknown types (OID=0) + + + + + http://www.postgresql.org/docs/current/static/datatype-uuid.html + + + + + http://www.postgresql.org/docs/current/static/datatype-boolean.html + + + + + http://www.postgresql.org/docs/current/static/datatype-datetime.html + + + + + Whether to convert positive and negative infinity values to DateTime.{Max,Min}Value when + a DateTime is requested + + + + + Copied wholesale from Postgresql backend/utils/adt/datetime.c:j2date + + + + + http://www.postgresql.org/docs/current/static/datatype-datetime.html + + + + + A deprecated compile-time option of PostgreSQL switches to a floating-point representation of some date/time + fields. Npgsql (currently) does not support this mode. + + + + + http://www.postgresql.org/docs/current/static/datatype-datetime.html + + + + + A deprecated compile-time option of PostgreSQL switches to a floating-point representation of some date/time + fields. Npgsql (currently) does not support this mode. + + + + + http://www.postgresql.org/docs/current/static/datatype-datetime.html + + + + + A deprecated compile-time option of PostgreSQL switches to a floating-point representation of some date/time + fields. Npgsql (currently) does not support this mode. + + + + + Whether to convert positive and negative infinity values to DateTime.{Max,Min}Value when + a DateTime is requested + + + + + http://www.postgresql.org/docs/current/static/datatype-datetime.html + + + + + http://www.postgresql.org/docs/current/static/datatype-datetime.html + + + + + http://www.postgresql.org/docs/current/static/datatype-textsearch.html + + + + + http://www.postgresql.org/docs/current/static/datatype-textsearch.html + + + + + Type handler for the PostgreSQL geometric box type. + + + http://www.postgresql.org/docs/current/static/datatype-geometric.html + + + + + Type handler for the PostgreSQL geometric circle type. + + + http://www.postgresql.org/docs/current/static/datatype-geometric.html + + + + + Type handler for the PostgreSQL geometric line type. + + + http://www.postgresql.org/docs/current/static/datatype-geometric.html + + + + + Type handler for the PostgreSQL geometric line segment type. + + + http://www.postgresql.org/docs/current/static/datatype-geometric.html + + + + + Type handler for the PostgreSQL geometric path segment type (open or closed). + + + http://www.postgresql.org/docs/current/static/datatype-geometric.html + + + + + Type handler for the PostgreSQL geometric point type. + + + http://www.postgresql.org/docs/current/static/datatype-geometric.html + + + + + Type handler for the PostgreSQL geometric polygon type. + + + http://www.postgresql.org/docs/current/static/datatype-geometric.html + + + + + An int2vector is simply a regular array of shorts, with the sole exception that its lower bound must + be 0 (we send 1 for regular arrays). + + + + + An OIDVector is simply a regular array of uints, with the sole exception that its lower bound must + be 0 (we send 1 for regular arrays). + + + + + http://www.postgresql.org/docs/current/static/datatype-net-types.html + + + + + http://www.postgresql.org/docs/current/static/datatype-net-types.html + + + + + http://www.postgresql.org/docs/current/static/datatype-net-types.html + + + + + http://www.postgresql.org/docs/current/static/datatype-numeric.html + + + + + http://www.postgresql.org/docs/current/static/datatype-numeric.html + + + + + http://www.postgresql.org/docs/current/static/datatype-numeric.html + + + + + http://www.postgresql.org/docs/current/static/datatype-numeric.html + + + + + http://www.postgresql.org/docs/current/static/datatype-numeric.html + + + + + http://www.postgresql.org/docs/current/static/datatype-numeric.html + + + + + http://www.postgresql.org/docs/current/static/datatype-oid.html + + + + + Creates a new TlsClientStream with the given underlying stream. + The handshake must be manually initiated with the method PerformInitialHandshake. + + Base stream + + + + Makes sure there is at least one full record available at _readStart. + Also sets _packetLen (does not include packet header of 5 bytes). + + True on success, false on End Of Stream. + + + + Encrypts a record. + A header should be at startPos containing TLS record type and version. + At startPos + 5 + ivLen the plaintext should start. + + Should point to the beginning of the record (content type) + Plaintext length (without header) + The byte position after the last byte in this encrypted record + + + + This method checks whether there are at least 1 byte that can be read in the buffer. + If not, but there are renegotiation messages in the buffer, these are first processed. + This method should be called between each Read and Write to make sure the buffer is empty before writing. + Only when this method returns false it is safe to call Write. + + Whether we should also look in the underlying NetworkStream + Whether there is available application data + + + + hmac should be initialized with the secret key + + + + + + + + + + Represents the date 1970-01-01 + + + + + Represents the date 0001-01-01 + + + + + A struct similar to .NET DateTime but capable of storing PostgreSQL's timestamp and timestamptz types. + DateTime is capable of storing values from year 1 to 9999 at 100-nanosecond precision, + while PostgreSQL's timestamps store values from 4713BC to 5874897AD with 1-microsecond precision. + + + + + Cast of an to a . + + An equivalent . + + + + Converts the value of the current object to Coordinated Universal Time (UTC). + + + See the MSDN documentation for DateTime.ToUniversalTime(). + Note: this method only takes into account the time zone's base offset, and does + not respect daylight savings. See https://github.com/npgsql/npgsql/pull/684 for more + details. + + + + + Converts the value of the current object to local time. + + + See the MSDN documentation for DateTime.ToLocalTime(). + Note: this method only takes into account the time zone's base offset, and does + not respect daylight savings. See https://github.com/npgsql/npgsql/pull/684 for more + details. + + + + + Returns a new that adds the value of the specified TimeSpan to the value of this instance. + + A positive or negative time interval. + An object whose value is the sum of the date and time represented by this instance and the time interval represented by value. + + + + Returns a new that adds the value of the specified to the value of this instance. + + A positive or negative time interval. + An object whose value is the sum of the date and time represented by this instance and the time interval represented by value. + + + + Returns a new that adds the specified number of years to the value of this instance. + + A number of years. The value parameter can be negative or positive. + An object whose value is the sum of the date and time represented by this instance and the number of years represented by value. + + + + Returns a new that adds the specified number of months to the value of this instance. + + A number of months. The months parameter can be negative or positive. + An object whose value is the sum of the date and time represented by this instance and months. + + + + Returns a new that adds the specified number of days to the value of this instance. + + A number of whole and fractional days. The value parameter can be negative or positive. + An object whose value is the sum of the date and time represented by this instance and the number of days represented by value. + + + + Returns a new that adds the specified number of hours to the value of this instance. + + A number of whole and fractional hours. The value parameter can be negative or positive. + An object whose value is the sum of the date and time represented by this instance and the number of hours represented by value. + + + + Returns a new that adds the specified number of minutes to the value of this instance. + + A number of whole and fractional minutes. The value parameter can be negative or positive. + An object whose value is the sum of the date and time represented by this instance and the number of minutes represented by value. + + + + Returns a new that adds the specified number of minutes to the value of this instance. + + A number of whole and fractional minutes. The value parameter can be negative or positive. + An object whose value is the sum of the date and time represented by this instance and the number of minutes represented by value. + + + + Returns a new that adds the specified number of milliseconds to the value of this instance. + + A number of whole and fractional milliseconds. The value parameter can be negative or positive. Note that this value is rounded to the nearest integer. + An object whose value is the sum of the date and time represented by this instance and the number of milliseconds represented by value. + + + + Returns a new that adds the specified number of ticks to the value of this instance. + + A number of 100-nanosecond ticks. The value parameter can be positive or negative. + An object whose value is the sum of the date and time represented by this instance and the time represented by value. + + + + Implicit cast of a to an + + A + An equivalent . + + + + Explicit cast of an to a . + + An . + An equivalent . + + + + Represents a PostgreSQL data type that can be written or read to the database. + Used in places such as to unambiguously specify + how to encode or decode values. + + See http://www.postgresql.org/docs/current/static/datatype.html + + + + Corresponds to the PostgreSQL 8-byte "bigint" type. + + See http://www.postgresql.org/docs/current/static/datatype-numeric.html + + + + Corresponds to the PostgreSQL 8-byte floating-point "double" type. + + See http://www.postgresql.org/docs/current/static/datatype-numeric.html + + + + Corresponds to the PostgreSQL 4-byte "integer" type. + + See http://www.postgresql.org/docs/current/static/datatype-numeric.html + + + + Corresponds to the PostgreSQL arbitrary-precision "numeric" type. + + See http://www.postgresql.org/docs/current/static/datatype-numeric.html + + + + Corresponds to the PostgreSQL floating-point "real" type. + + See http://www.postgresql.org/docs/current/static/datatype-numeric.html + + + + Corresponds to the PostgreSQL 2-byte "smallint" type. + + See http://www.postgresql.org/docs/current/static/datatype-numeric.html + + + + Corresponds to the PostgreSQL "boolean" type. + + See http://www.postgresql.org/docs/current/static/datatype-boolean.html + + + + Corresponds to the PostgreSQL "enum" type. + + See http://www.postgresql.org/docs/current/static/datatype-enum.html + + + + Corresponds to the PostgreSQL geometric "box" type. + + See http://www.postgresql.org/docs/current/static/datatype-geometric.html + + + + Corresponds to the PostgreSQL geometric "circle" type. + + See http://www.postgresql.org/docs/current/static/datatype-geometric.html + + + + Corresponds to the PostgreSQL geometric "line" type. + + See http://www.postgresql.org/docs/current/static/datatype-geometric.html + + + + Corresponds to the PostgreSQL geometric "lseg" type. + + See http://www.postgresql.org/docs/current/static/datatype-geometric.html + + + + Corresponds to the PostgreSQL geometric "path" type. + + See http://www.postgresql.org/docs/current/static/datatype-geometric.html + + + + Corresponds to the PostgreSQL geometric "point" type. + + See http://www.postgresql.org/docs/current/static/datatype-geometric.html + + + + Corresponds to the PostgreSQL geometric "polygon" type. + + See http://www.postgresql.org/docs/current/static/datatype-geometric.html + + + + Corresponds to the PostgreSQL "money" type. + + See http://www.postgresql.org/docs/current/static/datatype-money.html + + + + Corresponds to the PostgreSQL "char(n)"type. + + See http://www.postgresql.org/docs/current/static/datatype-character.html + + + + Corresponds to the PostgreSQL "text" type. + + See http://www.postgresql.org/docs/current/static/datatype-character.html + + + + Corresponds to the PostgreSQL "varchar" type. + + See http://www.postgresql.org/docs/current/static/datatype-character.html + + + + Corresponds to the PostgreSQL internal "name" type. + + See http://www.postgresql.org/docs/current/static/datatype-character.html + + + + Corresponds to the PostgreSQL "citext" type for the citext module. + + See http://www.postgresql.org/docs/current/static/citext.html + + + + Corresponds to the PostgreSQL "char" type. + + + This is an internal field and should normally not be used for regular applications. + + See http://www.postgresql.org/docs/current/static/datatype-text.html + + + + + Corresponds to the PostgreSQL "bytea" type, holding a raw byte string. + + See http://www.postgresql.org/docs/current/static/datatype-binary.html + + + + Corresponds to the PostgreSQL "date" type. + + See http://www.postgresql.org/docs/current/static/datatype-datetime.html + + + + Corresponds to the PostgreSQL "time" type. + + See http://www.postgresql.org/docs/current/static/datatype-datetime.html + + + + Corresponds to the PostgreSQL "timestamp" type. + + See http://www.postgresql.org/docs/current/static/datatype-datetime.html + + + + Corresponds to the PostgreSQL "timestamp with time zone" type. + + See http://www.postgresql.org/docs/current/static/datatype-datetime.html + + + + Corresponds to the PostgreSQL "interval" type. + + See http://www.postgresql.org/docs/current/static/datatype-datetime.html + + + + Corresponds to the PostgreSQL "time with time zone" type. + + See http://www.postgresql.org/docs/current/static/datatype-datetime.html + + + + Corresponds to the obsolete PostgreSQL "abstime" type. + + See http://www.postgresql.org/docs/current/static/datatype-datetime.html + + + + Corresponds to the PostgreSQL "inet" type. + + See http://www.postgresql.org/docs/current/static/datatype-net-types.html + + + + Corresponds to the PostgreSQL "cidr" type, a field storing an IPv4 or IPv6 network. + + See http://www.postgresql.org/docs/current/static/datatype-net-types.html + + + + Corresponds to the PostgreSQL "macaddr" type, a field storing a 6-byte physical address. + + See http://www.postgresql.org/docs/current/static/datatype-net-types.html + + + + Corresponds to the PostgreSQL "bit" type. + + See http://www.postgresql.org/docs/current/static/datatype-bit.html + + + + Corresponds to the PostgreSQL "varbit" type, a field storing a variable-length string of bits. + + See http://www.postgresql.org/docs/current/static/datatype-boolean.html + + + + Corresponds to the PostgreSQL "tsvector" type. + + See http://www.postgresql.org/docs/current/static/datatype-textsearch.html + + + + Corresponds to the PostgreSQL "tsquery" type. + + See http://www.postgresql.org/docs/current/static/datatype-textsearch.html + + + + Corresponds to the PostgreSQL "uuid" type. + + See http://www.postgresql.org/docs/current/static/datatype-uuid.html + + + + Corresponds to the PostgreSQL "xml" type. + + See http://www.postgresql.org/docs/current/static/datatype-xml.html + + + + Corresponds to the PostgreSQL "json" type, a field storing JSON in text format. + + See http://www.postgresql.org/docs/current/static/datatype-json.html + + + + + Corresponds to the PostgreSQL "jsonb" type, a field storing JSON in an optimized binary + format. + + + Supported since PostgreSQL 9.4. + See http://www.postgresql.org/docs/current/static/datatype-json.html + + + + + Corresponds to the PostgreSQL "hstore" type, a dictionary of string key-value pairs. + + See http://www.postgresql.org/docs/current/static/hstore.html + + + + Corresponds to the PostgreSQL "array" type, a variable-length multidimensional array of + another type. This value must be combined with another value from + via a bit OR (e.g. NpgsqlDbType.Array | NpgsqlDbType.Integer) + + See http://www.postgresql.org/docs/current/static/arrays.html + + + + Corresponds to the PostgreSQL "composite" type. + + See http://www.postgresql.org/docs/current/static/rowtypes.html + + + + Corresponds to the PostgreSQL "array" type, a variable-length multidimensional array of + another type. This value must be combined with another value from + via a bit OR (e.g. NpgsqlDbType.Array | NpgsqlDbType.Integer) + + + Supported since PostgreSQL 9.2. + See http://www.postgresql.org/docs/9.2/static/rangetypes.html + + + + + Corresponds to the PostgreSQL "refcursor" type. + + + + + Corresponds to the PostgreSQL internal "oidvector" type. + + See http://www.postgresql.org/docs/current/static/datatype-oid.html + + + + Corresponds to the PostgreSQL internal "int2vector" type. + + + + + Corresponds to the PostgreSQL "oid" type. + + See http://www.postgresql.org/docs/current/static/datatype-oid.html + + + + Corresponds to the PostgreSQL "xid" type, an internal transaction identifier. + + See http://www.postgresql.org/docs/current/static/datatype-oid.html + + + + Corresponds to the PostgreSQL "cid" type, an internal command identifier. + + See http://www.postgresql.org/docs/current/static/datatype-oid.html + + + + Corresponds to the PostgreSQL "regtype" type, a numeric (OID) ID of a type in the pg_type table. + + + + + Corresponds to the PostgreSQL "tid" type, a tuple id identifying the physical location of a row within its table. + + + + + A special value that can be used to send parameter values to the database without + specifying their type, allowing the database to cast them to another value based on context. + The value will be converted to a string and send as text. + + + This value shouldn't ordinarily be used, and makes sense only when sending a data type + unsupported by Npgsql. + + + + + The geometry type for postgresql spatial extension postgis. + + + + + 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. + + + + 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. + + + + + 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, . + + + + Explicit 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. + + + + Represents a PostgreSQL tsquery. This is the base class for lexeme, not, and and or nodes. + + + + + Node kind + + + + + NodeKind + + + + + Lexeme + + + + + Not operator + + + + + And operator + + + + + Or operator + + + + + Represents the empty tsquery. Should only be used at top level. + + + + + Writes the tsquery in PostgreSQL's text format. + + + + + + Parses a tsquery in PostgreSQL's text format. + + + + + + + TsQuery Lexeme node. + + + + + Lexeme text. + + + + + Weights is a bitmask of the Weight enum. + + + + + Prefix search. + + + + + Creates a tsquery lexeme with only lexeme text. + + Lexeme text. + + + + Creates a tsquery lexeme with lexeme text and weights. + + Lexeme text. + Bitmask of enum Weight. + + + + Creates a tsquery lexeme with lexeme text, weights and prefix search flag. + + Lexeme text. + Bitmask of enum Weight. + Is prefix search? + + + + Weight enum, can be OR'ed together. + + + + + None + + + + + D + + + + + C + + + + + B + + + + + A + + + + + TsQuery Not node. + + + + + Child node + + + + + Creates a not operator, with a given child node. + + + + + + Base class for TsQuery binary operators (& and |). + + + + + Left child + + + + + Right child + + + + + TsQuery And node. + + + + + Creates an and operator, with two given child nodes. + + + + + + + TsQuery Or Node. + + + + + Creates an or operator, with two given child nodes. + + + + + + + Represents an empty tsquery. Shold only be used as top node. + + + + + Creates a tsquery that represents an empty query. Should not be used as child node. + + + + + Represents a PostgreSQL tsvector. + + + + + Constructs an NpgsqlTsVector from a list of lexemes. This also sorts and remove duplicates. + + + + + + Parses a tsvector in PostgreSQL's text format. + + + + + + + Returns the lexeme at a specific index + + + + + + + Gets the number of lexemes. + + + + + Returns an enumerator. + + + + + + Returns an enumerator. + + + + + + Gets a string representation in PostgreSQL's format. + + + + + + Represents a lexeme. A lexeme consists of a text string and optional word entry positions. + + + + + Creates a lexeme with no word entry positions. + + + + + + Creates a lexeme with word entry positions. + + + + + + + Gets or sets the text. + + + + + Gets a word entry position. + + + + + + + Gets the number of word entry positions. + + + + + Creates a string representation in PostgreSQL's format. + + + + + + Represents a word entry position and an optional weight. + + + + + Creates a WordEntryPos with a given position and weight. + + Position values can range from 1 to 16383; larger numbers are silently set to 16383. + A weight labeled between A and D. + + + + The weight is labeled from A to D. D is the default, and not printed. + + + + + The position is a 14-bit unsigned integer indicating the position in the text this lexeme occurs. Cannot be 0. + + + + + Prints this lexeme in PostgreSQL's format, i.e. position is followed by weight (weight is only printed if A, B or C). + + + + + + The weight is labeled from A to D. D is the default, and not printed. + + + + + D, the default + + + + + C + + + + + B + + + + + A + + + + + Represents a PostgreSQL point type. + + + See http://www.postgresql.org/docs/current/static/datatype-geometric.html + + + + + Represents a PostgreSQL line type. + + + See http://www.postgresql.org/docs/current/static/datatype-geometric.html + + + + + Represents a PostgreSQL Line Segment type. + + + + + Represents a PostgreSQL box type. + + + See http://www.postgresql.org/docs/current/static/datatype-geometric.html + + + + + Represents a PostgreSQL Path type. + + + + + Represents a PostgreSQL Polygon type. + + + + + Represents a PostgreSQL Circle type. + + + + + Represents a PostgreSQL inet type, which is a combination of an IPAddress and a + subnet mask. + + + http://www.postgresql.org/docs/current/static/datatype-net-types.html + + + + + Represents a PostgreSQL tid value + + + http://www.postgresql.org/docs/current/static/datatype-oid.html + + + + + Block number + + + + + Tuple index within block + + + + + Indicates that this property or field correspond to a PostgreSQL field with the specified name + + + + + The name of PostgreSQL field that corresponds to this CLR property or field + + + + + Indicates that this property or field correspond to a PostgreSQL field with the specified name + + The name of PostgreSQL field that corresponds to this CLR property or field + + + + Represents the identifier of the Well Known Binary representation of a geographical feature specified by the OGC. + http://portal.opengeospatial.org/files/?artifact_id=13227 Chapter 6.3.2.7 + + + + + The modifiers used by postgis to extend the geomtry's binary representation + + + + + A structure representing a 2D double precision floating point coordinate; + + + + + X coordinate. + + + + + Y coordinate. + + + + + Generates a new BBpoint with the specified coordinates. + + X coordinate + Y coordinate + + + + Represents an Postgis feature. + + + + + returns the binary length of the data structure without header. + + + + + + The Spatial Reference System Identifier of the geometry (0 if unspecified). + + + + + Represents an Postgis 2D Point + + + + + Represents an Ogc 2D LineString + + + + + Represents an Postgis 2D Polygon. + + + + + Represents a Postgis 2D MultiPoint + + + + + Represents a Postgis 2D MultiLineString + + + + + Represents a Postgis 2D MultiPolygon. + + + + + Represents a collection of Postgis feature. + + + + + Indicates that the value of the marked element could be null sometimes, + so the check for null is necessary before its usage. + + + [CanBeNull] public object Test() { return null; } + public void UseTest() { + var p = Test(); + var s = p.ToString(); // Warning: Possible 'System.NullReferenceException' + } + + + + + Indicates that the value of the marked element could never be null. + + + [NotNull] public object Foo() { + return null; // Warning: Possible 'null' assignment + } + + + + + Can be appplied to symbols of types derived from IEnumerable as well as to symbols of Task + and Lazy classes to indicate that the value of a collection item, of the Task.Result property + or of the Lazy.Value property can never be null. + + + + + Can be appplied to symbols of types derived from IEnumerable as well as to symbols of Task + and Lazy classes to indicate that the value of a collection item, of the Task.Result property + or of the Lazy.Value property can be null. + + + + + Indicates that the marked symbol is used implicitly (e.g. via reflection, in external library), + so this symbol will not be marked as unused (as well as by other usage inspections). + + + + + Should be used on attributes and causes ReSharper to not mark symbols marked with such attributes + as unused (as well as by other usage inspections) + + + + Only entity marked with attribute considered used. + + + Indicates implicit assignment to a member. + + + + Indicates implicit instantiation of a type with fixed constructor signature. + That means any unused constructor parameters won't be reported as such. + + + + Indicates implicit instantiation of a type. + + + + Specify what is considered used implicitly when marked + with or . + + + + Members of entity marked with attribute are considered used. + + + Entity marked with attribute and all its members considered used. + + + + This attribute is intended to mark publicly available API + which should not be removed and so is treated as used. + + + + + Describes dependency between method input and output. + + +

Function Definition Table syntax:

+ + FDT ::= FDTRow [;FDTRow]* + FDTRow ::= Input => Output | Output <= Input + Input ::= ParameterName: Value [, Input]* + Output ::= [ParameterName: Value]* {halt|stop|void|nothing|Value} + Value ::= true | false | null | notnull | canbenull + + If method has single input parameter, it's name could be omitted.
+ Using halt (or void/nothing, which is the same) + for method output means that the methos doesn't return normally.
+ canbenull annotation is only applicable for output parameters.
+ You can use multiple [ContractAnnotation] for each FDT row, + or use single attribute with rows separated by semicolon.
+
+ + + [ContractAnnotation("=> halt")] + public void TerminationMethod() + + + [ContractAnnotation("halt <= condition: false")] + public void Assert(bool condition, string text) // regular assertion method + + + [ContractAnnotation("s:null => true")] + public bool IsNullOrEmpty(string s) // string.IsNullOrEmpty() + + + // A method that returns null if the parameter is null, + // and not null if the parameter is not null + [ContractAnnotation("null => null; notnull => notnull")] + public object Transform(object data) + + + [ContractAnnotation("s:null=>false; =>true,result:notnull; =>false, result:null")] + public bool TryParse(string s, out Person result) + + +
+ + + Indicates that the function argument should be string literal and match one + of the parameters of the caller function. For example, ReSharper annotates + the parameter of . + + + public void Foo(string param) { + if (param == null) + throw new ArgumentNullException("par"); // Warning: Cannot resolve symbol + } + + + + + Indicates that IEnumerable, passed as parameter, is not enumerated. + + +
+
diff --git a/test/ntpa.conf b/test/ntpa.conf new file mode 100644 index 00000000..74c49d15 --- /dev/null +++ b/test/ntpa.conf @@ -0,0 +1,299 @@ +###################################################################### +# Configuration for NTP Analyzer statistical recordings and frontend # +###################################################################### + +Database { + # Select either MySQL or PostgreSQL + Provider MySQL + + # Address of SQL server + Host 127.0.0.1 + + # Name of database + Name ntpa2 + + # Database user name + User ntpau + + # Password for the user + Pass test123 + + # Set to 1 to automatically create all tables and data. + Create 1 + + # Set to 1 to automatically upgrade database schema. + Upgrade 1 +} + +Log { + # Levels: error, warn, notice, info, debug and trace + Severity info + File /var/log/ntpa/ntpa.log +} + +Log { + Type Console + Severity debug +} + +# Synchronize timestamps for readings across different NTP servers/peers +Reading { + Name stat1 + + # Indicate if generation should happen immediately after start up + InitialRun 0 + + # Minutes between reading values from NTP servers. + Frequency 5 + + # Indicate if readings should happen at rounded intervals. + FixedRun 1 +} + +Server { + # Primary key in database table 'host' + HostID 1 + + # Address queried by ntpq and ntpdc + HostAddress 192.168.222.114 + + # The utility used to query ntpd. Use ntpdc for old hosts. + HostType ntpq + + HostStats { + # Use name defined in Reading section or number of minutes between readings. + Frequency stat1 + } + + HostIOStats { + Frequency stat1 + } + + PeerStats { + Frequency stat1 + } + + # Base path for generated files + #FilePath /usr/local/www/ntpa + FilePath "/home/carsten/www/" + + # Base URL for generated files + WebPath "file:///home/carsten/www/" + + ########## Webpages ########## + + # Main page for a host + HostPage ntp1 { + # Indicate if generation should happen immediately after start up + InitialRun 1 + + # Minutes between generation of page + Frequency 5 + + PageTitle ntp1.example.net + + # Use either 'default' or 'bootstrap' + Template bootstrap + + # Link to peer web pages + PeerPages ntp1-peers + + # Set to 1 if this page should show a link to pool.ntp.org + PoolMember 0 + + # Links to graphs + Images { + # Name of graph group + Title "Recent offset graphs" + + # Index in graph destination array + LinkIndex 1 + + # Link to graphs in config file + Graph offset1 + Graph offset3 + } + + # Name and path to generated file. + Destinations { + File index.html + } + } + + + # Web pages for peers + # Same usage as host configuration options + PeerPages ntp1-peers { + InitialRun 1 + Frequency 240 + + PageTitle ntp1.example.net + Template bootstrap + + Images { + Title "Recent offset graphs" + LinkIndex 1 + Graph offset24 + Graph offset72 + Graph delay + } + + # Path to use for generated files. + Destinations { + Directory peers/ + } + + # Base URL to generated files. + Link peers/ + } + + AboutPage about1 { + PageTitle example.net + ContentTitle ntp1.example.net + Content { +

Lorem ipsum dolor sit amet, consectetur adipiscing elit. + Sed et risus vel leo interdum fringilla. Vestibulum ex justo, + euismod ac conat tempor a massa. Donec elementum congue.

+ } + + Destinations { + File about.html + } + } + + ############### Bootstrap menu ############## + + # Options for boot strap menu + # When using the bootstrap theme a bootstrap menu must be included + Menu { + Item title { + Type Name + Caption example.net + Link http://example.net + } + + Item main { + Caption NTP + Page ntp1 + } + + Item { + Caption About + Page about1 + } + } + + ########## Host graphs ########## + + HostGraph offset1 { + InitialRun 1 + Frequency 15 + Timespan 1 + + Title "ntp1.example.net (1 day)" + Width 1024 + Height 550 + + Stability 0 + GFrequency 1 + Jitter 1 + Offset 1 + + Destinations { + File ntp1.png + } + + Links { + Link ntp1.png + } + } + + HostGraph offset3 { + InitialRun 1 + Frequency 30 + Timespan 3 + + Title "ntp1.example.net (3 days)" + Width 1024 + Height 550 + + Stability 0 + GFrequency 1 + Jitter 1 + Offset 1 + + Destinations { + File ntp3.png + } + + Links { + Link ntp3.png + } + } + + ########## Peer graphs ########## + + PeerGraphs offset24 { + InitialRun 1 + Frequency 15 + Timespan 1 + + Title "24 hours offset" + Width 1024 + Height 550 + Jitter 0 + Offset 1 + + Destinations { + Prefix offset24- + Directory /peers/ + } + + Links { + Link peer1/offset24- + } + } + + PeerGraphs offset72 { + InitialRun 1 + Frequency 15 + Timespan 3 + + Title "72 hours offset" + Width 1024 + Height 550 + Jitter 0 + Offset 1 + + Destinations { + Prefix offset72- + Directory /peers/ + } + + Links { + Link peers/offset72- + } + } + + PeerGraphs delay { + InitialRun 1 + Frequency 180 + Timespan 15 + + Title "15 days delay" + Width 1024 + Height 550 + Delay 1 + Jitter 1 + Offset 1 + + Destinations { + Prefix delay- + Directory /peers/ + } + + Links { + Link peers/delay- + } + } +} diff --git a/test/win.conf b/test/win.conf new file mode 100644 index 00000000..0eb61289 --- /dev/null +++ b/test/win.conf @@ -0,0 +1,223 @@ + +Database { + Provider MySql + Host 192.168.10.60 + Name ntpa2 + User ntpau + Pass "test123" + Create Yes +} + +Log { + File ntpa.log + Severity Trace +} + +Reading { + Name stat1 + Frequency 5 + TimeStamp UTC +} + +Service { + Heartbeat 2 +} + +Server { + HostID 1 + HostAddress 192.168.222.114 + FilePath "C:/inetpub/ntpa/" + + HostStats { + Frequency stat1 + } + + HostIoStats { + Frequency stat1 + } + + PeerStats { + Frequency stat1 + } + + Menu { + + Item title { + Type Link + Caption example.net + Link http://example.net + } + + Item main { + Type Page + Caption NTP + Link /index.html + } + + Item { + Type Page + Caption About + Page about1 + } + } + + AboutPage about1 { + PageTitle "example.net" + Link about.html + ContentTitle "ntp1.example.net" + + Content { +

Lorem ipsum dolor sit amet, consectetur adipiscing elit. + Sed et risus vel leo interdum fringilla. Vestibulum ex justo, + euismod ac conat tempor a massa. Donec elementum congue.

+ } + + Destinations { + File about.html + } + } + + HostPage ntp1 { + PageTitle "ntp1.example.net" + Template Bootstrap + PeerPages ntp1-peers + Link index.html + + Images { + Title "Recent offset graphs" + Graph offset1 + Graph offset3 + } + + Destinations { + File index.html + } + } + + PeerPages ntp1-peers { + PageTitle "ntp1.example.net" + Template Bootstrap + Link peers/ + + Images { + Graph offset24 + Graph offset72 + Graph delay + } + + Destinations { + Directory peers/ + } + } + + HostGraph offset1 { + Frequency 15 + InitialRun Yes + Title "ntp1.example.net (1 day)" + Timespan 1 + Jitter 1 + Offset 1 + GFrequency 1 + + Destinations { + File ntp1.png + } + + Links { + Link ntp1.png + } + } + + HostGraph offset3 { + Frequency 30 + InitialRun Yes + Title "ntp1.example.net (3 days)" + Timespan 3 + Jitter 1 + Offset 1 + GFrequency 1 + + Destinations { + File ntp3.png + } + + Links { + Link ntp3.png + } + } + + PeerGraphs offset24 { + Frequency 15 + InitialRun Yes + Title "24 hours offset" + Timespan 1 + Offset 1 + + Destinations { + Prefix offset24- + Directory peers/ + } + + Links { + Link peer1/offset24- + } + } + + PeerGraphs offset72 { + Frequency 15 + InitialRun Yes + Title "72 hours offset" + Timespan 3 + Offset 1 + + Destinations { + Prefix offset72- + Directory /peers/ + } + + Links { + Link peers/offset72- + } + } + + PeerGraphs delay { + Frequency 180 + InitialRun Yes + Title "15 days delay" + Timespan 15 + Offset 1 + Jitter 1 + Delay 1 + + Destinations { + Prefix delay- + Directory /peers/ + } + + Links { + Link peers/delay- + } + } + + PeerGraphPage i1pgraphs { + InitialRun 1 + Frequency 0 + + GraphPage ntp1-peers + + Destinations { + Directory /pgraphs/ + } + } + + HostGraphPage i1graphs { + InitialRun 1 + Frequency 0 + + GraphPage ntp1 + + Destinations { + Directory hgraphs/ + } + } +}