diff --git a/.gitignore b/.gitignore index 1ca720b5..806dffaf 100644 --- a/.gitignore +++ b/.gitignore @@ -5,4 +5,4 @@ obj *.exe *.suo *.user -.db \ No newline at end of file +.my \ No newline at end of file diff --git a/designs/logo.psd b/designs/logo.psd new file mode 100644 index 00000000..7e865c95 Binary files /dev/null and b/designs/logo.psd differ diff --git a/src/Frapid.Web.sln b/src/Frapid.Web.sln index 8295a8a5..256435f8 100644 --- a/src/Frapid.Web.sln +++ b/src/Frapid.Web.sln @@ -19,6 +19,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Frapid.Areas", "Libraries\F EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Frapid.NPoco", "Libraries\Frapid.NPoco\Frapid.NPoco.csproj", "{58F77141-FFE7-45F6-B726-80100204E69D}" EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Frapid.Installer", "Libraries\Frapid.Installer\Frapid.Installer.csproj", "{BFFE76A6-7E9D-42FA-AB3A-108BD2125923}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -53,6 +55,10 @@ Global {58F77141-FFE7-45F6-B726-80100204E69D}.Debug|Any CPU.Build.0 = Debug|Any CPU {58F77141-FFE7-45F6-B726-80100204E69D}.Release|Any CPU.ActiveCfg = Release|Any CPU {58F77141-FFE7-45F6-B726-80100204E69D}.Release|Any CPU.Build.0 = Release|Any CPU + {BFFE76A6-7E9D-42FA-AB3A-108BD2125923}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {BFFE76A6-7E9D-42FA-AB3A-108BD2125923}.Debug|Any CPU.Build.0 = Debug|Any CPU + {BFFE76A6-7E9D-42FA-AB3A-108BD2125923}.Release|Any CPU.ActiveCfg = Release|Any CPU + {BFFE76A6-7E9D-42FA-AB3A-108BD2125923}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -64,5 +70,6 @@ Global {88DFDF57-A52B-4D71-A0C4-BEF1A3839506} = {0DFA1BB9-74FE-4C63-B8AF-0B312ED992F6} {0361910A-7773-4EE9-861B-FFC5636D82D1} = {0DFA1BB9-74FE-4C63-B8AF-0B312ED992F6} {58F77141-FFE7-45F6-B726-80100204E69D} = {0DFA1BB9-74FE-4C63-B8AF-0B312ED992F6} + {BFFE76A6-7E9D-42FA-AB3A-108BD2125923} = {0DFA1BB9-74FE-4C63-B8AF-0B312ED992F6} EndGlobalSection EndGlobal diff --git a/src/Frapid.Web.sln.DotSettings b/src/Frapid.Web.sln.DotSettings new file mode 100644 index 00000000..c0993e17 --- /dev/null +++ b/src/Frapid.Web.sln.DotSettings @@ -0,0 +1,12 @@ + + DO_NOT_SHOW + SUGGESTION + SUGGESTION + SUGGESTION + + + + + HINT + 15 + UseExplicitType \ No newline at end of file diff --git a/src/Frapid.Web/AppInfo.json b/src/Frapid.Web/AppInfo.json new file mode 100644 index 00000000..3f8d7877 --- /dev/null +++ b/src/Frapid.Web/AppInfo.json @@ -0,0 +1,23 @@ +{ + "ApplicationName": "Frapid", + "AutoInstall": true, + "Thumbnail": null, + "Publisher": "MixERP Inc.", + "Url": "http://frapid.com", + "DocumentationUrl": "http://frapid.com", + "AssemblyName": null, + "Version": "1.0", + "RealeasedOn": null, + "Description": "Frapid", + "Category": "N/A", + "Bundle": "Frapid Framework", + "IsMeta": true, + "DbSchema": "i18n", + "BlankDbPath": "~/db/meta.sql", + "SampleDbPath": null, + "InstallSample": false, + "My": null, + "OverrideTemplatePath":"~/Override", + "OverrideDestination":"~/Catalogs/{0}", + "DependsOn": [] +} \ No newline at end of file diff --git a/src/Frapid.Web/Application/BundleConfig.cs b/src/Frapid.Web/Application/BundleConfig.cs index 3f1e094c..53a12663 100644 --- a/src/Frapid.Web/Application/BundleConfig.cs +++ b/src/Frapid.Web/Application/BundleConfig.cs @@ -195,7 +195,7 @@ private static string[] GetLibrariesScript() private static string[] GetDashboardScript() { - List script = new List + var script = new List { "~/Scripts/jquery-1.9.1.js", "~/Scripts/angular/angular.min.js", diff --git a/src/Frapid.Web/Application/ClassicAssemblyResolver.cs b/src/Frapid.Web/Application/ClassicAssemblyResolver.cs index 0f220983..f53d3400 100644 --- a/src/Frapid.Web/Application/ClassicAssemblyResolver.cs +++ b/src/Frapid.Web/Application/ClassicAssemblyResolver.cs @@ -9,11 +9,11 @@ public class ClassicAssemblyResolver : DefaultAssembliesResolver { public override ICollection GetAssemblies() { - ICollection baseAssemblies = base.GetAssemblies(); - List assemblies = new List(baseAssemblies); - List items = FrapidApiController.GetMembers(); + var baseAssemblies = base.GetAssemblies(); + var assemblies = new List(baseAssemblies); + var items = FrapidApiController.GetMembers(); - foreach (Assembly item in items) + foreach (var item in items) { baseAssemblies.Add(item); } diff --git a/src/Frapid.Web/Application/DefaultAssemblyResolver.cs b/src/Frapid.Web/Application/DefaultAssemblyResolver.cs index 3c9cdda2..95788d09 100644 --- a/src/Frapid.Web/Application/DefaultAssemblyResolver.cs +++ b/src/Frapid.Web/Application/DefaultAssemblyResolver.cs @@ -1,5 +1,4 @@ -using System; -using System.Collections.Generic; +using System.Collections.Generic; using System.Reflection; using System.Web.Http.Dispatcher; using Frapid.Framework; @@ -11,21 +10,21 @@ public class DefaultAssemblyResolver : DefaultAssembliesResolver { public override ICollection GetAssemblies() { - ICollection baseAssemblies = base.GetAssemblies(); - List assemblies = new List(baseAssemblies); + var baseAssemblies = base.GetAssemblies(); + var assemblies = new List(baseAssemblies); try { - List items = FrapidApiController.GetMembers(); + var items = FrapidApiController.GetMembers(); - foreach (Assembly item in items) + foreach (var item in items) { baseAssemblies.Add(item); } } catch (ReflectionTypeLoadException ex) { - foreach (Exception exception in ex.LoaderExceptions) + foreach (var exception in ex.LoaderExceptions) { Log.Error("Could not load assemblies containing Frapid Web API. Exception: {Exception}", exception); } diff --git a/src/Frapid.Web/Application/LogManager.cs b/src/Frapid.Web/Application/LogManager.cs index da04c9af..5b66e438 100644 --- a/src/Frapid.Web/Application/LogManager.cs +++ b/src/Frapid.Web/Application/LogManager.cs @@ -41,7 +41,7 @@ private static LoggerConfiguration GetConfiguration() string minimumLogLevel = ConfigurationManager.GetConfigurationValue("ParameterConfigFileLocation", "MinimumLogLevel"); - LoggingLevelSwitch levelSwitch = new LoggingLevelSwitch(); + var levelSwitch = new LoggingLevelSwitch(); LogEventLevel logLevel; Enum.TryParse(minimumLogLevel, out logLevel); diff --git a/src/Frapid.Web/Application/StartupRegistration.cs b/src/Frapid.Web/Application/StartupRegistration.cs index 39b23e09..ffa8ba8b 100644 --- a/src/Frapid.Web/Application/StartupRegistration.cs +++ b/src/Frapid.Web/Application/StartupRegistration.cs @@ -9,8 +9,8 @@ public class StartupRegistration { public static void Register() { - Type iType = typeof (IStartupRegistration); - IEnumerable members = AppDomain.CurrentDomain.GetAssemblies() + var iType = typeof (IStartupRegistration); + var members = AppDomain.CurrentDomain.GetAssemblies() .SelectMany(x => x.GetTypes()) .Where(x => iType.IsAssignableFrom(x) && !x.IsInterface && !x.IsAbstract) .Select(Activator.CreateInstance); diff --git a/src/Frapid.Web/Areas/Frapid.Account/AppInfo.json b/src/Frapid.Web/Areas/Frapid.Account/AppInfo.json new file mode 100644 index 00000000..e42c6dfe --- /dev/null +++ b/src/Frapid.Web/Areas/Frapid.Account/AppInfo.json @@ -0,0 +1,23 @@ +{ + "ApplicationName": "Frapid.Account", + "AutoInstall": true, + "Thumbnail": null, + "Publisher": "MixERP Inc.", + "Url": "http://frapid.com", + "DocumentationUrl": "http://frapid.com", + "AssemblyName": "Frapid.Account", + "Version": "1.0", + "RealeasedOn": null, + "Description": "Frapid authentication module.", + "Category": "Core Modules", + "Bundle": "Frapid Framework", + "IsMeta": false, + "DbSchema": "account", + "BlankDbPath": "~/Areas/Frapid.Account/db/1.x/1.0/db-blank.sql", + "SampleDbPath": "~/Areas/Frapid.Account/db/1.x/1.0/db-sample.sql", + "InstallSample": true, + "My": "~/Areas/Frapid.Account/.my/db.sql", + "OverrideTemplatePath":"~/Areas/Frapid.Account/Override", + "OverrideDestination":"~/Catalogs/{0}/Areas", + "DependsOn": ["Frapid.Config", "Frapid.WebsiteBuilder"] +} \ No newline at end of file diff --git a/src/Frapid.Web/Areas/Frapid.Account/Frapid.Account.csproj b/src/Frapid.Web/Areas/Frapid.Account/Frapid.Account.csproj index ab8bfda9..f02d8131 100644 --- a/src/Frapid.Web/Areas/Frapid.Account/Frapid.Account.csproj +++ b/src/Frapid.Web/Areas/Frapid.Account/Frapid.Account.csproj @@ -94,12 +94,16 @@ True + + packages\Npgsql.2.2.6\lib\net45\Mono.Security.dll + True + packages\Newtonsoft.Json.7.0.1\lib\net45\Newtonsoft.Json.dll True - - packages\Npgsql.3.0.3\lib\net45\Npgsql.dll + + packages\Npgsql.2.2.6\lib\net45\Npgsql.dll True diff --git a/src/Frapid.Web/Areas/Frapid.Account/Messaging/ResetEmail.cs b/src/Frapid.Web/Areas/Frapid.Account/Messaging/ResetEmail.cs index e5123d3f..f85eed3c 100644 --- a/src/Frapid.Web/Areas/Frapid.Account/Messaging/ResetEmail.cs +++ b/src/Frapid.Web/Areas/Frapid.Account/Messaging/ResetEmail.cs @@ -7,6 +7,9 @@ using Frapid.ApplicationState.Cache; using Frapid.Account.DTO; using Frapid.Messaging; +using Frapid.Messaging.DTO; +using Frapid.Messaging.Helpers; +using Frapid.WebsiteBuilder.ViewModels; namespace Frapid.Account.Messaging { @@ -46,16 +49,32 @@ private string ParseTemplate(string template) return parsed; } + private EmailQueue GetEmail(string catalog, Reset model, string subject, string message) + { + Config config = new Config(catalog); + + return new EmailQueue + { + AddedOn = DateTime.Now, + FromName = model.Name, + ReplyTo = model.Email, + Subject = subject, + Message = message, + SendTo = config.FromEmail + }; + } + public async Task SendAsync() { string template = GetTemplate(); string parsed = ParseTemplate(template); string subject = "Your Password Reset Link for " + HttpContext.Current.Request.Url.Authority; - MailQueueManager queue = new MailQueueManager(AppUsers.GetCatalog(), parsed, "", _resetDetails.Email, - subject); + var catalog = AppUsers.GetCatalog(); + var email = this.GetEmail(catalog, this._resetDetails, subject, parsed); + var queue = new MailQueueManager(catalog, email); queue.Add(); - await queue.ProcessMailQueueAsync(); + await queue.ProcessMailQueueAsync(EmailProcessor.GetDefault()); } } } \ No newline at end of file diff --git a/src/Frapid.Web/Areas/Frapid.Account/Messaging/SignUpEmail.cs b/src/Frapid.Web/Areas/Frapid.Account/Messaging/SignUpEmail.cs index 24c668f1..34ede53b 100644 --- a/src/Frapid.Web/Areas/Frapid.Account/Messaging/SignUpEmail.cs +++ b/src/Frapid.Web/Areas/Frapid.Account/Messaging/SignUpEmail.cs @@ -7,6 +7,8 @@ using Frapid.ApplicationState.Cache; using Frapid.Account.DTO; using Frapid.Messaging; +using Frapid.Messaging.DTO; +using Frapid.Messaging.Helpers; namespace Frapid.Account.Messaging { @@ -48,15 +50,32 @@ private string ParseTemplate(string template) return parsed; } + private EmailQueue GetEmail(string catalog, Registration model, string subject, string message) + { + Config config = new Config(catalog); + + return new EmailQueue + { + AddedOn = DateTime.Now, + FromName = model.Name, + ReplyTo = model.Email, + Subject = subject, + Message = message, + SendTo = config.FromEmail + }; + } + public async Task SendAsync() { var template = this.GetTemplate(); var parsed = this.ParseTemplate(template); var subject = "Confirm Your Registration at " + HttpContext.Current.Request.Url.Authority; - MailQueueManager queue = new MailQueueManager(AppUsers.GetCatalog(), parsed, "", this._registration.Email, subject); + var catalog = AppUsers.GetCatalog(); + var email = this.GetEmail(catalog, this._registration, subject, parsed); + var queue = new MailQueueManager(catalog, email); queue.Add(); - await queue.ProcessMailQueueAsync(); + await queue.ProcessMailQueueAsync(EmailProcessor.GetDefault()); } } } \ No newline at end of file diff --git a/src/Frapid.Web/Areas/Frapid.Account/Messaging/WelcomeEmail.cs b/src/Frapid.Web/Areas/Frapid.Account/Messaging/WelcomeEmail.cs index 75a347d6..4f7a97bb 100644 --- a/src/Frapid.Web/Areas/Frapid.Account/Messaging/WelcomeEmail.cs +++ b/src/Frapid.Web/Areas/Frapid.Account/Messaging/WelcomeEmail.cs @@ -8,6 +8,8 @@ using Frapid.Account.DTO; using Frapid.Account.Models; using Frapid.Messaging; +using Frapid.Messaging.DTO; +using Frapid.Messaging.Helpers; namespace Frapid.Account.Messaging { @@ -50,15 +52,31 @@ private string ParseTemplate(string template) return parsed; } + private EmailQueue GetEmail(string catalog, IUserInfo model, string subject, string message) + { + Config config = new Config(catalog); + + return new EmailQueue + { + AddedOn = DateTime.Now, + FromName = model.Name, + ReplyTo = model.Email, + Subject = subject, + Message = message, + SendTo = config.FromEmail + }; + } + public async Task SendAsync() { string template = GetTemplate(); string parsed = ParseTemplate(template); string subject = "Welcome to " + HttpContext.Current.Request.Url.Authority; - - MailQueueManager queue = new MailQueueManager(AppUsers.GetCatalog(), parsed, "", _user.Email, subject); + var catalog = AppUsers.GetCatalog(); + var email = this.GetEmail(catalog, this._user, subject, parsed); + var queue = new MailQueueManager(catalog, email); queue.Add(); - await queue.ProcessMailQueueAsync(); + await queue.ProcessMailQueueAsync(EmailProcessor.GetDefault()); } } } \ No newline at end of file diff --git a/src/Frapid.Web/Areas/Frapid.Account/Override/Frapid.Account/EmailTemplates/account-verification.html b/src/Frapid.Web/Areas/Frapid.Account/Override/Frapid.Account/EmailTemplates/account-verification.html new file mode 100644 index 00000000..0074de7c --- /dev/null +++ b/src/Frapid.Web/Areas/Frapid.Account/Override/Frapid.Account/EmailTemplates/account-verification.html @@ -0,0 +1,14 @@ +
+ Dear {{Name}}, +
+
+ You've entered {{EmailAddress}} as the contact email address. To complete the process, we need to verify that this email address belongs to you. Simply click the link below and sign in using your email address and password. +
+
+ {{VerificationLink}} +
+
+ Thank You, +
+ {{SiteUrl}} +
\ No newline at end of file diff --git a/src/Frapid.Web/Areas/Frapid.Account/Override/Frapid.Account/EmailTemplates/password-reset.html b/src/Frapid.Web/Areas/Frapid.Account/Override/Frapid.Account/EmailTemplates/password-reset.html new file mode 100644 index 00000000..97b7eba1 --- /dev/null +++ b/src/Frapid.Web/Areas/Frapid.Account/Override/Frapid.Account/EmailTemplates/password-reset.html @@ -0,0 +1,19 @@ +
+ Dear {{Name}}, +
+
+ You or someone pretending to be you has requested to reset your password on {{SiteUrl}}. + To reset your password, click on the following link: +
+
+ {{ResetLink}} +
+
+ Please ignore this email if you did not request to reset your password. + The link will automatically expire in 24 hours. +
+
+ Thank You, +
+ {{SiteUrl}} +
\ No newline at end of file diff --git a/src/Frapid.Web/Areas/Frapid.Account/Override/Frapid.Account/EmailTemplates/welcome-3rd-party.html b/src/Frapid.Web/Areas/Frapid.Account/Override/Frapid.Account/EmailTemplates/welcome-3rd-party.html new file mode 100644 index 00000000..38029576 --- /dev/null +++ b/src/Frapid.Web/Areas/Frapid.Account/Override/Frapid.Account/EmailTemplates/welcome-3rd-party.html @@ -0,0 +1,11 @@ +
+ Dear {{Name}}, +
+
+ We are excited to have you on {{Domain}}. Because you have signed up using {{ProviderName}} in our website, an account was automatically created for you. +
+
+ Thank You, +
+ {{SiteUrl}} +
\ No newline at end of file diff --git a/src/Frapid.Web/Areas/Frapid.Account/Override/Frapid.Account/EmailTemplates/welcome.html b/src/Frapid.Web/Areas/Frapid.Account/Override/Frapid.Account/EmailTemplates/welcome.html new file mode 100644 index 00000000..84fe5735 --- /dev/null +++ b/src/Frapid.Web/Areas/Frapid.Account/Override/Frapid.Account/EmailTemplates/welcome.html @@ -0,0 +1,14 @@ +
+ Dear {{Name}}, +
+
+ Welcome to {{Domain}}, we are excited to have you with us! Sign-in to our website using this link: +
+
+ {{SiteUrl}}/account/sign-in +
+
+ Thank You, +
+ {{SiteUrl}} +
\ No newline at end of file diff --git a/src/Frapid.Web/Areas/Frapid.Account/Override/Frapid.Account/Views/Reset/Do.cshtml b/src/Frapid.Web/Areas/Frapid.Account/Override/Frapid.Account/Views/Reset/Do.cshtml new file mode 100644 index 00000000..664c3b55 --- /dev/null +++ b/src/Frapid.Web/Areas/Frapid.Account/Override/Frapid.Account/Views/Reset/Do.cshtml @@ -0,0 +1,49 @@ +@using Frapid.i18n +@model dynamic + +@{ + ViewBag.Title = "Reset Your Account"; + Layout = ViewBag.LayoutPath + ViewBag.Layout; +} +@if (CultureManager.IsRtl()) +{ + +} +else +{ + +} + + +
+
+
Reset Your Account
+
+
+ + +
+
+ + +
+ + + +
+
+ + Cancel +
+
+ + + + + diff --git a/src/Frapid.Web/Areas/Frapid.Account/Override/Frapid.Account/Views/Reset/Index.cshtml b/src/Frapid.Web/Areas/Frapid.Account/Override/Frapid.Account/Views/Reset/Index.cshtml new file mode 100644 index 00000000..7ae93b12 --- /dev/null +++ b/src/Frapid.Web/Areas/Frapid.Account/Override/Frapid.Account/Views/Reset/Index.cshtml @@ -0,0 +1,47 @@ +@model Frapid.Account.ViewModels.Reset +@using Frapid.i18n +@{ + ViewBag.Title = "Reset Your Account"; + Layout = ViewBag.LayoutPath + ViewBag.Layout; +} +@if (CultureManager.IsRtl()) +{ + +} +else +{ + +} + + +
+
+
Forgot Your Password?
+
+ To reset your password, enter the email address which is registered in our website. + We will send you an email on your email address with instructions to help you + reset your password. +
+
+
+ + +
+ + + + +
+
+ + Cancel +
+
+ + + + + diff --git a/src/Frapid.Web/Areas/Frapid.Account/Override/Frapid.Account/Views/Reset/ResetEmailSent.cshtml b/src/Frapid.Web/Areas/Frapid.Account/Override/Frapid.Account/Views/Reset/ResetEmailSent.cshtml new file mode 100644 index 00000000..80800914 --- /dev/null +++ b/src/Frapid.Web/Areas/Frapid.Account/Override/Frapid.Account/Views/Reset/ResetEmailSent.cshtml @@ -0,0 +1,26 @@ +@using Frapid.i18n + +@{ + ViewBag.Title = "Email Sent"; + Layout = ViewBag.LayoutPath + ViewBag.Layout; +} +@if (CultureManager.IsRtl()) +{ + +} +else +{ + +} + + diff --git a/src/Frapid.Web/Areas/Frapid.Account/Override/Frapid.Account/Views/SignIn/Index.cshtml b/src/Frapid.Web/Areas/Frapid.Account/Override/Frapid.Account/Views/SignIn/Index.cshtml new file mode 100644 index 00000000..2f1ff2de --- /dev/null +++ b/src/Frapid.Web/Areas/Frapid.Account/Override/Frapid.Account/Views/SignIn/Index.cshtml @@ -0,0 +1,113 @@ +@using Frapid.i18n +@using Frapid.i18n.Resources +@model Frapid.Account.ViewModels.SignIn + + + + + + + + + + @Titles.SignIn + + @if (CultureManager.IsRtl()) + { + + + } + else + { + + + } + + + + + + + + + + + +
+
+ +
+
+ + +
+ + + +
+
+ +
+ + + + + \ No newline at end of file diff --git a/src/Frapid.Web/Areas/Frapid.Account/Override/Frapid.Account/Views/SignUp/EmailSent.cshtml b/src/Frapid.Web/Areas/Frapid.Account/Override/Frapid.Account/Views/SignUp/EmailSent.cshtml new file mode 100644 index 00000000..17b89f37 --- /dev/null +++ b/src/Frapid.Web/Areas/Frapid.Account/Override/Frapid.Account/Views/SignUp/EmailSent.cshtml @@ -0,0 +1,27 @@ +@using Frapid.i18n + +@{ + ViewBag.Title = "Email Sent"; + Layout = ViewBag.LayoutPath + ViewBag.Layout; +} +@if (CultureManager.IsRtl()) +{ + +} +else +{ + +} + + diff --git a/src/Frapid.Web/Areas/Frapid.Account/Override/Frapid.Account/Views/SignUp/Index.cshtml b/src/Frapid.Web/Areas/Frapid.Account/Override/Frapid.Account/Views/SignUp/Index.cshtml new file mode 100644 index 00000000..c0d44d3d --- /dev/null +++ b/src/Frapid.Web/Areas/Frapid.Account/Override/Frapid.Account/Views/SignUp/Index.cshtml @@ -0,0 +1,97 @@ +@using Frapid.i18n +@{ + ViewBag.Title = "Sign Up"; + Layout = ViewBag.LayoutPath + ViewBag.Layout; +} +@if (CultureManager.IsRtl()) +{ + +} +else +{ + +} + + + + + + + + + diff --git a/src/Frapid.Web/Areas/Frapid.Account/Override/Frapid.Account/Views/SignUp/InvalidToken.cshtml b/src/Frapid.Web/Areas/Frapid.Account/Override/Frapid.Account/Views/SignUp/InvalidToken.cshtml new file mode 100644 index 00000000..2ecb072d --- /dev/null +++ b/src/Frapid.Web/Areas/Frapid.Account/Override/Frapid.Account/Views/SignUp/InvalidToken.cshtml @@ -0,0 +1,25 @@ +@using Frapid.i18n + +@{ + ViewBag.Title = "Invalid Confirmation Code"; + Layout = ViewBag.LayoutPath + ViewBag.Layout; +} +@if (CultureManager.IsRtl()) +{ + +} +else +{ + +} + + diff --git a/src/Frapid.Web/Areas/Frapid.Account/Override/Frapid.Account/Views/SignUp/Welcome.cshtml b/src/Frapid.Web/Areas/Frapid.Account/Override/Frapid.Account/Views/SignUp/Welcome.cshtml new file mode 100644 index 00000000..f1d98198 --- /dev/null +++ b/src/Frapid.Web/Areas/Frapid.Account/Override/Frapid.Account/Views/SignUp/Welcome.cshtml @@ -0,0 +1,26 @@ +@using Frapid.i18n + +@{ + ViewBag.Title = "Welcome"; + Layout = ViewBag.LayoutPath + ViewBag.Layout; +} +@if (CultureManager.IsRtl()) +{ + +} +else +{ + +} + + diff --git a/src/Frapid.Web/Areas/Frapid.Account/Override/Frapid.Account/Views/web.config b/src/Frapid.Web/Areas/Frapid.Account/Override/Frapid.Account/Views/web.config new file mode 100644 index 00000000..4e5a0de8 --- /dev/null +++ b/src/Frapid.Web/Areas/Frapid.Account/Override/Frapid.Account/Views/web.config @@ -0,0 +1,42 @@ + + + + + +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/Frapid.Web/Areas/Frapid.Account/Override/Frapid.Account/web.config b/src/Frapid.Web/Areas/Frapid.Account/Override/Frapid.Account/web.config new file mode 100644 index 00000000..ea44ff97 --- /dev/null +++ b/src/Frapid.Web/Areas/Frapid.Account/Override/Frapid.Account/web.config @@ -0,0 +1,9 @@ + + + + + + + + + \ No newline at end of file diff --git a/src/Frapid.Web/Areas/Frapid.Account/db/1.x/1.0/db-blank.sql b/src/Frapid.Web/Areas/Frapid.Account/db/1.x/1.0/db-blank.sql index 5fabc768..4deb5add 100644 --- a/src/Frapid.Web/Areas/Frapid.Account/db/1.x/1.0/db-blank.sql +++ b/src/Frapid.Web/Areas/Frapid.Account/db/1.x/1.0/db-blank.sql @@ -99,7 +99,16 @@ ADD FOREIGN KEY(audit_user_id) REFERENCES account.users; ALTER TABLE website.contents ADD FOREIGN KEY(author_id) REFERENCES account.users; -ALTER TABLE website.contents +ALTER TABLE website.contacts +ADD FOREIGN KEY(audit_user_id) REFERENCES account.users; + +ALTER TABLE website.menus +ADD FOREIGN KEY(audit_user_id) REFERENCES account.users; + +ALTER TABLE website.menu_items +ADD FOREIGN KEY(audit_user_id) REFERENCES account.users; + +ALTER TABLE website.menu_items ADD FOREIGN KEY(audit_user_id) REFERENCES account.users; ALTER TABLE config.filters diff --git a/src/Frapid.Web/Areas/Frapid.Account/db/1.x/1.0/db-sample.sql b/src/Frapid.Web/Areas/Frapid.Account/db/1.x/1.0/db-sample.sql index 5fabc768..4deb5add 100644 --- a/src/Frapid.Web/Areas/Frapid.Account/db/1.x/1.0/db-sample.sql +++ b/src/Frapid.Web/Areas/Frapid.Account/db/1.x/1.0/db-sample.sql @@ -99,7 +99,16 @@ ADD FOREIGN KEY(audit_user_id) REFERENCES account.users; ALTER TABLE website.contents ADD FOREIGN KEY(author_id) REFERENCES account.users; -ALTER TABLE website.contents +ALTER TABLE website.contacts +ADD FOREIGN KEY(audit_user_id) REFERENCES account.users; + +ALTER TABLE website.menus +ADD FOREIGN KEY(audit_user_id) REFERENCES account.users; + +ALTER TABLE website.menu_items +ADD FOREIGN KEY(audit_user_id) REFERENCES account.users; + +ALTER TABLE website.menu_items ADD FOREIGN KEY(audit_user_id) REFERENCES account.users; ALTER TABLE config.filters diff --git a/src/Frapid.Web/Areas/Frapid.Account/db/1.x/1.0/src/10.db.sql b/src/Frapid.Web/Areas/Frapid.Account/db/1.x/1.0/src/10.db.sql index 3c932110..f532013c 100644 --- a/src/Frapid.Web/Areas/Frapid.Account/db/1.x/1.0/src/10.db.sql +++ b/src/Frapid.Web/Areas/Frapid.Account/db/1.x/1.0/src/10.db.sql @@ -98,7 +98,16 @@ ADD FOREIGN KEY(audit_user_id) REFERENCES account.users; ALTER TABLE website.contents ADD FOREIGN KEY(author_id) REFERENCES account.users; -ALTER TABLE website.contents +ALTER TABLE website.contacts +ADD FOREIGN KEY(audit_user_id) REFERENCES account.users; + +ALTER TABLE website.menus +ADD FOREIGN KEY(audit_user_id) REFERENCES account.users; + +ALTER TABLE website.menu_items +ADD FOREIGN KEY(audit_user_id) REFERENCES account.users; + +ALTER TABLE website.menu_items ADD FOREIGN KEY(audit_user_id) REFERENCES account.users; ALTER TABLE config.filters diff --git a/src/Frapid.Web/Areas/Frapid.Account/packages.config b/src/Frapid.Web/Areas/Frapid.Account/packages.config index a37059f6..015827ab 100644 --- a/src/Frapid.Web/Areas/Frapid.Account/packages.config +++ b/src/Frapid.Web/Areas/Frapid.Account/packages.config @@ -9,5 +9,5 @@ - + \ No newline at end of file diff --git a/src/Frapid.Web/Areas/Frapid.Account/packages/Npgsql.2.2.6/Npgsql.2.2.6.nupkg b/src/Frapid.Web/Areas/Frapid.Account/packages/Npgsql.2.2.6/Npgsql.2.2.6.nupkg new file mode 100644 index 00000000..55ca38b8 Binary files /dev/null and b/src/Frapid.Web/Areas/Frapid.Account/packages/Npgsql.2.2.6/Npgsql.2.2.6.nupkg differ diff --git a/src/Frapid.Web/Areas/Frapid.Account/packages/Npgsql.2.2.6/lib/net20/Mono.Security.dll b/src/Frapid.Web/Areas/Frapid.Account/packages/Npgsql.2.2.6/lib/net20/Mono.Security.dll new file mode 100644 index 00000000..5173f0dc Binary files /dev/null and b/src/Frapid.Web/Areas/Frapid.Account/packages/Npgsql.2.2.6/lib/net20/Mono.Security.dll differ diff --git a/src/Frapid.Web/Areas/Frapid.Account/packages/Npgsql.2.2.6/lib/net20/Npgsql.dll b/src/Frapid.Web/Areas/Frapid.Account/packages/Npgsql.2.2.6/lib/net20/Npgsql.dll new file mode 100644 index 00000000..933eff1b Binary files /dev/null and b/src/Frapid.Web/Areas/Frapid.Account/packages/Npgsql.2.2.6/lib/net20/Npgsql.dll differ diff --git a/src/Frapid.Web/Areas/Frapid.Account/packages/Npgsql.2.2.6/lib/net20/Npgsql.xml b/src/Frapid.Web/Areas/Frapid.Account/packages/Npgsql.2.2.6/lib/net20/Npgsql.xml new file mode 100644 index 00000000..ffe00a7a --- /dev/null +++ b/src/Frapid.Web/Areas/Frapid.Account/packages/Npgsql.2.2.6/lib/net20/Npgsql.xml @@ -0,0 +1,7603 @@ + + + + Npgsql + + + + + Handles serialisation of .NET array or IEnumeration to pg format. + Arrays of arrays, enumerations of enumerations, arrays of enumerations etc. + are treated as multi-dimensional arrays (in much the same manner as an array of arrays + is used to emulate multi-dimensional arrays in languages that lack native support for them). + If such an enumeration of enumerations is "jagged" (as opposed to rectangular, cuboid, + hypercuboid, hyperhypercuboid, etc) then this class will "correctly" serialise it, but pg + will raise an error as it doesn't allow jagged arrays. + + + + + Create an ArrayNativeToBackendTypeConverter with the element converter passed + + The that would be used to serialise the element type. + + + + Serialise the enumeration or array. + + + + + Convert a System.Array to PG binary format. + Write the array header and prepare to write array data to the stream. + + + + + Append all array data to the binary stream. + + + + + Handles parsing of pg arrays into .NET arrays. + + + + + Takes a string representation of a pg 1-dimensional array + (or a 1-dimensional row within an n-dimensional array) + and allows enumeration of the string represenations of each items. + + + + + Takes a string representation of a pg n-dimensional array + and allows enumeration of the string represenations of the next + lower level of rows (which in turn can be taken as (n-1)-dimensional arrays. + + + + + Takes an ArrayList which may be an ArrayList of ArrayLists, an ArrayList of ArrayLists of ArrayLists + and so on and enumerates the items that aren't ArrayLists (the leaf nodes if we think of the ArrayList + passed as a tree). Simply uses the ArrayLists' own IEnumerators to get that of the next, + pushing them onto a stack until we hit something that isn't an ArrayList. + ArrayList to enumerate + IEnumerable + + + + + Create a new ArrayBackendToNativeTypeConverter + + for the element type. + + + + Creates an array from pg text representation. + + + + + Creates an array list from pg represenation of an array. + Multidimensional arrays are treated as ArrayLists of ArrayLists + + + + + Creates an n-dimensional array from an ArrayList of ArrayLists or + a 1-dimensional array from something else. + + to convert + Type of the elements in the list + produced. + + + + Creates an n-dimensional System.Array from PG binary representation. + This function reads the array header and sets up an n-dimensional System.Array object to hold its data. + PopulateArrayFromBinaryArray() is then called to carry out array population. + + + + + Recursively populates an array from PB binary data representation. + + + + + Takes an array of ints and treats them like the limits of a set of counters. + Retains a matching set of ints that is set to all zeros on the first ++ + On a ++ it increments the "right-most" int. If that int reaches it's + limit it is set to zero and the one before it is incremented, and so on. + + Making this a more general purpose class is pretty straight-forward, but we'll just put what we need here. + + + + + Implements a bit string; a collection of zero or more bits which can each be 1 or 0. + BitString's behave as a list of bools, though like most strings and unlike most collections the position + tends to be of as much significance as the value. + BitStrings are often used as masks, and are commonly cast to and from other values. + + + + + Represents the empty string. + + + + + Create a BitString from an enumeration of boolean values. The BitString will contain + those booleans in the order they came in. + + The boolean values. + + + + Creates a BitString filled with a given number of true or false values. + + The value to fill the string with. + The number of bits to fill. + + + + Creats a bitstring from a string. + The string to copy from. + + + + + + Creates a single-bit element from a boolean value. + + The bool value which determines whether + the bit is 1 or 0. + + + + Creates a bitstring from an unsigned integer value. The string will be the shortest required to + contain the integer (e.g. 1 bit for 0 or 1, 2 for 2 or 3, 3 for 4-7, and so on). + + The integer. + This method is not CLS Compliant, and may not be available to some languages. + + + + Creates a bitstring from an integer value. The string will be the shortest required to + contain the integer (e.g. 1 bit for 0 or 1, 2 for 2 or 3, 3 for 4-7, and so on). + + The integer. + + + + Finds the first instance of a given value + + The value - whether true or false - to search for. + The index of the value found, or -1 if none are present. + + + + True if there is at least one bit with the value looked for. + + The value - true or false - to detect. + True if at least one bit was the same as item, false otherwise. + + + + Copies the bitstring to an array of bools. + + The boolean array to copy to. + The index in the array to start copying from. + + + + Returns an enumerator that enumerates through the string. + + The enumerator. + + + + Creats a bitstring by concatenating another onto this one. + + The string to append to this one. + The combined strings. + + + + Returns a substring of this string. + + The position to start from, must be between 0 and the length of the string. + The length of the string to return, must be greater than zero, and may not be + so large that the start + length exceeds the bounds of this instance. + The Bitstring identified + + + + Returns a substring of this string. + + The position to start from, must be between 0 and the length of the string, + the rest of the string is returned. + The Bitstring identified + + + + A logical and between this string and another. The two strings must be the same length. + + Another BitString to AND with this one. + A bitstring with 1 where both BitStrings had 1 and 0 otherwise. + + + + A logical or between this string and another. The two strings must be the same length. + + Another BitString to OR with this one. + A bitstring with 1 where either BitString had 1 and 0 otherwise. + + + + A logical xor between this string and another. The two strings must be the same length. + + Another BitString to XOR with this one. + A bitstring with 1 where one BitStrings and the other had 0, + and 0 where they both had 1 or both had 0. + + + + A bitstring that is the logical inverse of this one. + + A bitstring of the same length as this with 1 where this has 0 and vice-versa. + + + + Shifts the string operand bits to the left, filling with zeros to produce a + string of the same length. + + The number of bits to shift to the left. + A left-shifted bitstring. + The behaviour of LShift is closer to what one would expect from dealing + with PostgreSQL bit-strings than in using the same operations on integers in .NET + In particular, negative operands result in a right-shift, and operands greater than + the length of the string will shift it entirely, resulting in a zero-filled string. + + + + + Shifts the string operand bits to the right, filling with zeros to produce a + string of the same length. + + The number of bits to shift to the right. + A right-shifted bitstring. + The behaviour of RShift is closer to what one would expect from dealing + with PostgreSQL bit-strings than in using the same operations on integers in .NET + In particular, negative operands result in a left-shift, and operands greater than + the length of the string will shift it entirely, resulting in a zero-filled string. It also performs + a logical shift, rather than an arithmetic shift, so it always sets the vacated bit positions to zero + (like PostgreSQL and like .NET for unsigned integers but not for signed integers). + + + + + Returns true if the this string is identical to the argument passed. + + + + + Compares two strings. Strings are compared as strings, so while 0 being less than 1 will + mean a comparison between two strings of the same size is the same as treating them as numbers, + in the case of two strings of differing lengths the comparison starts at the right-most (most significant) + bit, and if all bits of the shorter string are exhausted without finding a comparison, then the larger + string is deemed to be greater than the shorter (0010 is greater than 0001 but less than 00100). + + Another string to compare with this one. + A value if the two strings are identical, an integer less + than zero if this is less than the argument, and an integer greater + than zero otherwise. + + + + Compares the string with another object. + + The object to compare with. + If the object is null then this string is considered greater. If the object is another BitString + then they are compared as in the explicit comparison for BitStrings + in any other case a is thrown. + + + + Compares this BitString with an object for equality. + + + + + Returns a code for use in hashing operations. + + + + + Returns a string representation of the BitString. + + + A string which can contain a letter and optionally a number which sets a minimum size for the string + returned. In each case using the lower-case form of the letter will result in a lower-case string + being returned. + + + B + A string of 1s and 0s. + + + X + An hexadecimal string (will result in an error unless the string's length is divisible by 4). + + + G + A string of 1s and 0s in single-quotes preceded by 'B' (Postgres bit string literal syntax). + + Y + An hexadecimal string in single-quotes preceded by 'X' (Postgres bit literal syntax, will result in an error unless the string's length is divisible by 4. + + C + The format produced by format-string "Y" if legal, otherwise that produced by format-string "G". + E + The most compact safe representation for Postgres. If single bit will be either a 0 or a 1. Otherwise if it + can be that produce by format string "Y" it will, otherwise if there are less than 9bits in length it will be that + produced by format-string "G". For longer strings that cannot be represented in hexadecimal it will be a string + representing the first part of the string in format "Y" followed by the PostgreSQL concatenation operator, followed + by the final bits in the format "G". E.g. "X'13DCE'||B'110'" + If format is empty or null, it is treated as if "B" had been passed (the default repreesentation, and that + generally used by PostgreSQL for display). + + The formatted string. + + + + Returns a string representation for the Bitstring + + A string containing '0' and '1' characters. + + + + Returns the same string as . formatProvider is ignored. + + + + + Parses a string to produce a BitString. Most formats that can be produced by + can be accepted, but hexadecimal + can be interpreted with the preceding X' to mark the following characters as + being hexadecimal rather than binary. + + + + + Performs a logical AND on the two operands. + + + + + Performs a logcial OR on the two operands. + + + + + Perofrms a logical EXCLUSIVE-OR on the two operands + + + + + Performs a logical NOT on the operand. + + + + + Concatenates the operands. + + + + + Left-shifts the string BitString. + + + + + Right-shifts the string BitString. + + + + + Compares the two operands. + + + + + Compares the two operands. + + + + + Compares the two operands. + + + + + Compares the two operands. + + + + + Compares the two operands. + + + + + Compares the two operands. + + + + + Interprets the bitstring as a series of bits in an encoded character string, + encoded according to the Encoding passed, and returns that string. + The bitstring must contain a whole number of octets(bytes) and also be + valid according to the Encoding passed. + + The to use in producing the string. + The string that was encoded in the BitString. + + + + Interprets the bitstring as a series of octets (bytes) and returns those octets. Fails + if the Bitstring does not contain a whole number of octets (its length is not evenly + divisible by 8). + + + + + Interprets the bitstring as a series of signed octets (bytes) and returns those octets. Fails + if the Bitstring does not contain a whole number of octets (its length is not evenly + divisible by 8). + This method is not CLS-Compliant and may not be available to languages that cannot + handle signed bytes. + + + + + Interprets the bitstring as a series of unsigned 16-bit integers and returns those integers. + Fails if the Bitstring's length is not evenly divisible by 16. + This method is not CLS-Compliant and may not be available to languages that cannot + handle unsigned integers. + + + + + Interprets the bitstring as a series of 16-bit integers and returns those integers. + Fails if the Bitstring's length is not evenly divisible by 16. + + + + + Interprets the bitstring as a series of unsigned 32-bit integers and returns those integers. + Fails if the Bitstring's length is not evenly divisible by 32. + This method is not CLS-Compliant and may not be available to languages that cannot + handle unsigned integers. + + + + + Interprets the bitstring as a series of signed 32-bit integers and returns those integers. + Fails if the Bitstring's length is not evenly divisible by 32. + + + + + Interprets the bitstring as a series of unsigned 64-bit integers and returns those integers. + Fails if the Bitstring's length is not evenly divisible by 64. + This method is not CLS-Compliant and may not be available to languages that cannot + handle unsigned integers. + + + + + Interprets the bitstring as a series of signed 64-bit integers and returns those integers. + Fails if the Bitstring's length is not evenly divisible by 64. + + + + + The length of the string. + + + + + Retrieves the value of the bit at the given index. + + + + + Represents the PostgreSQL interval datatype. + PostgreSQL differs from .NET in how it's interval type doesn't assume 24 hours in a day + (to deal with 23- and 25-hour days caused by daylight savings adjustments) and has a concept + of months that doesn't exist in .NET's class. (Neither datatype + has any concessions for leap-seconds). + For most uses just casting to and from TimeSpan will work correctly — in particular, + the results of subtracting one or the PostgreSQL date, time and + timestamp types from another should be the same whether you do so in .NET or PostgreSQL — + but if the handling of days and months in PostgreSQL is important to your application then you + should use this class instead of . + If you don't know whether these differences are important to your application, they + probably arent! Just use and do not use this class directly ☺ + To avoid forcing unnecessary provider-specific concerns on users who need not be concerned + with them a call to on a field containing an + value will return a rather than an + . If you need the extra functionality of + then use . + + + + + + + + + + Represents the number of ticks (100ns periods) in one microsecond. This field is constant. + + + + + Represents the number of ticks (100ns periods) in one millisecond. This field is constant. + + + + + Represents the number of ticks (100ns periods) in one second. This field is constant. + + + + + Represents the number of ticks (100ns periods) in one minute. This field is constant. + + + + + Represents the number of ticks (100ns periods) in one hour. This field is constant. + + + + + Represents the number of ticks (100ns periods) in one day. This field is constant. + + + + + Represents the number of hours in one day (assuming no daylight savings adjustments). This field is constant. + + + + + Represents the number of days assumed in one month if month justification or unjustifcation is performed. + This is set to 30 for consistency with PostgreSQL. Note that this is means that month adjustments cause + a year to be taken as 30 × 12 = 360 rather than 356/366 days. + + + + + Represents the number of ticks (100ns periods) in one day, assuming 30 days per month. + + + + + Represents the number of months in a year. This field is constant. + + + + + Represents the maximum . This field is read-only. + + + + + Represents the minimum . This field is read-only. + + + + + Represents the zero . This field is read-only. + + + + + Initializes a new to the specified number of ticks. + + A time period expressed in 100ns units. + + + + Initializes a new to hold the same time as a + + A time period expressed in a + + + + Initializes a new to the specified number of months, days + & ticks. + + Number of months. + Number of days. + Number of 100ns units. + + + + Initializes a new to the specified number of + days, hours, minutes & seconds. + + Number of days. + Number of hours. + Number of minutes. + Number of seconds. + + + + Initializes a new to the specified number of + days, hours, minutes, seconds & milliseconds. + + Number of days. + Number of hours. + Number of minutes. + Number of seconds. + Number of milliseconds. + + + + Initializes a new to the specified number of + months, days, hours, minutes, seconds & milliseconds. + + Number of months. + Number of days. + Number of hours. + Number of minutes. + Number of seconds. + Number of milliseconds. + + + + Initializes a new to the specified number of + years, months, days, hours, minutes, seconds & milliseconds. + Years are calculated exactly equivalent to 12 months. + + Number of years. + Number of months. + Number of days. + Number of hours. + Number of minutes. + Number of seconds. + Number of milliseconds. + + + + Creates an from a number of ticks. + + The number of ticks (100ns units) in the interval. + A d with the given number of ticks. + + + + Creates an from a number of microseconds. + + The number of microseconds in the interval. + A d with the given number of microseconds. + + + + Creates an from a number of milliseconds. + + The number of milliseconds in the interval. + A d with the given number of milliseconds. + + + + Creates an from a number of seconds. + + The number of seconds in the interval. + A d with the given number of seconds. + + + + Creates an from a number of minutes. + + The number of minutes in the interval. + A d with the given number of minutes. + + + + Creates an from a number of hours. + + The number of hours in the interval. + A d with the given number of hours. + + + + Creates an from a number of days. + + The number of days in the interval. + A d with the given number of days. + + + + Creates an from a number of months. + + The number of months in the interval. + A d with the given number of months. + + + + Adds another interval to this instance and returns the result. + + An to add to this instance. + An whose values are the sums of the two instances. + + + + Subtracts another interval from this instance and returns the result. + + An to subtract from this instance. + An whose values are the differences of the two instances. + + + + Returns an whose value is the negated value of this instance. + + An whose value is the negated value of this instance. + + + + This absolute value of this instance. In the case of some, but not all, components being negative, + the rules used for justification are used to determine if the instance is positive or negative. + + An whose value is the absolute value of this instance. + + + + Equivalent to PostgreSQL's justify_days function. + + An based on this one, but with any hours outside of the range [-23, 23] + converted into days. + + + + Opposite to PostgreSQL's justify_days function. + + An based on this one, but with any days converted to multiples of ±24hours. + + + + Equivalent to PostgreSQL's justify_months function. + + An based on this one, but with any days outside of the range [-30, 30] + converted into months. + + + + Opposite to PostgreSQL's justify_months function. + + An based on this one, but with any months converted to multiples of ±30days. + + + + Equivalent to PostgreSQL's justify_interval function. + + An based on this one, + but with any months converted to multiples of ±30days + and then with any days converted to multiples of ±24hours + + + + Opposite to PostgreSQL's justify_interval function. + + An based on this one, but with any months converted to multiples of ±30days and then any days converted to multiples of ±24hours; + + + + Produces a canonical NpgslInterval with 0 months and hours in the range of [-23, 23]. + + + While the fact that for many purposes, two different instances could be considered + equivalent (e.g. one with 2days, 3hours and one with 1day 27hours) there are different possible canonical forms. + + E.g. we could move all excess hours into days and all excess days into months and have the most readable form, + or we could move everything into the ticks and have the form that allows for the easiest arithmetic) the form + chosen has two important properties that make it the best choice. + First, it is closest two how + objects are most often represented. Second, it is compatible with results of many + PostgreSQL functions, particularly with age() and the results of subtracting one date, time or timestamp from + another. + + Note that the results of casting a to is + canonicalised. + + + An based on this one, but with months converted to multiples of ±30days and with any hours outside of the range [-23, 23] + converted into days. + + + + Implicit cast of a to an + + A + An eqivalent, canonical, . + + + + Implicit cast of an to a . + + A . + An equivalent . + + + + Returns true if another is exactly the same as this instance. + + An for comparison. + true if the two instances are exactly the same, + false otherwise. + + + + Returns true if another object is an , that is exactly the same as + this instance + + An for comparison. + true if the argument is an and is exactly the same + as this one, false otherwise. + + + + Compares two instances. + + The first . + The second . + 0 if the two are equal or equivalent. A value greater than zero if x is greater than y, + a value less than zero if x is less than y. + + + + A hash code suitable for uses with hashing algorithms. + + An signed integer. + + + + Compares this instance with another/ + + An to compare this with. + 0 if the instances are equal or equivalent. A value less than zero if + this instance is less than the argument. A value greater than zero if this instance + is greater than the instance. + + + + Compares this instance with another/ + + An object to compare this with. + 0 if the argument is an and the instances are equal or equivalent. + A value less than zero if the argument is an and + this instance is less than the argument. + A value greater than zero if the argument is an and this instance + is greater than the instance. + A value greater than zero if the argument is null. + The argument is not an . + + + + Parses a and returns a instance. + Designed to use the formats generally returned by PostgreSQL. + + The to parse. + An represented by the argument. + The string was null. + A value obtained from parsing the string exceeded the values allowed for the relevant component. + The string was not in a format that could be parsed to produce an . + + + + Attempt to parse a to produce an . + + The to parse. + (out) The produced, or if the parsing failed. + true if the parsing succeeded, false otherwise. + + + + Create a representation of the instance. + The format returned is of the form: + [M mon[s]] [d day[s]] [HH:mm:ss[.f[f[f[f[f[f[f[f[f]]]]]]]]]] + A zero is represented as 00:00:00 + + Ticks are 100ns, Postgress resolution is only to 1µs at most. Hence we lose 1 or more decimal + precision in storing values in the database. Despite this, this method will output that extra + digit of precision. It's forward-compatible with any future increases in resolution up to 100ns, + and also makes this ToString() more applicable to any other use-case. + + + The representation. + + + + Adds two together. + + The first to add. + The second to add. + An whose values are the sum of the arguments. + + + + Subtracts one from another. + + The to subtract the other from. + The to subtract from the other. + An whose values are the difference of the arguments + + + + Returns true if two are exactly the same. + + The first to compare. + The second to compare. + true if the two arguments are exactly the same, false otherwise. + + + + Returns false if two are exactly the same. + + The first to compare. + The second to compare. + false if the two arguments are exactly the same, true otherwise. + + + + Compares two instances to see if the first is less than the second + + The first to compare. + The second to compare. + true if the first is less than second, false otherwise. + + + + Compares two instances to see if the first is less than or equivalent to the second + + The first to compare. + The second to compare. + true if the first is less than or equivalent to second, false otherwise. + + + + Compares two instances to see if the first is greater than the second + + The first to compare. + The second to compare. + true if the first is greater than second, false otherwise. + + + + Compares two instances to see if the first is greater than or equivalent the second + + The first to compare. + The second to compare. + true if the first is greater than or equivalent to the second, false otherwise. + + + + Returns the instance. + + An . + The argument. + + + + Negates an instance. + + An . + The negation of the argument. + + + + The total number of ticks(100ns units) contained. This is the resolution of the + type. This ignores the number of days and + months held. If you want them included use first. + The resolution of the PostgreSQL + interval type is by default 1µs = 1,000 ns. It may be smaller as follows: + + + interval(0) + resolution of 1s (1 second) + + + interval(1) + resolution of 100ms = 0.1s (100 milliseconds) + + + interval(2) + resolution of 10ms = 0.01s (10 milliseconds) + + + interval(3) + resolution of 1ms = 0.001s (1 millisecond) + + + interval(4) + resolution of 100µs = 0.0001s (100 microseconds) + + + interval(5) + resolution of 10µs = 0.00001s (10 microseconds) + + + interval(6) or interval + resolution of 1µs = 0.000001s (1 microsecond) + + + As such, if the 100-nanosecond resolution is significant to an application, a PostgreSQL interval will + not suffice for those purposes. + In more frequent cases though, the resolution of the interval suffices. + will always suffice to handle the resolution of any interval value, and upon + writing to the database, will be rounded to the resolution used. + + The number of ticks in the instance. + + + + + Gets the number of whole microseconds held in the instance. + An in the range [-999999, 999999]. + + + + + Gets the number of whole milliseconds held in the instance. + An in the range [-999, 999]. + + + + + Gets the number of whole seconds held in the instance. + An in the range [-59, 59]. + + + + + Gets the number of whole minutes held in the instance. + An in the range [-59, 59]. + + + + + Gets the number of whole hours held in the instance. + Note that this can be less than -23 or greater than 23 unless + has been used to produce this instance. + + + + + Gets the number of days held in the instance. + Note that this does not pay attention to a time component with -24 or less hours or + 24 or more hours, unless has been called to produce this instance. + + + + + Gets the number of months held in the instance. + Note that this does not pay attention to a day component with -30 or less days or + 30 or more days, unless has been called to produce this instance. + + + + + Returns a representing the time component of the instance. + Note that this may have a value beyond the range ±23:59:59.9999999 unless + has been called to produce this instance. + + + + + The total number of ticks (100ns units) in the instance, assuming 24 hours in each day and + 30 days in a month. + + + + + The total number of microseconds in the instance, assuming 24 hours in each day and + 30 days in a month. + + + + + The total number of milliseconds in the instance, assuming 24 hours in each day and + 30 days in a month. + + + + + The total number of seconds in the instance, assuming 24 hours in each day and + 30 days in a month. + + + + + The total number of minutes in the instance, assuming 24 hours in each day and + 30 days in a month. + + + + + The total number of hours in the instance, assuming 24 hours in each day and + 30 days in a month. + + + + + The total number of days in the instance, assuming 24 hours in each day and + 30 days in a month. + + + + + The total number of months in the instance, assuming 24 hours in each day and + 30 days in a month. + + + + + Normalise this time; if it is 24:00:00, convert it to 00:00:00 + + This time, normalised + + + + The total number of ticks(100ns units) contained. This is the resolution of the + type. + The resolution of the PostgreSQL + interval type is by default 1µs = 1,000 ns. It may be smaller as follows: + + + time(0) + resolution of 1s (1 second) + + + time(1) + resolution of 100ms = 0.1s (100 milliseconds) + + + time(2) + resolution of 10ms = 0.01s (10 milliseconds) + + + time(3) + resolution of 1ms = 0.001s (1 millisecond) + + + time(4) + resolution of 100µs = 0.0001s (100 microseconds) + + + time(5) + resolution of 10µs = 0.00001s (10 microseconds) + + + time(6) or interval + resolution of 1µs = 0.000001s (1 microsecond) + + + As such, if the 100-nanosecond resolution is significant to an application, a PostgreSQL time will + not suffice for those purposes. + In more frequent cases though, the resolution of time suffices. + will always suffice to handle the resolution of any time value, and upon + writing to the database, will be rounded to the resolution used. + + The number of ticks in the instance. + + + + + Gets the number of whole microseconds held in the instance. + An integer in the range [0, 999999]. + + + + + Gets the number of whole milliseconds held in the instance. + An integer in the range [0, 999]. + + + + + Gets the number of whole seconds held in the instance. + An interger in the range [0, 59]. + + + + + Gets the number of whole minutes held in the instance. + An integer in the range [0, 59]. + + + + + Gets the number of whole hours held in the instance. + Note that the time 24:00:00 can be stored for roundtrip compatibility. Any calculations on such a + value will normalised it to 00:00:00. + + + + + Normalise this time; if it is 24:00:00, convert it to 00:00:00 + + This time, normalised + + + + Compares this with another . As per postgres' rules, + first the times are compared as if they were both in the same timezone. If they are equal then + then timezones are compared (+01:00 being "smaller" than -01:00). + + the to compare with. + An integer which is 0 if they are equal, < 0 if this is the smaller and > 0 if this is the larger. + + + + Gets the number of whole microseconds held in the instance. + An integer in the range [0, 999999]. + + + + + Gets the number of whole milliseconds held in the instance. + An integer in the range [0, 999]. + + + + + Gets the number of whole seconds held in the instance. + An interger in the range [0, 59]. + + + + + Gets the number of whole minutes held in the instance. + An integer in the range [0, 59]. + + + + + Gets the number of whole hours held in the instance. + Note that the time 24:00:00 can be stored for roundtrip compatibility. Any calculations on such a + value will normalised it to 00:00:00. + + + + + This class implements the Fastpath api. + + + + + This maps the functions names to their id's (possible unique just + to a connection). + + + + + Our connection. + + + + + The network stream. + + + + + Initialises the fastpath system. + + BaseConnection to attach to. + The network stream to the backend. + + + + Initialises the fastpath system. + + BaseConnection to attach to. + + + + Send a function call to the PostgreSQL backend. + + Function id. + True if the result is an integer, false for other results. + FastpathArguments to pass to fastpath. + null if no data, Integer if an integer result, or byte[] otherwise. + + + + Send a function call to the PostgreSQL backend by name. + Note: the mapping for the procedure name to function id needs to exist, + usually to an earlier call to addfunction(). + This is the prefered method to call, as function id's can/may change + between versions of the backend. + For an example of how this works, refer to NpgsqlTypes.LargeObject + + Function name. + True if the result is an integer, false for other results. + FastpathArguments to pass to fastpath. + null if no data, Integer if an integer result, or byte[] otherwise. + + + + This convenience method assumes that the return value is an Integer. + + Function name. + Function arguments. + Integer result. + + + + This convenience method assumes that the return value is an Integer. + + Function name. + Function arguments. + Array containing result + + + + This adds a function to our lookup table. + User code should use the addFunctions method, which is based upon a + query, rather than hard coding the oid. The oid for a function is not + guaranteed to remain static, even on different servers of the same + version. + + Function name. + Function id. + + + + This takes a ResultSet containing two columns. Column 1 contains the + function name, Column 2 the oid. + It reads the entire ResultSet, loading the values into the function + table. + REMEMBER to close() the resultset after calling this!! + Implementation note about function name lookups: + PostgreSQL stores the function id's and their corresponding names in + the pg_proc table. To speed things up locally, instead of querying each + function from that table when required, a Dictionary is used. Also, only + the function's required are entered into this table, keeping connection + times as fast as possible. + The org.postgresql.largeobject.LargeObject class performs a query upon it's startup, + and passes the returned ResultSet to the addFunctions() method here. + Once this has been done, the LargeObject api refers to the functions by + name. + Dont think that manually converting them to the oid's will work. Ok, + they will for now, but they can change during development (there was some + discussion about this for V7.0), so this is implemented to prevent any + unwarranted headaches in the future. + + ResultSet + + + + This returns the function id associated by its name + If addFunction() or addFunctions() have not been called for this name, + then an NpgsqlException is thrown. + + Function name to lookup. + Function ID for fastpath call. + + + + Fast Path Arg. + + + + + Type of argument, true=integer, false=byte[]. + + + + + Integer value if type=true. + + + + + Byte value if type=false; + + + + + Constructs an argument that consists of an integer value. + + Int value to set. + + + + Constructs an argument that consists of an array of bytes. + + Array to store. + + + + Constructs an argument that consists of part of a byte array. + + Source array. + offset within array. + length of data to include. + + + + Constructs an argument that consists of a String. + + String to store. + + + + This sends this argument down the network stream. + The stream sent consists of the length.int4 then the contents. + Note: This is called from Fastpath, and cannot be called from + client code. + + + + + + Report send size. + + Send size. + + + + Large Object. + + + + + Indicates a seek from the begining of a file. + + + + + Indicates a seek from the current position. + + + + + Indicates a seek from the end of a file. + + + + + This opens a large object. + If the object does not exist, then an NpgsqlException is thrown. + + FastPath API for the connection to use. + OID of the Large Object to open. + Mode of opening the large object + + + + OID getter. + + The OID of this LargeObject. + + + + This method closes the object. You must not call methods in this + object after this is called. + + + + + Reads some data from the object, and return as a byte[] array. + + Number of bytes to read. + Array containing data read. + + + + Reads some data from the object into an existing array. + + Destination array. + Offset within array. + Maximum number of bytes to read. + The number of bytes actually read. + + + + Writes an array to the object. + + Array to write. + + + + Writes some data from an array to the object. + + Destination array. + Offset within array. + Number of bytes to write. + + + + Sets the current position within the object. + This is similar to the fseek() call in the standard C library. It + allows you to have random access to the large object. + + Position within object. + Either SEEK_SET, SEEK_CUR or SEEK_END. + + + + Sets the current position within the object. + This is similar to the fseek() call in the standard C library. It + allows you to have random access to the large object. + + Position within object from begining. + + + + Report the current position within the object. + + The current position within the object. + + + + This method is inefficient, as the only way to find out the size of + the object is to seek to the end, record the current position, then + return to the original position. + A better method will be found in the future. + + The size of the large object. + + + + OID. + + + + + Large Object Manager. + + + + + This mode indicates we want to write to an object + + + + + This mode indicates we want to read an object + + + + + This mode is the default. It indicates we want read and write access to + + + + + Constructs the LargeObject API. + There should only be one LargeObjectManager per Connection. The + org.postgresql.Connection class keeps track of the various extension API's + and it's advised you use those to gain access, and not going direct. + + + + + + This opens an existing large object, based on its OID. This method + assumes that READ and WRITE access is required (the default). + + OID of large object. + LargeObject instance providing access to the object + + + + This opens an existing large object, based on its OID. + + OID of large object. + Mode of open. + + + + + This creates a large object, returning its OID. + + OID of new object. + + + + This creates a large object, returning its OID. + + Bitmask describing different attributes of the new object. + OID of new object. + + + + This deletes a large object. + + OID describing object to delete. + + + + This deletes a large object. + It is identical to the Delete() method, and is supplied as the C API uses unlink. + + OID describing object to delete. + + + + Options that control certain aspects of native to backend conversions that depend + on backend version and status. + + + + + Clone the current object. + + A new NativeToBackendTypeConverterOptions object. + + + + Clone the current object with a different OID/Name mapping. + + OID/Name mapping object to use in the new instance. + A new NativeToBackendTypeConverterOptions object. + + + + Provide event handlers to convert all native supported basic data types from their backend + text representation to a .NET object. + + + + + Convert UTF8 encoded text a string. + + + + + Byte array from bytea encoded as ASCII text, escaped or hex format. + + + + + Byte array from bytea encoded as binary. + + + + + Convert a postgresql boolean to a System.Boolean. + + + + + Convert a postgresql boolean to a System.Boolean. + + + + + Convert a postgresql bit to a System.Boolean. + + + + + Convert a postgresql datetime to a System.DateTime. + + + + + Convert a postgresql date to a System.DateTime. + + + + + Convert a postgresql time to a System.DateTime. + + + + + Convert a postgresql money to a System.Decimal. + + + + + Convert a postgresql float4 or float8 to a System.Float or System.Double respectively. + + + + + Provide event handlers to convert extended native supported data types from their backend + text representation to a .NET object. + + + + + Convert a postgresql point to a System.NpgsqlPoint. + + + + + Convert a postgresql point to a System.RectangleF. + + + + + LDeg. + + + + + Path. + + + + + Polygon. + + + + + Circle. + + + + + Inet. + + + + + MAC Address. + + + + + interval + + + + + Provide event handlers to convert the basic native supported data types from + native form to backend representation. + + + + + Convert a string to UTF8 encoded text, escaped and quoted as required. + + + + + Convert a string to UTF8 encoded text. + + + + + Binary data, escaped and quoted as required. + + + + + Binary data with possible older style octal escapes, quoted. + + + + + Binary data in the new hex format (>= 9.0), quoted. + + + + + Binary data, raw. + + + + + Convert to a postgresql boolean text format. + + + + + Convert to a postgresql boolean binary format. + + + + + Convert to a postgresql binary int2. + + + + + Convert to a postgresql binary int4. + + + + + Convert to a postgresql binary int8. + + + + + Convert to a postgresql bit. + + + + + Convert to a postgresql timestamp. + + + + + Convert to a postgresql date. + + + + + Convert to a postgresql time. + + + + + Convert to a postgres money. + + + + + Convert to a postgres double with maximum precision. + + + + + Convert a System.Float to a postgres float4. + + + + + Convert a System.Double to a postgres float8. + + + + + Provide event handlers to convert extended native supported data types from + native form to backend representation. + + + + + Point. + + + + + Box. + + + + + LSeg. + + + + + Open path. + + + + + Polygon. + + + + + Convert to a postgres MAC Address. + + + + + Circle. + + + + + Convert to a postgres inet. + + + + + Convert to a postgres interval + + + + + Delegate called to convert the given backend text data to its native representation. + + + + + Delegate called to convert the given backend binary data to its native representation. + + + + + Represents a backend data type. + This class can be called upon to convert a backend field representation to a native object. + + + + + Construct a new NpgsqlTypeInfo with the given attributes and conversion handlers. + + Type OID provided by the backend server. + Type name provided by the backend server. + NpgsqlDbType + DbType + System type to convert fields of this type to. + Data conversion handler for text encoding. + Data conversion handler for binary data. + + + + Perform a data conversion from a backend representation to + a native object. + + Data sent from the backend. + fieldValueSize + Type modifier field sent from the backend. + + + + Perform a data conversion from a backend representation to + a native object. + + Data sent from the backend. + TypeSize + Type modifier field sent from the backend. + + + + Type OID provided by the backend server. + + + + + Type name provided by the backend server. + + + + + NpgsqlDbType. + + + + + NpgsqlDbType. + + + + + Provider type to convert fields of this type to. + + + + + System type to convert fields of this type to. + + + + + Reports whether a backend binary to native decoder is available for this type. + + + + + Delegate called to convert the given native data to its backand representation. + + + + + Represents a backend data type. + This class can be called upon to convert a native object to its backend field representation, + + + + + Returns an NpgsqlNativeTypeInfo for an array where the elements are of the type + described by the NpgsqlNativeTypeInfo supplied. + + + + + Construct a new NpgsqlTypeInfo with the given attributes and conversion handlers. + + Type name provided by the backend server. + DbType + Quote + NpgsqlDbType + Data conversion handler for text backend encoding. + Data conversion handler for binary backend encoding (for extended queries). + + + + Perform a data conversion from a native object to + a backend representation. + DBNull and null values are handled differently depending if a plain query is used + When + + Native .NET object to be converted. + Specifies that the value should be formatted for the extended query syntax. + Options to guide serialization. If null, a default options set is used. + Specifies that the value should be formatted as an extended query array element. + + + + Type name provided by the backend server. + + + + + NpgsqlDbType. + + + + + DbType. + + + + + Apply quoting. + + + + + Use parameter size information. + + + + + Reports whether a native to backend binary encoder is available for this type. + + + + + Provide mapping between type OID, type name, and a NpgsqlBackendTypeInfo object that represents it. + + + + + Construct an empty mapping. + + + + + Copy constuctor. + + + + + Add the given NpgsqlBackendTypeInfo to this mapping. + + + + + Add a new NpgsqlBackendTypeInfo with the given attributes and conversion handlers to this mapping. + + Type OID provided by the backend server. + Type name provided by the backend server. + NpgsqlDbType + DbType + System type to convert fields of this type to. + Data conversion handler for text encoding. + Data conversion handler for binary data. + + + + Make a shallow copy of this type mapping. + + + + + Determine if a NpgsqlBackendTypeInfo with the given backend type OID exists in this mapping. + + + + + Determine if a NpgsqlBackendTypeInfo with the given backend type name exists in this mapping. + + + + + Get the number of type infos held. + + + + + Retrieve the NpgsqlBackendTypeInfo with the given backend type OID, or null if none found. + + + + + Retrieve the NpgsqlBackendTypeInfo with the given backend type name, or null if none found. + + + + + Provide mapping between type Type, NpgsqlDbType and a NpgsqlNativeTypeInfo object that represents it. + + + + + Add the given NpgsqlNativeTypeInfo to this mapping. + + + + + Add a new NpgsqlNativeTypeInfo with the given attributes and conversion handlers to this mapping. + + Type name provided by the backend server. + NpgsqlDbType + DbType + Quote + Data conversion handler for text backend encoding. + Data conversion handler for binary backend encoding (for extended query). + + + + Retrieve the NpgsqlNativeTypeInfo with the given NpgsqlDbType. + + + + + Retrieve the NpgsqlNativeTypeInfo with the given DbType. + + + + + Retrieve the NpgsqlNativeTypeInfo with the given Type. + + + + + Determine if a NpgsqlNativeTypeInfo with the given backend type name exists in this mapping. + + + + + Determine if a NpgsqlNativeTypeInfo with the given NpgsqlDbType exists in this mapping. + + + + + Determine if a NpgsqlNativeTypeInfo with the given Type name exists in this mapping. + + + + + Get the number of type infos held. + + + + + Represents a PostgreSQL Point type + + + + + Represents a PostgreSQL Line Segment type. + + + + + Represents a PostgreSQL Path type. + + + + + Represents a PostgreSQL Polygon type. + + + + + Represents a PostgreSQL Circle type. + + + + + Represents a PostgreSQL inet type. + + + + + Represents a PostgreSQL MacAddress type. + + + + + + + The macAddr parameter must contain a string that can only consist of numbers + and upper-case letters as hexadecimal digits. (See PhysicalAddress.Parse method on MSDN) + + + + This class contains helper methods for type conversion between + the .Net type system and postgresql. + + + + + A cache of basic datatype mappings keyed by server version. This way we don't + have to load the basic type mappings for every connection. + + + + + Find a NpgsqlNativeTypeInfo in the default types map that can handle objects + of the given NpgsqlDbType. + + + + + Find a NpgsqlNativeTypeInfo in the default types map that can handle objects + of the given NpgsqlDbType. + + + + + Find a NpgsqlNativeTypeInfo in the default types map that can handle objects + of the given DbType. + + + + + Find a NpgsqlNativeTypeInfo in the default types map that can handle objects + of the given System.Type. + + + + + This method is responsible to convert the byte[] received from the backend + to the corresponding NpgsqlType. + The given TypeInfo is called upon to do the conversion. + If no TypeInfo object is provided, no conversion is performed. + + + + + This method is responsible to convert the string received from the backend + to the corresponding NpgsqlType. + The given TypeInfo is called upon to do the conversion. + If no TypeInfo object is provided, no conversion is performed. + + + + + Create the one and only native to backend type map. + This map is used when formatting native data + types to backend representations. + + + + + This method creates (or retrieves from cache) a mapping between type and OID + of all natively supported postgresql data types. + This is needed as from one version to another, this mapping can be changed and + so we avoid hardcoding them. + + NpgsqlTypeMapping containing all known data types. The mapping must be + cloned before it is modified because it is cached; changes made by one connection may + effect another connection. + + + + + Attempt to map types by issuing a query against pg_type. + This function takes a list of NpgsqlTypeInfo and attempts to resolve the OID field + of each by querying pg_type. If the mapping is found, the type info object is + updated (OID) and added to the provided NpgsqlTypeMapping object. + + NpgsqlConnector to send query through. + Mapping object to add types too. + List of types that need to have OID's mapped. + + + + Summary description for NpgsqlQuery + + + + + For classes representing messages sent from the client to the server. + + + + + Set Cache Size. The default value is 20. + + + + + Lookup cached entity. null will returned if not match. + For both get{} and set{} apply LRU rule. + + key + + + + + The globally available text encoding used for frontend/backend communication. + + + + This class represents the base class for the state pattern design pattern + implementation. + + + This class represents the base class for the state pattern design pattern + implementation. + + + + + + This method is used by the states to change the state of the context. + + + + + Call ProcessBackendResponsesEnum(), and scan and discard all results. + + + + + This method is responsible to handle all protocol messages sent from the backend. + It holds all the logic to do it. + To exchange data, it uses a Mediator object from which it reads/writes information + to handle backend requests. + + + + + + Checks for context socket availability. + Socket.Poll supports integer as microseconds parameter. + This limits the usable command timeout value + to 2,147 seconds: (2,147 x 1,000,000 less than max_int). + In order to bypass this limit, the availability of + the socket is checked in 2,147 seconds cycles + + true, if for context socket availability was checked, false otherwise. + Context. + Select mode. + + + + Called from constructor of derived class. + + + + + Finalizer for HashAlgorithm + + + + + Computes the entire hash of all the bytes in the byte array. + + + + + When overridden in a derived class, drives the hashing function. + + + + + + + + When overridden in a derived class, this pads and hashes whatever data might be left in the buffers and then returns the hash created. + + + + + When overridden in a derived class, initializes the object to prepare for hashing. + + + + + Used for stream chaining. Computes hash as data passes through it. + + The buffer from which to grab the data to be copied. + The offset into the input buffer to start reading at. + The number of bytes to be copied. + The buffer to write the copied data to. + At what point in the outputBuffer to write the data at. + + + + Used for stream chaining. Computes hash as data passes through it. Finishes off the hash. + + The buffer from which to grab the data to be copied. + The offset into the input buffer to start reading at. + The number of bytes to be copied. + + + + Get whether or not the hash can transform multiple blocks at a time. + Note: MUST be overriden if descendant can transform multiple block + on a single call! + + + + + Gets the previously computed hash. + + + + + Returns the size in bits of the hash. + + + + + Must be overriden if not 1 + + + + + Must be overriden if not 1 + + + + + Common base class for all derived MD5 implementations. + + + + + Called from constructor of derived class. + + + + + Creates the default derived class. + + + + + C# implementation of the MD5 cryptographic hash function. + + + + + Creates a new MD5CryptoServiceProvider. + + + + + Drives the hashing function. + + Byte array containing the data to hash. + Where in the input buffer to start. + Size in bytes of the data in the buffer to hash. + + + + This finalizes the hash. Takes the data from the chaining variables and returns it. + + + + + Resets the class after use. Called automatically after hashing is done. + + + + + This is the meat of the hash function. It is what processes each block one at a time. + + Byte array to process data from. + Where in the byte array to start processing. + + + + Pads and then processes the final block. + + Buffer to grab data from. + Position in buffer in bytes to get data from. + How much data in bytes in the buffer to use. + + + + Implements for version 3 of the protocol. + + + + + Reads a row, field by field, allowing a DataRow to be built appropriately. + + + + + Marker interface which identifies a class which may take possession of a stream for the duration of + it's lifetime (possibly temporarily giving that possession to another class for part of that time. + + It inherits from IDisposable, since any such class must make sure it leaves the stream in a valid state. + + The most important such class is that compiler-generated from ProcessBackendResponsesEnum. Of course + we can't make that inherit from this interface, alas. + + + + + Marker interface which identifies a class which represents part of + a response from the server. + + + + + Reads part of a field, as needed (for + and + + + + + Adds further functionality to stream that is dependant upon the type of data read. + + + + + Completes the implementation of Streamer for char data. + + + + + Completes the implementation of Streamer for byte data. + + + + + This class represents a BackEndKeyData message received + from PostgreSQL + + + + + This class represents the Bind message sent to PostgreSQL + server. + + + + + + This class represents the CancelRequest message sent to PostgreSQL + server. + + + + + + Represents a SQL statement or function (stored procedure) to execute + against a PostgreSQL database. This class cannot be inherited. + + + Represents a SQL statement or function (stored procedure) to execute + against a PostgreSQL database. This class cannot be inherited. + + + Represents a SQL statement or function (stored procedure) to execute + against a PostgreSQL database. This class cannot be inherited. + + + + + 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. + + + + Used to execute internal commands. + + + + + Attempts to cancel the execution of a NpgsqlCommand. + + This Method isn't implemented yet. + + + + Create a new command based on this one. + + A new NpgsqlCommand object. + + + + Create a new command based on this one. + + A new NpgsqlCommand object. + + + + Creates a new instance of an DbParameter object. + + An DbParameter object. + + + + Creates a new instance of a NpgsqlParameter object. + + A NpgsqlParameter object. + + + + Releases the resources used by the NpgsqlCommand. + + + + + Internal query shortcut for use in cases where the number + of affected rows is of no interest. + + + + + Special adaptation of ExecuteBlind() that sets statement_timeout. + This exists to prevent Connector.SetBackendCommandTimeout() from calling Command.ExecuteBlind(), + which will cause an endless recursive loop. + + + Timeout in seconds. + + + + Executes a SQL statement against the connection and returns the number of rows affected. + + The number of rows affected if known; -1 otherwise. + + + + Sends the CommandText to + the Connection and builds a + NpgsqlDataReader + using one of the CommandBehavior values. + + One of the CommandBehavior values. + A NpgsqlDataReader object. + + + + Sends the CommandText to + the Connection and builds a + NpgsqlDataReader. + + A NpgsqlDataReader object. + + + + Sends the CommandText to + the Connection and builds a + NpgsqlDataReader + using one of the CommandBehavior values. + + One of the CommandBehavior values. + A NpgsqlDataReader object. + Currently the CommandBehavior parameter is ignored. + + + + This method binds the parameters from parameters collection to the bind + message. + + + + + Executes the query, and returns the first column of the first row + in the result set returned by the query. Extra columns or rows are ignored. + + The first column of the first row in the result set, + or a null reference if the result set is empty. + + + + Creates a prepared version of the command on a PostgreSQL server. + + + + + This method checks the connection state to see if the connection + is set or it is open. If one of this conditions is not met, throws + an InvalidOperationException + + + + + This method substitutes the Parameters, if exist, in the command + to their actual values. + The parameter name format is :ParameterName. + + A version of CommandText with the Parameters inserted. + + + + Process this.commandText, trimming each distinct command and substituting paramater + tokens. + + + UTF8 encoded command ready to be sent to the backend. + + + + Append a region of a source command text to an output command, performing parameter token + substitutions. + + Stream to which to append output. + Command text. + + + false if the query has multiple statements which are not allowed + + + + 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 is 20 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. + + + + DB parameter collection. + + + + + Gets the NpgsqlParameterCollection. + + The parameters of the SQL statement or function (stored procedure). The default is an empty collection. + + + + DB transaction. + + + + + Gets or sets the NpgsqlTransaction + within which the NpgsqlCommand executes. + + The NpgsqlTransaction. + The default value is a null reference. + + + + Gets or sets how command results are applied to the DataRow + when used by the Update + method of the DbDataAdapter. + + One of the UpdateRowSource values. + + + + Returns oid of inserted row. This is only updated when using executenonQuery and when command inserts just a single row. If table is created without oids, this will always be 0. + + + + + Returns whether this query will execute as a prepared (compiled) query. + + + + + Design time visible. + + + + + This class is responsible to create database commands for automatic insert, update and delete operations. + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + The adapter. + + + + + This method is reponsible to derive the command parameter list with values obtained from function definition. + It clears the Parameters collection of command. Also, if there is any parameter type which is not supported by Npgsql, an InvalidOperationException will be thrown. + Parameters name will be parameter1, parameter2, ... + + NpgsqlCommand whose function parameters will be obtained. + + + + Gets the automatically generated object required + to perform insertions at the data source. + + + The automatically generated object required to perform insertions. + + + + + Gets the automatically generated object required to perform insertions + at the data source, optionally using columns for parameter names. + + + If true, generate parameter names matching column names, if possible. + If false, generate @p1, @p2, and so on. + + + The automatically generated object required to perform insertions. + + + + + Gets the automatically generated System.Data.Common.DbCommand object required + to perform updates at the data source. + + + The automatically generated System.Data.Common.DbCommand object required to perform updates. + + + + + Gets the automatically generated object required to perform updates + at the data source, optionally using columns for parameter names. + + + If true, generate parameter names matching column names, if possible. + If false, generate @p1, @p2, and so on. + + + The automatically generated object required to perform updates. + + + + + Gets the automatically generated System.Data.Common.DbCommand object required + to perform deletions at the data source. + + + The automatically generated System.Data.Common.DbCommand object required to perform deletions. + + + + + Gets the automatically generated object required to perform deletions + at the data source, optionally using columns for parameter names. + + + If true, generate parameter names matching column names, if possible. + If false, generate @p1, @p2, and so on. + + + The automatically generated object required to perform deletions. + + + + + Applies the parameter information. + + The parameter. + The row. + Type of the statement. + if set to true [where clause]. + + + + Returns the name of the specified parameter in the format of @p#. + + The number to be included as part of the parameter's name.. + + The name of the parameter with the specified number appended as part of the parameter name. + + + + + Returns the full parameter name, given the partial parameter name. + + The partial name of the parameter. + + The full parameter name corresponding to the partial parameter name requested. + + + + + Returns the placeholder for the parameter in the associated SQL statement. + + The number to be included as part of the parameter's name. + + The name of the parameter with the specified number appended. + + + + + Registers the to handle the event for a . + + The to be used for the update. + + + + Adds an event handler for the event. + + The sender + A instance containing information about the event. + + + + Given an unquoted identifier in the correct catalog case, returns the correct quoted form of that identifier, including properly escaping any embedded quotes in the identifier. + + The original unquoted identifier. + + The quoted version of the identifier. Embedded quotes within the identifier are properly escaped. + + + + + Unquoted identifier parameter cannot be null + + + + Given a quoted identifier, returns the correct unquoted form of that identifier, including properly un-escaping any embedded quotes in the identifier. + + The identifier that will have its embedded quotes removed. + + The unquoted identifier, with embedded quotes properly un-escaped. + + + + + Quoted identifier parameter cannot be null + + + + Gets or sets the beginning character or characters to use when specifying database objects (for example, tables or columns) whose names contain characters such as spaces or reserved tokens. + + + The beginning character or characters to use. The default is an empty string. + + + + + + + + Gets or sets the ending character or characters to use when specifying database objects (for example, tables or columns) whose names contain characters such as spaces or reserved tokens. + + + The ending character or characters to use. The default is an empty string. + + + + + + + + Represents the method that handles the Notice events. + + The source of the event. + A NpgsqlNoticeEventArgs that contains the event data. + + + + Represents the method that handles the Notification events. + + The source of the event. + A NpgsqlNotificationEventArgs that contains the event data. + + + + This class represents a connection to a + PostgreSQL server. + + + + + 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. + + + + 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. + + + + + 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. + + + + + Opens a database connection with the property settings specified by the + ConnectionString. + + + + + 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. + + + + 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. + + + + + 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. + + + + + 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. + + + + Releases all resources used by the + NpgsqlConnection. + + true when called from Dispose(); + false when being called from the finalizer. + + + + Create a new connection based on this one. + + A new NpgsqlConnection object. + + + + Create a new connection based on this one. + + A new NpgsqlConnection object. + + + + Returns a copy of the NpgsqlConnectionStringBuilder that contains the parsed connection string values. + + + + + Default SSL CertificateSelectionCallback implementation. + + + + + Default SSL CertificateValidationCallback implementation. + + + + + Default SSL PrivateKeySelectionCallback implementation. + + + + + Default SSL ProvideClientCertificatesCallback implementation. + + + + + Default SSL ValidateRemoteCertificateCallback implementation. + + + + + Write each key/value pair in the connection string to the log. + + + + + Sets the `settings` ConnectionStringBuilder based on the given `connectionString` + + The connection string to load the builder from + + + + Sets the `settings` ConnectionStringBuilder based on the given `connectionString` + + The connection string to load the builder from + + + + Refresh the cached _connectionString whenever the builder settings change + + + + + Returns the supported collections + + + + + 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. + + + + Clear connection pool. + + + + + Clear all connection pools. + + + + + Enlist transation. + + + + + + Occurs on NoticeResponses from the PostgreSQL backend. + + + + + Occurs on NotificationResponses from the PostgreSQL backend. + + + + + Called to provide client certificates for SSL handshake. + + + + + Mono.Security.Protocol.Tls.CertificateSelectionCallback delegate. + + + + + Mono.Security.Protocol.Tls.CertificateValidationCallback delegate. + + + + + Mono.Security.Protocol.Tls.PrivateKeySelectionCallback delegate. + + + + + Called to validate server's certificate during SSL handshake + + + + + 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). + + + + + Gets or sets the string used to connect to a PostgreSQL database. + Valid values are: +
    +
  • + Server: Address/Name of Postgresql Server; +
  • +
  • + Port: Port to connect to; +
  • +
  • + Protocol: Protocol version to use, instead of automatic; Integer 2 or 3; +
  • +
  • + Database: Database name. Defaults to user name if not specified; +
  • +
  • + User Id: User name; +
  • +
  • + Password: Password for clear text authentication; +
  • +
  • + SSL: True or False. Controls whether to attempt a secure connection. Default = False; +
  • +
  • + Pooling: True or False. Controls whether connection pooling is used. Default = True; +
  • +
  • + MinPoolSize: Min size of connection pool; +
  • +
  • + MaxPoolSize: Max size of connection pool; +
  • +
  • + Timeout: Time to wait for connection open in seconds. Default is 15. +
  • +
  • + CommandTimeout: Time to wait for command to finish execution before throw an exception. In seconds. Default is 20. +
  • +
  • + Sslmode: Mode for ssl connection control. Can be Prefer, Require, Allow or Disable. Default is Disable. Check user manual for explanation of values. +
  • +
  • + ConnectionLifeTime: Time to wait before closing unused connections in the pool in seconds. Default is 15. +
  • +
  • + SyncNotification: Specifies if Npgsql should use synchronous notifications. +
  • +
  • + SearchPath: Changes search path to specified and public schemas. +
  • +
+
+ 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 SSL. + + + + + 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 time to wait before closing unused connections in the pool if the count + of all connections exeeds MinPoolSize. + + + If connection pool contains unused connections for ConnectionLifeTime seconds, + the half of them will be closed. If there will be unused connections in a second + later then again the half of them will be closed and so on. + This strategy provide smooth change of connection count in the pool. + + The time (in seconds) to wait. The default value is 15 seconds. + + + + Gets 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. + + + + Whether datareaders are loaded in their entirety (for compatibility with earlier code). + + + + + Gets the database server name. + + + + + Gets flag indicating if we are using Synchronous notification or not. + The default value is false. + + + + + 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 or ConnectionState.Closed + + + + Compatibility version. + + + + + Version of the PostgreSQL backend. + This can only be called when there is an active connection. + + + + + PostgreSQL server version. + + + + + Protocol version in use. + This can only be called when there is an active connection. + Always retuna Version3 + + + + + Whether the backend is an AWS Redshift instance + + + + + 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). + + + + + Report whether the backend understands the hex byte format (>= 9.0). + + + + + The connector object connected to the backend. + + + + + Gets the NpgsqlConnectionStringBuilder containing the parsed connection string values. + + + + + User name. + + + + + Use extended types. + + + + + Password. + + + + + Determine if connection pooling will be used for this connection. + + + + + Return an exact copy of this NpgsqlConnectionString. + + + + + No integrated security if we're on mono and .NET 4.5 because of ClaimsIdentity, + see https://github.com/npgsql/Npgsql/issues/133 + + + + + This function will set value for known key, both private member and base[key]. + + + + + value, coerced as needed to the stored type. + + + + The function will modify private member only, not base[key]. + + + + value, coerced as needed to the stored type. + + + + The function will access private member only, not base[key]. + + + value. + + + + Clear the member and assign them to the default value. + + + + + Gets or sets the backend server host name. + + + + + Gets or sets the backend server port. + + + + + Gets or sets the name of the database to be used after a connection is opened. + + The name of the database to be + used after a connection is opened. + + + + Gets or sets the login user name. + + + + + Gets or sets the login password as a UTF8 encoded byte array. + + + + + Sets the login password as a string. + + + + + Gets or sets the krbsrvname. + + + + + Gets or sets a value indicating whether to attempt to use SSL. + + + + + Gets or sets a value indicating whether to attempt to use SSL. + + + + + Gets or sets the time to wait while trying to establish a connection + before terminating the attempt and generating an error. + + The time (in seconds) to wait for a connection to open. The default value is 15 seconds. + + + + Gets or sets the schema search path. + + + + + Gets or sets a value indicating whether connection pooling should be used. + + + + + Gets or sets the time to wait before closing unused connections in the pool if the count + of all connections exeeds MinPoolSize. + + + If connection pool contains unused connections for ConnectionLifeTime seconds, + the half of them will be closed. If there will be unused connections in a second + later then again the half of them will be closed and so on. + This strategy provide smooth change of connection count in the pool. + + The time (in seconds) to wait. The default value is 15 seconds. + + + + Gets or sets the minimum connection pool size. + + + + + Gets or sets the maximum connection pool size. + + + + + Gets or sets a value indicating whether to listen for notifications and report them between command activity. + + + + + Gets the time to wait while trying to execute a command + before terminating the attempt and generating an error. + + The time (in seconds) to wait for a command to complete. The default value is 20 seconds. + + + + Gets or sets a value indicating whether datareaders are loaded in their entirety (for compatibility with earlier code). + + + + + Compatibilty version. When possible, behaviour caused by breaking changes will be preserved + if this version is less than that where the breaking change was introduced. + + + + + Gets or sets the ootional application name parameter to be sent to the backend during connection initiation. + + + + + Gets or sets a value indicating whether to silently Prepare() all commands before execution. + + + + + Gets or sets the specified backend communication protocol version. + + + + + Gets the backend encoding. Always returns "UTF8". + + + + + Case insensative accessor for indivual connection string values. + + + + + Set both ImplicitDefault and ExplicitDefault to the 's default value. + + + + + + + + Set ImplicitDefault to the default value of 's type, + and ExplicitDefault to . + + + + + + + + Represents the method that allows the application to provide a certificate collection to be used for SSL clien authentication + + A X509CertificateCollection to be filled with one or more client certificates. + + + + Represents the method that is called to validate the certificate provided by the server during an SSL handshake + + The server's certificate + The certificate chain containing the certificate's CA and any intermediate authorities + Any errors that were detected + + + + !!! Helper class, for compilation only. + Connector implements the logic for the Connection Objects to + access the physical connection to the database, and isolate + the application developer from connection pooling internals. + + + + + Whether the backend is an AWS Redshift instance + + + + + Constructor. + + Connection string. + Pooled + Controls whether the connector can be shared. + + + + This method checks if the connector is still ok. + We try to send a simple query text, select 1 as ConnectionTest; + + + + + This method is responsible for releasing all resources associated with this Connector. + + + + + This method is responsible to release all portals used by this Connector. + + + + + Modify the backend statement_timeout value if needed. + + New timeout + + + + Default SSL CertificateSelectionCallback implementation. + + + + + Default SSL CertificateValidationCallback implementation. + + + + + Default SSL PrivateKeySelectionCallback implementation. + + + + + Default SSL ProvideClientCertificatesCallback implementation. + + + + + Default SSL ValidateRemoteCertificateCallback implementation. + + + + + This method is required to set all the version dependent features flags. + SupportsPrepare means the server can use prepared query plans (7.3+) + + + + + Opens the physical connection to the server. + + Usually called by the RequestConnector + Method of the connection pool manager. + + + + Closes the physical connection to the server. + + + + + Returns next portal index. + + + + + Returns next plan index. + + + + + Occurs on NoticeResponses from the PostgreSQL backend. + + + + + Occurs on NotificationResponses from the PostgreSQL backend. + + + + + Called to provide client certificates for SSL handshake. + + + + + Mono.Security.Protocol.Tls.CertificateSelectionCallback delegate. + + + + + Mono.Security.Protocol.Tls.CertificateValidationCallback delegate. + + + + + Mono.Security.Protocol.Tls.PrivateKeySelectionCallback delegate. + + + + + Called to validate server's certificate during SSL handshake + + + + + Gets the current state of the connection. + + + + + Return Connection String. + + + + + Version of backend server this connector is connected to. + + + + + Whether the backend is an AWS Redshift instance + + + + + The physical connection socket to the backend. + + + + + The physical connection stream to the backend. + + + + + The top level stream to the backend. + + + + + Reports if this connector is fully connected. + + + + + The connection mediator. + + + + + Report if the connection is in a transaction. + + + + + Options that control certain aspects of native to backend conversions that depend + on backend version and status. + + + + + This class manages all connector objects, pooled AND non-pooled. + + + + Unique static instance of the connector pool + mamager. + + + Map of index to unused pooled connectors, avaliable to the + next RequestConnector() call. + This hashmap will be indexed by connection string. + This key will hold a list of queues of pooled connectors available to be used. + + + Timer for tracking unused connections in pools. + + + + Searches the shared and pooled connector lists for a + matching connector object or creates a new one. + + The NpgsqlConnection that is requesting + the connector. Its ConnectionString will be used to search the + pool for available connectors. + A connector object. + + + + Find a pooled connector. Handle shared/non-shared here. + + + + + Releases a connector, possibly back to the pool for future use. + + + Pooled connectors will be put back into the pool if there is room. + Shared connectors should just have their use count decremented + since they always stay in the shared pool. + + Connection to which the connector is leased. + The connector to release. + + + + Release a pooled connector. Handle shared/non-shared here. + + + + + Find an available pooled connector in the non-shared pool, or create + a new one if none found. + + + + + Put a pooled connector into the pool queue. + + Connection is leased to. + Connector to pool + + + + A queue with an extra Int32 for keeping track of busy connections. + + + + + Connections available to the end user + + + + + Connections currently in use + + + + + Represents information about COPY operation data transfer format as returned by server. + + + + + Only created when a CopyInResponse or CopyOutResponse is received by NpgsqlState.ProcessBackendResponses() + + + + + Returns true if this operation is currently active and field at given location is in binary format. + + + + + Returns true if this operation is currently active and in binary format. + + + + + Returns number of fields if this operation is currently active, otherwise -1 + + + + + Represents a PostgreSQL COPY FROM STDIN operation with a corresponding SQL statement + to execute against a PostgreSQL database + and an associated stream used to read data from (if provided by user) + or for writing it (when generated by driver). + Eg. new NpgsqlCopyIn("COPY mytable FROM STDIN", connection, streamToRead).Start(); + + + + + Creates NpgsqlCommand to run given query upon Start(). Data for the requested COPY IN operation can then be written to CopyData stream followed by a call to End() or Cancel(). + + + + + Given command is run upon Start(). Data for the requested COPY IN operation can then be written to CopyData stream followed by a call to End() or Cancel(). + + + + + Given command is executed upon Start() and all data from fromStream is passed to it as copy data. + + + + + Returns true if this operation is currently active and field at given location is in binary format. + + + + + Command specified upon creation is executed as a non-query. + If CopyStream is set upon creation, it will be flushed to server as copy data, and operation will be finished immediately. + Otherwise the CopyStream member can be used for writing copy data to server and operation finished with a call to End() or Cancel(). + + + + + Called after writing all data to CopyStream to successfully complete this copy operation. + + + + + Withdraws an already started copy operation. The operation will fail with given error message. + Will do nothing if current operation is not active. + + + + + Returns true if the connection is currently reserved for this operation. + + + + + The stream provided by user or generated upon Start(). + User may provide a stream to constructor; it is used to pass to server all data read from it. + Otherwise, call to Start() sets this to a writable NpgsqlCopyInStream that passes all data written to it to server. + In latter case this is only available while the copy operation is active and null otherwise. + + + + + Returns true if this operation is currently active and in binary format. + + + + + Returns number of fields expected on each input row if this operation is currently active, otherwise -1 + + + + + The Command used to execute this copy operation. + + + + + Set before a COPY IN query to define size of internal buffer for reading from given CopyStream. + + + + + Represents an ongoing COPY FROM STDIN operation. + Provides methods to push data to server and end or cancel the operation. + + + + + Called from NpgsqlState.ProcessBackendResponses upon CopyInResponse. + If CopyStream is already set, it is used to read data to push to server, after which the copy is completed. + Otherwise CopyStream is set to a writable NpgsqlCopyInStream that calls SendCopyData each time it is written to. + + + + + Sends given packet to server as a CopyData message. + Does not check for notifications! Use another thread for that. + + + + + Sends CopyDone message to server. Handles responses, ie. may throw an exception. + + + + + Sends CopyFail message to server. Handles responses, ie. should always throw an exception: + in CopyIn state the server responds to CopyFail with an error response; + outside of a CopyIn state the server responds to CopyFail with an error response; + without network connection or whatever, there's going to eventually be a failure, timeout or user intervention. + + + + + Copy format information returned from server. + + + + + Stream for writing data to a table on a PostgreSQL version 7.4 or newer database during an active COPY FROM STDIN operation. + Passes data exactly as is and when given, so see to it that you use server encoding, correct format and reasonably sized writes! + + + + + Created only by NpgsqlCopyInState.StartCopy() + + + + + Successfully completes copying data to server. Returns after operation is finished. + Does nothing if this stream is not the active copy operation writer. + + + + + Withdraws an already started copy operation. The operation will fail with given error message. + Does nothing if this stream is not the active copy operation writer. + + + + + Writes given bytes to server. + Fails if this stream is not the active copy operation writer. + + + + + Flushes stream contents to server. + Fails if this stream is not the active copy operation writer. + + + + + Not readable + + + + + Not seekable + + + + + Not supported + + + + + True while this stream can be used to write copy data to server + + + + + False + + + + + True + + + + + False + + + + + Number of bytes written so far + + + + + Number of bytes written so far; not settable + + + + + Represents a PostgreSQL COPY TO STDOUT operation with a corresponding SQL statement + to execute against a PostgreSQL database + and an associated stream used to write results to (if provided by user) + or for reading the results (when generated by driver). + Eg. new NpgsqlCopyOut("COPY (SELECT * FROM mytable) TO STDOUT", connection, streamToWrite).Start(); + + + + + Creates NpgsqlCommand to run given query upon Start(), after which CopyStream provides data from database as requested in the query. + + + + + Given command is run upon Start(), after which CopyStream provides data from database as requested in the query. + + + + + Given command is executed upon Start() and all requested copy data is written to toStream immediately. + + + + + Returns true if this operation is currently active and field at given location is in binary format. + + + + + Command specified upon creation is executed as a non-query. + If CopyStream is set upon creation, all copy data from server will be written to it, and operation will be finished immediately. + Otherwise the CopyStream member can be used for reading copy data from server until no more data is available. + + + + + Flush generated CopyStream at once. Effectively reads and discard all the rest of copy data from server. + + + + + Returns true if the connection is currently reserved for this operation. + + + + + The stream provided by user or generated upon Start() + + + + + The Command used to execute this copy operation. + + + + + Returns true if this operation is currently active and in binary format. + + + + + Returns number of fields if this operation is currently active, otherwise -1 + + + + + Faster alternative to using the generated CopyStream. + + + + + Represents an ongoing COPY TO STDOUT operation. + Provides methods to read data from server or end the operation. + + + + + Called from NpgsqlState.ProcessBackendResponses upon CopyOutResponse. + If CopyStream is already set, it is used to write data received from server, after which the copy ends. + Otherwise CopyStream is set to a readable NpgsqlCopyOutStream that receives data from server. + + + + + Called from NpgsqlOutStream.Read to read copy data from server. + + + + + Copy format information returned from server. + + + + + Stream for reading data from a table or select on a PostgreSQL version 7.4 or newer database during an active COPY TO STDOUT operation. + Passes data exactly as provided by the server. + + + + + Created only by NpgsqlCopyOutState.StartCopy() + + + + + Discards copy data as long as server pushes it. Returns after operation is finished. + Does nothing if this stream is not the active copy operation reader. + + + + + Not writable. + + + + + Not flushable. + + + + + Copies data read from server to given byte buffer. + Since server returns data row by row, length will differ each time, but it is only zero once the operation ends. + Can be mixed with calls to the more efficient NpgsqlCopyOutStream.Read() : byte[] though that would not make much sense. + + + + + Not seekable + + + + + Not supported + + + + + Returns a whole row of data from server without extra work. + If standard Stream.Read(...) has been called before, it's internal buffers remains are returned. + + + + + True while this stream can be used to read copy data from server + + + + + True + + + + + False + + + + + False + + + + + Number of bytes read so far + + + + + Number of bytes read so far; can not be set. + + + + + Writes given objects into a stream for PostgreSQL COPY in default copy format (not CSV or BINARY). + + + + + Default delimiter. + + + + + Default separator. + + + + + Default null. + + + + + Default escape. + + + + + Default quote. + + + + + Default buffer size. + + + + + Constructor. + + + + + + Flush buffers. + + + + + Flush rows. + + + + + Flush fields. + + + + + Close the serializer. + + + + + Escape sequence for the given character. + + + + + + + Make room for bytes. + + + + + + Add bytes. + + + + + + End row. + + + + + Prefix field. + + + + + Field added. + + + + + Add null. + + + + + Add string. + + + + + + add Int32. + + + + + + Add Int64. + + + + + + Add number. + + + + + + Add bool + + + + + + Add DateTime. + + + + + + Report whether the serializer is active. + + + + + To Stream. + + + + + Delimiter. + + + + + Separator. + + + + + Escape. + + + + + Null. + + + + + Buffer size. + + + + + Report whether space remains in the buffer. + + + + + Strings to escape. + + + + + Escape sequence bytes. + + + + + 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. + + + + + Default constructor. + + + + + Constructor. + + + + + + Constructor. + + + + + + + Constructor. + + + + + + + Create row updated event. + + + + + + + + + + Create row updating event. + + + + + + + + + + Raise the RowUpdated event. + + + + + + Raise the RowUpdating event. + + + + + + Row updated event. + + + + + Row updating event. + + + + + Delete command. + + + + + Select command. + + + + + Update command. + + + + + Insert command. + + + + + Provides a means of reading a forward-only stream of rows from a PostgreSQL backend. This class cannot be inherited. + + + + + Return the data type name of the column at index . + + + + + Return the data type of the column at index . + + + + + Return the Npgsql specific data type of the column at requested ordinal. + + column position + Appropriate Npgsql type for column. + + + + Return the column name of the column at index . + + + + + Return the data type OID of the column at index . + + FIXME: Why this method returns String? + + + + Has ordinal. + + + + + + + Return the column name of the column named . + + + + + Return the data DbType of the column at index . + + + + + Return the data NpgsqlDbType of the column at index . + + + + + Get specified field value. + /// + + + + + + Get the value of a column as a . + If the differences between and + in handling of days and months is not important to your application, use + instead. + + Index of the field to find. + value of the field. + + + + Get specified field value. + /// + + + + + + Get specified field value. + /// + + + + + + Get specified field value. + /// + + + + + + Get specified field value. + /// + + + + + + Get specified field value. + /// + + + + + + Send closed event. + + + + + Gets the value of a column converted to a Guid. + + + + + Gets the value of a column as Int16. + + + + + Gets the value of a column as Int32. + + + + + Gets the value of a column as Int64. + + + + + Gets the value of a column as Single. + + + + + Gets the value of a column as Double. + + + + + Gets the value of a column as String. + + + + + Gets the value of a column as Decimal. + + + + + Gets the value of a column as TimeSpan. + + + + + Copy values from each column in the current row into . + + Destination for column values. + The number of column values copied. + + + + Copy values from each column in the current row into . + + An array appropriately sized to store values from all columns. + The number of column values copied. + + + + Gets the value of a column as Boolean. + + + + + Gets the value of a column as Byte. + + + + + Gets the value of a column as Char. + + + + + Gets the value of a column as DateTime. + + + + + Returns a System.Data.DataTable that describes the column metadata of the DataReader. + + + + + This methods parses the command text and tries to get the tablename + from it. + + + + + Get enumerator. + + + + + + Is raised whenever Close() is called. + + + + + Gets the number of columns in the current row. + + + + + Gets the value of a column in its native format. + + + + + Gets the value of a column in its native format. + + + + + 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. + + + + + Contains the column names as the keys + + + + + Contains all unique columns + + + + + This is the primary implementation of NpgsqlDataReader. It is the one used in normal cases (where the + preload-reader option is not set in the connection string to resolve some potential backwards-compatibility + issues), the only implementation used internally, and in cases where CachingDataReader is used, it is still + used to do the actual "leg-work" of turning a response stream from the server into a datareader-style + object - with CachingDataReader then filling it's cache from here. + + + + + Iterate through the objects returned through from the server. + If it's a CompletedResponse the rowsaffected count is updated appropriately, + and we iterate again, otherwise we return it (perhaps updating our cache of pending + rows if appropriate). + + The next we will deal with. + + + + Advances the data reader to the next result, when multiple result sets were returned by the PostgreSQL backend. + + True if the reader was advanced, otherwise false. + + + + Releases the resources used by the NpgsqlCommand. + + + + + Closes the data reader object. + + + + + Advances the data reader to the next result, when multiple result sets were returned by the PostgreSQL backend. + + True if the reader was advanced, otherwise false. + + + + Advances the data reader to the next row. + + True if the reader was advanced, otherwise false. + + + + Return the value of the column at index . + + + + + Gets raw data from a column. + + + + + Gets raw data from a column. + + + + + Report whether the value in a column is DBNull. + + + + + Gets the number of rows changed, inserted, or deleted by execution of the SQL statement. + + + + + Indicates if NpgsqlDatareader has rows to be read. + + + + + Provides an implementation of NpgsqlDataReader in which all data is pre-loaded into memory. + This operates by first creating a ForwardsOnlyDataReader as usual, and then loading all of it's + Rows into memory. There is a general principle that when there is a trade-off between a class design that + is more efficient and/or scalable on the one hand and one that is less efficient but has more functionality + (in this case the internal-only functionality of caching results) that one can build the less efficent class + from the most efficient without significant extra loss in efficiency, but not the other way around. The relationship + between ForwardsOnlyDataReader and CachingDataReader is an example of this). + Since the interface presented to the user is still forwards-only, queues are used to + store this information, so that dequeueing as we go we give the garbage collector the best opportunity + possible to reclaim any memory that is no longer in use. + ForwardsOnlyDataReader being used to actually + obtain the information from the server means that the "leg-work" is still only done (and need only be + maintained) in one place. + This class exists to allow for certain potential backwards-compatibility issues to be resolved + with little effort on the part of affected users. It is considerably less efficient than ForwardsOnlyDataReader + and hence never used internally. + + + + + This is the base class for NpgsqlDescribeStatement and NpgsqlDescribePortal. + + + + + + This class represents the Statement Describe message sent to PostgreSQL + server. + + + + + + This class represents the Portal Describe message sent to PostgreSQL + server. + + + + + + EventArgs class to send Notice parameters, which are just NpgsqlError's in a lighter context. + + + + + Notice information. + + + + + This class represents the ErrorResponse and NoticeResponse + message sent from PostgreSQL server. + + + + + Return a string representation of this error object. + + + + + Severity code. All versions. + + + + + Error code. PostgreSQL 7.4 and up. + + + + + Terse error message. All versions. + + + + + Detailed error message. PostgreSQL 7.4 and up. + + + + + Suggestion to help resolve the error. PostgreSQL 7.4 and up. + + + + + Position (one based) within the query string where the error was encounterd. PostgreSQL 7.4 and up. + + + + + Position (one based) within the query string where the error was encounterd. This position refers to an internal command executed for example inside a PL/pgSQL function. PostgreSQL 7.4 and up. + + + + + Internal query string where the error was encounterd. This position refers to an internal command executed for example inside a PL/pgSQL function. PostgreSQL 7.4 and up. + + + + + Trace back information. PostgreSQL 7.4 and up. + + + + + Source file (in backend) reporting the error. PostgreSQL 7.4 and up. + + + + + Source file line number (in backend) reporting the error. PostgreSQL 7.4 and up. + + + + + Source routine (in backend) reporting the error. PostgreSQL 7.4 and up. + + + + + Schema name which relates to the error. PostgreSQL 9.3 and up. + + + + + Table name which relates to the error. PostgreSQL 9.3 and up. + + + + + Column name which relates to the error. PostgreSQL 9.3 and up. + + + + + Data type of column which relates to the error. PostgreSQL 9.3 and up. + + + + + Constraint name which relates to the error. PostgreSQL 9.3 and up. + + + + + String containing the sql sent which produced this error. + + + + + Backend protocol version in use. + + + + + Error and notice message field codes + + + + + Severity: the field contents are ERROR, FATAL, or PANIC (in an error message), + or WARNING, NOTICE, DEBUG, INFO, or LOG (in a notice message), or a localized + translation of one of these. Always present. + + + + + Code: the SQLSTATE code for the error (see Appendix A). Not localizable. Always present. + + + + + Message: the primary human-readable error message. This should be accurate + but terse (typically one line). Always present. + + + + + Detail: an optional secondary error message carrying more detail about the problem. + Might run to multiple lines. + + + + + Hint: an optional suggestion what to do about the problem. This is intended to differ + from Detail in that it offers advice (potentially inappropriate) rather than hard facts. + Might run to multiple lines. + + + + + Position: the field value is a decimal ASCII integer, indicating an error cursor + position as an index into the original query string. The first character has index 1, + and positions are measured in characters not bytes. + + + + + Internal position: this is defined the same as the P field, but it is used when the + cursor position refers to an internally generated command rather than the one submitted + by the client. + The q field will always appear when this field appears. + + + + + Internal query: the text of a failed internally-generated command. + This could be, for example, a SQL query issued by a PL/pgSQL function. + + + + + Where: an indication of the context in which the error occurred. + Presently this includes a call stack traceback of active procedural language functions + and internally-generated queries. The trace is one entry per line, most recent first. + + + + + Schema name: if the error was associated with a specific database object, + the name of the schema containing that object, if any. + + + + + Table name: if the error was associated with a specific table, the name of the table. + (Refer to the schema name field for the name of the table's schema.) + + + + + Column name: if the error was associated with a specific table column, the name of the column. + (Refer to the schema and table name fields to identify the table.) + + + + + Data type name: if the error was associated with a specific data type, the name of the data type. + (Refer to the schema name field for the name of the data type's schema.) + + + + + Constraint name: if the error was associated with a specific constraint, the name of the constraint. + Refer to fields listed above for the associated table or domain. + (For this purpose, indexes are treated as constraints, even if they weren't created with constraint syntax.) + + + + + File: the file name of the source-code location where the error was reported. + + + + + Line: the line number of the source-code location where the error was reported. + + + + + Routine: the name of the source-code routine reporting the error. + + + + + The level of verbosity of the NpgsqlEventLog + + + + + Don't log at all + + + + + Only log the most common issues + + + + + Log everything + + + + + This class handles all the Npgsql event and debug logging + + + + + Writes a string to the Npgsql event log if msglevel is bigger then NpgsqlEventLog.Level + + + This method is obsolete and should no longer be used. + It is likely to be removed in future versions of Npgsql + + The message to write to the event log + The minimum LogLevel for which this message should be logged. + + + + Writes a string to the Npgsql event log if msglevel is bigger then NpgsqlEventLog.Level + + The ResourceManager to get the localized resources + The name of the resource that should be fetched by the ResourceManager + The minimum LogLevel for which this message should be logged. + The additional parameters that shall be included into the log-message (must be compatible with the string in the resource): + + + + Writes the default log-message for the action of calling the Get-part of an Indexer to the log file. + + The minimum LogLevel for which this message should be logged. + The name of the class that contains the Indexer + The parameter given to the Indexer + + + + Writes the default log-message for the action of calling the Set-part of an Indexer to the logfile. + + The minimum LogLevel for which this message should be logged. + The name of the class that contains the Indexer + The parameter given to the Indexer + The value the Indexer is set to + + + + Writes the default log-message for the action of calling the Get-part of a Property to the logfile. + + The minimum LogLevel for which this message should be logged. + The name of the class that contains the Property + The name of the Property + + + + Writes the default log-message for the action of calling the Set-part of a Property to the logfile. + + The minimum LogLevel for which this message should be logged. + The name of the class that contains the Property + The name of the Property + The value the Property is set to + + + + Writes the default log-message for the action of calling a Method without Arguments to the logfile. + + The minimum LogLevel for which this message should be logged. + The name of the class that contains the Method + The name of the Method + + + + Writes the default log-message for the action of calling a Method with one Argument to the logfile. + + The minimum LogLevel for which this message should be logged. + The name of the class that contains the Method + The name of the Method + The value of the Argument of the Method + + + + Writes the default log-message for the action of calling a Method with two Arguments to the logfile. + + The minimum LogLevel for which this message should be logged. + The name of the class that contains the Method + The name of the Method + The value of the first Argument of the Method + The value of the second Argument of the Method + + + + Writes the default log-message for the action of calling a Method with three Arguments to the logfile. + + The minimum LogLevel for which this message should be logged. + The name of the class that contains the Method + The name of the Method + The value of the first Argument of the Method + The value of the second Argument of the Method + The value of the third Argument of the Method + + + + Writes the default log-message for the action of calling a Method with more than three Arguments to the logfile. + + The minimum LogLevel for which this message should be logged. + The name of the class that contains the Method + The name of the Method + A Object-Array with zero or more Ojects that are Arguments of the Method. + + + + Sets/Returns the filename to use for logging. + + The filename of the current Log file. + + + + Sets/Returns whether Log messages should be echoed to the console + + true if Log messages are echoed to the console, otherwise false + + + + The exception that is thrown when the PostgreSQL backend reports errors. + + + + + Construct a backend error exception based on a list of one or more + backend errors. The basic Exception.Message will be built from the + first (usually the only) error in the list. + + + + + Get object data. + + + + + + + Format a .NET style exception string. + Include all errors in the list, including any hints. + + + + + Append a line to the given Stream, first checking for zero-length. + + + + + Provide access to the entire list of errors provided by the PostgreSQL backend. + + + + + Severity code. All versions. + + + + + Error code. PostgreSQL 7.4 and up. + + + + + Basic error message. All versions. + + + + + Detailed error message. PostgreSQL 7.4 and up. + + + + + Suggestion to help resolve the error. PostgreSQL 7.4 and up. + + + + + Position (one based) within the query string where the error was encounterd. PostgreSQL 7.4 and up. + + + + + Trace back information. PostgreSQL 7.4 and up. + + + + + Source file (in backend) reporting the error. PostgreSQL 7.4 and up. + + + + + Source file line number (in backend) reporting the error. PostgreSQL 7.4 and up. + + + + + Source routine (in backend) reporting the error. PostgreSQL 7.4 and up. + + + + + Schema name which relates to the error. PostgreSQL 9.3 and up. + + + + + Table name which relates to the error. PostgreSQL 9.3 and up. + + + + + Column name which relates to the error. PostgreSQL 9.3 and up. + + + + + Data type of column which relates to the error. PostgreSQL 9.3 and up. + + + + + Constraint name which relates to the error. PostgreSQL 9.3 and up. + + + + + String containing the sql sent which produced this error. + + + + + Returns the entire list of errors provided by the PostgreSQL backend. + + + + + This class represents the Execute message sent to PostgreSQL + server. + + + + + + A factory to create instances of various Npgsql objects. + + + + + Creates an NpgsqlCommand object. + + + + + This class represents the Flush message sent to PostgreSQL + server. + + + + + + For classes representing simple messages, + consisting only of a message code and length identifier, + sent from the client to the server. + + + + + This class is responsible for serving as bridge between the backend + protocol handling and the core classes. It is used as the mediator for + exchanging data generated/sent from/to backend. + + + + + + The current command timeout on the backend. This is set via "SET statement_timeout = (milliseconds)". + A value of -1 means the backend's timeout value is unknown because it has not yet been set. + + + + + EventArgs class to send Notification parameters. + + + + + Process ID of the PostgreSQL backend that sent this notification. + + + + + Condition that triggered that notification. + + + + + Additional Information From Notifiying Process (for future use, currently postgres always sets this to an empty string) + + + + + This class represents a parameter to a command that will be sent to server + + + + + Initializes a new instance of the NpgsqlParameter class. + + + + + Initializes a new instance of the NpgsqlParameter + class with the parameter m_Name and a value of the new NpgsqlParameter. + + The m_Name of the parameter to map. + An Object that is the value of the NpgsqlParameter. + +

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

+

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

+
+
+ + + Initializes a new instance of the NpgsqlParameter + class with the parameter m_Name and the data type. + + The m_Name of the parameter to map. + One of the DbType values. + + + + Initializes a new instance of the NpgsqlParameter. + + The m_Name of the parameter to map. + One of the DbType values. + + + + Initializes a new instance of the NpgsqlParameter. + + The m_Name of the parameter to map. + One of the NpgsqlDbType values. + The length of the parameter. + + + + Initializes a new instance of the NpgsqlParameter. + + The m_Name of the parameter to map. + One of the DbType values. + The length of the parameter. + + + + Initializes a new instance of the NpgsqlParameter + + The m_Name of the parameter to map. + One of the NpgsqlDbType values. + The length of the parameter. + The m_Name of the source column. + + + + Initializes a new instance of the NpgsqlParameter. + + The m_Name of the parameter to map. + One of the DbType values. + The length of the parameter. + The m_Name of the source column. + + + + Initializes a new instance of the NpgsqlParameter. + + The m_Name of the parameter to map. + One of the NpgsqlDbType values. + The length of the parameter. + The m_Name of the source column. + One of the ParameterDirection values. + true if the value of the field can be null, otherwise false. + The total number of digits to the left and right of the decimal point to which + Value is resolved. + The total number of decimal places to which + Value is resolved. + One of the DataRowVersion values. + An Object that is the value + of the NpgsqlParameter. + + + + Initializes a new instance of the NpgsqlParameter. + + The m_Name of the parameter to map. + One of the DbType values. + The length of the parameter. + The m_Name of the source column. + One of the ParameterDirection values. + true if the value of the field can be null, otherwise false. + The total number of digits to the left and right of the decimal point to which + Value is resolved. + The total number of decimal places to which + Value is resolved. + One of the DataRowVersion values. + An Object that is the value + of the NpgsqlParameter. + + + + Reset DBType. + + + + + Creates a new NpgsqlParameter that + is a copy of the current instance. + + A new NpgsqlParameter that is a copy of this instance. + + + + The collection to which this parameter belongs, if any. + + + + + Gets or sets the maximum number of digits used to represent the + 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. + + + + Whether to use an explicit cast when included in a query. + + + + + 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 String. + + + + Gets or sets the DbType of the parameter. + + One of the DbType values. The default is String. + + + + Gets or sets a value indicating whether the parameter is input-only, + output-only, bidirectional, or a stored procedure return value parameter. + + One of the ParameterDirection + values. The default is Input. + + + + Gets or sets a value indicating whether the parameter accepts null values. + + true if null values are accepted; otherwise, false. The default is false. + + + + Gets or sets the m_Name of the NpgsqlParameter. + + The m_Name of the NpgsqlParameter. + The default is an empty string. + + + + The m_Name scrubbed of any optional marker + + + + + Gets or sets the m_Name of the source column that is mapped to the + DataSet and used for loading or + returning the Value. + + The m_Name of the source column that is mapped to the + DataSet. The default is an empty string. + + + + Gets or sets the DataRowVersion + to use when loading Value. + + One of the DataRowVersion values. + The default is Current. + + + + 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. + + + + Source column mapping. + + + + + 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. + + + + + Adds the specified NpgsqlParameter object to the NpgsqlParameterCollection. + + The NpgsqlParameter to add to the collection. + The index of the new NpgsqlParameter object. + + + + Obsolete. Use AddWithValue instead. + + + Use caution when using this overload of the + Add method to specify integer parameter values. + Because this overload takes a value of type Object, + you must convert the integral value to an Object + type when the value is zero, as the following C# example demonstrates. + parameters.Add(":pname", Convert.ToInt32(0)); + If you do not perform this conversion, the compiler will assume you + are attempting to call the NpgsqlParameterCollection.Add(string, DbType) overload. + + + + + Adds a NpgsqlParameter to the NpgsqlParameterCollection given the specified parameter name and value. + + The name of the NpgsqlParameter. + The Value of the NpgsqlParameter to add to the collection. + The paramater that was added. + + + + Adds a NpgsqlParameter to the NpgsqlParameterCollection given the specified parameter name and value. + + The name of the NpgsqlParameter. + The Value of the NpgsqlParameter to add to the collection. + One of the NpgsqlDbType values. + The paramater that was added. + + + + Adds a NpgsqlParameter to the NpgsqlParameterCollection given the specified parameter name and value. + + The name of the NpgsqlParameter. + The Value of the NpgsqlParameter to add to the collection. + One of the NpgsqlDbType values. + The length of the column. + The paramater that was added. + + + + Adds a NpgsqlParameter to the NpgsqlParameterCollection given the specified parameter name and value. + + The name of the NpgsqlParameter. + The Value of the NpgsqlParameter to add to the collection. + One of the NpgsqlDbType values. + The length of the column. + The name of the source column. + The paramater that was added. + + + + Adds a NpgsqlParameter to the NpgsqlParameterCollection given the parameter name and the data type. + + 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. + + + + 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. + + + + 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. + + + + + + + In methods taking an object as argument this method is used to verify + that the argument has the type NpgsqlParameter + + The object to verify + + + + 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[] + + + + 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. + + + + Report whether the collection is read only. Always false. + + + + + 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. + + + + Sync root. + + + + + This class represents the ParameterStatus message sent from PostgreSQL + server. + + + + + + This class represents the Parse message sent to PostgreSQL + server. + + + + + + This class represents a PasswordPacket message sent to backend + PostgreSQL. + + + + + Used when a connection is closed + + + + + This is the abstract base class for NpgsqlAsciiRow and NpgsqlBinaryRow. + + + + + The index of the current field in the stream, i.e. the one that hasn't + been read yet + + + + + This class represents a RowDescription message sent from + the PostgreSQL. + + + + + + This struct represents the internal data of the RowDescription message. + + + + + 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. + + + + This class represents a StartupPacket message of PostgreSQL + protocol. + + + + + + Represents a completed response message. + + + + + This class represents the Sync message sent to PostgreSQL + server. + + + + + + Represents a transaction to be made in a PostgreSQL database. This class cannot be inherited. + + + + + Dispose. + + + + + + Commits the database transaction. + + + + + Rolls back a transaction from a pending state. + + + + + Rolls back a transaction from a pending savepoint state. + + + + + Creates a transaction save point. + + + + + Cancel the transaction without telling the backend about it. This is + used to make the transaction go away when closing a connection. + + + + + Gets the NpgsqlConnection + object associated with the transaction, or a null reference if the + transaction is no longer valid. + + The NpgsqlConnection + object associated with the transaction. + + + + DB connection. + + + + + Specifies the IsolationLevel for this transaction. + + The IsolationLevel for this transaction. + The default is ReadCommitted. + + + + This class provides many util methods to handle + reading and writing of PostgreSQL protocol messages. + + + + + This method takes a ProtocolVersion and returns an integer + version number that the Postgres backend will recognize in a + startup packet. + + + + + This method takes a version string as returned by SELECT VERSION() and returns + a valid version string ("7.2.2" for example). + This is only needed when running protocol version 2. + This does not do any validity checks. + + + + + This method gets a C NULL terminated string from the network stream. + It keeps reading a byte in each time until a NULL byte is returned. + It returns the resultant string of bytes read. + This string is sent from backend. + + + + + Reads requested number of bytes from stream with retries until Stream.Read returns 0 or count is reached. + + Stream to read + byte buffer to fill + starting position to fill the buffer + number of bytes to read + The number of bytes read. May be less than count if no more bytes are available. + + + + Reads requested number of bytes from . If output matches exactly, and == false, is returned directly. + + Source array. + Starting position to read from + Number of bytes to read + Force a copy, even if the output is an exact copy of . + byte[] containing data requested. + + + + This method writes a string to the network stream. + + + + + This method writes a string to the network stream. + + + + + This method writes a C NULL terminated string to the network stream. + It appends a NULL terminator to the end of the String. + + + + + This method writes a C NULL terminated string to the network stream. + It appends a NULL terminator to the end of the String. + + + + + This method writes a byte to the stream. It also enables logging of them. + + + + + This method writes a byte to the stream. It also enables logging of them. + + + + + This method writes a set of bytes to the stream. It also enables logging of them. + + + + + This method writes a set of bytes to the stream. It also enables logging of them. + + + + + This method writes a C NULL terminated string limited in length to the + backend server. + It pads the string with null bytes to the size specified. + + + + + This method writes a C NULL terminated byte[] limited in length to the + backend server. + It pads the string with null bytes to the size specified. + + + + + Write a 32-bit integer to the given stream in the correct byte order. + + + + + Read a 32-bit integer from the given stream in the correct byte order. + + + + + Read a 32-bit integer from the given array in the correct byte order. + + + + + Write a 16-bit integer to the given stream in the correct byte order. + + + + + Read a 16-bit integer from the given stream in the correct byte order. + + + + + Read a 16-bit integer from the given array in the correct byte order. + + + + + Copy and possibly reverse a byte array, depending on host architecture endienness. + + Source byte array. + Force a copy even if no swap is performed. + , reversed if on a little-endian architecture, copied if required. + + + + Copy and possibly reverse a byte array, depending on host architecture endienness. + + Source byte array. + Starting offset in source array. + Number of bytes to copy. + Force a copy even if no swap is performed. + , reversed if on a little-endian architecture, copied if required. + + + + Represent the frontend/backend protocol version. + + + + + Represent the backend server version. + As this class offers no functionality beyond that offered by it has been + deprecated in favour of that class. + + + + + + Returns the string representation of this version in three place dot notation (Major.Minor.Patch). + + + + + Server version major number. + + + + + Server version minor number. + + + + + Server version patch level number. + + + + + A class to handle everything associated with SSPI authentication + + + + + Simplified SecBufferDesc struct with only one SecBuffer + + + + + Provides a set of static (Shared in Visual Basic) methods for + querying objects that implement . + + + + + Returns the input typed as . + + + + + Returns an empty that has the + specified type argument. + + + + + Converts the elements of an to the + specified type. + + + + + Filters the elements of an based on a specified type. + + + + + Generates a sequence of integral numbers within a specified range. + + The value of the first integer in the sequence. + The number of sequential integers to generate. + + + + Generates a sequence that contains one repeated value. + + + + + Filters a sequence of values based on a predicate. + + + + + Filters a sequence of values based on a predicate. + Each element's index is used in the logic of the predicate function. + + + + + Projects each element of a sequence into a new form. + + + + + Projects each element of a sequence into a new form by + incorporating the element's index. + + + + + Projects each element of a sequence to an + and flattens the resulting sequences into one sequence. + + + + + Projects each element of a sequence to an , + and flattens the resulting sequences into one sequence. The + index of each source element is used in the projected form of + that element. + + + + + Projects each element of a sequence to an , + flattens the resulting sequences into one sequence, and invokes + a result selector function on each element therein. + + + + + Projects each element of a sequence to an , + flattens the resulting sequences into one sequence, and invokes + a result selector function on each element therein. The index of + each source element is used in the intermediate projected form + of that element. + + + + + Returns elements from a sequence as long as a specified condition is true. + + + + + Returns elements from a sequence as long as a specified condition is true. + The element's index is used in the logic of the predicate function. + + + + + Returns a specified number of contiguous elements from the start + of a sequence. + + + + + Base implementation of First operator. + + + + + Returns the first element of a sequence. + + + + + Returns the first element in a sequence that satisfies a specified condition. + + + + + Returns the first element of a sequence, or a default value if + the sequence contains no elements. + + + + + Returns the first element of the sequence that satisfies a + condition or a default value if no such element is found. + + + + + Base implementation of Last operator. + + + + + Returns the last element of a sequence. + + + + + Returns the last element of a sequence that satisfies a + specified condition. + + + + + Returns the last element of a sequence, or a default value if + the sequence contains no elements. + + + + + Returns the last element of a sequence that satisfies a + condition or a default value if no such element is found. + + + + + Base implementation of Single operator. + + + + + Returns the only element of a sequence, and throws an exception + if there is not exactly one element in the sequence. + + + + + Returns the only element of a sequence that satisfies a + specified condition, and throws an exception if more than one + such element exists. + + + + + Returns the only element of a sequence, or a default value if + the sequence is empty; this method throws an exception if there + is more than one element in the sequence. + + + + + Returns the only element of a sequence that satisfies a + specified condition or a default value if no such element + exists; this method throws an exception if more than one element + satisfies the condition. + + + + + Returns the element at a specified index in a sequence. + + + + + Returns the element at a specified index in a sequence or a + default value if the index is out of range. + + + + + Inverts the order of the elements in a sequence. + + + + + Bypasses elements in a sequence as long as a specified condition + is true and then returns the remaining elements. + + + + + Bypasses elements in a sequence as long as a specified condition + is true and then returns the remaining elements. The element's + index is used in the logic of the predicate function. + + + + + Bypasses a specified number of elements in a sequence and then + returns the remaining elements. + + + + + Returns the number of elements in a sequence. + + + + + Returns a number that represents how many elements in the + specified sequence satisfy a condition. + + + + + Returns an that represents the total number + of elements in a sequence. + + + + + Returns an that represents how many elements + in a sequence satisfy a condition. + + + + + Concatenates two sequences. + + + + + Creates a from an . + + + + + Creates an array from an . + + + + + Returns distinct elements from a sequence by using the default + equality comparer to compare values. + + + + + Returns distinct elements from a sequence by using a specified + to compare values. + + + + + Creates a from an + according to a specified key + selector function. + + + + + Creates a from an + according to a specified key + selector function and a key comparer. + + + + + Creates a from an + according to specified key + and element selector functions. + + + + + Creates a from an + according to a specified key + selector function, a comparer and an element selector function. + + + + + Groups the elements of a sequence according to a specified key + selector function. + + + + + Groups the elements of a sequence according to a specified key + selector function and compares the keys by using a specified + comparer. + + + + + Groups the elements of a sequence according to a specified key + selector function and projects the elements for each group by + using a specified function. + + + + + Groups the elements of a sequence according to a specified key + selector function and creates a result value from each group and + its key. + + + + + Groups the elements of a sequence according to a key selector + function. The keys are compared by using a comparer and each + group's elements are projected by using a specified function. + + + + + Groups the elements of a sequence according to a specified key + selector function and creates a result value from each group and + its key. The elements of each group are projected by using a + specified function. + + + + + Groups the elements of a sequence according to a specified key + selector function and creates a result value from each group and + its key. The keys are compared by using a specified comparer. + + + + + Groups the elements of a sequence according to a specified key + selector function and creates a result value from each group and + its key. Key values are compared by using a specified comparer, + and the elements of each group are projected by using a + specified function. + + + + + Applies an accumulator function over a sequence. + + + + + Applies an accumulator function over a sequence. The specified + seed value is used as the initial accumulator value. + + + + + Applies an accumulator function over a sequence. The specified + seed value is used as the initial accumulator value, and the + specified function is used to select the result value. + + + + + Produces the set union of two sequences by using the default + equality comparer. + + + + + Produces the set union of two sequences by using a specified + . + + + + + Returns the elements of the specified sequence or the type + parameter's default value in a singleton collection if the + sequence is empty. + + + + + Returns the elements of the specified sequence or the specified + value in a singleton collection if the sequence is empty. + + + + + Determines whether all elements of a sequence satisfy a condition. + + + + + Determines whether a sequence contains any elements. + + + + + Determines whether any element of a sequence satisfies a + condition. + + + + + Determines whether a sequence contains a specified element by + using the default equality comparer. + + + + + Determines whether a sequence contains a specified element by + using a specified . + + + + + Determines whether two sequences are equal by comparing the + elements by using the default equality comparer for their type. + + + + + Determines whether two sequences are equal by comparing their + elements by using a specified . + + + + + Base implementation for Min/Max operator. + + + + + Base implementation for Min/Max operator for nullable types. + + + + + Returns the minimum value in a generic sequence. + + + + + Invokes a transform function on each element of a generic + sequence and returns the minimum resulting value. + + + + + Returns the maximum value in a generic sequence. + + + + + Invokes a transform function on each element of a generic + sequence and returns the maximum resulting value. + + + + + Makes an enumerator seen as enumerable once more. + + + The supplied enumerator must have been started. The first element + returned is the element the enumerator was on when passed in. + DO NOT use this method if the caller must be a generator. It is + mostly safe among aggregate operations. + + + + + Sorts the elements of a sequence in ascending order according to a key. + + + + + Sorts the elements of a sequence in ascending order by using a + specified comparer. + + + + + Sorts the elements of a sequence in descending order according to a key. + + + + + Sorts the elements of a sequence in descending order by using a + specified comparer. + + + + + Performs a subsequent ordering of the elements in a sequence in + ascending order according to a key. + + + + + Performs a subsequent ordering of the elements in a sequence in + ascending order by using a specified comparer. + + + + + Performs a subsequent ordering of the elements in a sequence in + descending order, according to a key. + + + + + Performs a subsequent ordering of the elements in a sequence in + descending order by using a specified comparer. + + + + + Base implementation for Intersect and Except operators. + + + + + Produces the set intersection of two sequences by using the + default equality comparer to compare values. + + + + + Produces the set intersection of two sequences by using the + specified to compare values. + + + + + Produces the set difference of two sequences by using the + default equality comparer to compare values. + + + + + Produces the set difference of two sequences by using the + specified to compare values. + + + + + Creates a from an + according to a specified key + selector function. + + + + + Creates a from an + according to a specified key + selector function and key comparer. + + + + + Creates a from an + according to specified key + selector and element selector functions. + + + + + Creates a from an + according to a specified key + selector function, a comparer, and an element selector function. + + + + + Correlates the elements of two sequences based on matching keys. + The default equality comparer is used to compare keys. + + + + + Correlates the elements of two sequences based on matching keys. + The default equality comparer is used to compare keys. A + specified is used to compare keys. + + + + + Correlates the elements of two sequences based on equality of + keys and groups the results. The default equality comparer is + used to compare keys. + + + + + Correlates the elements of two sequences based on equality of + keys and groups the results. The default equality comparer is + used to compare keys. A specified + is used to compare keys. + + + + + Computes the sum of a sequence of nullable values. + + + + + Computes the sum of a sequence of nullable + values that are obtained by invoking a transform function on + each element of the input sequence. + + + + + Computes the average of a sequence of nullable values. + + + + + Computes the average of a sequence of nullable values + that are obtained by invoking a transform function on each + element of the input sequence. + + + + + Computes the sum of a sequence of values. + + + + + Computes the sum of a sequence of + values that are obtained by invoking a transform function on + each element of the input sequence. + + + + + Computes the average of a sequence of values. + + + + + Computes the average of a sequence of values + that are obtained by invoking a transform function on each + element of the input sequence. + + + + + Returns the minimum value in a sequence of nullable + values. + + + + + Invokes a transform function on each element of a sequence and + returns the minimum nullable value. + + + + + Returns the maximum value in a sequence of nullable + values. + + + + + Invokes a transform function on each element of a sequence and + returns the maximum nullable value. + + + + + Computes the sum of a sequence of nullable values. + + + + + Computes the sum of a sequence of nullable + values that are obtained by invoking a transform function on + each element of the input sequence. + + + + + Computes the average of a sequence of nullable values. + + + + + Computes the average of a sequence of nullable values + that are obtained by invoking a transform function on each + element of the input sequence. + + + + + Computes the sum of a sequence of values. + + + + + Computes the sum of a sequence of + values that are obtained by invoking a transform function on + each element of the input sequence. + + + + + Computes the average of a sequence of values. + + + + + Computes the average of a sequence of values + that are obtained by invoking a transform function on each + element of the input sequence. + + + + + Returns the minimum value in a sequence of nullable + values. + + + + + Invokes a transform function on each element of a sequence and + returns the minimum nullable value. + + + + + Returns the maximum value in a sequence of nullable + values. + + + + + Invokes a transform function on each element of a sequence and + returns the maximum nullable value. + + + + + Computes the sum of a sequence of nullable values. + + + + + Computes the sum of a sequence of nullable + values that are obtained by invoking a transform function on + each element of the input sequence. + + + + + Computes the average of a sequence of nullable values. + + + + + Computes the average of a sequence of nullable values + that are obtained by invoking a transform function on each + element of the input sequence. + + + + + Computes the sum of a sequence of values. + + + + + Computes the sum of a sequence of + values that are obtained by invoking a transform function on + each element of the input sequence. + + + + + Computes the average of a sequence of values. + + + + + Computes the average of a sequence of values + that are obtained by invoking a transform function on each + element of the input sequence. + + + + + Returns the minimum value in a sequence of nullable + values. + + + + + Invokes a transform function on each element of a sequence and + returns the minimum nullable value. + + + + + Returns the maximum value in a sequence of nullable + values. + + + + + Invokes a transform function on each element of a sequence and + returns the maximum nullable value. + + + + + Computes the sum of a sequence of nullable values. + + + + + Computes the sum of a sequence of nullable + values that are obtained by invoking a transform function on + each element of the input sequence. + + + + + Computes the average of a sequence of nullable values. + + + + + Computes the average of a sequence of nullable values + that are obtained by invoking a transform function on each + element of the input sequence. + + + + + Computes the sum of a sequence of values. + + + + + Computes the sum of a sequence of + values that are obtained by invoking a transform function on + each element of the input sequence. + + + + + Computes the average of a sequence of values. + + + + + Computes the average of a sequence of values + that are obtained by invoking a transform function on each + element of the input sequence. + + + + + Returns the minimum value in a sequence of nullable + values. + + + + + Invokes a transform function on each element of a sequence and + returns the minimum nullable value. + + + + + Returns the maximum value in a sequence of nullable + values. + + + + + Invokes a transform function on each element of a sequence and + returns the maximum nullable value. + + + + + Computes the sum of a sequence of nullable values. + + + + + Computes the sum of a sequence of nullable + values that are obtained by invoking a transform function on + each element of the input sequence. + + + + + Computes the average of a sequence of nullable values. + + + + + Computes the average of a sequence of nullable values + that are obtained by invoking a transform function on each + element of the input sequence. + + + + + Computes the sum of a sequence of values. + + + + + Computes the sum of a sequence of + values that are obtained by invoking a transform function on + each element of the input sequence. + + + + + Computes the average of a sequence of values. + + + + + Computes the average of a sequence of values + that are obtained by invoking a transform function on each + element of the input sequence. + + + + + Returns the minimum value in a sequence of nullable + values. + + + + + Invokes a transform function on each element of a sequence and + returns the minimum nullable value. + + + + + Returns the maximum value in a sequence of nullable + values. + + + + + Invokes a transform function on each element of a sequence and + returns the maximum nullable value. + + + + + Represents a collection of objects that have a common key. + + + + + Gets the key of the . + + + + + This attribute allows us to define extension methods without + requiring .NET Framework 3.5. For more information, see the section, + Extension Methods in .NET Framework 2.0 Apps, + of Basic Instincts: Extension Methods + column in MSDN Magazine, + issue Nov 2007. + + + + + Defines an indexer, size property, and Boolean search method for + data structures that map keys to + sequences of values. + + + + + This type is not intended to be used directly from user code. + It may be removed or changed in a future version without notice. + + + + + This type is not intended to be used directly from user code. + It may be removed or changed in a future version without notice. + + + + + This type is not intended to be used directly from user code. + It may be removed or changed in a future version without notice. + + + + + Represents a sorted sequence. + + + + + Performs a subsequent ordering on the elements of an + according to a key. + + + + + Represents a collection of keys each mapped to one or more values. + + + + + Determines whether a specified key is in the . + + + + + Applies a transform function to each key and its associated + values and returns the results. + + + + + Returns a generic enumerator that iterates through the . + + + + + Gets the number of key/value collection pairs in the . + + + + + Gets the collection of values indexed by the specified key. + + +
+
diff --git a/src/Frapid.Web/Areas/Frapid.Account/packages/Npgsql.2.2.6/lib/net20/de/Npgsql.resources.dll b/src/Frapid.Web/Areas/Frapid.Account/packages/Npgsql.2.2.6/lib/net20/de/Npgsql.resources.dll new file mode 100644 index 00000000..1e018cad Binary files /dev/null and b/src/Frapid.Web/Areas/Frapid.Account/packages/Npgsql.2.2.6/lib/net20/de/Npgsql.resources.dll differ diff --git a/src/Frapid.Web/Areas/Frapid.Account/packages/Npgsql.2.2.6/lib/net20/es/Npgsql.resources.dll b/src/Frapid.Web/Areas/Frapid.Account/packages/Npgsql.2.2.6/lib/net20/es/Npgsql.resources.dll new file mode 100644 index 00000000..fbc889c3 Binary files /dev/null and b/src/Frapid.Web/Areas/Frapid.Account/packages/Npgsql.2.2.6/lib/net20/es/Npgsql.resources.dll differ diff --git a/src/Frapid.Web/Areas/Frapid.Account/packages/Npgsql.2.2.6/lib/net20/fi/Npgsql.resources.dll b/src/Frapid.Web/Areas/Frapid.Account/packages/Npgsql.2.2.6/lib/net20/fi/Npgsql.resources.dll new file mode 100644 index 00000000..9973ad78 Binary files /dev/null and b/src/Frapid.Web/Areas/Frapid.Account/packages/Npgsql.2.2.6/lib/net20/fi/Npgsql.resources.dll differ diff --git a/src/Frapid.Web/Areas/Frapid.Account/packages/Npgsql.2.2.6/lib/net20/fr/Npgsql.resources.dll b/src/Frapid.Web/Areas/Frapid.Account/packages/Npgsql.2.2.6/lib/net20/fr/Npgsql.resources.dll new file mode 100644 index 00000000..0a4f9460 Binary files /dev/null and b/src/Frapid.Web/Areas/Frapid.Account/packages/Npgsql.2.2.6/lib/net20/fr/Npgsql.resources.dll differ diff --git a/src/Frapid.Web/Areas/Frapid.Account/packages/Npgsql.2.2.6/lib/net20/ja/Npgsql.resources.dll b/src/Frapid.Web/Areas/Frapid.Account/packages/Npgsql.2.2.6/lib/net20/ja/Npgsql.resources.dll new file mode 100644 index 00000000..11feb58a Binary files /dev/null and b/src/Frapid.Web/Areas/Frapid.Account/packages/Npgsql.2.2.6/lib/net20/ja/Npgsql.resources.dll differ diff --git a/src/Frapid.Web/Areas/Frapid.Account/packages/Npgsql.2.2.6/lib/net20/zh-CN/Npgsql.resources.dll b/src/Frapid.Web/Areas/Frapid.Account/packages/Npgsql.2.2.6/lib/net20/zh-CN/Npgsql.resources.dll new file mode 100644 index 00000000..e14137b0 Binary files /dev/null and b/src/Frapid.Web/Areas/Frapid.Account/packages/Npgsql.2.2.6/lib/net20/zh-CN/Npgsql.resources.dll differ diff --git a/src/Frapid.Web/Areas/Frapid.Account/packages/Npgsql.2.2.6/lib/net35/Mono.Security.dll b/src/Frapid.Web/Areas/Frapid.Account/packages/Npgsql.2.2.6/lib/net35/Mono.Security.dll new file mode 100644 index 00000000..5173f0dc Binary files /dev/null and b/src/Frapid.Web/Areas/Frapid.Account/packages/Npgsql.2.2.6/lib/net35/Mono.Security.dll differ diff --git a/src/Frapid.Web/Areas/Frapid.Account/packages/Npgsql.2.2.6/lib/net35/Npgsql.dll b/src/Frapid.Web/Areas/Frapid.Account/packages/Npgsql.2.2.6/lib/net35/Npgsql.dll new file mode 100644 index 00000000..fd1bca6c Binary files /dev/null and b/src/Frapid.Web/Areas/Frapid.Account/packages/Npgsql.2.2.6/lib/net35/Npgsql.dll differ diff --git a/src/Frapid.Web/Areas/Frapid.Account/packages/Npgsql.2.2.6/lib/net35/Npgsql.xml b/src/Frapid.Web/Areas/Frapid.Account/packages/Npgsql.2.2.6/lib/net35/Npgsql.xml new file mode 100644 index 00000000..44c2c149 --- /dev/null +++ b/src/Frapid.Web/Areas/Frapid.Account/packages/Npgsql.2.2.6/lib/net35/Npgsql.xml @@ -0,0 +1,6536 @@ + + + + Npgsql + + + + + Handles serialisation of .NET array or IEnumeration to pg format. + Arrays of arrays, enumerations of enumerations, arrays of enumerations etc. + are treated as multi-dimensional arrays (in much the same manner as an array of arrays + is used to emulate multi-dimensional arrays in languages that lack native support for them). + If such an enumeration of enumerations is "jagged" (as opposed to rectangular, cuboid, + hypercuboid, hyperhypercuboid, etc) then this class will "correctly" serialise it, but pg + will raise an error as it doesn't allow jagged arrays. + + + + + Create an ArrayNativeToBackendTypeConverter with the element converter passed + + The that would be used to serialise the element type. + + + + Serialise the enumeration or array. + + + + + Convert a System.Array to PG binary format. + Write the array header and prepare to write array data to the stream. + + + + + Append all array data to the binary stream. + + + + + Handles parsing of pg arrays into .NET arrays. + + + + + Takes a string representation of a pg 1-dimensional array + (or a 1-dimensional row within an n-dimensional array) + and allows enumeration of the string represenations of each items. + + + + + Takes a string representation of a pg n-dimensional array + and allows enumeration of the string represenations of the next + lower level of rows (which in turn can be taken as (n-1)-dimensional arrays. + + + + + Takes an ArrayList which may be an ArrayList of ArrayLists, an ArrayList of ArrayLists of ArrayLists + and so on and enumerates the items that aren't ArrayLists (the leaf nodes if we think of the ArrayList + passed as a tree). Simply uses the ArrayLists' own IEnumerators to get that of the next, + pushing them onto a stack until we hit something that isn't an ArrayList. + ArrayList to enumerate + IEnumerable + + + + + Create a new ArrayBackendToNativeTypeConverter + + for the element type. + + + + Creates an array from pg text representation. + + + + + Creates an array list from pg represenation of an array. + Multidimensional arrays are treated as ArrayLists of ArrayLists + + + + + Creates an n-dimensional array from an ArrayList of ArrayLists or + a 1-dimensional array from something else. + + to convert + Type of the elements in the list + produced. + + + + Creates an n-dimensional System.Array from PG binary representation. + This function reads the array header and sets up an n-dimensional System.Array object to hold its data. + PopulateArrayFromBinaryArray() is then called to carry out array population. + + + + + Recursively populates an array from PB binary data representation. + + + + + Takes an array of ints and treats them like the limits of a set of counters. + Retains a matching set of ints that is set to all zeros on the first ++ + On a ++ it increments the "right-most" int. If that int reaches it's + limit it is set to zero and the one before it is incremented, and so on. + + Making this a more general purpose class is pretty straight-forward, but we'll just put what we need here. + + + + + Implements a bit string; a collection of zero or more bits which can each be 1 or 0. + BitString's behave as a list of bools, though like most strings and unlike most collections the position + tends to be of as much significance as the value. + BitStrings are often used as masks, and are commonly cast to and from other values. + + + + + Represents the empty string. + + + + + Create a BitString from an enumeration of boolean values. The BitString will contain + those booleans in the order they came in. + + The boolean values. + + + + Creates a BitString filled with a given number of true or false values. + + The value to fill the string with. + The number of bits to fill. + + + + Creats a bitstring from a string. + The string to copy from. + + + + + + Creates a single-bit element from a boolean value. + + The bool value which determines whether + the bit is 1 or 0. + + + + Creates a bitstring from an unsigned integer value. The string will be the shortest required to + contain the integer (e.g. 1 bit for 0 or 1, 2 for 2 or 3, 3 for 4-7, and so on). + + The integer. + This method is not CLS Compliant, and may not be available to some languages. + + + + Creates a bitstring from an integer value. The string will be the shortest required to + contain the integer (e.g. 1 bit for 0 or 1, 2 for 2 or 3, 3 for 4-7, and so on). + + The integer. + + + + Finds the first instance of a given value + + The value - whether true or false - to search for. + The index of the value found, or -1 if none are present. + + + + True if there is at least one bit with the value looked for. + + The value - true or false - to detect. + True if at least one bit was the same as item, false otherwise. + + + + Copies the bitstring to an array of bools. + + The boolean array to copy to. + The index in the array to start copying from. + + + + Returns an enumerator that enumerates through the string. + + The enumerator. + + + + Creats a bitstring by concatenating another onto this one. + + The string to append to this one. + The combined strings. + + + + Returns a substring of this string. + + The position to start from, must be between 0 and the length of the string. + The length of the string to return, must be greater than zero, and may not be + so large that the start + length exceeds the bounds of this instance. + The Bitstring identified + + + + Returns a substring of this string. + + The position to start from, must be between 0 and the length of the string, + the rest of the string is returned. + The Bitstring identified + + + + A logical and between this string and another. The two strings must be the same length. + + Another BitString to AND with this one. + A bitstring with 1 where both BitStrings had 1 and 0 otherwise. + + + + A logical or between this string and another. The two strings must be the same length. + + Another BitString to OR with this one. + A bitstring with 1 where either BitString had 1 and 0 otherwise. + + + + A logical xor between this string and another. The two strings must be the same length. + + Another BitString to XOR with this one. + A bitstring with 1 where one BitStrings and the other had 0, + and 0 where they both had 1 or both had 0. + + + + A bitstring that is the logical inverse of this one. + + A bitstring of the same length as this with 1 where this has 0 and vice-versa. + + + + Shifts the string operand bits to the left, filling with zeros to produce a + string of the same length. + + The number of bits to shift to the left. + A left-shifted bitstring. + The behaviour of LShift is closer to what one would expect from dealing + with PostgreSQL bit-strings than in using the same operations on integers in .NET + In particular, negative operands result in a right-shift, and operands greater than + the length of the string will shift it entirely, resulting in a zero-filled string. + + + + + Shifts the string operand bits to the right, filling with zeros to produce a + string of the same length. + + The number of bits to shift to the right. + A right-shifted bitstring. + The behaviour of RShift is closer to what one would expect from dealing + with PostgreSQL bit-strings than in using the same operations on integers in .NET + In particular, negative operands result in a left-shift, and operands greater than + the length of the string will shift it entirely, resulting in a zero-filled string. It also performs + a logical shift, rather than an arithmetic shift, so it always sets the vacated bit positions to zero + (like PostgreSQL and like .NET for unsigned integers but not for signed integers). + + + + + Returns true if the this string is identical to the argument passed. + + + + + Compares two strings. Strings are compared as strings, so while 0 being less than 1 will + mean a comparison between two strings of the same size is the same as treating them as numbers, + in the case of two strings of differing lengths the comparison starts at the right-most (most significant) + bit, and if all bits of the shorter string are exhausted without finding a comparison, then the larger + string is deemed to be greater than the shorter (0010 is greater than 0001 but less than 00100). + + Another string to compare with this one. + A value if the two strings are identical, an integer less + than zero if this is less than the argument, and an integer greater + than zero otherwise. + + + + Compares the string with another object. + + The object to compare with. + If the object is null then this string is considered greater. If the object is another BitString + then they are compared as in the explicit comparison for BitStrings + in any other case a is thrown. + + + + Compares this BitString with an object for equality. + + + + + Returns a code for use in hashing operations. + + + + + Returns a string representation of the BitString. + + + A string which can contain a letter and optionally a number which sets a minimum size for the string + returned. In each case using the lower-case form of the letter will result in a lower-case string + being returned. + + + B + A string of 1s and 0s. + + + X + An hexadecimal string (will result in an error unless the string's length is divisible by 4). + + + G + A string of 1s and 0s in single-quotes preceded by 'B' (Postgres bit string literal syntax). + + Y + An hexadecimal string in single-quotes preceded by 'X' (Postgres bit literal syntax, will result in an error unless the string's length is divisible by 4. + + C + The format produced by format-string "Y" if legal, otherwise that produced by format-string "G". + E + The most compact safe representation for Postgres. If single bit will be either a 0 or a 1. Otherwise if it + can be that produce by format string "Y" it will, otherwise if there are less than 9bits in length it will be that + produced by format-string "G". For longer strings that cannot be represented in hexadecimal it will be a string + representing the first part of the string in format "Y" followed by the PostgreSQL concatenation operator, followed + by the final bits in the format "G". E.g. "X'13DCE'||B'110'" + If format is empty or null, it is treated as if "B" had been passed (the default repreesentation, and that + generally used by PostgreSQL for display). + + The formatted string. + + + + Returns a string representation for the Bitstring + + A string containing '0' and '1' characters. + + + + Returns the same string as . formatProvider is ignored. + + + + + Parses a string to produce a BitString. Most formats that can be produced by + can be accepted, but hexadecimal + can be interpreted with the preceding X' to mark the following characters as + being hexadecimal rather than binary. + + + + + Performs a logical AND on the two operands. + + + + + Performs a logcial OR on the two operands. + + + + + Perofrms a logical EXCLUSIVE-OR on the two operands + + + + + Performs a logical NOT on the operand. + + + + + Concatenates the operands. + + + + + Left-shifts the string BitString. + + + + + Right-shifts the string BitString. + + + + + Compares the two operands. + + + + + Compares the two operands. + + + + + Compares the two operands. + + + + + Compares the two operands. + + + + + Compares the two operands. + + + + + Compares the two operands. + + + + + Interprets the bitstring as a series of bits in an encoded character string, + encoded according to the Encoding passed, and returns that string. + The bitstring must contain a whole number of octets(bytes) and also be + valid according to the Encoding passed. + + The to use in producing the string. + The string that was encoded in the BitString. + + + + Interprets the bitstring as a series of octets (bytes) and returns those octets. Fails + if the Bitstring does not contain a whole number of octets (its length is not evenly + divisible by 8). + + + + + Interprets the bitstring as a series of signed octets (bytes) and returns those octets. Fails + if the Bitstring does not contain a whole number of octets (its length is not evenly + divisible by 8). + This method is not CLS-Compliant and may not be available to languages that cannot + handle signed bytes. + + + + + Interprets the bitstring as a series of unsigned 16-bit integers and returns those integers. + Fails if the Bitstring's length is not evenly divisible by 16. + This method is not CLS-Compliant and may not be available to languages that cannot + handle unsigned integers. + + + + + Interprets the bitstring as a series of 16-bit integers and returns those integers. + Fails if the Bitstring's length is not evenly divisible by 16. + + + + + Interprets the bitstring as a series of unsigned 32-bit integers and returns those integers. + Fails if the Bitstring's length is not evenly divisible by 32. + This method is not CLS-Compliant and may not be available to languages that cannot + handle unsigned integers. + + + + + Interprets the bitstring as a series of signed 32-bit integers and returns those integers. + Fails if the Bitstring's length is not evenly divisible by 32. + + + + + Interprets the bitstring as a series of unsigned 64-bit integers and returns those integers. + Fails if the Bitstring's length is not evenly divisible by 64. + This method is not CLS-Compliant and may not be available to languages that cannot + handle unsigned integers. + + + + + Interprets the bitstring as a series of signed 64-bit integers and returns those integers. + Fails if the Bitstring's length is not evenly divisible by 64. + + + + + The length of the string. + + + + + Retrieves the value of the bit at the given index. + + + + + Represents the PostgreSQL interval datatype. + PostgreSQL differs from .NET in how it's interval type doesn't assume 24 hours in a day + (to deal with 23- and 25-hour days caused by daylight savings adjustments) and has a concept + of months that doesn't exist in .NET's class. (Neither datatype + has any concessions for leap-seconds). + For most uses just casting to and from TimeSpan will work correctly — in particular, + the results of subtracting one or the PostgreSQL date, time and + timestamp types from another should be the same whether you do so in .NET or PostgreSQL — + but if the handling of days and months in PostgreSQL is important to your application then you + should use this class instead of . + If you don't know whether these differences are important to your application, they + probably arent! Just use and do not use this class directly ☺ + To avoid forcing unnecessary provider-specific concerns on users who need not be concerned + with them a call to on a field containing an + value will return a rather than an + . If you need the extra functionality of + then use . + + + + + + + + + + Represents the number of ticks (100ns periods) in one microsecond. This field is constant. + + + + + Represents the number of ticks (100ns periods) in one millisecond. This field is constant. + + + + + Represents the number of ticks (100ns periods) in one second. This field is constant. + + + + + Represents the number of ticks (100ns periods) in one minute. This field is constant. + + + + + Represents the number of ticks (100ns periods) in one hour. This field is constant. + + + + + Represents the number of ticks (100ns periods) in one day. This field is constant. + + + + + Represents the number of hours in one day (assuming no daylight savings adjustments). This field is constant. + + + + + Represents the number of days assumed in one month if month justification or unjustifcation is performed. + This is set to 30 for consistency with PostgreSQL. Note that this is means that month adjustments cause + a year to be taken as 30 × 12 = 360 rather than 356/366 days. + + + + + Represents the number of ticks (100ns periods) in one day, assuming 30 days per month. + + + + + Represents the number of months in a year. This field is constant. + + + + + Represents the maximum . This field is read-only. + + + + + Represents the minimum . This field is read-only. + + + + + Represents the zero . This field is read-only. + + + + + Initializes a new to the specified number of ticks. + + A time period expressed in 100ns units. + + + + Initializes a new to hold the same time as a + + A time period expressed in a + + + + Initializes a new to the specified number of months, days + & ticks. + + Number of months. + Number of days. + Number of 100ns units. + + + + Initializes a new to the specified number of + days, hours, minutes & seconds. + + Number of days. + Number of hours. + Number of minutes. + Number of seconds. + + + + Initializes a new to the specified number of + days, hours, minutes, seconds & milliseconds. + + Number of days. + Number of hours. + Number of minutes. + Number of seconds. + Number of milliseconds. + + + + Initializes a new to the specified number of + months, days, hours, minutes, seconds & milliseconds. + + Number of months. + Number of days. + Number of hours. + Number of minutes. + Number of seconds. + Number of milliseconds. + + + + Initializes a new to the specified number of + years, months, days, hours, minutes, seconds & milliseconds. + Years are calculated exactly equivalent to 12 months. + + Number of years. + Number of months. + Number of days. + Number of hours. + Number of minutes. + Number of seconds. + Number of milliseconds. + + + + Creates an from a number of ticks. + + The number of ticks (100ns units) in the interval. + A d with the given number of ticks. + + + + Creates an from a number of microseconds. + + The number of microseconds in the interval. + A d with the given number of microseconds. + + + + Creates an from a number of milliseconds. + + The number of milliseconds in the interval. + A d with the given number of milliseconds. + + + + Creates an from a number of seconds. + + The number of seconds in the interval. + A d with the given number of seconds. + + + + Creates an from a number of minutes. + + The number of minutes in the interval. + A d with the given number of minutes. + + + + Creates an from a number of hours. + + The number of hours in the interval. + A d with the given number of hours. + + + + Creates an from a number of days. + + The number of days in the interval. + A d with the given number of days. + + + + Creates an from a number of months. + + The number of months in the interval. + A d with the given number of months. + + + + Adds another interval to this instance and returns the result. + + An to add to this instance. + An whose values are the sums of the two instances. + + + + Subtracts another interval from this instance and returns the result. + + An to subtract from this instance. + An whose values are the differences of the two instances. + + + + Returns an whose value is the negated value of this instance. + + An whose value is the negated value of this instance. + + + + This absolute value of this instance. In the case of some, but not all, components being negative, + the rules used for justification are used to determine if the instance is positive or negative. + + An whose value is the absolute value of this instance. + + + + Equivalent to PostgreSQL's justify_days function. + + An based on this one, but with any hours outside of the range [-23, 23] + converted into days. + + + + Opposite to PostgreSQL's justify_days function. + + An based on this one, but with any days converted to multiples of ±24hours. + + + + Equivalent to PostgreSQL's justify_months function. + + An based on this one, but with any days outside of the range [-30, 30] + converted into months. + + + + Opposite to PostgreSQL's justify_months function. + + An based on this one, but with any months converted to multiples of ±30days. + + + + Equivalent to PostgreSQL's justify_interval function. + + An based on this one, + but with any months converted to multiples of ±30days + and then with any days converted to multiples of ±24hours + + + + Opposite to PostgreSQL's justify_interval function. + + An based on this one, but with any months converted to multiples of ±30days and then any days converted to multiples of ±24hours; + + + + Produces a canonical NpgslInterval with 0 months and hours in the range of [-23, 23]. + + + While the fact that for many purposes, two different instances could be considered + equivalent (e.g. one with 2days, 3hours and one with 1day 27hours) there are different possible canonical forms. + + E.g. we could move all excess hours into days and all excess days into months and have the most readable form, + or we could move everything into the ticks and have the form that allows for the easiest arithmetic) the form + chosen has two important properties that make it the best choice. + First, it is closest two how + objects are most often represented. Second, it is compatible with results of many + PostgreSQL functions, particularly with age() and the results of subtracting one date, time or timestamp from + another. + + Note that the results of casting a to is + canonicalised. + + + An based on this one, but with months converted to multiples of ±30days and with any hours outside of the range [-23, 23] + converted into days. + + + + Implicit cast of a to an + + A + An eqivalent, canonical, . + + + + Implicit cast of an to a . + + A . + An equivalent . + + + + Returns true if another is exactly the same as this instance. + + An for comparison. + true if the two instances are exactly the same, + false otherwise. + + + + Returns true if another object is an , that is exactly the same as + this instance + + An for comparison. + true if the argument is an and is exactly the same + as this one, false otherwise. + + + + Compares two instances. + + The first . + The second . + 0 if the two are equal or equivalent. A value greater than zero if x is greater than y, + a value less than zero if x is less than y. + + + + A hash code suitable for uses with hashing algorithms. + + An signed integer. + + + + Compares this instance with another/ + + An to compare this with. + 0 if the instances are equal or equivalent. A value less than zero if + this instance is less than the argument. A value greater than zero if this instance + is greater than the instance. + + + + Compares this instance with another/ + + An object to compare this with. + 0 if the argument is an and the instances are equal or equivalent. + A value less than zero if the argument is an and + this instance is less than the argument. + A value greater than zero if the argument is an and this instance + is greater than the instance. + A value greater than zero if the argument is null. + The argument is not an . + + + + Parses a and returns a instance. + Designed to use the formats generally returned by PostgreSQL. + + The to parse. + An represented by the argument. + The string was null. + A value obtained from parsing the string exceeded the values allowed for the relevant component. + The string was not in a format that could be parsed to produce an . + + + + Attempt to parse a to produce an . + + The to parse. + (out) The produced, or if the parsing failed. + true if the parsing succeeded, false otherwise. + + + + Create a representation of the instance. + The format returned is of the form: + [M mon[s]] [d day[s]] [HH:mm:ss[.f[f[f[f[f[f[f[f[f]]]]]]]]]] + A zero is represented as 00:00:00 + + Ticks are 100ns, Postgress resolution is only to 1µs at most. Hence we lose 1 or more decimal + precision in storing values in the database. Despite this, this method will output that extra + digit of precision. It's forward-compatible with any future increases in resolution up to 100ns, + and also makes this ToString() more applicable to any other use-case. + + + The representation. + + + + Adds two together. + + The first to add. + The second to add. + An whose values are the sum of the arguments. + + + + Subtracts one from another. + + The to subtract the other from. + The to subtract from the other. + An whose values are the difference of the arguments + + + + Returns true if two are exactly the same. + + The first to compare. + The second to compare. + true if the two arguments are exactly the same, false otherwise. + + + + Returns false if two are exactly the same. + + The first to compare. + The second to compare. + false if the two arguments are exactly the same, true otherwise. + + + + Compares two instances to see if the first is less than the second + + The first to compare. + The second to compare. + true if the first is less than second, false otherwise. + + + + Compares two instances to see if the first is less than or equivalent to the second + + The first to compare. + The second to compare. + true if the first is less than or equivalent to second, false otherwise. + + + + Compares two instances to see if the first is greater than the second + + The first to compare. + The second to compare. + true if the first is greater than second, false otherwise. + + + + Compares two instances to see if the first is greater than or equivalent the second + + The first to compare. + The second to compare. + true if the first is greater than or equivalent to the second, false otherwise. + + + + Returns the instance. + + An . + The argument. + + + + Negates an instance. + + An . + The negation of the argument. + + + + The total number of ticks(100ns units) contained. This is the resolution of the + type. This ignores the number of days and + months held. If you want them included use first. + The resolution of the PostgreSQL + interval type is by default 1µs = 1,000 ns. It may be smaller as follows: + + + interval(0) + resolution of 1s (1 second) + + + interval(1) + resolution of 100ms = 0.1s (100 milliseconds) + + + interval(2) + resolution of 10ms = 0.01s (10 milliseconds) + + + interval(3) + resolution of 1ms = 0.001s (1 millisecond) + + + interval(4) + resolution of 100µs = 0.0001s (100 microseconds) + + + interval(5) + resolution of 10µs = 0.00001s (10 microseconds) + + + interval(6) or interval + resolution of 1µs = 0.000001s (1 microsecond) + + + As such, if the 100-nanosecond resolution is significant to an application, a PostgreSQL interval will + not suffice for those purposes. + In more frequent cases though, the resolution of the interval suffices. + will always suffice to handle the resolution of any interval value, and upon + writing to the database, will be rounded to the resolution used. + + The number of ticks in the instance. + + + + + Gets the number of whole microseconds held in the instance. + An in the range [-999999, 999999]. + + + + + Gets the number of whole milliseconds held in the instance. + An in the range [-999, 999]. + + + + + Gets the number of whole seconds held in the instance. + An in the range [-59, 59]. + + + + + Gets the number of whole minutes held in the instance. + An in the range [-59, 59]. + + + + + Gets the number of whole hours held in the instance. + Note that this can be less than -23 or greater than 23 unless + has been used to produce this instance. + + + + + Gets the number of days held in the instance. + Note that this does not pay attention to a time component with -24 or less hours or + 24 or more hours, unless has been called to produce this instance. + + + + + Gets the number of months held in the instance. + Note that this does not pay attention to a day component with -30 or less days or + 30 or more days, unless has been called to produce this instance. + + + + + Returns a representing the time component of the instance. + Note that this may have a value beyond the range ±23:59:59.9999999 unless + has been called to produce this instance. + + + + + The total number of ticks (100ns units) in the instance, assuming 24 hours in each day and + 30 days in a month. + + + + + The total number of microseconds in the instance, assuming 24 hours in each day and + 30 days in a month. + + + + + The total number of milliseconds in the instance, assuming 24 hours in each day and + 30 days in a month. + + + + + The total number of seconds in the instance, assuming 24 hours in each day and + 30 days in a month. + + + + + The total number of minutes in the instance, assuming 24 hours in each day and + 30 days in a month. + + + + + The total number of hours in the instance, assuming 24 hours in each day and + 30 days in a month. + + + + + The total number of days in the instance, assuming 24 hours in each day and + 30 days in a month. + + + + + The total number of months in the instance, assuming 24 hours in each day and + 30 days in a month. + + + + + Normalise this time; if it is 24:00:00, convert it to 00:00:00 + + This time, normalised + + + + The total number of ticks(100ns units) contained. This is the resolution of the + type. + The resolution of the PostgreSQL + interval type is by default 1µs = 1,000 ns. It may be smaller as follows: + + + time(0) + resolution of 1s (1 second) + + + time(1) + resolution of 100ms = 0.1s (100 milliseconds) + + + time(2) + resolution of 10ms = 0.01s (10 milliseconds) + + + time(3) + resolution of 1ms = 0.001s (1 millisecond) + + + time(4) + resolution of 100µs = 0.0001s (100 microseconds) + + + time(5) + resolution of 10µs = 0.00001s (10 microseconds) + + + time(6) or interval + resolution of 1µs = 0.000001s (1 microsecond) + + + As such, if the 100-nanosecond resolution is significant to an application, a PostgreSQL time will + not suffice for those purposes. + In more frequent cases though, the resolution of time suffices. + will always suffice to handle the resolution of any time value, and upon + writing to the database, will be rounded to the resolution used. + + The number of ticks in the instance. + + + + + Gets the number of whole microseconds held in the instance. + An integer in the range [0, 999999]. + + + + + Gets the number of whole milliseconds held in the instance. + An integer in the range [0, 999]. + + + + + Gets the number of whole seconds held in the instance. + An interger in the range [0, 59]. + + + + + Gets the number of whole minutes held in the instance. + An integer in the range [0, 59]. + + + + + Gets the number of whole hours held in the instance. + Note that the time 24:00:00 can be stored for roundtrip compatibility. Any calculations on such a + value will normalised it to 00:00:00. + + + + + Normalise this time; if it is 24:00:00, convert it to 00:00:00 + + This time, normalised + + + + Compares this with another . As per postgres' rules, + first the times are compared as if they were both in the same timezone. If they are equal then + then timezones are compared (+01:00 being "smaller" than -01:00). + + the to compare with. + An integer which is 0 if they are equal, < 0 if this is the smaller and > 0 if this is the larger. + + + + Gets the number of whole microseconds held in the instance. + An integer in the range [0, 999999]. + + + + + Gets the number of whole milliseconds held in the instance. + An integer in the range [0, 999]. + + + + + Gets the number of whole seconds held in the instance. + An interger in the range [0, 59]. + + + + + Gets the number of whole minutes held in the instance. + An integer in the range [0, 59]. + + + + + Gets the number of whole hours held in the instance. + Note that the time 24:00:00 can be stored for roundtrip compatibility. Any calculations on such a + value will normalised it to 00:00:00. + + + + + This class implements the Fastpath api. + + + + + This maps the functions names to their id's (possible unique just + to a connection). + + + + + Our connection. + + + + + The network stream. + + + + + Initialises the fastpath system. + + BaseConnection to attach to. + The network stream to the backend. + + + + Initialises the fastpath system. + + BaseConnection to attach to. + + + + Send a function call to the PostgreSQL backend. + + Function id. + True if the result is an integer, false for other results. + FastpathArguments to pass to fastpath. + null if no data, Integer if an integer result, or byte[] otherwise. + + + + Send a function call to the PostgreSQL backend by name. + Note: the mapping for the procedure name to function id needs to exist, + usually to an earlier call to addfunction(). + This is the prefered method to call, as function id's can/may change + between versions of the backend. + For an example of how this works, refer to NpgsqlTypes.LargeObject + + Function name. + True if the result is an integer, false for other results. + FastpathArguments to pass to fastpath. + null if no data, Integer if an integer result, or byte[] otherwise. + + + + This convenience method assumes that the return value is an Integer. + + Function name. + Function arguments. + Integer result. + + + + This convenience method assumes that the return value is an Integer. + + Function name. + Function arguments. + Array containing result + + + + This adds a function to our lookup table. + User code should use the addFunctions method, which is based upon a + query, rather than hard coding the oid. The oid for a function is not + guaranteed to remain static, even on different servers of the same + version. + + Function name. + Function id. + + + + This takes a ResultSet containing two columns. Column 1 contains the + function name, Column 2 the oid. + It reads the entire ResultSet, loading the values into the function + table. + REMEMBER to close() the resultset after calling this!! + Implementation note about function name lookups: + PostgreSQL stores the function id's and their corresponding names in + the pg_proc table. To speed things up locally, instead of querying each + function from that table when required, a Dictionary is used. Also, only + the function's required are entered into this table, keeping connection + times as fast as possible. + The org.postgresql.largeobject.LargeObject class performs a query upon it's startup, + and passes the returned ResultSet to the addFunctions() method here. + Once this has been done, the LargeObject api refers to the functions by + name. + Dont think that manually converting them to the oid's will work. Ok, + they will for now, but they can change during development (there was some + discussion about this for V7.0), so this is implemented to prevent any + unwarranted headaches in the future. + + ResultSet + + + + This returns the function id associated by its name + If addFunction() or addFunctions() have not been called for this name, + then an NpgsqlException is thrown. + + Function name to lookup. + Function ID for fastpath call. + + + + Fast Path Arg. + + + + + Type of argument, true=integer, false=byte[]. + + + + + Integer value if type=true. + + + + + Byte value if type=false; + + + + + Constructs an argument that consists of an integer value. + + Int value to set. + + + + Constructs an argument that consists of an array of bytes. + + Array to store. + + + + Constructs an argument that consists of part of a byte array. + + Source array. + offset within array. + length of data to include. + + + + Constructs an argument that consists of a String. + + String to store. + + + + This sends this argument down the network stream. + The stream sent consists of the length.int4 then the contents. + Note: This is called from Fastpath, and cannot be called from + client code. + + + + + + Report send size. + + Send size. + + + + Large Object. + + + + + Indicates a seek from the begining of a file. + + + + + Indicates a seek from the current position. + + + + + Indicates a seek from the end of a file. + + + + + This opens a large object. + If the object does not exist, then an NpgsqlException is thrown. + + FastPath API for the connection to use. + OID of the Large Object to open. + Mode of opening the large object + + + + OID getter. + + The OID of this LargeObject. + + + + This method closes the object. You must not call methods in this + object after this is called. + + + + + Reads some data from the object, and return as a byte[] array. + + Number of bytes to read. + Array containing data read. + + + + Reads some data from the object into an existing array. + + Destination array. + Offset within array. + Maximum number of bytes to read. + The number of bytes actually read. + + + + Writes an array to the object. + + Array to write. + + + + Writes some data from an array to the object. + + Destination array. + Offset within array. + Number of bytes to write. + + + + Sets the current position within the object. + This is similar to the fseek() call in the standard C library. It + allows you to have random access to the large object. + + Position within object. + Either SEEK_SET, SEEK_CUR or SEEK_END. + + + + Sets the current position within the object. + This is similar to the fseek() call in the standard C library. It + allows you to have random access to the large object. + + Position within object from begining. + + + + Report the current position within the object. + + The current position within the object. + + + + This method is inefficient, as the only way to find out the size of + the object is to seek to the end, record the current position, then + return to the original position. + A better method will be found in the future. + + The size of the large object. + + + + OID. + + + + + Large Object Manager. + + + + + This mode indicates we want to write to an object + + + + + This mode indicates we want to read an object + + + + + This mode is the default. It indicates we want read and write access to + + + + + Constructs the LargeObject API. + There should only be one LargeObjectManager per Connection. The + org.postgresql.Connection class keeps track of the various extension API's + and it's advised you use those to gain access, and not going direct. + + + + + + This opens an existing large object, based on its OID. This method + assumes that READ and WRITE access is required (the default). + + OID of large object. + LargeObject instance providing access to the object + + + + This opens an existing large object, based on its OID. + + OID of large object. + Mode of open. + + + + + This creates a large object, returning its OID. + + OID of new object. + + + + This creates a large object, returning its OID. + + Bitmask describing different attributes of the new object. + OID of new object. + + + + This deletes a large object. + + OID describing object to delete. + + + + This deletes a large object. + It is identical to the Delete() method, and is supplied as the C API uses unlink. + + OID describing object to delete. + + + + Options that control certain aspects of native to backend conversions that depend + on backend version and status. + + + + + Clone the current object. + + A new NativeToBackendTypeConverterOptions object. + + + + Clone the current object with a different OID/Name mapping. + + OID/Name mapping object to use in the new instance. + A new NativeToBackendTypeConverterOptions object. + + + + Provide event handlers to convert all native supported basic data types from their backend + text representation to a .NET object. + + + + + Convert UTF8 encoded text a string. + + + + + Byte array from bytea encoded as ASCII text, escaped or hex format. + + + + + Byte array from bytea encoded as binary. + + + + + Convert a postgresql boolean to a System.Boolean. + + + + + Convert a postgresql boolean to a System.Boolean. + + + + + Convert a postgresql bit to a System.Boolean. + + + + + Convert a postgresql datetime to a System.DateTime. + + + + + Convert a postgresql date to a System.DateTime. + + + + + Convert a postgresql time to a System.DateTime. + + + + + Convert a postgresql money to a System.Decimal. + + + + + Convert a postgresql float4 or float8 to a System.Float or System.Double respectively. + + + + + Provide event handlers to convert extended native supported data types from their backend + text representation to a .NET object. + + + + + Convert a postgresql point to a System.NpgsqlPoint. + + + + + Convert a postgresql point to a System.RectangleF. + + + + + LDeg. + + + + + Path. + + + + + Polygon. + + + + + Circle. + + + + + Inet. + + + + + MAC Address. + + + + + interval + + + + + Provide event handlers to convert the basic native supported data types from + native form to backend representation. + + + + + Convert a string to UTF8 encoded text, escaped and quoted as required. + + + + + Convert a string to UTF8 encoded text. + + + + + Binary data, escaped and quoted as required. + + + + + Binary data with possible older style octal escapes, quoted. + + + + + Binary data in the new hex format (>= 9.0), quoted. + + + + + Binary data, raw. + + + + + Convert to a postgresql boolean text format. + + + + + Convert to a postgresql boolean binary format. + + + + + Convert to a postgresql binary int2. + + + + + Convert to a postgresql binary int4. + + + + + Convert to a postgresql binary int8. + + + + + Convert to a postgresql bit. + + + + + Convert to a postgresql timestamp. + + + + + Convert to a postgresql date. + + + + + Convert to a postgresql time. + + + + + Convert to a postgres money. + + + + + Convert to a postgres double with maximum precision. + + + + + Convert a System.Float to a postgres float4. + + + + + Convert a System.Double to a postgres float8. + + + + + Provide event handlers to convert extended native supported data types from + native form to backend representation. + + + + + Point. + + + + + Box. + + + + + LSeg. + + + + + Open path. + + + + + Polygon. + + + + + Convert to a postgres MAC Address. + + + + + Circle. + + + + + Convert to a postgres inet. + + + + + Convert to a postgres interval + + + + + Delegate called to convert the given backend text data to its native representation. + + + + + Delegate called to convert the given backend binary data to its native representation. + + + + + Represents a backend data type. + This class can be called upon to convert a backend field representation to a native object. + + + + + Construct a new NpgsqlTypeInfo with the given attributes and conversion handlers. + + Type OID provided by the backend server. + Type name provided by the backend server. + NpgsqlDbType + DbType + System type to convert fields of this type to. + Data conversion handler for text encoding. + Data conversion handler for binary data. + + + + Perform a data conversion from a backend representation to + a native object. + + Data sent from the backend. + fieldValueSize + Type modifier field sent from the backend. + + + + Perform a data conversion from a backend representation to + a native object. + + Data sent from the backend. + TypeSize + Type modifier field sent from the backend. + + + + Type OID provided by the backend server. + + + + + Type name provided by the backend server. + + + + + NpgsqlDbType. + + + + + NpgsqlDbType. + + + + + Provider type to convert fields of this type to. + + + + + System type to convert fields of this type to. + + + + + Reports whether a backend binary to native decoder is available for this type. + + + + + Delegate called to convert the given native data to its backand representation. + + + + + Represents a backend data type. + This class can be called upon to convert a native object to its backend field representation, + + + + + Returns an NpgsqlNativeTypeInfo for an array where the elements are of the type + described by the NpgsqlNativeTypeInfo supplied. + + + + + Construct a new NpgsqlTypeInfo with the given attributes and conversion handlers. + + Type name provided by the backend server. + DbType + Quote + NpgsqlDbType + Data conversion handler for text backend encoding. + Data conversion handler for binary backend encoding (for extended queries). + + + + Perform a data conversion from a native object to + a backend representation. + DBNull and null values are handled differently depending if a plain query is used + When + + Native .NET object to be converted. + Specifies that the value should be formatted for the extended query syntax. + Options to guide serialization. If null, a default options set is used. + Specifies that the value should be formatted as an extended query array element. + + + + Type name provided by the backend server. + + + + + NpgsqlDbType. + + + + + DbType. + + + + + Apply quoting. + + + + + Use parameter size information. + + + + + Reports whether a native to backend binary encoder is available for this type. + + + + + Provide mapping between type OID, type name, and a NpgsqlBackendTypeInfo object that represents it. + + + + + Construct an empty mapping. + + + + + Copy constuctor. + + + + + Add the given NpgsqlBackendTypeInfo to this mapping. + + + + + Add a new NpgsqlBackendTypeInfo with the given attributes and conversion handlers to this mapping. + + Type OID provided by the backend server. + Type name provided by the backend server. + NpgsqlDbType + DbType + System type to convert fields of this type to. + Data conversion handler for text encoding. + Data conversion handler for binary data. + + + + Make a shallow copy of this type mapping. + + + + + Determine if a NpgsqlBackendTypeInfo with the given backend type OID exists in this mapping. + + + + + Determine if a NpgsqlBackendTypeInfo with the given backend type name exists in this mapping. + + + + + Get the number of type infos held. + + + + + Retrieve the NpgsqlBackendTypeInfo with the given backend type OID, or null if none found. + + + + + Retrieve the NpgsqlBackendTypeInfo with the given backend type name, or null if none found. + + + + + Provide mapping between type Type, NpgsqlDbType and a NpgsqlNativeTypeInfo object that represents it. + + + + + Add the given NpgsqlNativeTypeInfo to this mapping. + + + + + Add a new NpgsqlNativeTypeInfo with the given attributes and conversion handlers to this mapping. + + Type name provided by the backend server. + NpgsqlDbType + DbType + Quote + Data conversion handler for text backend encoding. + Data conversion handler for binary backend encoding (for extended query). + + + + Retrieve the NpgsqlNativeTypeInfo with the given NpgsqlDbType. + + + + + Retrieve the NpgsqlNativeTypeInfo with the given DbType. + + + + + Retrieve the NpgsqlNativeTypeInfo with the given Type. + + + + + Determine if a NpgsqlNativeTypeInfo with the given backend type name exists in this mapping. + + + + + Determine if a NpgsqlNativeTypeInfo with the given NpgsqlDbType exists in this mapping. + + + + + Determine if a NpgsqlNativeTypeInfo with the given Type name exists in this mapping. + + + + + Get the number of type infos held. + + + + + Represents a PostgreSQL Point type + + + + + Represents a PostgreSQL Line Segment type. + + + + + Represents a PostgreSQL Path type. + + + + + Represents a PostgreSQL Polygon type. + + + + + Represents a PostgreSQL Circle type. + + + + + Represents a PostgreSQL inet type. + + + + + Represents a PostgreSQL MacAddress type. + + + + + + + The macAddr parameter must contain a string that can only consist of numbers + and upper-case letters as hexadecimal digits. (See PhysicalAddress.Parse method on MSDN) + + + + This class contains helper methods for type conversion between + the .Net type system and postgresql. + + + + + A cache of basic datatype mappings keyed by server version. This way we don't + have to load the basic type mappings for every connection. + + + + + Find a NpgsqlNativeTypeInfo in the default types map that can handle objects + of the given NpgsqlDbType. + + + + + Find a NpgsqlNativeTypeInfo in the default types map that can handle objects + of the given NpgsqlDbType. + + + + + Find a NpgsqlNativeTypeInfo in the default types map that can handle objects + of the given DbType. + + + + + Find a NpgsqlNativeTypeInfo in the default types map that can handle objects + of the given System.Type. + + + + + This method is responsible to convert the byte[] received from the backend + to the corresponding NpgsqlType. + The given TypeInfo is called upon to do the conversion. + If no TypeInfo object is provided, no conversion is performed. + + + + + This method is responsible to convert the string received from the backend + to the corresponding NpgsqlType. + The given TypeInfo is called upon to do the conversion. + If no TypeInfo object is provided, no conversion is performed. + + + + + Create the one and only native to backend type map. + This map is used when formatting native data + types to backend representations. + + + + + This method creates (or retrieves from cache) a mapping between type and OID + of all natively supported postgresql data types. + This is needed as from one version to another, this mapping can be changed and + so we avoid hardcoding them. + + NpgsqlTypeMapping containing all known data types. The mapping must be + cloned before it is modified because it is cached; changes made by one connection may + effect another connection. + + + + + Attempt to map types by issuing a query against pg_type. + This function takes a list of NpgsqlTypeInfo and attempts to resolve the OID field + of each by querying pg_type. If the mapping is found, the type info object is + updated (OID) and added to the provided NpgsqlTypeMapping object. + + NpgsqlConnector to send query through. + Mapping object to add types too. + List of types that need to have OID's mapped. + + + + Summary description for NpgsqlQuery + + + + + For classes representing messages sent from the client to the server. + + + + + Set Cache Size. The default value is 20. + + + + + Lookup cached entity. null will returned if not match. + For both get{} and set{} apply LRU rule. + + key + + + + + The globally available text encoding used for frontend/backend communication. + + + + This class represents the base class for the state pattern design pattern + implementation. + + + This class represents the base class for the state pattern design pattern + implementation. + + + + + + This method is used by the states to change the state of the context. + + + + + Call ProcessBackendResponsesEnum(), and scan and discard all results. + + + + + This method is responsible to handle all protocol messages sent from the backend. + It holds all the logic to do it. + To exchange data, it uses a Mediator object from which it reads/writes information + to handle backend requests. + + + + + + Checks for context socket availability. + Socket.Poll supports integer as microseconds parameter. + This limits the usable command timeout value + to 2,147 seconds: (2,147 x 1,000,000 less than max_int). + In order to bypass this limit, the availability of + the socket is checked in 2,147 seconds cycles + + true, if for context socket availability was checked, false otherwise. + Context. + Select mode. + + + + Called from constructor of derived class. + + + + + Finalizer for HashAlgorithm + + + + + Computes the entire hash of all the bytes in the byte array. + + + + + When overridden in a derived class, drives the hashing function. + + + + + + + + When overridden in a derived class, this pads and hashes whatever data might be left in the buffers and then returns the hash created. + + + + + When overridden in a derived class, initializes the object to prepare for hashing. + + + + + Used for stream chaining. Computes hash as data passes through it. + + The buffer from which to grab the data to be copied. + The offset into the input buffer to start reading at. + The number of bytes to be copied. + The buffer to write the copied data to. + At what point in the outputBuffer to write the data at. + + + + Used for stream chaining. Computes hash as data passes through it. Finishes off the hash. + + The buffer from which to grab the data to be copied. + The offset into the input buffer to start reading at. + The number of bytes to be copied. + + + + Get whether or not the hash can transform multiple blocks at a time. + Note: MUST be overriden if descendant can transform multiple block + on a single call! + + + + + Gets the previously computed hash. + + + + + Returns the size in bits of the hash. + + + + + Must be overriden if not 1 + + + + + Must be overriden if not 1 + + + + + Common base class for all derived MD5 implementations. + + + + + Called from constructor of derived class. + + + + + Creates the default derived class. + + + + + C# implementation of the MD5 cryptographic hash function. + + + + + Creates a new MD5CryptoServiceProvider. + + + + + Drives the hashing function. + + Byte array containing the data to hash. + Where in the input buffer to start. + Size in bytes of the data in the buffer to hash. + + + + This finalizes the hash. Takes the data from the chaining variables and returns it. + + + + + Resets the class after use. Called automatically after hashing is done. + + + + + This is the meat of the hash function. It is what processes each block one at a time. + + Byte array to process data from. + Where in the byte array to start processing. + + + + Pads and then processes the final block. + + Buffer to grab data from. + Position in buffer in bytes to get data from. + How much data in bytes in the buffer to use. + + + + Implements for version 3 of the protocol. + + + + + Reads a row, field by field, allowing a DataRow to be built appropriately. + + + + + Marker interface which identifies a class which may take possession of a stream for the duration of + it's lifetime (possibly temporarily giving that possession to another class for part of that time. + + It inherits from IDisposable, since any such class must make sure it leaves the stream in a valid state. + + The most important such class is that compiler-generated from ProcessBackendResponsesEnum. Of course + we can't make that inherit from this interface, alas. + + + + + Marker interface which identifies a class which represents part of + a response from the server. + + + + + Reads part of a field, as needed (for + and + + + + + Adds further functionality to stream that is dependant upon the type of data read. + + + + + Completes the implementation of Streamer for char data. + + + + + Completes the implementation of Streamer for byte data. + + + + + This class represents a BackEndKeyData message received + from PostgreSQL + + + + + This class represents the Bind message sent to PostgreSQL + server. + + + + + + This class represents the CancelRequest message sent to PostgreSQL + server. + + + + + + Represents a SQL statement or function (stored procedure) to execute + against a PostgreSQL database. This class cannot be inherited. + + + Represents a SQL statement or function (stored procedure) to execute + against a PostgreSQL database. This class cannot be inherited. + + + Represents a SQL statement or function (stored procedure) to execute + against a PostgreSQL database. This class cannot be inherited. + + + + + 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. + + + + Used to execute internal commands. + + + + + Attempts to cancel the execution of a NpgsqlCommand. + + This Method isn't implemented yet. + + + + Create a new command based on this one. + + A new NpgsqlCommand object. + + + + Create a new command based on this one. + + A new NpgsqlCommand object. + + + + Creates a new instance of an DbParameter object. + + An DbParameter object. + + + + Creates a new instance of a NpgsqlParameter object. + + A NpgsqlParameter object. + + + + Releases the resources used by the NpgsqlCommand. + + + + + Internal query shortcut for use in cases where the number + of affected rows is of no interest. + + + + + Special adaptation of ExecuteBlind() that sets statement_timeout. + This exists to prevent Connector.SetBackendCommandTimeout() from calling Command.ExecuteBlind(), + which will cause an endless recursive loop. + + + Timeout in seconds. + + + + Executes a SQL statement against the connection and returns the number of rows affected. + + The number of rows affected if known; -1 otherwise. + + + + Sends the CommandText to + the Connection and builds a + NpgsqlDataReader + using one of the CommandBehavior values. + + One of the CommandBehavior values. + A NpgsqlDataReader object. + + + + Sends the CommandText to + the Connection and builds a + NpgsqlDataReader. + + A NpgsqlDataReader object. + + + + Sends the CommandText to + the Connection and builds a + NpgsqlDataReader + using one of the CommandBehavior values. + + One of the CommandBehavior values. + A NpgsqlDataReader object. + Currently the CommandBehavior parameter is ignored. + + + + This method binds the parameters from parameters collection to the bind + message. + + + + + Executes the query, and returns the first column of the first row + in the result set returned by the query. Extra columns or rows are ignored. + + The first column of the first row in the result set, + or a null reference if the result set is empty. + + + + Creates a prepared version of the command on a PostgreSQL server. + + + + + This method checks the connection state to see if the connection + is set or it is open. If one of this conditions is not met, throws + an InvalidOperationException + + + + + This method substitutes the Parameters, if exist, in the command + to their actual values. + The parameter name format is :ParameterName. + + A version of CommandText with the Parameters inserted. + + + + Process this.commandText, trimming each distinct command and substituting paramater + tokens. + + + UTF8 encoded command ready to be sent to the backend. + + + + Append a region of a source command text to an output command, performing parameter token + substitutions. + + Stream to which to append output. + Command text. + + + false if the query has multiple statements which are not allowed + + + + 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 is 20 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. + + + + DB parameter collection. + + + + + Gets the NpgsqlParameterCollection. + + The parameters of the SQL statement or function (stored procedure). The default is an empty collection. + + + + DB transaction. + + + + + Gets or sets the NpgsqlTransaction + within which the NpgsqlCommand executes. + + The NpgsqlTransaction. + The default value is a null reference. + + + + Gets or sets how command results are applied to the DataRow + when used by the Update + method of the DbDataAdapter. + + One of the UpdateRowSource values. + + + + Returns oid of inserted row. This is only updated when using executenonQuery and when command inserts just a single row. If table is created without oids, this will always be 0. + + + + + Returns whether this query will execute as a prepared (compiled) query. + + + + + Design time visible. + + + + + This class is responsible to create database commands for automatic insert, update and delete operations. + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + The adapter. + + + + + This method is reponsible to derive the command parameter list with values obtained from function definition. + It clears the Parameters collection of command. Also, if there is any parameter type which is not supported by Npgsql, an InvalidOperationException will be thrown. + Parameters name will be parameter1, parameter2, ... + + NpgsqlCommand whose function parameters will be obtained. + + + + Gets the automatically generated object required + to perform insertions at the data source. + + + The automatically generated object required to perform insertions. + + + + + Gets the automatically generated object required to perform insertions + at the data source, optionally using columns for parameter names. + + + If true, generate parameter names matching column names, if possible. + If false, generate @p1, @p2, and so on. + + + The automatically generated object required to perform insertions. + + + + + Gets the automatically generated System.Data.Common.DbCommand object required + to perform updates at the data source. + + + The automatically generated System.Data.Common.DbCommand object required to perform updates. + + + + + Gets the automatically generated object required to perform updates + at the data source, optionally using columns for parameter names. + + + If true, generate parameter names matching column names, if possible. + If false, generate @p1, @p2, and so on. + + + The automatically generated object required to perform updates. + + + + + Gets the automatically generated System.Data.Common.DbCommand object required + to perform deletions at the data source. + + + The automatically generated System.Data.Common.DbCommand object required to perform deletions. + + + + + Gets the automatically generated object required to perform deletions + at the data source, optionally using columns for parameter names. + + + If true, generate parameter names matching column names, if possible. + If false, generate @p1, @p2, and so on. + + + The automatically generated object required to perform deletions. + + + + + Applies the parameter information. + + The parameter. + The row. + Type of the statement. + if set to true [where clause]. + + + + Returns the name of the specified parameter in the format of @p#. + + The number to be included as part of the parameter's name.. + + The name of the parameter with the specified number appended as part of the parameter name. + + + + + Returns the full parameter name, given the partial parameter name. + + The partial name of the parameter. + + The full parameter name corresponding to the partial parameter name requested. + + + + + Returns the placeholder for the parameter in the associated SQL statement. + + The number to be included as part of the parameter's name. + + The name of the parameter with the specified number appended. + + + + + Registers the to handle the event for a . + + The to be used for the update. + + + + Adds an event handler for the event. + + The sender + A instance containing information about the event. + + + + Given an unquoted identifier in the correct catalog case, returns the correct quoted form of that identifier, including properly escaping any embedded quotes in the identifier. + + The original unquoted identifier. + + The quoted version of the identifier. Embedded quotes within the identifier are properly escaped. + + + + + Unquoted identifier parameter cannot be null + + + + Given a quoted identifier, returns the correct unquoted form of that identifier, including properly un-escaping any embedded quotes in the identifier. + + The identifier that will have its embedded quotes removed. + + The unquoted identifier, with embedded quotes properly un-escaped. + + + + + Quoted identifier parameter cannot be null + + + + Gets or sets the beginning character or characters to use when specifying database objects (for example, tables or columns) whose names contain characters such as spaces or reserved tokens. + + + The beginning character or characters to use. The default is an empty string. + + + + + + + + Gets or sets the ending character or characters to use when specifying database objects (for example, tables or columns) whose names contain characters such as spaces or reserved tokens. + + + The ending character or characters to use. The default is an empty string. + + + + + + + + Represents the method that handles the Notice events. + + The source of the event. + A NpgsqlNoticeEventArgs that contains the event data. + + + + Represents the method that handles the Notification events. + + The source of the event. + A NpgsqlNotificationEventArgs that contains the event data. + + + + This class represents a connection to a + PostgreSQL server. + + + + + 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. + + + + 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. + + + + + 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. + + + + + Opens a database connection with the property settings specified by the + ConnectionString. + + + + + 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. + + + + 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. + + + + + 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. + + + + + 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. + + + + Releases all resources used by the + NpgsqlConnection. + + true when called from Dispose(); + false when being called from the finalizer. + + + + Create a new connection based on this one. + + A new NpgsqlConnection object. + + + + Create a new connection based on this one. + + A new NpgsqlConnection object. + + + + Returns a copy of the NpgsqlConnectionStringBuilder that contains the parsed connection string values. + + + + + Default SSL CertificateSelectionCallback implementation. + + + + + Default SSL CertificateValidationCallback implementation. + + + + + Default SSL PrivateKeySelectionCallback implementation. + + + + + Default SSL ProvideClientCertificatesCallback implementation. + + + + + Default SSL ValidateRemoteCertificateCallback implementation. + + + + + Write each key/value pair in the connection string to the log. + + + + + Sets the `settings` ConnectionStringBuilder based on the given `connectionString` + + The connection string to load the builder from + + + + Sets the `settings` ConnectionStringBuilder based on the given `connectionString` + + The connection string to load the builder from + + + + Refresh the cached _connectionString whenever the builder settings change + + + + + Returns the supported collections + + + + + 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. + + + + Clear connection pool. + + + + + Clear all connection pools. + + + + + Enlist transation. + + + + + + Occurs on NoticeResponses from the PostgreSQL backend. + + + + + Occurs on NotificationResponses from the PostgreSQL backend. + + + + + Called to provide client certificates for SSL handshake. + + + + + Mono.Security.Protocol.Tls.CertificateSelectionCallback delegate. + + + + + Mono.Security.Protocol.Tls.CertificateValidationCallback delegate. + + + + + Mono.Security.Protocol.Tls.PrivateKeySelectionCallback delegate. + + + + + Called to validate server's certificate during SSL handshake + + + + + 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). + + + + + Gets or sets the string used to connect to a PostgreSQL database. + Valid values are: +
    +
  • + Server: Address/Name of Postgresql Server; +
  • +
  • + Port: Port to connect to; +
  • +
  • + Protocol: Protocol version to use, instead of automatic; Integer 2 or 3; +
  • +
  • + Database: Database name. Defaults to user name if not specified; +
  • +
  • + User Id: User name; +
  • +
  • + Password: Password for clear text authentication; +
  • +
  • + SSL: True or False. Controls whether to attempt a secure connection. Default = False; +
  • +
  • + Pooling: True or False. Controls whether connection pooling is used. Default = True; +
  • +
  • + MinPoolSize: Min size of connection pool; +
  • +
  • + MaxPoolSize: Max size of connection pool; +
  • +
  • + Timeout: Time to wait for connection open in seconds. Default is 15. +
  • +
  • + CommandTimeout: Time to wait for command to finish execution before throw an exception. In seconds. Default is 20. +
  • +
  • + Sslmode: Mode for ssl connection control. Can be Prefer, Require, Allow or Disable. Default is Disable. Check user manual for explanation of values. +
  • +
  • + ConnectionLifeTime: Time to wait before closing unused connections in the pool in seconds. Default is 15. +
  • +
  • + SyncNotification: Specifies if Npgsql should use synchronous notifications. +
  • +
  • + SearchPath: Changes search path to specified and public schemas. +
  • +
+
+ 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 SSL. + + + + + 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 time to wait before closing unused connections in the pool if the count + of all connections exeeds MinPoolSize. + + + If connection pool contains unused connections for ConnectionLifeTime seconds, + the half of them will be closed. If there will be unused connections in a second + later then again the half of them will be closed and so on. + This strategy provide smooth change of connection count in the pool. + + The time (in seconds) to wait. The default value is 15 seconds. + + + + Gets 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. + + + + Whether datareaders are loaded in their entirety (for compatibility with earlier code). + + + + + Gets the database server name. + + + + + Gets flag indicating if we are using Synchronous notification or not. + The default value is false. + + + + + 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 or ConnectionState.Closed + + + + Compatibility version. + + + + + Version of the PostgreSQL backend. + This can only be called when there is an active connection. + + + + + PostgreSQL server version. + + + + + Protocol version in use. + This can only be called when there is an active connection. + Always retuna Version3 + + + + + Whether the backend is an AWS Redshift instance + + + + + 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). + + + + + Report whether the backend understands the hex byte format (>= 9.0). + + + + + The connector object connected to the backend. + + + + + Gets the NpgsqlConnectionStringBuilder containing the parsed connection string values. + + + + + User name. + + + + + Use extended types. + + + + + Password. + + + + + Determine if connection pooling will be used for this connection. + + + + + DB provider factory. + + + + + Return an exact copy of this NpgsqlConnectionString. + + + + + No integrated security if we're on mono and .NET 4.5 because of ClaimsIdentity, + see https://github.com/npgsql/Npgsql/issues/133 + + + + + This function will set value for known key, both private member and base[key]. + + + + + value, coerced as needed to the stored type. + + + + The function will modify private member only, not base[key]. + + + + value, coerced as needed to the stored type. + + + + The function will access private member only, not base[key]. + + + value. + + + + Clear the member and assign them to the default value. + + + + + Gets or sets the backend server host name. + + + + + Gets or sets the backend server port. + + + + + Gets or sets the name of the database to be used after a connection is opened. + + The name of the database to be + used after a connection is opened. + + + + Gets or sets the login user name. + + + + + Gets or sets the login password as a UTF8 encoded byte array. + + + + + Sets the login password as a string. + + + + + Gets or sets the krbsrvname. + + + + + Gets or sets a value indicating whether to attempt to use SSL. + + + + + Gets or sets a value indicating whether to attempt to use SSL. + + + + + Gets or sets the time to wait while trying to establish a connection + before terminating the attempt and generating an error. + + The time (in seconds) to wait for a connection to open. The default value is 15 seconds. + + + + Gets or sets the schema search path. + + + + + Gets or sets a value indicating whether connection pooling should be used. + + + + + Gets or sets the time to wait before closing unused connections in the pool if the count + of all connections exeeds MinPoolSize. + + + If connection pool contains unused connections for ConnectionLifeTime seconds, + the half of them will be closed. If there will be unused connections in a second + later then again the half of them will be closed and so on. + This strategy provide smooth change of connection count in the pool. + + The time (in seconds) to wait. The default value is 15 seconds. + + + + Gets or sets the minimum connection pool size. + + + + + Gets or sets the maximum connection pool size. + + + + + Gets or sets a value indicating whether to listen for notifications and report them between command activity. + + + + + Gets the time to wait while trying to execute a command + before terminating the attempt and generating an error. + + The time (in seconds) to wait for a command to complete. The default value is 20 seconds. + + + + Gets or sets a value indicating whether datareaders are loaded in their entirety (for compatibility with earlier code). + + + + + Compatibilty version. When possible, behaviour caused by breaking changes will be preserved + if this version is less than that where the breaking change was introduced. + + + + + Gets or sets the ootional application name parameter to be sent to the backend during connection initiation. + + + + + Gets or sets a value indicating whether to silently Prepare() all commands before execution. + + + + + Gets or sets the specified backend communication protocol version. + + + + + Gets the backend encoding. Always returns "UTF8". + + + + + Case insensative accessor for indivual connection string values. + + + + + Set both ImplicitDefault and ExplicitDefault to the 's default value. + + + + + + + + Set ImplicitDefault to the default value of 's type, + and ExplicitDefault to . + + + + + + + + Represents the method that allows the application to provide a certificate collection to be used for SSL clien authentication + + A X509CertificateCollection to be filled with one or more client certificates. + + + + Represents the method that is called to validate the certificate provided by the server during an SSL handshake + + The server's certificate + The certificate chain containing the certificate's CA and any intermediate authorities + Any errors that were detected + + + + !!! Helper class, for compilation only. + Connector implements the logic for the Connection Objects to + access the physical connection to the database, and isolate + the application developer from connection pooling internals. + + + + + Whether the backend is an AWS Redshift instance + + + + + Constructor. + + Connection string. + Pooled + Controls whether the connector can be shared. + + + + This method checks if the connector is still ok. + We try to send a simple query text, select 1 as ConnectionTest; + + + + + This method is responsible for releasing all resources associated with this Connector. + + + + + This method is responsible to release all portals used by this Connector. + + + + + Modify the backend statement_timeout value if needed. + + New timeout + + + + Default SSL CertificateSelectionCallback implementation. + + + + + Default SSL CertificateValidationCallback implementation. + + + + + Default SSL PrivateKeySelectionCallback implementation. + + + + + Default SSL ProvideClientCertificatesCallback implementation. + + + + + Default SSL ValidateRemoteCertificateCallback implementation. + + + + + This method is required to set all the version dependent features flags. + SupportsPrepare means the server can use prepared query plans (7.3+) + + + + + Opens the physical connection to the server. + + Usually called by the RequestConnector + Method of the connection pool manager. + + + + Closes the physical connection to the server. + + + + + Returns next portal index. + + + + + Returns next plan index. + + + + + Occurs on NoticeResponses from the PostgreSQL backend. + + + + + Occurs on NotificationResponses from the PostgreSQL backend. + + + + + Called to provide client certificates for SSL handshake. + + + + + Mono.Security.Protocol.Tls.CertificateSelectionCallback delegate. + + + + + Mono.Security.Protocol.Tls.CertificateValidationCallback delegate. + + + + + Mono.Security.Protocol.Tls.PrivateKeySelectionCallback delegate. + + + + + Called to validate server's certificate during SSL handshake + + + + + Gets the current state of the connection. + + + + + Return Connection String. + + + + + Version of backend server this connector is connected to. + + + + + Whether the backend is an AWS Redshift instance + + + + + The physical connection socket to the backend. + + + + + The physical connection stream to the backend. + + + + + The top level stream to the backend. + + + + + Reports if this connector is fully connected. + + + + + The connection mediator. + + + + + Report if the connection is in a transaction. + + + + + Options that control certain aspects of native to backend conversions that depend + on backend version and status. + + + + + This class manages all connector objects, pooled AND non-pooled. + + + + Unique static instance of the connector pool + mamager. + + + Map of index to unused pooled connectors, avaliable to the + next RequestConnector() call. + This hashmap will be indexed by connection string. + This key will hold a list of queues of pooled connectors available to be used. + + + Timer for tracking unused connections in pools. + + + + Searches the shared and pooled connector lists for a + matching connector object or creates a new one. + + The NpgsqlConnection that is requesting + the connector. Its ConnectionString will be used to search the + pool for available connectors. + A connector object. + + + + Find a pooled connector. Handle shared/non-shared here. + + + + + Releases a connector, possibly back to the pool for future use. + + + Pooled connectors will be put back into the pool if there is room. + Shared connectors should just have their use count decremented + since they always stay in the shared pool. + + Connection to which the connector is leased. + The connector to release. + + + + Release a pooled connector. Handle shared/non-shared here. + + + + + Find an available pooled connector in the non-shared pool, or create + a new one if none found. + + + + + Put a pooled connector into the pool queue. + + Connection is leased to. + Connector to pool + + + + A queue with an extra Int32 for keeping track of busy connections. + + + + + Connections available to the end user + + + + + Connections currently in use + + + + + Represents information about COPY operation data transfer format as returned by server. + + + + + Only created when a CopyInResponse or CopyOutResponse is received by NpgsqlState.ProcessBackendResponses() + + + + + Returns true if this operation is currently active and field at given location is in binary format. + + + + + Returns true if this operation is currently active and in binary format. + + + + + Returns number of fields if this operation is currently active, otherwise -1 + + + + + Represents a PostgreSQL COPY FROM STDIN operation with a corresponding SQL statement + to execute against a PostgreSQL database + and an associated stream used to read data from (if provided by user) + or for writing it (when generated by driver). + Eg. new NpgsqlCopyIn("COPY mytable FROM STDIN", connection, streamToRead).Start(); + + + + + Creates NpgsqlCommand to run given query upon Start(). Data for the requested COPY IN operation can then be written to CopyData stream followed by a call to End() or Cancel(). + + + + + Given command is run upon Start(). Data for the requested COPY IN operation can then be written to CopyData stream followed by a call to End() or Cancel(). + + + + + Given command is executed upon Start() and all data from fromStream is passed to it as copy data. + + + + + Returns true if this operation is currently active and field at given location is in binary format. + + + + + Command specified upon creation is executed as a non-query. + If CopyStream is set upon creation, it will be flushed to server as copy data, and operation will be finished immediately. + Otherwise the CopyStream member can be used for writing copy data to server and operation finished with a call to End() or Cancel(). + + + + + Called after writing all data to CopyStream to successfully complete this copy operation. + + + + + Withdraws an already started copy operation. The operation will fail with given error message. + Will do nothing if current operation is not active. + + + + + Returns true if the connection is currently reserved for this operation. + + + + + The stream provided by user or generated upon Start(). + User may provide a stream to constructor; it is used to pass to server all data read from it. + Otherwise, call to Start() sets this to a writable NpgsqlCopyInStream that passes all data written to it to server. + In latter case this is only available while the copy operation is active and null otherwise. + + + + + Returns true if this operation is currently active and in binary format. + + + + + Returns number of fields expected on each input row if this operation is currently active, otherwise -1 + + + + + The Command used to execute this copy operation. + + + + + Set before a COPY IN query to define size of internal buffer for reading from given CopyStream. + + + + + Represents an ongoing COPY FROM STDIN operation. + Provides methods to push data to server and end or cancel the operation. + + + + + Called from NpgsqlState.ProcessBackendResponses upon CopyInResponse. + If CopyStream is already set, it is used to read data to push to server, after which the copy is completed. + Otherwise CopyStream is set to a writable NpgsqlCopyInStream that calls SendCopyData each time it is written to. + + + + + Sends given packet to server as a CopyData message. + Does not check for notifications! Use another thread for that. + + + + + Sends CopyDone message to server. Handles responses, ie. may throw an exception. + + + + + Sends CopyFail message to server. Handles responses, ie. should always throw an exception: + in CopyIn state the server responds to CopyFail with an error response; + outside of a CopyIn state the server responds to CopyFail with an error response; + without network connection or whatever, there's going to eventually be a failure, timeout or user intervention. + + + + + Copy format information returned from server. + + + + + Stream for writing data to a table on a PostgreSQL version 7.4 or newer database during an active COPY FROM STDIN operation. + Passes data exactly as is and when given, so see to it that you use server encoding, correct format and reasonably sized writes! + + + + + Created only by NpgsqlCopyInState.StartCopy() + + + + + Successfully completes copying data to server. Returns after operation is finished. + Does nothing if this stream is not the active copy operation writer. + + + + + Withdraws an already started copy operation. The operation will fail with given error message. + Does nothing if this stream is not the active copy operation writer. + + + + + Writes given bytes to server. + Fails if this stream is not the active copy operation writer. + + + + + Flushes stream contents to server. + Fails if this stream is not the active copy operation writer. + + + + + Not readable + + + + + Not seekable + + + + + Not supported + + + + + True while this stream can be used to write copy data to server + + + + + False + + + + + True + + + + + False + + + + + Number of bytes written so far + + + + + Number of bytes written so far; not settable + + + + + Represents a PostgreSQL COPY TO STDOUT operation with a corresponding SQL statement + to execute against a PostgreSQL database + and an associated stream used to write results to (if provided by user) + or for reading the results (when generated by driver). + Eg. new NpgsqlCopyOut("COPY (SELECT * FROM mytable) TO STDOUT", connection, streamToWrite).Start(); + + + + + Creates NpgsqlCommand to run given query upon Start(), after which CopyStream provides data from database as requested in the query. + + + + + Given command is run upon Start(), after which CopyStream provides data from database as requested in the query. + + + + + Given command is executed upon Start() and all requested copy data is written to toStream immediately. + + + + + Returns true if this operation is currently active and field at given location is in binary format. + + + + + Command specified upon creation is executed as a non-query. + If CopyStream is set upon creation, all copy data from server will be written to it, and operation will be finished immediately. + Otherwise the CopyStream member can be used for reading copy data from server until no more data is available. + + + + + Flush generated CopyStream at once. Effectively reads and discard all the rest of copy data from server. + + + + + Returns true if the connection is currently reserved for this operation. + + + + + The stream provided by user or generated upon Start() + + + + + The Command used to execute this copy operation. + + + + + Returns true if this operation is currently active and in binary format. + + + + + Returns number of fields if this operation is currently active, otherwise -1 + + + + + Faster alternative to using the generated CopyStream. + + + + + Represents an ongoing COPY TO STDOUT operation. + Provides methods to read data from server or end the operation. + + + + + Called from NpgsqlState.ProcessBackendResponses upon CopyOutResponse. + If CopyStream is already set, it is used to write data received from server, after which the copy ends. + Otherwise CopyStream is set to a readable NpgsqlCopyOutStream that receives data from server. + + + + + Called from NpgsqlOutStream.Read to read copy data from server. + + + + + Copy format information returned from server. + + + + + Stream for reading data from a table or select on a PostgreSQL version 7.4 or newer database during an active COPY TO STDOUT operation. + Passes data exactly as provided by the server. + + + + + Created only by NpgsqlCopyOutState.StartCopy() + + + + + Discards copy data as long as server pushes it. Returns after operation is finished. + Does nothing if this stream is not the active copy operation reader. + + + + + Not writable. + + + + + Not flushable. + + + + + Copies data read from server to given byte buffer. + Since server returns data row by row, length will differ each time, but it is only zero once the operation ends. + Can be mixed with calls to the more efficient NpgsqlCopyOutStream.Read() : byte[] though that would not make much sense. + + + + + Not seekable + + + + + Not supported + + + + + Returns a whole row of data from server without extra work. + If standard Stream.Read(...) has been called before, it's internal buffers remains are returned. + + + + + True while this stream can be used to read copy data from server + + + + + True + + + + + False + + + + + False + + + + + Number of bytes read so far + + + + + Number of bytes read so far; can not be set. + + + + + Writes given objects into a stream for PostgreSQL COPY in default copy format (not CSV or BINARY). + + + + + Default delimiter. + + + + + Default separator. + + + + + Default null. + + + + + Default escape. + + + + + Default quote. + + + + + Default buffer size. + + + + + Constructor. + + + + + + Flush buffers. + + + + + Flush rows. + + + + + Flush fields. + + + + + Close the serializer. + + + + + Escape sequence for the given character. + + + + + + + Make room for bytes. + + + + + + Add bytes. + + + + + + End row. + + + + + Prefix field. + + + + + Field added. + + + + + Add null. + + + + + Add string. + + + + + + add Int32. + + + + + + Add Int64. + + + + + + Add number. + + + + + + Add bool + + + + + + Add DateTime. + + + + + + Report whether the serializer is active. + + + + + To Stream. + + + + + Delimiter. + + + + + Separator. + + + + + Escape. + + + + + Null. + + + + + Buffer size. + + + + + Report whether space remains in the buffer. + + + + + Strings to escape. + + + + + Escape sequence bytes. + + + + + 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. + + + + + Default constructor. + + + + + Constructor. + + + + + + Constructor. + + + + + + + Constructor. + + + + + + + Create row updated event. + + + + + + + + + + Create row updating event. + + + + + + + + + + Raise the RowUpdated event. + + + + + + Raise the RowUpdating event. + + + + + + Row updated event. + + + + + Row updating event. + + + + + Delete command. + + + + + Select command. + + + + + Update command. + + + + + Insert command. + + + + + Provides a means of reading a forward-only stream of rows from a PostgreSQL backend. This class cannot be inherited. + + + + + Return the data type name of the column at index . + + + + + Return the data type of the column at index . + + + + + Return the Npgsql specific data type of the column at requested ordinal. + + column position + Appropriate Npgsql type for column. + + + + Return the column name of the column at index . + + + + + Return the data type OID of the column at index . + + FIXME: Why this method returns String? + + + + Has ordinal. + + + + + + + Return the column name of the column named . + + + + + Return the data DbType of the column at index . + + + + + Return the data NpgsqlDbType of the column at index . + + + + + Get specified field value. + /// + + + + + + Get the value of a column as a . + If the differences between and + in handling of days and months is not important to your application, use + instead. + + Index of the field to find. + value of the field. + + + + Get specified field value. + /// + + + + + + Get specified field value. + /// + + + + + + Get specified field value. + /// + + + + + + Get specified field value. + /// + + + + + + Get specified field value. + /// + + + + + + Send closed event. + + + + + Gets the value of a column converted to a Guid. + + + + + Gets the value of a column as Int16. + + + + + Gets the value of a column as Int32. + + + + + Gets the value of a column as Int64. + + + + + Gets the value of a column as Single. + + + + + Gets the value of a column as Double. + + + + + Gets the value of a column as String. + + + + + Gets the value of a column as Decimal. + + + + + Gets the value of a column as TimeSpan. + + + + + Copy values from each column in the current row into . + + Destination for column values. + The number of column values copied. + + + + Copy values from each column in the current row into . + + An array appropriately sized to store values from all columns. + The number of column values copied. + + + + Gets the value of a column as Boolean. + + + + + Gets the value of a column as Byte. + + + + + Gets the value of a column as Char. + + + + + Gets the value of a column as DateTime. + + + + + Returns a System.Data.DataTable that describes the column metadata of the DataReader. + + + + + This methods parses the command text and tries to get the tablename + from it. + + + + + Get enumerator. + + + + + + Is raised whenever Close() is called. + + + + + Gets the number of columns in the current row. + + + + + Gets the value of a column in its native format. + + + + + Gets the value of a column in its native format. + + + + + 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. + + + + + Contains the column names as the keys + + + + + Contains all unique columns + + + + + This is the primary implementation of NpgsqlDataReader. It is the one used in normal cases (where the + preload-reader option is not set in the connection string to resolve some potential backwards-compatibility + issues), the only implementation used internally, and in cases where CachingDataReader is used, it is still + used to do the actual "leg-work" of turning a response stream from the server into a datareader-style + object - with CachingDataReader then filling it's cache from here. + + + + + Iterate through the objects returned through from the server. + If it's a CompletedResponse the rowsaffected count is updated appropriately, + and we iterate again, otherwise we return it (perhaps updating our cache of pending + rows if appropriate). + + The next we will deal with. + + + + Advances the data reader to the next result, when multiple result sets were returned by the PostgreSQL backend. + + True if the reader was advanced, otherwise false. + + + + Releases the resources used by the NpgsqlCommand. + + + + + Closes the data reader object. + + + + + Advances the data reader to the next result, when multiple result sets were returned by the PostgreSQL backend. + + True if the reader was advanced, otherwise false. + + + + Advances the data reader to the next row. + + True if the reader was advanced, otherwise false. + + + + Return the value of the column at index . + + + + + Gets raw data from a column. + + + + + Gets raw data from a column. + + + + + Report whether the value in a column is DBNull. + + + + + Gets the number of rows changed, inserted, or deleted by execution of the SQL statement. + + + + + Indicates if NpgsqlDatareader has rows to be read. + + + + + Provides an implementation of NpgsqlDataReader in which all data is pre-loaded into memory. + This operates by first creating a ForwardsOnlyDataReader as usual, and then loading all of it's + Rows into memory. There is a general principle that when there is a trade-off between a class design that + is more efficient and/or scalable on the one hand and one that is less efficient but has more functionality + (in this case the internal-only functionality of caching results) that one can build the less efficent class + from the most efficient without significant extra loss in efficiency, but not the other way around. The relationship + between ForwardsOnlyDataReader and CachingDataReader is an example of this). + Since the interface presented to the user is still forwards-only, queues are used to + store this information, so that dequeueing as we go we give the garbage collector the best opportunity + possible to reclaim any memory that is no longer in use. + ForwardsOnlyDataReader being used to actually + obtain the information from the server means that the "leg-work" is still only done (and need only be + maintained) in one place. + This class exists to allow for certain potential backwards-compatibility issues to be resolved + with little effort on the part of affected users. It is considerably less efficient than ForwardsOnlyDataReader + and hence never used internally. + + + + + This is the base class for NpgsqlDescribeStatement and NpgsqlDescribePortal. + + + + + + This class represents the Statement Describe message sent to PostgreSQL + server. + + + + + + This class represents the Portal Describe message sent to PostgreSQL + server. + + + + + + EventArgs class to send Notice parameters, which are just NpgsqlError's in a lighter context. + + + + + Notice information. + + + + + This class represents the ErrorResponse and NoticeResponse + message sent from PostgreSQL server. + + + + + Return a string representation of this error object. + + + + + Severity code. All versions. + + + + + Error code. PostgreSQL 7.4 and up. + + + + + Terse error message. All versions. + + + + + Detailed error message. PostgreSQL 7.4 and up. + + + + + Suggestion to help resolve the error. PostgreSQL 7.4 and up. + + + + + Position (one based) within the query string where the error was encounterd. PostgreSQL 7.4 and up. + + + + + Position (one based) within the query string where the error was encounterd. This position refers to an internal command executed for example inside a PL/pgSQL function. PostgreSQL 7.4 and up. + + + + + Internal query string where the error was encounterd. This position refers to an internal command executed for example inside a PL/pgSQL function. PostgreSQL 7.4 and up. + + + + + Trace back information. PostgreSQL 7.4 and up. + + + + + Source file (in backend) reporting the error. PostgreSQL 7.4 and up. + + + + + Source file line number (in backend) reporting the error. PostgreSQL 7.4 and up. + + + + + Source routine (in backend) reporting the error. PostgreSQL 7.4 and up. + + + + + Schema name which relates to the error. PostgreSQL 9.3 and up. + + + + + Table name which relates to the error. PostgreSQL 9.3 and up. + + + + + Column name which relates to the error. PostgreSQL 9.3 and up. + + + + + Data type of column which relates to the error. PostgreSQL 9.3 and up. + + + + + Constraint name which relates to the error. PostgreSQL 9.3 and up. + + + + + String containing the sql sent which produced this error. + + + + + Backend protocol version in use. + + + + + Error and notice message field codes + + + + + Severity: the field contents are ERROR, FATAL, or PANIC (in an error message), + or WARNING, NOTICE, DEBUG, INFO, or LOG (in a notice message), or a localized + translation of one of these. Always present. + + + + + Code: the SQLSTATE code for the error (see Appendix A). Not localizable. Always present. + + + + + Message: the primary human-readable error message. This should be accurate + but terse (typically one line). Always present. + + + + + Detail: an optional secondary error message carrying more detail about the problem. + Might run to multiple lines. + + + + + Hint: an optional suggestion what to do about the problem. This is intended to differ + from Detail in that it offers advice (potentially inappropriate) rather than hard facts. + Might run to multiple lines. + + + + + Position: the field value is a decimal ASCII integer, indicating an error cursor + position as an index into the original query string. The first character has index 1, + and positions are measured in characters not bytes. + + + + + Internal position: this is defined the same as the P field, but it is used when the + cursor position refers to an internally generated command rather than the one submitted + by the client. + The q field will always appear when this field appears. + + + + + Internal query: the text of a failed internally-generated command. + This could be, for example, a SQL query issued by a PL/pgSQL function. + + + + + Where: an indication of the context in which the error occurred. + Presently this includes a call stack traceback of active procedural language functions + and internally-generated queries. The trace is one entry per line, most recent first. + + + + + Schema name: if the error was associated with a specific database object, + the name of the schema containing that object, if any. + + + + + Table name: if the error was associated with a specific table, the name of the table. + (Refer to the schema name field for the name of the table's schema.) + + + + + Column name: if the error was associated with a specific table column, the name of the column. + (Refer to the schema and table name fields to identify the table.) + + + + + Data type name: if the error was associated with a specific data type, the name of the data type. + (Refer to the schema name field for the name of the data type's schema.) + + + + + Constraint name: if the error was associated with a specific constraint, the name of the constraint. + Refer to fields listed above for the associated table or domain. + (For this purpose, indexes are treated as constraints, even if they weren't created with constraint syntax.) + + + + + File: the file name of the source-code location where the error was reported. + + + + + Line: the line number of the source-code location where the error was reported. + + + + + Routine: the name of the source-code routine reporting the error. + + + + + The level of verbosity of the NpgsqlEventLog + + + + + Don't log at all + + + + + Only log the most common issues + + + + + Log everything + + + + + This class handles all the Npgsql event and debug logging + + + + + Writes a string to the Npgsql event log if msglevel is bigger then NpgsqlEventLog.Level + + + This method is obsolete and should no longer be used. + It is likely to be removed in future versions of Npgsql + + The message to write to the event log + The minimum LogLevel for which this message should be logged. + + + + Writes a string to the Npgsql event log if msglevel is bigger then NpgsqlEventLog.Level + + The ResourceManager to get the localized resources + The name of the resource that should be fetched by the ResourceManager + The minimum LogLevel for which this message should be logged. + The additional parameters that shall be included into the log-message (must be compatible with the string in the resource): + + + + Writes the default log-message for the action of calling the Get-part of an Indexer to the log file. + + The minimum LogLevel for which this message should be logged. + The name of the class that contains the Indexer + The parameter given to the Indexer + + + + Writes the default log-message for the action of calling the Set-part of an Indexer to the logfile. + + The minimum LogLevel for which this message should be logged. + The name of the class that contains the Indexer + The parameter given to the Indexer + The value the Indexer is set to + + + + Writes the default log-message for the action of calling the Get-part of a Property to the logfile. + + The minimum LogLevel for which this message should be logged. + The name of the class that contains the Property + The name of the Property + + + + Writes the default log-message for the action of calling the Set-part of a Property to the logfile. + + The minimum LogLevel for which this message should be logged. + The name of the class that contains the Property + The name of the Property + The value the Property is set to + + + + Writes the default log-message for the action of calling a Method without Arguments to the logfile. + + The minimum LogLevel for which this message should be logged. + The name of the class that contains the Method + The name of the Method + + + + Writes the default log-message for the action of calling a Method with one Argument to the logfile. + + The minimum LogLevel for which this message should be logged. + The name of the class that contains the Method + The name of the Method + The value of the Argument of the Method + + + + Writes the default log-message for the action of calling a Method with two Arguments to the logfile. + + The minimum LogLevel for which this message should be logged. + The name of the class that contains the Method + The name of the Method + The value of the first Argument of the Method + The value of the second Argument of the Method + + + + Writes the default log-message for the action of calling a Method with three Arguments to the logfile. + + The minimum LogLevel for which this message should be logged. + The name of the class that contains the Method + The name of the Method + The value of the first Argument of the Method + The value of the second Argument of the Method + The value of the third Argument of the Method + + + + Writes the default log-message for the action of calling a Method with more than three Arguments to the logfile. + + The minimum LogLevel for which this message should be logged. + The name of the class that contains the Method + The name of the Method + A Object-Array with zero or more Ojects that are Arguments of the Method. + + + + Sets/Returns the filename to use for logging. + + The filename of the current Log file. + + + + Sets/Returns whether Log messages should be echoed to the console + + true if Log messages are echoed to the console, otherwise false + + + + The exception that is thrown when the PostgreSQL backend reports errors. + + + + + Construct a backend error exception based on a list of one or more + backend errors. The basic Exception.Message will be built from the + first (usually the only) error in the list. + + + + + Get object data. + + + + + + + Format a .NET style exception string. + Include all errors in the list, including any hints. + + + + + Append a line to the given Stream, first checking for zero-length. + + + + + Provide access to the entire list of errors provided by the PostgreSQL backend. + + + + + Severity code. All versions. + + + + + Error code. PostgreSQL 7.4 and up. + + + + + Basic error message. All versions. + + + + + Detailed error message. PostgreSQL 7.4 and up. + + + + + Suggestion to help resolve the error. PostgreSQL 7.4 and up. + + + + + Position (one based) within the query string where the error was encounterd. PostgreSQL 7.4 and up. + + + + + Trace back information. PostgreSQL 7.4 and up. + + + + + Source file (in backend) reporting the error. PostgreSQL 7.4 and up. + + + + + Source file line number (in backend) reporting the error. PostgreSQL 7.4 and up. + + + + + Source routine (in backend) reporting the error. PostgreSQL 7.4 and up. + + + + + Schema name which relates to the error. PostgreSQL 9.3 and up. + + + + + Table name which relates to the error. PostgreSQL 9.3 and up. + + + + + Column name which relates to the error. PostgreSQL 9.3 and up. + + + + + Data type of column which relates to the error. PostgreSQL 9.3 and up. + + + + + Constraint name which relates to the error. PostgreSQL 9.3 and up. + + + + + String containing the sql sent which produced this error. + + + + + Returns the entire list of errors provided by the PostgreSQL backend. + + + + + This class represents the Execute message sent to PostgreSQL + server. + + + + + + A factory to create instances of various Npgsql objects. + + + + + Creates an NpgsqlCommand object. + + + + + This class represents the Flush message sent to PostgreSQL + server. + + + + + + For classes representing simple messages, + consisting only of a message code and length identifier, + sent from the client to the server. + + + + + This class is responsible for serving as bridge between the backend + protocol handling and the core classes. It is used as the mediator for + exchanging data generated/sent from/to backend. + + + + + + The current command timeout on the backend. This is set via "SET statement_timeout = (milliseconds)". + A value of -1 means the backend's timeout value is unknown because it has not yet been set. + + + + + EventArgs class to send Notification parameters. + + + + + Process ID of the PostgreSQL backend that sent this notification. + + + + + Condition that triggered that notification. + + + + + Additional Information From Notifiying Process (for future use, currently postgres always sets this to an empty string) + + + + + This class represents a parameter to a command that will be sent to server + + + + + Initializes a new instance of the NpgsqlParameter class. + + + + + Initializes a new instance of the NpgsqlParameter + class with the parameter m_Name and a value of the new NpgsqlParameter. + + The m_Name of the parameter to map. + An Object that is the value of the NpgsqlParameter. + +

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

+

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

+
+
+ + + Initializes a new instance of the NpgsqlParameter + class with the parameter m_Name and the data type. + + The m_Name of the parameter to map. + One of the DbType values. + + + + Initializes a new instance of the NpgsqlParameter. + + The m_Name of the parameter to map. + One of the DbType values. + + + + Initializes a new instance of the NpgsqlParameter. + + The m_Name of the parameter to map. + One of the NpgsqlDbType values. + The length of the parameter. + + + + Initializes a new instance of the NpgsqlParameter. + + The m_Name of the parameter to map. + One of the DbType values. + The length of the parameter. + + + + Initializes a new instance of the NpgsqlParameter + + The m_Name of the parameter to map. + One of the NpgsqlDbType values. + The length of the parameter. + The m_Name of the source column. + + + + Initializes a new instance of the NpgsqlParameter. + + The m_Name of the parameter to map. + One of the DbType values. + The length of the parameter. + The m_Name of the source column. + + + + Initializes a new instance of the NpgsqlParameter. + + The m_Name of the parameter to map. + One of the NpgsqlDbType values. + The length of the parameter. + The m_Name of the source column. + One of the ParameterDirection values. + true if the value of the field can be null, otherwise false. + The total number of digits to the left and right of the decimal point to which + Value is resolved. + The total number of decimal places to which + Value is resolved. + One of the DataRowVersion values. + An Object that is the value + of the NpgsqlParameter. + + + + Initializes a new instance of the NpgsqlParameter. + + The m_Name of the parameter to map. + One of the DbType values. + The length of the parameter. + The m_Name of the source column. + One of the ParameterDirection values. + true if the value of the field can be null, otherwise false. + The total number of digits to the left and right of the decimal point to which + Value is resolved. + The total number of decimal places to which + Value is resolved. + One of the DataRowVersion values. + An Object that is the value + of the NpgsqlParameter. + + + + Reset DBType. + + + + + Creates a new NpgsqlParameter that + is a copy of the current instance. + + A new NpgsqlParameter that is a copy of this instance. + + + + The collection to which this parameter belongs, if any. + + + + + Gets or sets the maximum number of digits used to represent the + 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. + + + + Whether to use an explicit cast when included in a query. + + + + + 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 String. + + + + Gets or sets the DbType of the parameter. + + One of the DbType values. The default is String. + + + + Gets or sets a value indicating whether the parameter is input-only, + output-only, bidirectional, or a stored procedure return value parameter. + + One of the ParameterDirection + values. The default is Input. + + + + Gets or sets a value indicating whether the parameter accepts null values. + + true if null values are accepted; otherwise, false. The default is false. + + + + Gets or sets the m_Name of the NpgsqlParameter. + + The m_Name of the NpgsqlParameter. + The default is an empty string. + + + + The m_Name scrubbed of any optional marker + + + + + Gets or sets the m_Name of the source column that is mapped to the + DataSet and used for loading or + returning the Value. + + The m_Name of the source column that is mapped to the + DataSet. The default is an empty string. + + + + Gets or sets the DataRowVersion + to use when loading Value. + + One of the DataRowVersion values. + The default is Current. + + + + 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. + + + + Source column mapping. + + + + + 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. + + + + + Adds the specified NpgsqlParameter object to the NpgsqlParameterCollection. + + The NpgsqlParameter to add to the collection. + The index of the new NpgsqlParameter object. + + + + Obsolete. Use AddWithValue instead. + + + Use caution when using this overload of the + Add method to specify integer parameter values. + Because this overload takes a value of type Object, + you must convert the integral value to an Object + type when the value is zero, as the following C# example demonstrates. + parameters.Add(":pname", Convert.ToInt32(0)); + If you do not perform this conversion, the compiler will assume you + are attempting to call the NpgsqlParameterCollection.Add(string, DbType) overload. + + + + + Adds a NpgsqlParameter to the NpgsqlParameterCollection given the specified parameter name and value. + + The name of the NpgsqlParameter. + The Value of the NpgsqlParameter to add to the collection. + The paramater that was added. + + + + Adds a NpgsqlParameter to the NpgsqlParameterCollection given the specified parameter name and value. + + The name of the NpgsqlParameter. + The Value of the NpgsqlParameter to add to the collection. + One of the NpgsqlDbType values. + The paramater that was added. + + + + Adds a NpgsqlParameter to the NpgsqlParameterCollection given the specified parameter name and value. + + The name of the NpgsqlParameter. + The Value of the NpgsqlParameter to add to the collection. + One of the NpgsqlDbType values. + The length of the column. + The paramater that was added. + + + + Adds a NpgsqlParameter to the NpgsqlParameterCollection given the specified parameter name and value. + + The name of the NpgsqlParameter. + The Value of the NpgsqlParameter to add to the collection. + One of the NpgsqlDbType values. + The length of the column. + The name of the source column. + The paramater that was added. + + + + Adds a NpgsqlParameter to the NpgsqlParameterCollection given the parameter name and the data type. + + 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. + + + + 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. + + + + 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. + + + + + + + In methods taking an object as argument this method is used to verify + that the argument has the type NpgsqlParameter + + The object to verify + + + + 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[] + + + + 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. + + + + Report whether the collection is read only. Always false. + + + + + 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. + + + + Sync root. + + + + + This class represents the ParameterStatus message sent from PostgreSQL + server. + + + + + + This class represents the Parse message sent to PostgreSQL + server. + + + + + + This class represents a PasswordPacket message sent to backend + PostgreSQL. + + + + + Used when a connection is closed + + + + + This is the abstract base class for NpgsqlAsciiRow and NpgsqlBinaryRow. + + + + + The index of the current field in the stream, i.e. the one that hasn't + been read yet + + + + + This class represents a RowDescription message sent from + the PostgreSQL. + + + + + + This struct represents the internal data of the RowDescription message. + + + + + 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. + + + + This class represents a StartupPacket message of PostgreSQL + protocol. + + + + + + Represents a completed response message. + + + + + This class represents the Sync message sent to PostgreSQL + server. + + + + + + Represents a transaction to be made in a PostgreSQL database. This class cannot be inherited. + + + + + Dispose. + + + + + + Commits the database transaction. + + + + + Rolls back a transaction from a pending state. + + + + + Rolls back a transaction from a pending savepoint state. + + + + + Creates a transaction save point. + + + + + Cancel the transaction without telling the backend about it. This is + used to make the transaction go away when closing a connection. + + + + + Gets the NpgsqlConnection + object associated with the transaction, or a null reference if the + transaction is no longer valid. + + The NpgsqlConnection + object associated with the transaction. + + + + DB connection. + + + + + Specifies the IsolationLevel for this transaction. + + The IsolationLevel for this transaction. + The default is ReadCommitted. + + + + This class provides many util methods to handle + reading and writing of PostgreSQL protocol messages. + + + + + This method takes a ProtocolVersion and returns an integer + version number that the Postgres backend will recognize in a + startup packet. + + + + + This method takes a version string as returned by SELECT VERSION() and returns + a valid version string ("7.2.2" for example). + This is only needed when running protocol version 2. + This does not do any validity checks. + + + + + This method gets a C NULL terminated string from the network stream. + It keeps reading a byte in each time until a NULL byte is returned. + It returns the resultant string of bytes read. + This string is sent from backend. + + + + + Reads requested number of bytes from stream with retries until Stream.Read returns 0 or count is reached. + + Stream to read + byte buffer to fill + starting position to fill the buffer + number of bytes to read + The number of bytes read. May be less than count if no more bytes are available. + + + + Reads requested number of bytes from . If output matches exactly, and == false, is returned directly. + + Source array. + Starting position to read from + Number of bytes to read + Force a copy, even if the output is an exact copy of . + byte[] containing data requested. + + + + This method writes a string to the network stream. + + + + + This method writes a string to the network stream. + + + + + This method writes a C NULL terminated string to the network stream. + It appends a NULL terminator to the end of the String. + + + + + This method writes a C NULL terminated string to the network stream. + It appends a NULL terminator to the end of the String. + + + + + This method writes a byte to the stream. It also enables logging of them. + + + + + This method writes a byte to the stream. It also enables logging of them. + + + + + This method writes a set of bytes to the stream. It also enables logging of them. + + + + + This method writes a set of bytes to the stream. It also enables logging of them. + + + + + This method writes a C NULL terminated string limited in length to the + backend server. + It pads the string with null bytes to the size specified. + + + + + This method writes a C NULL terminated byte[] limited in length to the + backend server. + It pads the string with null bytes to the size specified. + + + + + Write a 32-bit integer to the given stream in the correct byte order. + + + + + Read a 32-bit integer from the given stream in the correct byte order. + + + + + Read a 32-bit integer from the given array in the correct byte order. + + + + + Write a 16-bit integer to the given stream in the correct byte order. + + + + + Read a 16-bit integer from the given stream in the correct byte order. + + + + + Read a 16-bit integer from the given array in the correct byte order. + + + + + Copy and possibly reverse a byte array, depending on host architecture endienness. + + Source byte array. + Force a copy even if no swap is performed. + , reversed if on a little-endian architecture, copied if required. + + + + Copy and possibly reverse a byte array, depending on host architecture endienness. + + Source byte array. + Starting offset in source array. + Number of bytes to copy. + Force a copy even if no swap is performed. + , reversed if on a little-endian architecture, copied if required. + + + + Represent the frontend/backend protocol version. + + + + + Represent the backend server version. + As this class offers no functionality beyond that offered by it has been + deprecated in favour of that class. + + + + + + Returns the string representation of this version in three place dot notation (Major.Minor.Patch). + + + + + Server version major number. + + + + + Server version minor number. + + + + + Server version patch level number. + + + + + A class to handle everything associated with SSPI authentication + + + + + Simplified SecBufferDesc struct with only one SecBuffer + + +
+
diff --git a/src/Frapid.Web/Areas/Frapid.Account/packages/Npgsql.2.2.6/lib/net35/de/Npgsql.resources.dll b/src/Frapid.Web/Areas/Frapid.Account/packages/Npgsql.2.2.6/lib/net35/de/Npgsql.resources.dll new file mode 100644 index 00000000..d290d077 Binary files /dev/null and b/src/Frapid.Web/Areas/Frapid.Account/packages/Npgsql.2.2.6/lib/net35/de/Npgsql.resources.dll differ diff --git a/src/Frapid.Web/Areas/Frapid.Account/packages/Npgsql.2.2.6/lib/net35/es/Npgsql.resources.dll b/src/Frapid.Web/Areas/Frapid.Account/packages/Npgsql.2.2.6/lib/net35/es/Npgsql.resources.dll new file mode 100644 index 00000000..5fffbf61 Binary files /dev/null and b/src/Frapid.Web/Areas/Frapid.Account/packages/Npgsql.2.2.6/lib/net35/es/Npgsql.resources.dll differ diff --git a/src/Frapid.Web/Areas/Frapid.Account/packages/Npgsql.2.2.6/lib/net35/fi/Npgsql.resources.dll b/src/Frapid.Web/Areas/Frapid.Account/packages/Npgsql.2.2.6/lib/net35/fi/Npgsql.resources.dll new file mode 100644 index 00000000..ce7d5a66 Binary files /dev/null and b/src/Frapid.Web/Areas/Frapid.Account/packages/Npgsql.2.2.6/lib/net35/fi/Npgsql.resources.dll differ diff --git a/src/Frapid.Web/Areas/Frapid.Account/packages/Npgsql.2.2.6/lib/net35/fr/Npgsql.resources.dll b/src/Frapid.Web/Areas/Frapid.Account/packages/Npgsql.2.2.6/lib/net35/fr/Npgsql.resources.dll new file mode 100644 index 00000000..1ca521a9 Binary files /dev/null and b/src/Frapid.Web/Areas/Frapid.Account/packages/Npgsql.2.2.6/lib/net35/fr/Npgsql.resources.dll differ diff --git a/src/Frapid.Web/Areas/Frapid.Account/packages/Npgsql.2.2.6/lib/net35/ja/Npgsql.resources.dll b/src/Frapid.Web/Areas/Frapid.Account/packages/Npgsql.2.2.6/lib/net35/ja/Npgsql.resources.dll new file mode 100644 index 00000000..990b6075 Binary files /dev/null and b/src/Frapid.Web/Areas/Frapid.Account/packages/Npgsql.2.2.6/lib/net35/ja/Npgsql.resources.dll differ diff --git a/src/Frapid.Web/Areas/Frapid.Account/packages/Npgsql.2.2.6/lib/net35/zh-CN/Npgsql.resources.dll b/src/Frapid.Web/Areas/Frapid.Account/packages/Npgsql.2.2.6/lib/net35/zh-CN/Npgsql.resources.dll new file mode 100644 index 00000000..e0dd3dfa Binary files /dev/null and b/src/Frapid.Web/Areas/Frapid.Account/packages/Npgsql.2.2.6/lib/net35/zh-CN/Npgsql.resources.dll differ diff --git a/src/Frapid.Web/Areas/Frapid.Account/packages/Npgsql.2.2.6/lib/net40/Mono.Security.dll b/src/Frapid.Web/Areas/Frapid.Account/packages/Npgsql.2.2.6/lib/net40/Mono.Security.dll new file mode 100644 index 00000000..62ae3394 Binary files /dev/null and b/src/Frapid.Web/Areas/Frapid.Account/packages/Npgsql.2.2.6/lib/net40/Mono.Security.dll differ diff --git a/src/Frapid.Web/Areas/Frapid.Account/packages/Npgsql.2.2.6/lib/net40/Npgsql.dll b/src/Frapid.Web/Areas/Frapid.Account/packages/Npgsql.2.2.6/lib/net40/Npgsql.dll new file mode 100644 index 00000000..d910e814 Binary files /dev/null and b/src/Frapid.Web/Areas/Frapid.Account/packages/Npgsql.2.2.6/lib/net40/Npgsql.dll differ diff --git a/src/Frapid.Web/Areas/Frapid.Account/packages/Npgsql.2.2.6/lib/net40/Npgsql.xml b/src/Frapid.Web/Areas/Frapid.Account/packages/Npgsql.2.2.6/lib/net40/Npgsql.xml new file mode 100644 index 00000000..44c2c149 --- /dev/null +++ b/src/Frapid.Web/Areas/Frapid.Account/packages/Npgsql.2.2.6/lib/net40/Npgsql.xml @@ -0,0 +1,6536 @@ + + + + Npgsql + + + + + Handles serialisation of .NET array or IEnumeration to pg format. + Arrays of arrays, enumerations of enumerations, arrays of enumerations etc. + are treated as multi-dimensional arrays (in much the same manner as an array of arrays + is used to emulate multi-dimensional arrays in languages that lack native support for them). + If such an enumeration of enumerations is "jagged" (as opposed to rectangular, cuboid, + hypercuboid, hyperhypercuboid, etc) then this class will "correctly" serialise it, but pg + will raise an error as it doesn't allow jagged arrays. + + + + + Create an ArrayNativeToBackendTypeConverter with the element converter passed + + The that would be used to serialise the element type. + + + + Serialise the enumeration or array. + + + + + Convert a System.Array to PG binary format. + Write the array header and prepare to write array data to the stream. + + + + + Append all array data to the binary stream. + + + + + Handles parsing of pg arrays into .NET arrays. + + + + + Takes a string representation of a pg 1-dimensional array + (or a 1-dimensional row within an n-dimensional array) + and allows enumeration of the string represenations of each items. + + + + + Takes a string representation of a pg n-dimensional array + and allows enumeration of the string represenations of the next + lower level of rows (which in turn can be taken as (n-1)-dimensional arrays. + + + + + Takes an ArrayList which may be an ArrayList of ArrayLists, an ArrayList of ArrayLists of ArrayLists + and so on and enumerates the items that aren't ArrayLists (the leaf nodes if we think of the ArrayList + passed as a tree). Simply uses the ArrayLists' own IEnumerators to get that of the next, + pushing them onto a stack until we hit something that isn't an ArrayList. + ArrayList to enumerate + IEnumerable + + + + + Create a new ArrayBackendToNativeTypeConverter + + for the element type. + + + + Creates an array from pg text representation. + + + + + Creates an array list from pg represenation of an array. + Multidimensional arrays are treated as ArrayLists of ArrayLists + + + + + Creates an n-dimensional array from an ArrayList of ArrayLists or + a 1-dimensional array from something else. + + to convert + Type of the elements in the list + produced. + + + + Creates an n-dimensional System.Array from PG binary representation. + This function reads the array header and sets up an n-dimensional System.Array object to hold its data. + PopulateArrayFromBinaryArray() is then called to carry out array population. + + + + + Recursively populates an array from PB binary data representation. + + + + + Takes an array of ints and treats them like the limits of a set of counters. + Retains a matching set of ints that is set to all zeros on the first ++ + On a ++ it increments the "right-most" int. If that int reaches it's + limit it is set to zero and the one before it is incremented, and so on. + + Making this a more general purpose class is pretty straight-forward, but we'll just put what we need here. + + + + + Implements a bit string; a collection of zero or more bits which can each be 1 or 0. + BitString's behave as a list of bools, though like most strings and unlike most collections the position + tends to be of as much significance as the value. + BitStrings are often used as masks, and are commonly cast to and from other values. + + + + + Represents the empty string. + + + + + Create a BitString from an enumeration of boolean values. The BitString will contain + those booleans in the order they came in. + + The boolean values. + + + + Creates a BitString filled with a given number of true or false values. + + The value to fill the string with. + The number of bits to fill. + + + + Creats a bitstring from a string. + The string to copy from. + + + + + + Creates a single-bit element from a boolean value. + + The bool value which determines whether + the bit is 1 or 0. + + + + Creates a bitstring from an unsigned integer value. The string will be the shortest required to + contain the integer (e.g. 1 bit for 0 or 1, 2 for 2 or 3, 3 for 4-7, and so on). + + The integer. + This method is not CLS Compliant, and may not be available to some languages. + + + + Creates a bitstring from an integer value. The string will be the shortest required to + contain the integer (e.g. 1 bit for 0 or 1, 2 for 2 or 3, 3 for 4-7, and so on). + + The integer. + + + + Finds the first instance of a given value + + The value - whether true or false - to search for. + The index of the value found, or -1 if none are present. + + + + True if there is at least one bit with the value looked for. + + The value - true or false - to detect. + True if at least one bit was the same as item, false otherwise. + + + + Copies the bitstring to an array of bools. + + The boolean array to copy to. + The index in the array to start copying from. + + + + Returns an enumerator that enumerates through the string. + + The enumerator. + + + + Creats a bitstring by concatenating another onto this one. + + The string to append to this one. + The combined strings. + + + + Returns a substring of this string. + + The position to start from, must be between 0 and the length of the string. + The length of the string to return, must be greater than zero, and may not be + so large that the start + length exceeds the bounds of this instance. + The Bitstring identified + + + + Returns a substring of this string. + + The position to start from, must be between 0 and the length of the string, + the rest of the string is returned. + The Bitstring identified + + + + A logical and between this string and another. The two strings must be the same length. + + Another BitString to AND with this one. + A bitstring with 1 where both BitStrings had 1 and 0 otherwise. + + + + A logical or between this string and another. The two strings must be the same length. + + Another BitString to OR with this one. + A bitstring with 1 where either BitString had 1 and 0 otherwise. + + + + A logical xor between this string and another. The two strings must be the same length. + + Another BitString to XOR with this one. + A bitstring with 1 where one BitStrings and the other had 0, + and 0 where they both had 1 or both had 0. + + + + A bitstring that is the logical inverse of this one. + + A bitstring of the same length as this with 1 where this has 0 and vice-versa. + + + + Shifts the string operand bits to the left, filling with zeros to produce a + string of the same length. + + The number of bits to shift to the left. + A left-shifted bitstring. + The behaviour of LShift is closer to what one would expect from dealing + with PostgreSQL bit-strings than in using the same operations on integers in .NET + In particular, negative operands result in a right-shift, and operands greater than + the length of the string will shift it entirely, resulting in a zero-filled string. + + + + + Shifts the string operand bits to the right, filling with zeros to produce a + string of the same length. + + The number of bits to shift to the right. + A right-shifted bitstring. + The behaviour of RShift is closer to what one would expect from dealing + with PostgreSQL bit-strings than in using the same operations on integers in .NET + In particular, negative operands result in a left-shift, and operands greater than + the length of the string will shift it entirely, resulting in a zero-filled string. It also performs + a logical shift, rather than an arithmetic shift, so it always sets the vacated bit positions to zero + (like PostgreSQL and like .NET for unsigned integers but not for signed integers). + + + + + Returns true if the this string is identical to the argument passed. + + + + + Compares two strings. Strings are compared as strings, so while 0 being less than 1 will + mean a comparison between two strings of the same size is the same as treating them as numbers, + in the case of two strings of differing lengths the comparison starts at the right-most (most significant) + bit, and if all bits of the shorter string are exhausted without finding a comparison, then the larger + string is deemed to be greater than the shorter (0010 is greater than 0001 but less than 00100). + + Another string to compare with this one. + A value if the two strings are identical, an integer less + than zero if this is less than the argument, and an integer greater + than zero otherwise. + + + + Compares the string with another object. + + The object to compare with. + If the object is null then this string is considered greater. If the object is another BitString + then they are compared as in the explicit comparison for BitStrings + in any other case a is thrown. + + + + Compares this BitString with an object for equality. + + + + + Returns a code for use in hashing operations. + + + + + Returns a string representation of the BitString. + + + A string which can contain a letter and optionally a number which sets a minimum size for the string + returned. In each case using the lower-case form of the letter will result in a lower-case string + being returned. + + + B + A string of 1s and 0s. + + + X + An hexadecimal string (will result in an error unless the string's length is divisible by 4). + + + G + A string of 1s and 0s in single-quotes preceded by 'B' (Postgres bit string literal syntax). + + Y + An hexadecimal string in single-quotes preceded by 'X' (Postgres bit literal syntax, will result in an error unless the string's length is divisible by 4. + + C + The format produced by format-string "Y" if legal, otherwise that produced by format-string "G". + E + The most compact safe representation for Postgres. If single bit will be either a 0 or a 1. Otherwise if it + can be that produce by format string "Y" it will, otherwise if there are less than 9bits in length it will be that + produced by format-string "G". For longer strings that cannot be represented in hexadecimal it will be a string + representing the first part of the string in format "Y" followed by the PostgreSQL concatenation operator, followed + by the final bits in the format "G". E.g. "X'13DCE'||B'110'" + If format is empty or null, it is treated as if "B" had been passed (the default repreesentation, and that + generally used by PostgreSQL for display). + + The formatted string. + + + + Returns a string representation for the Bitstring + + A string containing '0' and '1' characters. + + + + Returns the same string as . formatProvider is ignored. + + + + + Parses a string to produce a BitString. Most formats that can be produced by + can be accepted, but hexadecimal + can be interpreted with the preceding X' to mark the following characters as + being hexadecimal rather than binary. + + + + + Performs a logical AND on the two operands. + + + + + Performs a logcial OR on the two operands. + + + + + Perofrms a logical EXCLUSIVE-OR on the two operands + + + + + Performs a logical NOT on the operand. + + + + + Concatenates the operands. + + + + + Left-shifts the string BitString. + + + + + Right-shifts the string BitString. + + + + + Compares the two operands. + + + + + Compares the two operands. + + + + + Compares the two operands. + + + + + Compares the two operands. + + + + + Compares the two operands. + + + + + Compares the two operands. + + + + + Interprets the bitstring as a series of bits in an encoded character string, + encoded according to the Encoding passed, and returns that string. + The bitstring must contain a whole number of octets(bytes) and also be + valid according to the Encoding passed. + + The to use in producing the string. + The string that was encoded in the BitString. + + + + Interprets the bitstring as a series of octets (bytes) and returns those octets. Fails + if the Bitstring does not contain a whole number of octets (its length is not evenly + divisible by 8). + + + + + Interprets the bitstring as a series of signed octets (bytes) and returns those octets. Fails + if the Bitstring does not contain a whole number of octets (its length is not evenly + divisible by 8). + This method is not CLS-Compliant and may not be available to languages that cannot + handle signed bytes. + + + + + Interprets the bitstring as a series of unsigned 16-bit integers and returns those integers. + Fails if the Bitstring's length is not evenly divisible by 16. + This method is not CLS-Compliant and may not be available to languages that cannot + handle unsigned integers. + + + + + Interprets the bitstring as a series of 16-bit integers and returns those integers. + Fails if the Bitstring's length is not evenly divisible by 16. + + + + + Interprets the bitstring as a series of unsigned 32-bit integers and returns those integers. + Fails if the Bitstring's length is not evenly divisible by 32. + This method is not CLS-Compliant and may not be available to languages that cannot + handle unsigned integers. + + + + + Interprets the bitstring as a series of signed 32-bit integers and returns those integers. + Fails if the Bitstring's length is not evenly divisible by 32. + + + + + Interprets the bitstring as a series of unsigned 64-bit integers and returns those integers. + Fails if the Bitstring's length is not evenly divisible by 64. + This method is not CLS-Compliant and may not be available to languages that cannot + handle unsigned integers. + + + + + Interprets the bitstring as a series of signed 64-bit integers and returns those integers. + Fails if the Bitstring's length is not evenly divisible by 64. + + + + + The length of the string. + + + + + Retrieves the value of the bit at the given index. + + + + + Represents the PostgreSQL interval datatype. + PostgreSQL differs from .NET in how it's interval type doesn't assume 24 hours in a day + (to deal with 23- and 25-hour days caused by daylight savings adjustments) and has a concept + of months that doesn't exist in .NET's class. (Neither datatype + has any concessions for leap-seconds). + For most uses just casting to and from TimeSpan will work correctly — in particular, + the results of subtracting one or the PostgreSQL date, time and + timestamp types from another should be the same whether you do so in .NET or PostgreSQL — + but if the handling of days and months in PostgreSQL is important to your application then you + should use this class instead of . + If you don't know whether these differences are important to your application, they + probably arent! Just use and do not use this class directly ☺ + To avoid forcing unnecessary provider-specific concerns on users who need not be concerned + with them a call to on a field containing an + value will return a rather than an + . If you need the extra functionality of + then use . + + + + + + + + + + Represents the number of ticks (100ns periods) in one microsecond. This field is constant. + + + + + Represents the number of ticks (100ns periods) in one millisecond. This field is constant. + + + + + Represents the number of ticks (100ns periods) in one second. This field is constant. + + + + + Represents the number of ticks (100ns periods) in one minute. This field is constant. + + + + + Represents the number of ticks (100ns periods) in one hour. This field is constant. + + + + + Represents the number of ticks (100ns periods) in one day. This field is constant. + + + + + Represents the number of hours in one day (assuming no daylight savings adjustments). This field is constant. + + + + + Represents the number of days assumed in one month if month justification or unjustifcation is performed. + This is set to 30 for consistency with PostgreSQL. Note that this is means that month adjustments cause + a year to be taken as 30 × 12 = 360 rather than 356/366 days. + + + + + Represents the number of ticks (100ns periods) in one day, assuming 30 days per month. + + + + + Represents the number of months in a year. This field is constant. + + + + + Represents the maximum . This field is read-only. + + + + + Represents the minimum . This field is read-only. + + + + + Represents the zero . This field is read-only. + + + + + Initializes a new to the specified number of ticks. + + A time period expressed in 100ns units. + + + + Initializes a new to hold the same time as a + + A time period expressed in a + + + + Initializes a new to the specified number of months, days + & ticks. + + Number of months. + Number of days. + Number of 100ns units. + + + + Initializes a new to the specified number of + days, hours, minutes & seconds. + + Number of days. + Number of hours. + Number of minutes. + Number of seconds. + + + + Initializes a new to the specified number of + days, hours, minutes, seconds & milliseconds. + + Number of days. + Number of hours. + Number of minutes. + Number of seconds. + Number of milliseconds. + + + + Initializes a new to the specified number of + months, days, hours, minutes, seconds & milliseconds. + + Number of months. + Number of days. + Number of hours. + Number of minutes. + Number of seconds. + Number of milliseconds. + + + + Initializes a new to the specified number of + years, months, days, hours, minutes, seconds & milliseconds. + Years are calculated exactly equivalent to 12 months. + + Number of years. + Number of months. + Number of days. + Number of hours. + Number of minutes. + Number of seconds. + Number of milliseconds. + + + + Creates an from a number of ticks. + + The number of ticks (100ns units) in the interval. + A d with the given number of ticks. + + + + Creates an from a number of microseconds. + + The number of microseconds in the interval. + A d with the given number of microseconds. + + + + Creates an from a number of milliseconds. + + The number of milliseconds in the interval. + A d with the given number of milliseconds. + + + + Creates an from a number of seconds. + + The number of seconds in the interval. + A d with the given number of seconds. + + + + Creates an from a number of minutes. + + The number of minutes in the interval. + A d with the given number of minutes. + + + + Creates an from a number of hours. + + The number of hours in the interval. + A d with the given number of hours. + + + + Creates an from a number of days. + + The number of days in the interval. + A d with the given number of days. + + + + Creates an from a number of months. + + The number of months in the interval. + A d with the given number of months. + + + + Adds another interval to this instance and returns the result. + + An to add to this instance. + An whose values are the sums of the two instances. + + + + Subtracts another interval from this instance and returns the result. + + An to subtract from this instance. + An whose values are the differences of the two instances. + + + + Returns an whose value is the negated value of this instance. + + An whose value is the negated value of this instance. + + + + This absolute value of this instance. In the case of some, but not all, components being negative, + the rules used for justification are used to determine if the instance is positive or negative. + + An whose value is the absolute value of this instance. + + + + Equivalent to PostgreSQL's justify_days function. + + An based on this one, but with any hours outside of the range [-23, 23] + converted into days. + + + + Opposite to PostgreSQL's justify_days function. + + An based on this one, but with any days converted to multiples of ±24hours. + + + + Equivalent to PostgreSQL's justify_months function. + + An based on this one, but with any days outside of the range [-30, 30] + converted into months. + + + + Opposite to PostgreSQL's justify_months function. + + An based on this one, but with any months converted to multiples of ±30days. + + + + Equivalent to PostgreSQL's justify_interval function. + + An based on this one, + but with any months converted to multiples of ±30days + and then with any days converted to multiples of ±24hours + + + + Opposite to PostgreSQL's justify_interval function. + + An based on this one, but with any months converted to multiples of ±30days and then any days converted to multiples of ±24hours; + + + + Produces a canonical NpgslInterval with 0 months and hours in the range of [-23, 23]. + + + While the fact that for many purposes, two different instances could be considered + equivalent (e.g. one with 2days, 3hours and one with 1day 27hours) there are different possible canonical forms. + + E.g. we could move all excess hours into days and all excess days into months and have the most readable form, + or we could move everything into the ticks and have the form that allows for the easiest arithmetic) the form + chosen has two important properties that make it the best choice. + First, it is closest two how + objects are most often represented. Second, it is compatible with results of many + PostgreSQL functions, particularly with age() and the results of subtracting one date, time or timestamp from + another. + + Note that the results of casting a to is + canonicalised. + + + An based on this one, but with months converted to multiples of ±30days and with any hours outside of the range [-23, 23] + converted into days. + + + + Implicit cast of a to an + + A + An eqivalent, canonical, . + + + + Implicit cast of an to a . + + A . + An equivalent . + + + + Returns true if another is exactly the same as this instance. + + An for comparison. + true if the two instances are exactly the same, + false otherwise. + + + + Returns true if another object is an , that is exactly the same as + this instance + + An for comparison. + true if the argument is an and is exactly the same + as this one, false otherwise. + + + + Compares two instances. + + The first . + The second . + 0 if the two are equal or equivalent. A value greater than zero if x is greater than y, + a value less than zero if x is less than y. + + + + A hash code suitable for uses with hashing algorithms. + + An signed integer. + + + + Compares this instance with another/ + + An to compare this with. + 0 if the instances are equal or equivalent. A value less than zero if + this instance is less than the argument. A value greater than zero if this instance + is greater than the instance. + + + + Compares this instance with another/ + + An object to compare this with. + 0 if the argument is an and the instances are equal or equivalent. + A value less than zero if the argument is an and + this instance is less than the argument. + A value greater than zero if the argument is an and this instance + is greater than the instance. + A value greater than zero if the argument is null. + The argument is not an . + + + + Parses a and returns a instance. + Designed to use the formats generally returned by PostgreSQL. + + The to parse. + An represented by the argument. + The string was null. + A value obtained from parsing the string exceeded the values allowed for the relevant component. + The string was not in a format that could be parsed to produce an . + + + + Attempt to parse a to produce an . + + The to parse. + (out) The produced, or if the parsing failed. + true if the parsing succeeded, false otherwise. + + + + Create a representation of the instance. + The format returned is of the form: + [M mon[s]] [d day[s]] [HH:mm:ss[.f[f[f[f[f[f[f[f[f]]]]]]]]]] + A zero is represented as 00:00:00 + + Ticks are 100ns, Postgress resolution is only to 1µs at most. Hence we lose 1 or more decimal + precision in storing values in the database. Despite this, this method will output that extra + digit of precision. It's forward-compatible with any future increases in resolution up to 100ns, + and also makes this ToString() more applicable to any other use-case. + + + The representation. + + + + Adds two together. + + The first to add. + The second to add. + An whose values are the sum of the arguments. + + + + Subtracts one from another. + + The to subtract the other from. + The to subtract from the other. + An whose values are the difference of the arguments + + + + Returns true if two are exactly the same. + + The first to compare. + The second to compare. + true if the two arguments are exactly the same, false otherwise. + + + + Returns false if two are exactly the same. + + The first to compare. + The second to compare. + false if the two arguments are exactly the same, true otherwise. + + + + Compares two instances to see if the first is less than the second + + The first to compare. + The second to compare. + true if the first is less than second, false otherwise. + + + + Compares two instances to see if the first is less than or equivalent to the second + + The first to compare. + The second to compare. + true if the first is less than or equivalent to second, false otherwise. + + + + Compares two instances to see if the first is greater than the second + + The first to compare. + The second to compare. + true if the first is greater than second, false otherwise. + + + + Compares two instances to see if the first is greater than or equivalent the second + + The first to compare. + The second to compare. + true if the first is greater than or equivalent to the second, false otherwise. + + + + Returns the instance. + + An . + The argument. + + + + Negates an instance. + + An . + The negation of the argument. + + + + The total number of ticks(100ns units) contained. This is the resolution of the + type. This ignores the number of days and + months held. If you want them included use first. + The resolution of the PostgreSQL + interval type is by default 1µs = 1,000 ns. It may be smaller as follows: + + + interval(0) + resolution of 1s (1 second) + + + interval(1) + resolution of 100ms = 0.1s (100 milliseconds) + + + interval(2) + resolution of 10ms = 0.01s (10 milliseconds) + + + interval(3) + resolution of 1ms = 0.001s (1 millisecond) + + + interval(4) + resolution of 100µs = 0.0001s (100 microseconds) + + + interval(5) + resolution of 10µs = 0.00001s (10 microseconds) + + + interval(6) or interval + resolution of 1µs = 0.000001s (1 microsecond) + + + As such, if the 100-nanosecond resolution is significant to an application, a PostgreSQL interval will + not suffice for those purposes. + In more frequent cases though, the resolution of the interval suffices. + will always suffice to handle the resolution of any interval value, and upon + writing to the database, will be rounded to the resolution used. + + The number of ticks in the instance. + + + + + Gets the number of whole microseconds held in the instance. + An in the range [-999999, 999999]. + + + + + Gets the number of whole milliseconds held in the instance. + An in the range [-999, 999]. + + + + + Gets the number of whole seconds held in the instance. + An in the range [-59, 59]. + + + + + Gets the number of whole minutes held in the instance. + An in the range [-59, 59]. + + + + + Gets the number of whole hours held in the instance. + Note that this can be less than -23 or greater than 23 unless + has been used to produce this instance. + + + + + Gets the number of days held in the instance. + Note that this does not pay attention to a time component with -24 or less hours or + 24 or more hours, unless has been called to produce this instance. + + + + + Gets the number of months held in the instance. + Note that this does not pay attention to a day component with -30 or less days or + 30 or more days, unless has been called to produce this instance. + + + + + Returns a representing the time component of the instance. + Note that this may have a value beyond the range ±23:59:59.9999999 unless + has been called to produce this instance. + + + + + The total number of ticks (100ns units) in the instance, assuming 24 hours in each day and + 30 days in a month. + + + + + The total number of microseconds in the instance, assuming 24 hours in each day and + 30 days in a month. + + + + + The total number of milliseconds in the instance, assuming 24 hours in each day and + 30 days in a month. + + + + + The total number of seconds in the instance, assuming 24 hours in each day and + 30 days in a month. + + + + + The total number of minutes in the instance, assuming 24 hours in each day and + 30 days in a month. + + + + + The total number of hours in the instance, assuming 24 hours in each day and + 30 days in a month. + + + + + The total number of days in the instance, assuming 24 hours in each day and + 30 days in a month. + + + + + The total number of months in the instance, assuming 24 hours in each day and + 30 days in a month. + + + + + Normalise this time; if it is 24:00:00, convert it to 00:00:00 + + This time, normalised + + + + The total number of ticks(100ns units) contained. This is the resolution of the + type. + The resolution of the PostgreSQL + interval type is by default 1µs = 1,000 ns. It may be smaller as follows: + + + time(0) + resolution of 1s (1 second) + + + time(1) + resolution of 100ms = 0.1s (100 milliseconds) + + + time(2) + resolution of 10ms = 0.01s (10 milliseconds) + + + time(3) + resolution of 1ms = 0.001s (1 millisecond) + + + time(4) + resolution of 100µs = 0.0001s (100 microseconds) + + + time(5) + resolution of 10µs = 0.00001s (10 microseconds) + + + time(6) or interval + resolution of 1µs = 0.000001s (1 microsecond) + + + As such, if the 100-nanosecond resolution is significant to an application, a PostgreSQL time will + not suffice for those purposes. + In more frequent cases though, the resolution of time suffices. + will always suffice to handle the resolution of any time value, and upon + writing to the database, will be rounded to the resolution used. + + The number of ticks in the instance. + + + + + Gets the number of whole microseconds held in the instance. + An integer in the range [0, 999999]. + + + + + Gets the number of whole milliseconds held in the instance. + An integer in the range [0, 999]. + + + + + Gets the number of whole seconds held in the instance. + An interger in the range [0, 59]. + + + + + Gets the number of whole minutes held in the instance. + An integer in the range [0, 59]. + + + + + Gets the number of whole hours held in the instance. + Note that the time 24:00:00 can be stored for roundtrip compatibility. Any calculations on such a + value will normalised it to 00:00:00. + + + + + Normalise this time; if it is 24:00:00, convert it to 00:00:00 + + This time, normalised + + + + Compares this with another . As per postgres' rules, + first the times are compared as if they were both in the same timezone. If they are equal then + then timezones are compared (+01:00 being "smaller" than -01:00). + + the to compare with. + An integer which is 0 if they are equal, < 0 if this is the smaller and > 0 if this is the larger. + + + + Gets the number of whole microseconds held in the instance. + An integer in the range [0, 999999]. + + + + + Gets the number of whole milliseconds held in the instance. + An integer in the range [0, 999]. + + + + + Gets the number of whole seconds held in the instance. + An interger in the range [0, 59]. + + + + + Gets the number of whole minutes held in the instance. + An integer in the range [0, 59]. + + + + + Gets the number of whole hours held in the instance. + Note that the time 24:00:00 can be stored for roundtrip compatibility. Any calculations on such a + value will normalised it to 00:00:00. + + + + + This class implements the Fastpath api. + + + + + This maps the functions names to their id's (possible unique just + to a connection). + + + + + Our connection. + + + + + The network stream. + + + + + Initialises the fastpath system. + + BaseConnection to attach to. + The network stream to the backend. + + + + Initialises the fastpath system. + + BaseConnection to attach to. + + + + Send a function call to the PostgreSQL backend. + + Function id. + True if the result is an integer, false for other results. + FastpathArguments to pass to fastpath. + null if no data, Integer if an integer result, or byte[] otherwise. + + + + Send a function call to the PostgreSQL backend by name. + Note: the mapping for the procedure name to function id needs to exist, + usually to an earlier call to addfunction(). + This is the prefered method to call, as function id's can/may change + between versions of the backend. + For an example of how this works, refer to NpgsqlTypes.LargeObject + + Function name. + True if the result is an integer, false for other results. + FastpathArguments to pass to fastpath. + null if no data, Integer if an integer result, or byte[] otherwise. + + + + This convenience method assumes that the return value is an Integer. + + Function name. + Function arguments. + Integer result. + + + + This convenience method assumes that the return value is an Integer. + + Function name. + Function arguments. + Array containing result + + + + This adds a function to our lookup table. + User code should use the addFunctions method, which is based upon a + query, rather than hard coding the oid. The oid for a function is not + guaranteed to remain static, even on different servers of the same + version. + + Function name. + Function id. + + + + This takes a ResultSet containing two columns. Column 1 contains the + function name, Column 2 the oid. + It reads the entire ResultSet, loading the values into the function + table. + REMEMBER to close() the resultset after calling this!! + Implementation note about function name lookups: + PostgreSQL stores the function id's and their corresponding names in + the pg_proc table. To speed things up locally, instead of querying each + function from that table when required, a Dictionary is used. Also, only + the function's required are entered into this table, keeping connection + times as fast as possible. + The org.postgresql.largeobject.LargeObject class performs a query upon it's startup, + and passes the returned ResultSet to the addFunctions() method here. + Once this has been done, the LargeObject api refers to the functions by + name. + Dont think that manually converting them to the oid's will work. Ok, + they will for now, but they can change during development (there was some + discussion about this for V7.0), so this is implemented to prevent any + unwarranted headaches in the future. + + ResultSet + + + + This returns the function id associated by its name + If addFunction() or addFunctions() have not been called for this name, + then an NpgsqlException is thrown. + + Function name to lookup. + Function ID for fastpath call. + + + + Fast Path Arg. + + + + + Type of argument, true=integer, false=byte[]. + + + + + Integer value if type=true. + + + + + Byte value if type=false; + + + + + Constructs an argument that consists of an integer value. + + Int value to set. + + + + Constructs an argument that consists of an array of bytes. + + Array to store. + + + + Constructs an argument that consists of part of a byte array. + + Source array. + offset within array. + length of data to include. + + + + Constructs an argument that consists of a String. + + String to store. + + + + This sends this argument down the network stream. + The stream sent consists of the length.int4 then the contents. + Note: This is called from Fastpath, and cannot be called from + client code. + + + + + + Report send size. + + Send size. + + + + Large Object. + + + + + Indicates a seek from the begining of a file. + + + + + Indicates a seek from the current position. + + + + + Indicates a seek from the end of a file. + + + + + This opens a large object. + If the object does not exist, then an NpgsqlException is thrown. + + FastPath API for the connection to use. + OID of the Large Object to open. + Mode of opening the large object + + + + OID getter. + + The OID of this LargeObject. + + + + This method closes the object. You must not call methods in this + object after this is called. + + + + + Reads some data from the object, and return as a byte[] array. + + Number of bytes to read. + Array containing data read. + + + + Reads some data from the object into an existing array. + + Destination array. + Offset within array. + Maximum number of bytes to read. + The number of bytes actually read. + + + + Writes an array to the object. + + Array to write. + + + + Writes some data from an array to the object. + + Destination array. + Offset within array. + Number of bytes to write. + + + + Sets the current position within the object. + This is similar to the fseek() call in the standard C library. It + allows you to have random access to the large object. + + Position within object. + Either SEEK_SET, SEEK_CUR or SEEK_END. + + + + Sets the current position within the object. + This is similar to the fseek() call in the standard C library. It + allows you to have random access to the large object. + + Position within object from begining. + + + + Report the current position within the object. + + The current position within the object. + + + + This method is inefficient, as the only way to find out the size of + the object is to seek to the end, record the current position, then + return to the original position. + A better method will be found in the future. + + The size of the large object. + + + + OID. + + + + + Large Object Manager. + + + + + This mode indicates we want to write to an object + + + + + This mode indicates we want to read an object + + + + + This mode is the default. It indicates we want read and write access to + + + + + Constructs the LargeObject API. + There should only be one LargeObjectManager per Connection. The + org.postgresql.Connection class keeps track of the various extension API's + and it's advised you use those to gain access, and not going direct. + + + + + + This opens an existing large object, based on its OID. This method + assumes that READ and WRITE access is required (the default). + + OID of large object. + LargeObject instance providing access to the object + + + + This opens an existing large object, based on its OID. + + OID of large object. + Mode of open. + + + + + This creates a large object, returning its OID. + + OID of new object. + + + + This creates a large object, returning its OID. + + Bitmask describing different attributes of the new object. + OID of new object. + + + + This deletes a large object. + + OID describing object to delete. + + + + This deletes a large object. + It is identical to the Delete() method, and is supplied as the C API uses unlink. + + OID describing object to delete. + + + + Options that control certain aspects of native to backend conversions that depend + on backend version and status. + + + + + Clone the current object. + + A new NativeToBackendTypeConverterOptions object. + + + + Clone the current object with a different OID/Name mapping. + + OID/Name mapping object to use in the new instance. + A new NativeToBackendTypeConverterOptions object. + + + + Provide event handlers to convert all native supported basic data types from their backend + text representation to a .NET object. + + + + + Convert UTF8 encoded text a string. + + + + + Byte array from bytea encoded as ASCII text, escaped or hex format. + + + + + Byte array from bytea encoded as binary. + + + + + Convert a postgresql boolean to a System.Boolean. + + + + + Convert a postgresql boolean to a System.Boolean. + + + + + Convert a postgresql bit to a System.Boolean. + + + + + Convert a postgresql datetime to a System.DateTime. + + + + + Convert a postgresql date to a System.DateTime. + + + + + Convert a postgresql time to a System.DateTime. + + + + + Convert a postgresql money to a System.Decimal. + + + + + Convert a postgresql float4 or float8 to a System.Float or System.Double respectively. + + + + + Provide event handlers to convert extended native supported data types from their backend + text representation to a .NET object. + + + + + Convert a postgresql point to a System.NpgsqlPoint. + + + + + Convert a postgresql point to a System.RectangleF. + + + + + LDeg. + + + + + Path. + + + + + Polygon. + + + + + Circle. + + + + + Inet. + + + + + MAC Address. + + + + + interval + + + + + Provide event handlers to convert the basic native supported data types from + native form to backend representation. + + + + + Convert a string to UTF8 encoded text, escaped and quoted as required. + + + + + Convert a string to UTF8 encoded text. + + + + + Binary data, escaped and quoted as required. + + + + + Binary data with possible older style octal escapes, quoted. + + + + + Binary data in the new hex format (>= 9.0), quoted. + + + + + Binary data, raw. + + + + + Convert to a postgresql boolean text format. + + + + + Convert to a postgresql boolean binary format. + + + + + Convert to a postgresql binary int2. + + + + + Convert to a postgresql binary int4. + + + + + Convert to a postgresql binary int8. + + + + + Convert to a postgresql bit. + + + + + Convert to a postgresql timestamp. + + + + + Convert to a postgresql date. + + + + + Convert to a postgresql time. + + + + + Convert to a postgres money. + + + + + Convert to a postgres double with maximum precision. + + + + + Convert a System.Float to a postgres float4. + + + + + Convert a System.Double to a postgres float8. + + + + + Provide event handlers to convert extended native supported data types from + native form to backend representation. + + + + + Point. + + + + + Box. + + + + + LSeg. + + + + + Open path. + + + + + Polygon. + + + + + Convert to a postgres MAC Address. + + + + + Circle. + + + + + Convert to a postgres inet. + + + + + Convert to a postgres interval + + + + + Delegate called to convert the given backend text data to its native representation. + + + + + Delegate called to convert the given backend binary data to its native representation. + + + + + Represents a backend data type. + This class can be called upon to convert a backend field representation to a native object. + + + + + Construct a new NpgsqlTypeInfo with the given attributes and conversion handlers. + + Type OID provided by the backend server. + Type name provided by the backend server. + NpgsqlDbType + DbType + System type to convert fields of this type to. + Data conversion handler for text encoding. + Data conversion handler for binary data. + + + + Perform a data conversion from a backend representation to + a native object. + + Data sent from the backend. + fieldValueSize + Type modifier field sent from the backend. + + + + Perform a data conversion from a backend representation to + a native object. + + Data sent from the backend. + TypeSize + Type modifier field sent from the backend. + + + + Type OID provided by the backend server. + + + + + Type name provided by the backend server. + + + + + NpgsqlDbType. + + + + + NpgsqlDbType. + + + + + Provider type to convert fields of this type to. + + + + + System type to convert fields of this type to. + + + + + Reports whether a backend binary to native decoder is available for this type. + + + + + Delegate called to convert the given native data to its backand representation. + + + + + Represents a backend data type. + This class can be called upon to convert a native object to its backend field representation, + + + + + Returns an NpgsqlNativeTypeInfo for an array where the elements are of the type + described by the NpgsqlNativeTypeInfo supplied. + + + + + Construct a new NpgsqlTypeInfo with the given attributes and conversion handlers. + + Type name provided by the backend server. + DbType + Quote + NpgsqlDbType + Data conversion handler for text backend encoding. + Data conversion handler for binary backend encoding (for extended queries). + + + + Perform a data conversion from a native object to + a backend representation. + DBNull and null values are handled differently depending if a plain query is used + When + + Native .NET object to be converted. + Specifies that the value should be formatted for the extended query syntax. + Options to guide serialization. If null, a default options set is used. + Specifies that the value should be formatted as an extended query array element. + + + + Type name provided by the backend server. + + + + + NpgsqlDbType. + + + + + DbType. + + + + + Apply quoting. + + + + + Use parameter size information. + + + + + Reports whether a native to backend binary encoder is available for this type. + + + + + Provide mapping between type OID, type name, and a NpgsqlBackendTypeInfo object that represents it. + + + + + Construct an empty mapping. + + + + + Copy constuctor. + + + + + Add the given NpgsqlBackendTypeInfo to this mapping. + + + + + Add a new NpgsqlBackendTypeInfo with the given attributes and conversion handlers to this mapping. + + Type OID provided by the backend server. + Type name provided by the backend server. + NpgsqlDbType + DbType + System type to convert fields of this type to. + Data conversion handler for text encoding. + Data conversion handler for binary data. + + + + Make a shallow copy of this type mapping. + + + + + Determine if a NpgsqlBackendTypeInfo with the given backend type OID exists in this mapping. + + + + + Determine if a NpgsqlBackendTypeInfo with the given backend type name exists in this mapping. + + + + + Get the number of type infos held. + + + + + Retrieve the NpgsqlBackendTypeInfo with the given backend type OID, or null if none found. + + + + + Retrieve the NpgsqlBackendTypeInfo with the given backend type name, or null if none found. + + + + + Provide mapping between type Type, NpgsqlDbType and a NpgsqlNativeTypeInfo object that represents it. + + + + + Add the given NpgsqlNativeTypeInfo to this mapping. + + + + + Add a new NpgsqlNativeTypeInfo with the given attributes and conversion handlers to this mapping. + + Type name provided by the backend server. + NpgsqlDbType + DbType + Quote + Data conversion handler for text backend encoding. + Data conversion handler for binary backend encoding (for extended query). + + + + Retrieve the NpgsqlNativeTypeInfo with the given NpgsqlDbType. + + + + + Retrieve the NpgsqlNativeTypeInfo with the given DbType. + + + + + Retrieve the NpgsqlNativeTypeInfo with the given Type. + + + + + Determine if a NpgsqlNativeTypeInfo with the given backend type name exists in this mapping. + + + + + Determine if a NpgsqlNativeTypeInfo with the given NpgsqlDbType exists in this mapping. + + + + + Determine if a NpgsqlNativeTypeInfo with the given Type name exists in this mapping. + + + + + Get the number of type infos held. + + + + + Represents a PostgreSQL Point type + + + + + Represents a PostgreSQL Line Segment type. + + + + + Represents a PostgreSQL Path type. + + + + + Represents a PostgreSQL Polygon type. + + + + + Represents a PostgreSQL Circle type. + + + + + Represents a PostgreSQL inet type. + + + + + Represents a PostgreSQL MacAddress type. + + + + + + + The macAddr parameter must contain a string that can only consist of numbers + and upper-case letters as hexadecimal digits. (See PhysicalAddress.Parse method on MSDN) + + + + This class contains helper methods for type conversion between + the .Net type system and postgresql. + + + + + A cache of basic datatype mappings keyed by server version. This way we don't + have to load the basic type mappings for every connection. + + + + + Find a NpgsqlNativeTypeInfo in the default types map that can handle objects + of the given NpgsqlDbType. + + + + + Find a NpgsqlNativeTypeInfo in the default types map that can handle objects + of the given NpgsqlDbType. + + + + + Find a NpgsqlNativeTypeInfo in the default types map that can handle objects + of the given DbType. + + + + + Find a NpgsqlNativeTypeInfo in the default types map that can handle objects + of the given System.Type. + + + + + This method is responsible to convert the byte[] received from the backend + to the corresponding NpgsqlType. + The given TypeInfo is called upon to do the conversion. + If no TypeInfo object is provided, no conversion is performed. + + + + + This method is responsible to convert the string received from the backend + to the corresponding NpgsqlType. + The given TypeInfo is called upon to do the conversion. + If no TypeInfo object is provided, no conversion is performed. + + + + + Create the one and only native to backend type map. + This map is used when formatting native data + types to backend representations. + + + + + This method creates (or retrieves from cache) a mapping between type and OID + of all natively supported postgresql data types. + This is needed as from one version to another, this mapping can be changed and + so we avoid hardcoding them. + + NpgsqlTypeMapping containing all known data types. The mapping must be + cloned before it is modified because it is cached; changes made by one connection may + effect another connection. + + + + + Attempt to map types by issuing a query against pg_type. + This function takes a list of NpgsqlTypeInfo and attempts to resolve the OID field + of each by querying pg_type. If the mapping is found, the type info object is + updated (OID) and added to the provided NpgsqlTypeMapping object. + + NpgsqlConnector to send query through. + Mapping object to add types too. + List of types that need to have OID's mapped. + + + + Summary description for NpgsqlQuery + + + + + For classes representing messages sent from the client to the server. + + + + + Set Cache Size. The default value is 20. + + + + + Lookup cached entity. null will returned if not match. + For both get{} and set{} apply LRU rule. + + key + + + + + The globally available text encoding used for frontend/backend communication. + + + + This class represents the base class for the state pattern design pattern + implementation. + + + This class represents the base class for the state pattern design pattern + implementation. + + + + + + This method is used by the states to change the state of the context. + + + + + Call ProcessBackendResponsesEnum(), and scan and discard all results. + + + + + This method is responsible to handle all protocol messages sent from the backend. + It holds all the logic to do it. + To exchange data, it uses a Mediator object from which it reads/writes information + to handle backend requests. + + + + + + Checks for context socket availability. + Socket.Poll supports integer as microseconds parameter. + This limits the usable command timeout value + to 2,147 seconds: (2,147 x 1,000,000 less than max_int). + In order to bypass this limit, the availability of + the socket is checked in 2,147 seconds cycles + + true, if for context socket availability was checked, false otherwise. + Context. + Select mode. + + + + Called from constructor of derived class. + + + + + Finalizer for HashAlgorithm + + + + + Computes the entire hash of all the bytes in the byte array. + + + + + When overridden in a derived class, drives the hashing function. + + + + + + + + When overridden in a derived class, this pads and hashes whatever data might be left in the buffers and then returns the hash created. + + + + + When overridden in a derived class, initializes the object to prepare for hashing. + + + + + Used for stream chaining. Computes hash as data passes through it. + + The buffer from which to grab the data to be copied. + The offset into the input buffer to start reading at. + The number of bytes to be copied. + The buffer to write the copied data to. + At what point in the outputBuffer to write the data at. + + + + Used for stream chaining. Computes hash as data passes through it. Finishes off the hash. + + The buffer from which to grab the data to be copied. + The offset into the input buffer to start reading at. + The number of bytes to be copied. + + + + Get whether or not the hash can transform multiple blocks at a time. + Note: MUST be overriden if descendant can transform multiple block + on a single call! + + + + + Gets the previously computed hash. + + + + + Returns the size in bits of the hash. + + + + + Must be overriden if not 1 + + + + + Must be overriden if not 1 + + + + + Common base class for all derived MD5 implementations. + + + + + Called from constructor of derived class. + + + + + Creates the default derived class. + + + + + C# implementation of the MD5 cryptographic hash function. + + + + + Creates a new MD5CryptoServiceProvider. + + + + + Drives the hashing function. + + Byte array containing the data to hash. + Where in the input buffer to start. + Size in bytes of the data in the buffer to hash. + + + + This finalizes the hash. Takes the data from the chaining variables and returns it. + + + + + Resets the class after use. Called automatically after hashing is done. + + + + + This is the meat of the hash function. It is what processes each block one at a time. + + Byte array to process data from. + Where in the byte array to start processing. + + + + Pads and then processes the final block. + + Buffer to grab data from. + Position in buffer in bytes to get data from. + How much data in bytes in the buffer to use. + + + + Implements for version 3 of the protocol. + + + + + Reads a row, field by field, allowing a DataRow to be built appropriately. + + + + + Marker interface which identifies a class which may take possession of a stream for the duration of + it's lifetime (possibly temporarily giving that possession to another class for part of that time. + + It inherits from IDisposable, since any such class must make sure it leaves the stream in a valid state. + + The most important such class is that compiler-generated from ProcessBackendResponsesEnum. Of course + we can't make that inherit from this interface, alas. + + + + + Marker interface which identifies a class which represents part of + a response from the server. + + + + + Reads part of a field, as needed (for + and + + + + + Adds further functionality to stream that is dependant upon the type of data read. + + + + + Completes the implementation of Streamer for char data. + + + + + Completes the implementation of Streamer for byte data. + + + + + This class represents a BackEndKeyData message received + from PostgreSQL + + + + + This class represents the Bind message sent to PostgreSQL + server. + + + + + + This class represents the CancelRequest message sent to PostgreSQL + server. + + + + + + Represents a SQL statement or function (stored procedure) to execute + against a PostgreSQL database. This class cannot be inherited. + + + Represents a SQL statement or function (stored procedure) to execute + against a PostgreSQL database. This class cannot be inherited. + + + Represents a SQL statement or function (stored procedure) to execute + against a PostgreSQL database. This class cannot be inherited. + + + + + 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. + + + + Used to execute internal commands. + + + + + Attempts to cancel the execution of a NpgsqlCommand. + + This Method isn't implemented yet. + + + + Create a new command based on this one. + + A new NpgsqlCommand object. + + + + Create a new command based on this one. + + A new NpgsqlCommand object. + + + + Creates a new instance of an DbParameter object. + + An DbParameter object. + + + + Creates a new instance of a NpgsqlParameter object. + + A NpgsqlParameter object. + + + + Releases the resources used by the NpgsqlCommand. + + + + + Internal query shortcut for use in cases where the number + of affected rows is of no interest. + + + + + Special adaptation of ExecuteBlind() that sets statement_timeout. + This exists to prevent Connector.SetBackendCommandTimeout() from calling Command.ExecuteBlind(), + which will cause an endless recursive loop. + + + Timeout in seconds. + + + + Executes a SQL statement against the connection and returns the number of rows affected. + + The number of rows affected if known; -1 otherwise. + + + + Sends the CommandText to + the Connection and builds a + NpgsqlDataReader + using one of the CommandBehavior values. + + One of the CommandBehavior values. + A NpgsqlDataReader object. + + + + Sends the CommandText to + the Connection and builds a + NpgsqlDataReader. + + A NpgsqlDataReader object. + + + + Sends the CommandText to + the Connection and builds a + NpgsqlDataReader + using one of the CommandBehavior values. + + One of the CommandBehavior values. + A NpgsqlDataReader object. + Currently the CommandBehavior parameter is ignored. + + + + This method binds the parameters from parameters collection to the bind + message. + + + + + Executes the query, and returns the first column of the first row + in the result set returned by the query. Extra columns or rows are ignored. + + The first column of the first row in the result set, + or a null reference if the result set is empty. + + + + Creates a prepared version of the command on a PostgreSQL server. + + + + + This method checks the connection state to see if the connection + is set or it is open. If one of this conditions is not met, throws + an InvalidOperationException + + + + + This method substitutes the Parameters, if exist, in the command + to their actual values. + The parameter name format is :ParameterName. + + A version of CommandText with the Parameters inserted. + + + + Process this.commandText, trimming each distinct command and substituting paramater + tokens. + + + UTF8 encoded command ready to be sent to the backend. + + + + Append a region of a source command text to an output command, performing parameter token + substitutions. + + Stream to which to append output. + Command text. + + + false if the query has multiple statements which are not allowed + + + + 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 is 20 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. + + + + DB parameter collection. + + + + + Gets the NpgsqlParameterCollection. + + The parameters of the SQL statement or function (stored procedure). The default is an empty collection. + + + + DB transaction. + + + + + Gets or sets the NpgsqlTransaction + within which the NpgsqlCommand executes. + + The NpgsqlTransaction. + The default value is a null reference. + + + + Gets or sets how command results are applied to the DataRow + when used by the Update + method of the DbDataAdapter. + + One of the UpdateRowSource values. + + + + Returns oid of inserted row. This is only updated when using executenonQuery and when command inserts just a single row. If table is created without oids, this will always be 0. + + + + + Returns whether this query will execute as a prepared (compiled) query. + + + + + Design time visible. + + + + + This class is responsible to create database commands for automatic insert, update and delete operations. + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + The adapter. + + + + + This method is reponsible to derive the command parameter list with values obtained from function definition. + It clears the Parameters collection of command. Also, if there is any parameter type which is not supported by Npgsql, an InvalidOperationException will be thrown. + Parameters name will be parameter1, parameter2, ... + + NpgsqlCommand whose function parameters will be obtained. + + + + Gets the automatically generated object required + to perform insertions at the data source. + + + The automatically generated object required to perform insertions. + + + + + Gets the automatically generated object required to perform insertions + at the data source, optionally using columns for parameter names. + + + If true, generate parameter names matching column names, if possible. + If false, generate @p1, @p2, and so on. + + + The automatically generated object required to perform insertions. + + + + + Gets the automatically generated System.Data.Common.DbCommand object required + to perform updates at the data source. + + + The automatically generated System.Data.Common.DbCommand object required to perform updates. + + + + + Gets the automatically generated object required to perform updates + at the data source, optionally using columns for parameter names. + + + If true, generate parameter names matching column names, if possible. + If false, generate @p1, @p2, and so on. + + + The automatically generated object required to perform updates. + + + + + Gets the automatically generated System.Data.Common.DbCommand object required + to perform deletions at the data source. + + + The automatically generated System.Data.Common.DbCommand object required to perform deletions. + + + + + Gets the automatically generated object required to perform deletions + at the data source, optionally using columns for parameter names. + + + If true, generate parameter names matching column names, if possible. + If false, generate @p1, @p2, and so on. + + + The automatically generated object required to perform deletions. + + + + + Applies the parameter information. + + The parameter. + The row. + Type of the statement. + if set to true [where clause]. + + + + Returns the name of the specified parameter in the format of @p#. + + The number to be included as part of the parameter's name.. + + The name of the parameter with the specified number appended as part of the parameter name. + + + + + Returns the full parameter name, given the partial parameter name. + + The partial name of the parameter. + + The full parameter name corresponding to the partial parameter name requested. + + + + + Returns the placeholder for the parameter in the associated SQL statement. + + The number to be included as part of the parameter's name. + + The name of the parameter with the specified number appended. + + + + + Registers the to handle the event for a . + + The to be used for the update. + + + + Adds an event handler for the event. + + The sender + A instance containing information about the event. + + + + Given an unquoted identifier in the correct catalog case, returns the correct quoted form of that identifier, including properly escaping any embedded quotes in the identifier. + + The original unquoted identifier. + + The quoted version of the identifier. Embedded quotes within the identifier are properly escaped. + + + + + Unquoted identifier parameter cannot be null + + + + Given a quoted identifier, returns the correct unquoted form of that identifier, including properly un-escaping any embedded quotes in the identifier. + + The identifier that will have its embedded quotes removed. + + The unquoted identifier, with embedded quotes properly un-escaped. + + + + + Quoted identifier parameter cannot be null + + + + Gets or sets the beginning character or characters to use when specifying database objects (for example, tables or columns) whose names contain characters such as spaces or reserved tokens. + + + The beginning character or characters to use. The default is an empty string. + + + + + + + + Gets or sets the ending character or characters to use when specifying database objects (for example, tables or columns) whose names contain characters such as spaces or reserved tokens. + + + The ending character or characters to use. The default is an empty string. + + + + + + + + Represents the method that handles the Notice events. + + The source of the event. + A NpgsqlNoticeEventArgs that contains the event data. + + + + Represents the method that handles the Notification events. + + The source of the event. + A NpgsqlNotificationEventArgs that contains the event data. + + + + This class represents a connection to a + PostgreSQL server. + + + + + 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. + + + + 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. + + + + + 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. + + + + + Opens a database connection with the property settings specified by the + ConnectionString. + + + + + 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. + + + + 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. + + + + + 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. + + + + + 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. + + + + Releases all resources used by the + NpgsqlConnection. + + true when called from Dispose(); + false when being called from the finalizer. + + + + Create a new connection based on this one. + + A new NpgsqlConnection object. + + + + Create a new connection based on this one. + + A new NpgsqlConnection object. + + + + Returns a copy of the NpgsqlConnectionStringBuilder that contains the parsed connection string values. + + + + + Default SSL CertificateSelectionCallback implementation. + + + + + Default SSL CertificateValidationCallback implementation. + + + + + Default SSL PrivateKeySelectionCallback implementation. + + + + + Default SSL ProvideClientCertificatesCallback implementation. + + + + + Default SSL ValidateRemoteCertificateCallback implementation. + + + + + Write each key/value pair in the connection string to the log. + + + + + Sets the `settings` ConnectionStringBuilder based on the given `connectionString` + + The connection string to load the builder from + + + + Sets the `settings` ConnectionStringBuilder based on the given `connectionString` + + The connection string to load the builder from + + + + Refresh the cached _connectionString whenever the builder settings change + + + + + Returns the supported collections + + + + + 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. + + + + Clear connection pool. + + + + + Clear all connection pools. + + + + + Enlist transation. + + + + + + Occurs on NoticeResponses from the PostgreSQL backend. + + + + + Occurs on NotificationResponses from the PostgreSQL backend. + + + + + Called to provide client certificates for SSL handshake. + + + + + Mono.Security.Protocol.Tls.CertificateSelectionCallback delegate. + + + + + Mono.Security.Protocol.Tls.CertificateValidationCallback delegate. + + + + + Mono.Security.Protocol.Tls.PrivateKeySelectionCallback delegate. + + + + + Called to validate server's certificate during SSL handshake + + + + + 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). + + + + + Gets or sets the string used to connect to a PostgreSQL database. + Valid values are: +
    +
  • + Server: Address/Name of Postgresql Server; +
  • +
  • + Port: Port to connect to; +
  • +
  • + Protocol: Protocol version to use, instead of automatic; Integer 2 or 3; +
  • +
  • + Database: Database name. Defaults to user name if not specified; +
  • +
  • + User Id: User name; +
  • +
  • + Password: Password for clear text authentication; +
  • +
  • + SSL: True or False. Controls whether to attempt a secure connection. Default = False; +
  • +
  • + Pooling: True or False. Controls whether connection pooling is used. Default = True; +
  • +
  • + MinPoolSize: Min size of connection pool; +
  • +
  • + MaxPoolSize: Max size of connection pool; +
  • +
  • + Timeout: Time to wait for connection open in seconds. Default is 15. +
  • +
  • + CommandTimeout: Time to wait for command to finish execution before throw an exception. In seconds. Default is 20. +
  • +
  • + Sslmode: Mode for ssl connection control. Can be Prefer, Require, Allow or Disable. Default is Disable. Check user manual for explanation of values. +
  • +
  • + ConnectionLifeTime: Time to wait before closing unused connections in the pool in seconds. Default is 15. +
  • +
  • + SyncNotification: Specifies if Npgsql should use synchronous notifications. +
  • +
  • + SearchPath: Changes search path to specified and public schemas. +
  • +
+
+ 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 SSL. + + + + + 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 time to wait before closing unused connections in the pool if the count + of all connections exeeds MinPoolSize. + + + If connection pool contains unused connections for ConnectionLifeTime seconds, + the half of them will be closed. If there will be unused connections in a second + later then again the half of them will be closed and so on. + This strategy provide smooth change of connection count in the pool. + + The time (in seconds) to wait. The default value is 15 seconds. + + + + Gets 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. + + + + Whether datareaders are loaded in their entirety (for compatibility with earlier code). + + + + + Gets the database server name. + + + + + Gets flag indicating if we are using Synchronous notification or not. + The default value is false. + + + + + 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 or ConnectionState.Closed + + + + Compatibility version. + + + + + Version of the PostgreSQL backend. + This can only be called when there is an active connection. + + + + + PostgreSQL server version. + + + + + Protocol version in use. + This can only be called when there is an active connection. + Always retuna Version3 + + + + + Whether the backend is an AWS Redshift instance + + + + + 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). + + + + + Report whether the backend understands the hex byte format (>= 9.0). + + + + + The connector object connected to the backend. + + + + + Gets the NpgsqlConnectionStringBuilder containing the parsed connection string values. + + + + + User name. + + + + + Use extended types. + + + + + Password. + + + + + Determine if connection pooling will be used for this connection. + + + + + DB provider factory. + + + + + Return an exact copy of this NpgsqlConnectionString. + + + + + No integrated security if we're on mono and .NET 4.5 because of ClaimsIdentity, + see https://github.com/npgsql/Npgsql/issues/133 + + + + + This function will set value for known key, both private member and base[key]. + + + + + value, coerced as needed to the stored type. + + + + The function will modify private member only, not base[key]. + + + + value, coerced as needed to the stored type. + + + + The function will access private member only, not base[key]. + + + value. + + + + Clear the member and assign them to the default value. + + + + + Gets or sets the backend server host name. + + + + + Gets or sets the backend server port. + + + + + Gets or sets the name of the database to be used after a connection is opened. + + The name of the database to be + used after a connection is opened. + + + + Gets or sets the login user name. + + + + + Gets or sets the login password as a UTF8 encoded byte array. + + + + + Sets the login password as a string. + + + + + Gets or sets the krbsrvname. + + + + + Gets or sets a value indicating whether to attempt to use SSL. + + + + + Gets or sets a value indicating whether to attempt to use SSL. + + + + + Gets or sets the time to wait while trying to establish a connection + before terminating the attempt and generating an error. + + The time (in seconds) to wait for a connection to open. The default value is 15 seconds. + + + + Gets or sets the schema search path. + + + + + Gets or sets a value indicating whether connection pooling should be used. + + + + + Gets or sets the time to wait before closing unused connections in the pool if the count + of all connections exeeds MinPoolSize. + + + If connection pool contains unused connections for ConnectionLifeTime seconds, + the half of them will be closed. If there will be unused connections in a second + later then again the half of them will be closed and so on. + This strategy provide smooth change of connection count in the pool. + + The time (in seconds) to wait. The default value is 15 seconds. + + + + Gets or sets the minimum connection pool size. + + + + + Gets or sets the maximum connection pool size. + + + + + Gets or sets a value indicating whether to listen for notifications and report them between command activity. + + + + + Gets the time to wait while trying to execute a command + before terminating the attempt and generating an error. + + The time (in seconds) to wait for a command to complete. The default value is 20 seconds. + + + + Gets or sets a value indicating whether datareaders are loaded in their entirety (for compatibility with earlier code). + + + + + Compatibilty version. When possible, behaviour caused by breaking changes will be preserved + if this version is less than that where the breaking change was introduced. + + + + + Gets or sets the ootional application name parameter to be sent to the backend during connection initiation. + + + + + Gets or sets a value indicating whether to silently Prepare() all commands before execution. + + + + + Gets or sets the specified backend communication protocol version. + + + + + Gets the backend encoding. Always returns "UTF8". + + + + + Case insensative accessor for indivual connection string values. + + + + + Set both ImplicitDefault and ExplicitDefault to the 's default value. + + + + + + + + Set ImplicitDefault to the default value of 's type, + and ExplicitDefault to . + + + + + + + + Represents the method that allows the application to provide a certificate collection to be used for SSL clien authentication + + A X509CertificateCollection to be filled with one or more client certificates. + + + + Represents the method that is called to validate the certificate provided by the server during an SSL handshake + + The server's certificate + The certificate chain containing the certificate's CA and any intermediate authorities + Any errors that were detected + + + + !!! Helper class, for compilation only. + Connector implements the logic for the Connection Objects to + access the physical connection to the database, and isolate + the application developer from connection pooling internals. + + + + + Whether the backend is an AWS Redshift instance + + + + + Constructor. + + Connection string. + Pooled + Controls whether the connector can be shared. + + + + This method checks if the connector is still ok. + We try to send a simple query text, select 1 as ConnectionTest; + + + + + This method is responsible for releasing all resources associated with this Connector. + + + + + This method is responsible to release all portals used by this Connector. + + + + + Modify the backend statement_timeout value if needed. + + New timeout + + + + Default SSL CertificateSelectionCallback implementation. + + + + + Default SSL CertificateValidationCallback implementation. + + + + + Default SSL PrivateKeySelectionCallback implementation. + + + + + Default SSL ProvideClientCertificatesCallback implementation. + + + + + Default SSL ValidateRemoteCertificateCallback implementation. + + + + + This method is required to set all the version dependent features flags. + SupportsPrepare means the server can use prepared query plans (7.3+) + + + + + Opens the physical connection to the server. + + Usually called by the RequestConnector + Method of the connection pool manager. + + + + Closes the physical connection to the server. + + + + + Returns next portal index. + + + + + Returns next plan index. + + + + + Occurs on NoticeResponses from the PostgreSQL backend. + + + + + Occurs on NotificationResponses from the PostgreSQL backend. + + + + + Called to provide client certificates for SSL handshake. + + + + + Mono.Security.Protocol.Tls.CertificateSelectionCallback delegate. + + + + + Mono.Security.Protocol.Tls.CertificateValidationCallback delegate. + + + + + Mono.Security.Protocol.Tls.PrivateKeySelectionCallback delegate. + + + + + Called to validate server's certificate during SSL handshake + + + + + Gets the current state of the connection. + + + + + Return Connection String. + + + + + Version of backend server this connector is connected to. + + + + + Whether the backend is an AWS Redshift instance + + + + + The physical connection socket to the backend. + + + + + The physical connection stream to the backend. + + + + + The top level stream to the backend. + + + + + Reports if this connector is fully connected. + + + + + The connection mediator. + + + + + Report if the connection is in a transaction. + + + + + Options that control certain aspects of native to backend conversions that depend + on backend version and status. + + + + + This class manages all connector objects, pooled AND non-pooled. + + + + Unique static instance of the connector pool + mamager. + + + Map of index to unused pooled connectors, avaliable to the + next RequestConnector() call. + This hashmap will be indexed by connection string. + This key will hold a list of queues of pooled connectors available to be used. + + + Timer for tracking unused connections in pools. + + + + Searches the shared and pooled connector lists for a + matching connector object or creates a new one. + + The NpgsqlConnection that is requesting + the connector. Its ConnectionString will be used to search the + pool for available connectors. + A connector object. + + + + Find a pooled connector. Handle shared/non-shared here. + + + + + Releases a connector, possibly back to the pool for future use. + + + Pooled connectors will be put back into the pool if there is room. + Shared connectors should just have their use count decremented + since they always stay in the shared pool. + + Connection to which the connector is leased. + The connector to release. + + + + Release a pooled connector. Handle shared/non-shared here. + + + + + Find an available pooled connector in the non-shared pool, or create + a new one if none found. + + + + + Put a pooled connector into the pool queue. + + Connection is leased to. + Connector to pool + + + + A queue with an extra Int32 for keeping track of busy connections. + + + + + Connections available to the end user + + + + + Connections currently in use + + + + + Represents information about COPY operation data transfer format as returned by server. + + + + + Only created when a CopyInResponse or CopyOutResponse is received by NpgsqlState.ProcessBackendResponses() + + + + + Returns true if this operation is currently active and field at given location is in binary format. + + + + + Returns true if this operation is currently active and in binary format. + + + + + Returns number of fields if this operation is currently active, otherwise -1 + + + + + Represents a PostgreSQL COPY FROM STDIN operation with a corresponding SQL statement + to execute against a PostgreSQL database + and an associated stream used to read data from (if provided by user) + or for writing it (when generated by driver). + Eg. new NpgsqlCopyIn("COPY mytable FROM STDIN", connection, streamToRead).Start(); + + + + + Creates NpgsqlCommand to run given query upon Start(). Data for the requested COPY IN operation can then be written to CopyData stream followed by a call to End() or Cancel(). + + + + + Given command is run upon Start(). Data for the requested COPY IN operation can then be written to CopyData stream followed by a call to End() or Cancel(). + + + + + Given command is executed upon Start() and all data from fromStream is passed to it as copy data. + + + + + Returns true if this operation is currently active and field at given location is in binary format. + + + + + Command specified upon creation is executed as a non-query. + If CopyStream is set upon creation, it will be flushed to server as copy data, and operation will be finished immediately. + Otherwise the CopyStream member can be used for writing copy data to server and operation finished with a call to End() or Cancel(). + + + + + Called after writing all data to CopyStream to successfully complete this copy operation. + + + + + Withdraws an already started copy operation. The operation will fail with given error message. + Will do nothing if current operation is not active. + + + + + Returns true if the connection is currently reserved for this operation. + + + + + The stream provided by user or generated upon Start(). + User may provide a stream to constructor; it is used to pass to server all data read from it. + Otherwise, call to Start() sets this to a writable NpgsqlCopyInStream that passes all data written to it to server. + In latter case this is only available while the copy operation is active and null otherwise. + + + + + Returns true if this operation is currently active and in binary format. + + + + + Returns number of fields expected on each input row if this operation is currently active, otherwise -1 + + + + + The Command used to execute this copy operation. + + + + + Set before a COPY IN query to define size of internal buffer for reading from given CopyStream. + + + + + Represents an ongoing COPY FROM STDIN operation. + Provides methods to push data to server and end or cancel the operation. + + + + + Called from NpgsqlState.ProcessBackendResponses upon CopyInResponse. + If CopyStream is already set, it is used to read data to push to server, after which the copy is completed. + Otherwise CopyStream is set to a writable NpgsqlCopyInStream that calls SendCopyData each time it is written to. + + + + + Sends given packet to server as a CopyData message. + Does not check for notifications! Use another thread for that. + + + + + Sends CopyDone message to server. Handles responses, ie. may throw an exception. + + + + + Sends CopyFail message to server. Handles responses, ie. should always throw an exception: + in CopyIn state the server responds to CopyFail with an error response; + outside of a CopyIn state the server responds to CopyFail with an error response; + without network connection or whatever, there's going to eventually be a failure, timeout or user intervention. + + + + + Copy format information returned from server. + + + + + Stream for writing data to a table on a PostgreSQL version 7.4 or newer database during an active COPY FROM STDIN operation. + Passes data exactly as is and when given, so see to it that you use server encoding, correct format and reasonably sized writes! + + + + + Created only by NpgsqlCopyInState.StartCopy() + + + + + Successfully completes copying data to server. Returns after operation is finished. + Does nothing if this stream is not the active copy operation writer. + + + + + Withdraws an already started copy operation. The operation will fail with given error message. + Does nothing if this stream is not the active copy operation writer. + + + + + Writes given bytes to server. + Fails if this stream is not the active copy operation writer. + + + + + Flushes stream contents to server. + Fails if this stream is not the active copy operation writer. + + + + + Not readable + + + + + Not seekable + + + + + Not supported + + + + + True while this stream can be used to write copy data to server + + + + + False + + + + + True + + + + + False + + + + + Number of bytes written so far + + + + + Number of bytes written so far; not settable + + + + + Represents a PostgreSQL COPY TO STDOUT operation with a corresponding SQL statement + to execute against a PostgreSQL database + and an associated stream used to write results to (if provided by user) + or for reading the results (when generated by driver). + Eg. new NpgsqlCopyOut("COPY (SELECT * FROM mytable) TO STDOUT", connection, streamToWrite).Start(); + + + + + Creates NpgsqlCommand to run given query upon Start(), after which CopyStream provides data from database as requested in the query. + + + + + Given command is run upon Start(), after which CopyStream provides data from database as requested in the query. + + + + + Given command is executed upon Start() and all requested copy data is written to toStream immediately. + + + + + Returns true if this operation is currently active and field at given location is in binary format. + + + + + Command specified upon creation is executed as a non-query. + If CopyStream is set upon creation, all copy data from server will be written to it, and operation will be finished immediately. + Otherwise the CopyStream member can be used for reading copy data from server until no more data is available. + + + + + Flush generated CopyStream at once. Effectively reads and discard all the rest of copy data from server. + + + + + Returns true if the connection is currently reserved for this operation. + + + + + The stream provided by user or generated upon Start() + + + + + The Command used to execute this copy operation. + + + + + Returns true if this operation is currently active and in binary format. + + + + + Returns number of fields if this operation is currently active, otherwise -1 + + + + + Faster alternative to using the generated CopyStream. + + + + + Represents an ongoing COPY TO STDOUT operation. + Provides methods to read data from server or end the operation. + + + + + Called from NpgsqlState.ProcessBackendResponses upon CopyOutResponse. + If CopyStream is already set, it is used to write data received from server, after which the copy ends. + Otherwise CopyStream is set to a readable NpgsqlCopyOutStream that receives data from server. + + + + + Called from NpgsqlOutStream.Read to read copy data from server. + + + + + Copy format information returned from server. + + + + + Stream for reading data from a table or select on a PostgreSQL version 7.4 or newer database during an active COPY TO STDOUT operation. + Passes data exactly as provided by the server. + + + + + Created only by NpgsqlCopyOutState.StartCopy() + + + + + Discards copy data as long as server pushes it. Returns after operation is finished. + Does nothing if this stream is not the active copy operation reader. + + + + + Not writable. + + + + + Not flushable. + + + + + Copies data read from server to given byte buffer. + Since server returns data row by row, length will differ each time, but it is only zero once the operation ends. + Can be mixed with calls to the more efficient NpgsqlCopyOutStream.Read() : byte[] though that would not make much sense. + + + + + Not seekable + + + + + Not supported + + + + + Returns a whole row of data from server without extra work. + If standard Stream.Read(...) has been called before, it's internal buffers remains are returned. + + + + + True while this stream can be used to read copy data from server + + + + + True + + + + + False + + + + + False + + + + + Number of bytes read so far + + + + + Number of bytes read so far; can not be set. + + + + + Writes given objects into a stream for PostgreSQL COPY in default copy format (not CSV or BINARY). + + + + + Default delimiter. + + + + + Default separator. + + + + + Default null. + + + + + Default escape. + + + + + Default quote. + + + + + Default buffer size. + + + + + Constructor. + + + + + + Flush buffers. + + + + + Flush rows. + + + + + Flush fields. + + + + + Close the serializer. + + + + + Escape sequence for the given character. + + + + + + + Make room for bytes. + + + + + + Add bytes. + + + + + + End row. + + + + + Prefix field. + + + + + Field added. + + + + + Add null. + + + + + Add string. + + + + + + add Int32. + + + + + + Add Int64. + + + + + + Add number. + + + + + + Add bool + + + + + + Add DateTime. + + + + + + Report whether the serializer is active. + + + + + To Stream. + + + + + Delimiter. + + + + + Separator. + + + + + Escape. + + + + + Null. + + + + + Buffer size. + + + + + Report whether space remains in the buffer. + + + + + Strings to escape. + + + + + Escape sequence bytes. + + + + + 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. + + + + + Default constructor. + + + + + Constructor. + + + + + + Constructor. + + + + + + + Constructor. + + + + + + + Create row updated event. + + + + + + + + + + Create row updating event. + + + + + + + + + + Raise the RowUpdated event. + + + + + + Raise the RowUpdating event. + + + + + + Row updated event. + + + + + Row updating event. + + + + + Delete command. + + + + + Select command. + + + + + Update command. + + + + + Insert command. + + + + + Provides a means of reading a forward-only stream of rows from a PostgreSQL backend. This class cannot be inherited. + + + + + Return the data type name of the column at index . + + + + + Return the data type of the column at index . + + + + + Return the Npgsql specific data type of the column at requested ordinal. + + column position + Appropriate Npgsql type for column. + + + + Return the column name of the column at index . + + + + + Return the data type OID of the column at index . + + FIXME: Why this method returns String? + + + + Has ordinal. + + + + + + + Return the column name of the column named . + + + + + Return the data DbType of the column at index . + + + + + Return the data NpgsqlDbType of the column at index . + + + + + Get specified field value. + /// + + + + + + Get the value of a column as a . + If the differences between and + in handling of days and months is not important to your application, use + instead. + + Index of the field to find. + value of the field. + + + + Get specified field value. + /// + + + + + + Get specified field value. + /// + + + + + + Get specified field value. + /// + + + + + + Get specified field value. + /// + + + + + + Get specified field value. + /// + + + + + + Send closed event. + + + + + Gets the value of a column converted to a Guid. + + + + + Gets the value of a column as Int16. + + + + + Gets the value of a column as Int32. + + + + + Gets the value of a column as Int64. + + + + + Gets the value of a column as Single. + + + + + Gets the value of a column as Double. + + + + + Gets the value of a column as String. + + + + + Gets the value of a column as Decimal. + + + + + Gets the value of a column as TimeSpan. + + + + + Copy values from each column in the current row into . + + Destination for column values. + The number of column values copied. + + + + Copy values from each column in the current row into . + + An array appropriately sized to store values from all columns. + The number of column values copied. + + + + Gets the value of a column as Boolean. + + + + + Gets the value of a column as Byte. + + + + + Gets the value of a column as Char. + + + + + Gets the value of a column as DateTime. + + + + + Returns a System.Data.DataTable that describes the column metadata of the DataReader. + + + + + This methods parses the command text and tries to get the tablename + from it. + + + + + Get enumerator. + + + + + + Is raised whenever Close() is called. + + + + + Gets the number of columns in the current row. + + + + + Gets the value of a column in its native format. + + + + + Gets the value of a column in its native format. + + + + + 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. + + + + + Contains the column names as the keys + + + + + Contains all unique columns + + + + + This is the primary implementation of NpgsqlDataReader. It is the one used in normal cases (where the + preload-reader option is not set in the connection string to resolve some potential backwards-compatibility + issues), the only implementation used internally, and in cases where CachingDataReader is used, it is still + used to do the actual "leg-work" of turning a response stream from the server into a datareader-style + object - with CachingDataReader then filling it's cache from here. + + + + + Iterate through the objects returned through from the server. + If it's a CompletedResponse the rowsaffected count is updated appropriately, + and we iterate again, otherwise we return it (perhaps updating our cache of pending + rows if appropriate). + + The next we will deal with. + + + + Advances the data reader to the next result, when multiple result sets were returned by the PostgreSQL backend. + + True if the reader was advanced, otherwise false. + + + + Releases the resources used by the NpgsqlCommand. + + + + + Closes the data reader object. + + + + + Advances the data reader to the next result, when multiple result sets were returned by the PostgreSQL backend. + + True if the reader was advanced, otherwise false. + + + + Advances the data reader to the next row. + + True if the reader was advanced, otherwise false. + + + + Return the value of the column at index . + + + + + Gets raw data from a column. + + + + + Gets raw data from a column. + + + + + Report whether the value in a column is DBNull. + + + + + Gets the number of rows changed, inserted, or deleted by execution of the SQL statement. + + + + + Indicates if NpgsqlDatareader has rows to be read. + + + + + Provides an implementation of NpgsqlDataReader in which all data is pre-loaded into memory. + This operates by first creating a ForwardsOnlyDataReader as usual, and then loading all of it's + Rows into memory. There is a general principle that when there is a trade-off between a class design that + is more efficient and/or scalable on the one hand and one that is less efficient but has more functionality + (in this case the internal-only functionality of caching results) that one can build the less efficent class + from the most efficient without significant extra loss in efficiency, but not the other way around. The relationship + between ForwardsOnlyDataReader and CachingDataReader is an example of this). + Since the interface presented to the user is still forwards-only, queues are used to + store this information, so that dequeueing as we go we give the garbage collector the best opportunity + possible to reclaim any memory that is no longer in use. + ForwardsOnlyDataReader being used to actually + obtain the information from the server means that the "leg-work" is still only done (and need only be + maintained) in one place. + This class exists to allow for certain potential backwards-compatibility issues to be resolved + with little effort on the part of affected users. It is considerably less efficient than ForwardsOnlyDataReader + and hence never used internally. + + + + + This is the base class for NpgsqlDescribeStatement and NpgsqlDescribePortal. + + + + + + This class represents the Statement Describe message sent to PostgreSQL + server. + + + + + + This class represents the Portal Describe message sent to PostgreSQL + server. + + + + + + EventArgs class to send Notice parameters, which are just NpgsqlError's in a lighter context. + + + + + Notice information. + + + + + This class represents the ErrorResponse and NoticeResponse + message sent from PostgreSQL server. + + + + + Return a string representation of this error object. + + + + + Severity code. All versions. + + + + + Error code. PostgreSQL 7.4 and up. + + + + + Terse error message. All versions. + + + + + Detailed error message. PostgreSQL 7.4 and up. + + + + + Suggestion to help resolve the error. PostgreSQL 7.4 and up. + + + + + Position (one based) within the query string where the error was encounterd. PostgreSQL 7.4 and up. + + + + + Position (one based) within the query string where the error was encounterd. This position refers to an internal command executed for example inside a PL/pgSQL function. PostgreSQL 7.4 and up. + + + + + Internal query string where the error was encounterd. This position refers to an internal command executed for example inside a PL/pgSQL function. PostgreSQL 7.4 and up. + + + + + Trace back information. PostgreSQL 7.4 and up. + + + + + Source file (in backend) reporting the error. PostgreSQL 7.4 and up. + + + + + Source file line number (in backend) reporting the error. PostgreSQL 7.4 and up. + + + + + Source routine (in backend) reporting the error. PostgreSQL 7.4 and up. + + + + + Schema name which relates to the error. PostgreSQL 9.3 and up. + + + + + Table name which relates to the error. PostgreSQL 9.3 and up. + + + + + Column name which relates to the error. PostgreSQL 9.3 and up. + + + + + Data type of column which relates to the error. PostgreSQL 9.3 and up. + + + + + Constraint name which relates to the error. PostgreSQL 9.3 and up. + + + + + String containing the sql sent which produced this error. + + + + + Backend protocol version in use. + + + + + Error and notice message field codes + + + + + Severity: the field contents are ERROR, FATAL, or PANIC (in an error message), + or WARNING, NOTICE, DEBUG, INFO, or LOG (in a notice message), or a localized + translation of one of these. Always present. + + + + + Code: the SQLSTATE code for the error (see Appendix A). Not localizable. Always present. + + + + + Message: the primary human-readable error message. This should be accurate + but terse (typically one line). Always present. + + + + + Detail: an optional secondary error message carrying more detail about the problem. + Might run to multiple lines. + + + + + Hint: an optional suggestion what to do about the problem. This is intended to differ + from Detail in that it offers advice (potentially inappropriate) rather than hard facts. + Might run to multiple lines. + + + + + Position: the field value is a decimal ASCII integer, indicating an error cursor + position as an index into the original query string. The first character has index 1, + and positions are measured in characters not bytes. + + + + + Internal position: this is defined the same as the P field, but it is used when the + cursor position refers to an internally generated command rather than the one submitted + by the client. + The q field will always appear when this field appears. + + + + + Internal query: the text of a failed internally-generated command. + This could be, for example, a SQL query issued by a PL/pgSQL function. + + + + + Where: an indication of the context in which the error occurred. + Presently this includes a call stack traceback of active procedural language functions + and internally-generated queries. The trace is one entry per line, most recent first. + + + + + Schema name: if the error was associated with a specific database object, + the name of the schema containing that object, if any. + + + + + Table name: if the error was associated with a specific table, the name of the table. + (Refer to the schema name field for the name of the table's schema.) + + + + + Column name: if the error was associated with a specific table column, the name of the column. + (Refer to the schema and table name fields to identify the table.) + + + + + Data type name: if the error was associated with a specific data type, the name of the data type. + (Refer to the schema name field for the name of the data type's schema.) + + + + + Constraint name: if the error was associated with a specific constraint, the name of the constraint. + Refer to fields listed above for the associated table or domain. + (For this purpose, indexes are treated as constraints, even if they weren't created with constraint syntax.) + + + + + File: the file name of the source-code location where the error was reported. + + + + + Line: the line number of the source-code location where the error was reported. + + + + + Routine: the name of the source-code routine reporting the error. + + + + + The level of verbosity of the NpgsqlEventLog + + + + + Don't log at all + + + + + Only log the most common issues + + + + + Log everything + + + + + This class handles all the Npgsql event and debug logging + + + + + Writes a string to the Npgsql event log if msglevel is bigger then NpgsqlEventLog.Level + + + This method is obsolete and should no longer be used. + It is likely to be removed in future versions of Npgsql + + The message to write to the event log + The minimum LogLevel for which this message should be logged. + + + + Writes a string to the Npgsql event log if msglevel is bigger then NpgsqlEventLog.Level + + The ResourceManager to get the localized resources + The name of the resource that should be fetched by the ResourceManager + The minimum LogLevel for which this message should be logged. + The additional parameters that shall be included into the log-message (must be compatible with the string in the resource): + + + + Writes the default log-message for the action of calling the Get-part of an Indexer to the log file. + + The minimum LogLevel for which this message should be logged. + The name of the class that contains the Indexer + The parameter given to the Indexer + + + + Writes the default log-message for the action of calling the Set-part of an Indexer to the logfile. + + The minimum LogLevel for which this message should be logged. + The name of the class that contains the Indexer + The parameter given to the Indexer + The value the Indexer is set to + + + + Writes the default log-message for the action of calling the Get-part of a Property to the logfile. + + The minimum LogLevel for which this message should be logged. + The name of the class that contains the Property + The name of the Property + + + + Writes the default log-message for the action of calling the Set-part of a Property to the logfile. + + The minimum LogLevel for which this message should be logged. + The name of the class that contains the Property + The name of the Property + The value the Property is set to + + + + Writes the default log-message for the action of calling a Method without Arguments to the logfile. + + The minimum LogLevel for which this message should be logged. + The name of the class that contains the Method + The name of the Method + + + + Writes the default log-message for the action of calling a Method with one Argument to the logfile. + + The minimum LogLevel for which this message should be logged. + The name of the class that contains the Method + The name of the Method + The value of the Argument of the Method + + + + Writes the default log-message for the action of calling a Method with two Arguments to the logfile. + + The minimum LogLevel for which this message should be logged. + The name of the class that contains the Method + The name of the Method + The value of the first Argument of the Method + The value of the second Argument of the Method + + + + Writes the default log-message for the action of calling a Method with three Arguments to the logfile. + + The minimum LogLevel for which this message should be logged. + The name of the class that contains the Method + The name of the Method + The value of the first Argument of the Method + The value of the second Argument of the Method + The value of the third Argument of the Method + + + + Writes the default log-message for the action of calling a Method with more than three Arguments to the logfile. + + The minimum LogLevel for which this message should be logged. + The name of the class that contains the Method + The name of the Method + A Object-Array with zero or more Ojects that are Arguments of the Method. + + + + Sets/Returns the filename to use for logging. + + The filename of the current Log file. + + + + Sets/Returns whether Log messages should be echoed to the console + + true if Log messages are echoed to the console, otherwise false + + + + The exception that is thrown when the PostgreSQL backend reports errors. + + + + + Construct a backend error exception based on a list of one or more + backend errors. The basic Exception.Message will be built from the + first (usually the only) error in the list. + + + + + Get object data. + + + + + + + Format a .NET style exception string. + Include all errors in the list, including any hints. + + + + + Append a line to the given Stream, first checking for zero-length. + + + + + Provide access to the entire list of errors provided by the PostgreSQL backend. + + + + + Severity code. All versions. + + + + + Error code. PostgreSQL 7.4 and up. + + + + + Basic error message. All versions. + + + + + Detailed error message. PostgreSQL 7.4 and up. + + + + + Suggestion to help resolve the error. PostgreSQL 7.4 and up. + + + + + Position (one based) within the query string where the error was encounterd. PostgreSQL 7.4 and up. + + + + + Trace back information. PostgreSQL 7.4 and up. + + + + + Source file (in backend) reporting the error. PostgreSQL 7.4 and up. + + + + + Source file line number (in backend) reporting the error. PostgreSQL 7.4 and up. + + + + + Source routine (in backend) reporting the error. PostgreSQL 7.4 and up. + + + + + Schema name which relates to the error. PostgreSQL 9.3 and up. + + + + + Table name which relates to the error. PostgreSQL 9.3 and up. + + + + + Column name which relates to the error. PostgreSQL 9.3 and up. + + + + + Data type of column which relates to the error. PostgreSQL 9.3 and up. + + + + + Constraint name which relates to the error. PostgreSQL 9.3 and up. + + + + + String containing the sql sent which produced this error. + + + + + Returns the entire list of errors provided by the PostgreSQL backend. + + + + + This class represents the Execute message sent to PostgreSQL + server. + + + + + + A factory to create instances of various Npgsql objects. + + + + + Creates an NpgsqlCommand object. + + + + + This class represents the Flush message sent to PostgreSQL + server. + + + + + + For classes representing simple messages, + consisting only of a message code and length identifier, + sent from the client to the server. + + + + + This class is responsible for serving as bridge between the backend + protocol handling and the core classes. It is used as the mediator for + exchanging data generated/sent from/to backend. + + + + + + The current command timeout on the backend. This is set via "SET statement_timeout = (milliseconds)". + A value of -1 means the backend's timeout value is unknown because it has not yet been set. + + + + + EventArgs class to send Notification parameters. + + + + + Process ID of the PostgreSQL backend that sent this notification. + + + + + Condition that triggered that notification. + + + + + Additional Information From Notifiying Process (for future use, currently postgres always sets this to an empty string) + + + + + This class represents a parameter to a command that will be sent to server + + + + + Initializes a new instance of the NpgsqlParameter class. + + + + + Initializes a new instance of the NpgsqlParameter + class with the parameter m_Name and a value of the new NpgsqlParameter. + + The m_Name of the parameter to map. + An Object that is the value of the NpgsqlParameter. + +

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

+

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

+
+
+ + + Initializes a new instance of the NpgsqlParameter + class with the parameter m_Name and the data type. + + The m_Name of the parameter to map. + One of the DbType values. + + + + Initializes a new instance of the NpgsqlParameter. + + The m_Name of the parameter to map. + One of the DbType values. + + + + Initializes a new instance of the NpgsqlParameter. + + The m_Name of the parameter to map. + One of the NpgsqlDbType values. + The length of the parameter. + + + + Initializes a new instance of the NpgsqlParameter. + + The m_Name of the parameter to map. + One of the DbType values. + The length of the parameter. + + + + Initializes a new instance of the NpgsqlParameter + + The m_Name of the parameter to map. + One of the NpgsqlDbType values. + The length of the parameter. + The m_Name of the source column. + + + + Initializes a new instance of the NpgsqlParameter. + + The m_Name of the parameter to map. + One of the DbType values. + The length of the parameter. + The m_Name of the source column. + + + + Initializes a new instance of the NpgsqlParameter. + + The m_Name of the parameter to map. + One of the NpgsqlDbType values. + The length of the parameter. + The m_Name of the source column. + One of the ParameterDirection values. + true if the value of the field can be null, otherwise false. + The total number of digits to the left and right of the decimal point to which + Value is resolved. + The total number of decimal places to which + Value is resolved. + One of the DataRowVersion values. + An Object that is the value + of the NpgsqlParameter. + + + + Initializes a new instance of the NpgsqlParameter. + + The m_Name of the parameter to map. + One of the DbType values. + The length of the parameter. + The m_Name of the source column. + One of the ParameterDirection values. + true if the value of the field can be null, otherwise false. + The total number of digits to the left and right of the decimal point to which + Value is resolved. + The total number of decimal places to which + Value is resolved. + One of the DataRowVersion values. + An Object that is the value + of the NpgsqlParameter. + + + + Reset DBType. + + + + + Creates a new NpgsqlParameter that + is a copy of the current instance. + + A new NpgsqlParameter that is a copy of this instance. + + + + The collection to which this parameter belongs, if any. + + + + + Gets or sets the maximum number of digits used to represent the + 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. + + + + Whether to use an explicit cast when included in a query. + + + + + 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 String. + + + + Gets or sets the DbType of the parameter. + + One of the DbType values. The default is String. + + + + Gets or sets a value indicating whether the parameter is input-only, + output-only, bidirectional, or a stored procedure return value parameter. + + One of the ParameterDirection + values. The default is Input. + + + + Gets or sets a value indicating whether the parameter accepts null values. + + true if null values are accepted; otherwise, false. The default is false. + + + + Gets or sets the m_Name of the NpgsqlParameter. + + The m_Name of the NpgsqlParameter. + The default is an empty string. + + + + The m_Name scrubbed of any optional marker + + + + + Gets or sets the m_Name of the source column that is mapped to the + DataSet and used for loading or + returning the Value. + + The m_Name of the source column that is mapped to the + DataSet. The default is an empty string. + + + + Gets or sets the DataRowVersion + to use when loading Value. + + One of the DataRowVersion values. + The default is Current. + + + + 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. + + + + Source column mapping. + + + + + 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. + + + + + Adds the specified NpgsqlParameter object to the NpgsqlParameterCollection. + + The NpgsqlParameter to add to the collection. + The index of the new NpgsqlParameter object. + + + + Obsolete. Use AddWithValue instead. + + + Use caution when using this overload of the + Add method to specify integer parameter values. + Because this overload takes a value of type Object, + you must convert the integral value to an Object + type when the value is zero, as the following C# example demonstrates. + parameters.Add(":pname", Convert.ToInt32(0)); + If you do not perform this conversion, the compiler will assume you + are attempting to call the NpgsqlParameterCollection.Add(string, DbType) overload. + + + + + Adds a NpgsqlParameter to the NpgsqlParameterCollection given the specified parameter name and value. + + The name of the NpgsqlParameter. + The Value of the NpgsqlParameter to add to the collection. + The paramater that was added. + + + + Adds a NpgsqlParameter to the NpgsqlParameterCollection given the specified parameter name and value. + + The name of the NpgsqlParameter. + The Value of the NpgsqlParameter to add to the collection. + One of the NpgsqlDbType values. + The paramater that was added. + + + + Adds a NpgsqlParameter to the NpgsqlParameterCollection given the specified parameter name and value. + + The name of the NpgsqlParameter. + The Value of the NpgsqlParameter to add to the collection. + One of the NpgsqlDbType values. + The length of the column. + The paramater that was added. + + + + Adds a NpgsqlParameter to the NpgsqlParameterCollection given the specified parameter name and value. + + The name of the NpgsqlParameter. + The Value of the NpgsqlParameter to add to the collection. + One of the NpgsqlDbType values. + The length of the column. + The name of the source column. + The paramater that was added. + + + + Adds a NpgsqlParameter to the NpgsqlParameterCollection given the parameter name and the data type. + + 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. + + + + 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. + + + + 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. + + + + + + + In methods taking an object as argument this method is used to verify + that the argument has the type NpgsqlParameter + + The object to verify + + + + 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[] + + + + 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. + + + + Report whether the collection is read only. Always false. + + + + + 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. + + + + Sync root. + + + + + This class represents the ParameterStatus message sent from PostgreSQL + server. + + + + + + This class represents the Parse message sent to PostgreSQL + server. + + + + + + This class represents a PasswordPacket message sent to backend + PostgreSQL. + + + + + Used when a connection is closed + + + + + This is the abstract base class for NpgsqlAsciiRow and NpgsqlBinaryRow. + + + + + The index of the current field in the stream, i.e. the one that hasn't + been read yet + + + + + This class represents a RowDescription message sent from + the PostgreSQL. + + + + + + This struct represents the internal data of the RowDescription message. + + + + + 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. + + + + This class represents a StartupPacket message of PostgreSQL + protocol. + + + + + + Represents a completed response message. + + + + + This class represents the Sync message sent to PostgreSQL + server. + + + + + + Represents a transaction to be made in a PostgreSQL database. This class cannot be inherited. + + + + + Dispose. + + + + + + Commits the database transaction. + + + + + Rolls back a transaction from a pending state. + + + + + Rolls back a transaction from a pending savepoint state. + + + + + Creates a transaction save point. + + + + + Cancel the transaction without telling the backend about it. This is + used to make the transaction go away when closing a connection. + + + + + Gets the NpgsqlConnection + object associated with the transaction, or a null reference if the + transaction is no longer valid. + + The NpgsqlConnection + object associated with the transaction. + + + + DB connection. + + + + + Specifies the IsolationLevel for this transaction. + + The IsolationLevel for this transaction. + The default is ReadCommitted. + + + + This class provides many util methods to handle + reading and writing of PostgreSQL protocol messages. + + + + + This method takes a ProtocolVersion and returns an integer + version number that the Postgres backend will recognize in a + startup packet. + + + + + This method takes a version string as returned by SELECT VERSION() and returns + a valid version string ("7.2.2" for example). + This is only needed when running protocol version 2. + This does not do any validity checks. + + + + + This method gets a C NULL terminated string from the network stream. + It keeps reading a byte in each time until a NULL byte is returned. + It returns the resultant string of bytes read. + This string is sent from backend. + + + + + Reads requested number of bytes from stream with retries until Stream.Read returns 0 or count is reached. + + Stream to read + byte buffer to fill + starting position to fill the buffer + number of bytes to read + The number of bytes read. May be less than count if no more bytes are available. + + + + Reads requested number of bytes from . If output matches exactly, and == false, is returned directly. + + Source array. + Starting position to read from + Number of bytes to read + Force a copy, even if the output is an exact copy of . + byte[] containing data requested. + + + + This method writes a string to the network stream. + + + + + This method writes a string to the network stream. + + + + + This method writes a C NULL terminated string to the network stream. + It appends a NULL terminator to the end of the String. + + + + + This method writes a C NULL terminated string to the network stream. + It appends a NULL terminator to the end of the String. + + + + + This method writes a byte to the stream. It also enables logging of them. + + + + + This method writes a byte to the stream. It also enables logging of them. + + + + + This method writes a set of bytes to the stream. It also enables logging of them. + + + + + This method writes a set of bytes to the stream. It also enables logging of them. + + + + + This method writes a C NULL terminated string limited in length to the + backend server. + It pads the string with null bytes to the size specified. + + + + + This method writes a C NULL terminated byte[] limited in length to the + backend server. + It pads the string with null bytes to the size specified. + + + + + Write a 32-bit integer to the given stream in the correct byte order. + + + + + Read a 32-bit integer from the given stream in the correct byte order. + + + + + Read a 32-bit integer from the given array in the correct byte order. + + + + + Write a 16-bit integer to the given stream in the correct byte order. + + + + + Read a 16-bit integer from the given stream in the correct byte order. + + + + + Read a 16-bit integer from the given array in the correct byte order. + + + + + Copy and possibly reverse a byte array, depending on host architecture endienness. + + Source byte array. + Force a copy even if no swap is performed. + , reversed if on a little-endian architecture, copied if required. + + + + Copy and possibly reverse a byte array, depending on host architecture endienness. + + Source byte array. + Starting offset in source array. + Number of bytes to copy. + Force a copy even if no swap is performed. + , reversed if on a little-endian architecture, copied if required. + + + + Represent the frontend/backend protocol version. + + + + + Represent the backend server version. + As this class offers no functionality beyond that offered by it has been + deprecated in favour of that class. + + + + + + Returns the string representation of this version in three place dot notation (Major.Minor.Patch). + + + + + Server version major number. + + + + + Server version minor number. + + + + + Server version patch level number. + + + + + A class to handle everything associated with SSPI authentication + + + + + Simplified SecBufferDesc struct with only one SecBuffer + + +
+
diff --git a/src/Frapid.Web/Areas/Frapid.Account/packages/Npgsql.2.2.6/lib/net40/de/Npgsql.resources.dll b/src/Frapid.Web/Areas/Frapid.Account/packages/Npgsql.2.2.6/lib/net40/de/Npgsql.resources.dll new file mode 100644 index 00000000..c6dd4e05 Binary files /dev/null and b/src/Frapid.Web/Areas/Frapid.Account/packages/Npgsql.2.2.6/lib/net40/de/Npgsql.resources.dll differ diff --git a/src/Frapid.Web/Areas/Frapid.Account/packages/Npgsql.2.2.6/lib/net40/es/Npgsql.resources.dll b/src/Frapid.Web/Areas/Frapid.Account/packages/Npgsql.2.2.6/lib/net40/es/Npgsql.resources.dll new file mode 100644 index 00000000..2bc2df41 Binary files /dev/null and b/src/Frapid.Web/Areas/Frapid.Account/packages/Npgsql.2.2.6/lib/net40/es/Npgsql.resources.dll differ diff --git a/src/Frapid.Web/Areas/Frapid.Account/packages/Npgsql.2.2.6/lib/net40/fi/Npgsql.resources.dll b/src/Frapid.Web/Areas/Frapid.Account/packages/Npgsql.2.2.6/lib/net40/fi/Npgsql.resources.dll new file mode 100644 index 00000000..7451bcf4 Binary files /dev/null and b/src/Frapid.Web/Areas/Frapid.Account/packages/Npgsql.2.2.6/lib/net40/fi/Npgsql.resources.dll differ diff --git a/src/Frapid.Web/Areas/Frapid.Account/packages/Npgsql.2.2.6/lib/net40/fr/Npgsql.resources.dll b/src/Frapid.Web/Areas/Frapid.Account/packages/Npgsql.2.2.6/lib/net40/fr/Npgsql.resources.dll new file mode 100644 index 00000000..dde4d72e Binary files /dev/null and b/src/Frapid.Web/Areas/Frapid.Account/packages/Npgsql.2.2.6/lib/net40/fr/Npgsql.resources.dll differ diff --git a/src/Frapid.Web/Areas/Frapid.Account/packages/Npgsql.2.2.6/lib/net40/ja/Npgsql.resources.dll b/src/Frapid.Web/Areas/Frapid.Account/packages/Npgsql.2.2.6/lib/net40/ja/Npgsql.resources.dll new file mode 100644 index 00000000..8a3385b7 Binary files /dev/null and b/src/Frapid.Web/Areas/Frapid.Account/packages/Npgsql.2.2.6/lib/net40/ja/Npgsql.resources.dll differ diff --git a/src/Frapid.Web/Areas/Frapid.Account/packages/Npgsql.2.2.6/lib/net40/zh-CN/Npgsql.resources.dll b/src/Frapid.Web/Areas/Frapid.Account/packages/Npgsql.2.2.6/lib/net40/zh-CN/Npgsql.resources.dll new file mode 100644 index 00000000..82a6bd23 Binary files /dev/null and b/src/Frapid.Web/Areas/Frapid.Account/packages/Npgsql.2.2.6/lib/net40/zh-CN/Npgsql.resources.dll differ diff --git a/src/Frapid.Web/Areas/Frapid.Account/packages/Npgsql.2.2.6/lib/net45/Mono.Security.dll b/src/Frapid.Web/Areas/Frapid.Account/packages/Npgsql.2.2.6/lib/net45/Mono.Security.dll new file mode 100644 index 00000000..62ae3394 Binary files /dev/null and b/src/Frapid.Web/Areas/Frapid.Account/packages/Npgsql.2.2.6/lib/net45/Mono.Security.dll differ diff --git a/src/Frapid.Web/Areas/Frapid.Account/packages/Npgsql.2.2.6/lib/net45/Npgsql.dll b/src/Frapid.Web/Areas/Frapid.Account/packages/Npgsql.2.2.6/lib/net45/Npgsql.dll new file mode 100644 index 00000000..87fc0adb Binary files /dev/null and b/src/Frapid.Web/Areas/Frapid.Account/packages/Npgsql.2.2.6/lib/net45/Npgsql.dll differ diff --git a/src/Frapid.Web/Areas/Frapid.Account/packages/Npgsql.2.2.6/lib/net45/Npgsql.xml b/src/Frapid.Web/Areas/Frapid.Account/packages/Npgsql.2.2.6/lib/net45/Npgsql.xml new file mode 100644 index 00000000..44c2c149 --- /dev/null +++ b/src/Frapid.Web/Areas/Frapid.Account/packages/Npgsql.2.2.6/lib/net45/Npgsql.xml @@ -0,0 +1,6536 @@ + + + + Npgsql + + + + + Handles serialisation of .NET array or IEnumeration to pg format. + Arrays of arrays, enumerations of enumerations, arrays of enumerations etc. + are treated as multi-dimensional arrays (in much the same manner as an array of arrays + is used to emulate multi-dimensional arrays in languages that lack native support for them). + If such an enumeration of enumerations is "jagged" (as opposed to rectangular, cuboid, + hypercuboid, hyperhypercuboid, etc) then this class will "correctly" serialise it, but pg + will raise an error as it doesn't allow jagged arrays. + + + + + Create an ArrayNativeToBackendTypeConverter with the element converter passed + + The that would be used to serialise the element type. + + + + Serialise the enumeration or array. + + + + + Convert a System.Array to PG binary format. + Write the array header and prepare to write array data to the stream. + + + + + Append all array data to the binary stream. + + + + + Handles parsing of pg arrays into .NET arrays. + + + + + Takes a string representation of a pg 1-dimensional array + (or a 1-dimensional row within an n-dimensional array) + and allows enumeration of the string represenations of each items. + + + + + Takes a string representation of a pg n-dimensional array + and allows enumeration of the string represenations of the next + lower level of rows (which in turn can be taken as (n-1)-dimensional arrays. + + + + + Takes an ArrayList which may be an ArrayList of ArrayLists, an ArrayList of ArrayLists of ArrayLists + and so on and enumerates the items that aren't ArrayLists (the leaf nodes if we think of the ArrayList + passed as a tree). Simply uses the ArrayLists' own IEnumerators to get that of the next, + pushing them onto a stack until we hit something that isn't an ArrayList. + ArrayList to enumerate + IEnumerable + + + + + Create a new ArrayBackendToNativeTypeConverter + + for the element type. + + + + Creates an array from pg text representation. + + + + + Creates an array list from pg represenation of an array. + Multidimensional arrays are treated as ArrayLists of ArrayLists + + + + + Creates an n-dimensional array from an ArrayList of ArrayLists or + a 1-dimensional array from something else. + + to convert + Type of the elements in the list + produced. + + + + Creates an n-dimensional System.Array from PG binary representation. + This function reads the array header and sets up an n-dimensional System.Array object to hold its data. + PopulateArrayFromBinaryArray() is then called to carry out array population. + + + + + Recursively populates an array from PB binary data representation. + + + + + Takes an array of ints and treats them like the limits of a set of counters. + Retains a matching set of ints that is set to all zeros on the first ++ + On a ++ it increments the "right-most" int. If that int reaches it's + limit it is set to zero and the one before it is incremented, and so on. + + Making this a more general purpose class is pretty straight-forward, but we'll just put what we need here. + + + + + Implements a bit string; a collection of zero or more bits which can each be 1 or 0. + BitString's behave as a list of bools, though like most strings and unlike most collections the position + tends to be of as much significance as the value. + BitStrings are often used as masks, and are commonly cast to and from other values. + + + + + Represents the empty string. + + + + + Create a BitString from an enumeration of boolean values. The BitString will contain + those booleans in the order they came in. + + The boolean values. + + + + Creates a BitString filled with a given number of true or false values. + + The value to fill the string with. + The number of bits to fill. + + + + Creats a bitstring from a string. + The string to copy from. + + + + + + Creates a single-bit element from a boolean value. + + The bool value which determines whether + the bit is 1 or 0. + + + + Creates a bitstring from an unsigned integer value. The string will be the shortest required to + contain the integer (e.g. 1 bit for 0 or 1, 2 for 2 or 3, 3 for 4-7, and so on). + + The integer. + This method is not CLS Compliant, and may not be available to some languages. + + + + Creates a bitstring from an integer value. The string will be the shortest required to + contain the integer (e.g. 1 bit for 0 or 1, 2 for 2 or 3, 3 for 4-7, and so on). + + The integer. + + + + Finds the first instance of a given value + + The value - whether true or false - to search for. + The index of the value found, or -1 if none are present. + + + + True if there is at least one bit with the value looked for. + + The value - true or false - to detect. + True if at least one bit was the same as item, false otherwise. + + + + Copies the bitstring to an array of bools. + + The boolean array to copy to. + The index in the array to start copying from. + + + + Returns an enumerator that enumerates through the string. + + The enumerator. + + + + Creats a bitstring by concatenating another onto this one. + + The string to append to this one. + The combined strings. + + + + Returns a substring of this string. + + The position to start from, must be between 0 and the length of the string. + The length of the string to return, must be greater than zero, and may not be + so large that the start + length exceeds the bounds of this instance. + The Bitstring identified + + + + Returns a substring of this string. + + The position to start from, must be between 0 and the length of the string, + the rest of the string is returned. + The Bitstring identified + + + + A logical and between this string and another. The two strings must be the same length. + + Another BitString to AND with this one. + A bitstring with 1 where both BitStrings had 1 and 0 otherwise. + + + + A logical or between this string and another. The two strings must be the same length. + + Another BitString to OR with this one. + A bitstring with 1 where either BitString had 1 and 0 otherwise. + + + + A logical xor between this string and another. The two strings must be the same length. + + Another BitString to XOR with this one. + A bitstring with 1 where one BitStrings and the other had 0, + and 0 where they both had 1 or both had 0. + + + + A bitstring that is the logical inverse of this one. + + A bitstring of the same length as this with 1 where this has 0 and vice-versa. + + + + Shifts the string operand bits to the left, filling with zeros to produce a + string of the same length. + + The number of bits to shift to the left. + A left-shifted bitstring. + The behaviour of LShift is closer to what one would expect from dealing + with PostgreSQL bit-strings than in using the same operations on integers in .NET + In particular, negative operands result in a right-shift, and operands greater than + the length of the string will shift it entirely, resulting in a zero-filled string. + + + + + Shifts the string operand bits to the right, filling with zeros to produce a + string of the same length. + + The number of bits to shift to the right. + A right-shifted bitstring. + The behaviour of RShift is closer to what one would expect from dealing + with PostgreSQL bit-strings than in using the same operations on integers in .NET + In particular, negative operands result in a left-shift, and operands greater than + the length of the string will shift it entirely, resulting in a zero-filled string. It also performs + a logical shift, rather than an arithmetic shift, so it always sets the vacated bit positions to zero + (like PostgreSQL and like .NET for unsigned integers but not for signed integers). + + + + + Returns true if the this string is identical to the argument passed. + + + + + Compares two strings. Strings are compared as strings, so while 0 being less than 1 will + mean a comparison between two strings of the same size is the same as treating them as numbers, + in the case of two strings of differing lengths the comparison starts at the right-most (most significant) + bit, and if all bits of the shorter string are exhausted without finding a comparison, then the larger + string is deemed to be greater than the shorter (0010 is greater than 0001 but less than 00100). + + Another string to compare with this one. + A value if the two strings are identical, an integer less + than zero if this is less than the argument, and an integer greater + than zero otherwise. + + + + Compares the string with another object. + + The object to compare with. + If the object is null then this string is considered greater. If the object is another BitString + then they are compared as in the explicit comparison for BitStrings + in any other case a is thrown. + + + + Compares this BitString with an object for equality. + + + + + Returns a code for use in hashing operations. + + + + + Returns a string representation of the BitString. + + + A string which can contain a letter and optionally a number which sets a minimum size for the string + returned. In each case using the lower-case form of the letter will result in a lower-case string + being returned. + + + B + A string of 1s and 0s. + + + X + An hexadecimal string (will result in an error unless the string's length is divisible by 4). + + + G + A string of 1s and 0s in single-quotes preceded by 'B' (Postgres bit string literal syntax). + + Y + An hexadecimal string in single-quotes preceded by 'X' (Postgres bit literal syntax, will result in an error unless the string's length is divisible by 4. + + C + The format produced by format-string "Y" if legal, otherwise that produced by format-string "G". + E + The most compact safe representation for Postgres. If single bit will be either a 0 or a 1. Otherwise if it + can be that produce by format string "Y" it will, otherwise if there are less than 9bits in length it will be that + produced by format-string "G". For longer strings that cannot be represented in hexadecimal it will be a string + representing the first part of the string in format "Y" followed by the PostgreSQL concatenation operator, followed + by the final bits in the format "G". E.g. "X'13DCE'||B'110'" + If format is empty or null, it is treated as if "B" had been passed (the default repreesentation, and that + generally used by PostgreSQL for display). + + The formatted string. + + + + Returns a string representation for the Bitstring + + A string containing '0' and '1' characters. + + + + Returns the same string as . formatProvider is ignored. + + + + + Parses a string to produce a BitString. Most formats that can be produced by + can be accepted, but hexadecimal + can be interpreted with the preceding X' to mark the following characters as + being hexadecimal rather than binary. + + + + + Performs a logical AND on the two operands. + + + + + Performs a logcial OR on the two operands. + + + + + Perofrms a logical EXCLUSIVE-OR on the two operands + + + + + Performs a logical NOT on the operand. + + + + + Concatenates the operands. + + + + + Left-shifts the string BitString. + + + + + Right-shifts the string BitString. + + + + + Compares the two operands. + + + + + Compares the two operands. + + + + + Compares the two operands. + + + + + Compares the two operands. + + + + + Compares the two operands. + + + + + Compares the two operands. + + + + + Interprets the bitstring as a series of bits in an encoded character string, + encoded according to the Encoding passed, and returns that string. + The bitstring must contain a whole number of octets(bytes) and also be + valid according to the Encoding passed. + + The to use in producing the string. + The string that was encoded in the BitString. + + + + Interprets the bitstring as a series of octets (bytes) and returns those octets. Fails + if the Bitstring does not contain a whole number of octets (its length is not evenly + divisible by 8). + + + + + Interprets the bitstring as a series of signed octets (bytes) and returns those octets. Fails + if the Bitstring does not contain a whole number of octets (its length is not evenly + divisible by 8). + This method is not CLS-Compliant and may not be available to languages that cannot + handle signed bytes. + + + + + Interprets the bitstring as a series of unsigned 16-bit integers and returns those integers. + Fails if the Bitstring's length is not evenly divisible by 16. + This method is not CLS-Compliant and may not be available to languages that cannot + handle unsigned integers. + + + + + Interprets the bitstring as a series of 16-bit integers and returns those integers. + Fails if the Bitstring's length is not evenly divisible by 16. + + + + + Interprets the bitstring as a series of unsigned 32-bit integers and returns those integers. + Fails if the Bitstring's length is not evenly divisible by 32. + This method is not CLS-Compliant and may not be available to languages that cannot + handle unsigned integers. + + + + + Interprets the bitstring as a series of signed 32-bit integers and returns those integers. + Fails if the Bitstring's length is not evenly divisible by 32. + + + + + Interprets the bitstring as a series of unsigned 64-bit integers and returns those integers. + Fails if the Bitstring's length is not evenly divisible by 64. + This method is not CLS-Compliant and may not be available to languages that cannot + handle unsigned integers. + + + + + Interprets the bitstring as a series of signed 64-bit integers and returns those integers. + Fails if the Bitstring's length is not evenly divisible by 64. + + + + + The length of the string. + + + + + Retrieves the value of the bit at the given index. + + + + + Represents the PostgreSQL interval datatype. + PostgreSQL differs from .NET in how it's interval type doesn't assume 24 hours in a day + (to deal with 23- and 25-hour days caused by daylight savings adjustments) and has a concept + of months that doesn't exist in .NET's class. (Neither datatype + has any concessions for leap-seconds). + For most uses just casting to and from TimeSpan will work correctly — in particular, + the results of subtracting one or the PostgreSQL date, time and + timestamp types from another should be the same whether you do so in .NET or PostgreSQL — + but if the handling of days and months in PostgreSQL is important to your application then you + should use this class instead of . + If you don't know whether these differences are important to your application, they + probably arent! Just use and do not use this class directly ☺ + To avoid forcing unnecessary provider-specific concerns on users who need not be concerned + with them a call to on a field containing an + value will return a rather than an + . If you need the extra functionality of + then use . + + + + + + + + + + Represents the number of ticks (100ns periods) in one microsecond. This field is constant. + + + + + Represents the number of ticks (100ns periods) in one millisecond. This field is constant. + + + + + Represents the number of ticks (100ns periods) in one second. This field is constant. + + + + + Represents the number of ticks (100ns periods) in one minute. This field is constant. + + + + + Represents the number of ticks (100ns periods) in one hour. This field is constant. + + + + + Represents the number of ticks (100ns periods) in one day. This field is constant. + + + + + Represents the number of hours in one day (assuming no daylight savings adjustments). This field is constant. + + + + + Represents the number of days assumed in one month if month justification or unjustifcation is performed. + This is set to 30 for consistency with PostgreSQL. Note that this is means that month adjustments cause + a year to be taken as 30 × 12 = 360 rather than 356/366 days. + + + + + Represents the number of ticks (100ns periods) in one day, assuming 30 days per month. + + + + + Represents the number of months in a year. This field is constant. + + + + + Represents the maximum . This field is read-only. + + + + + Represents the minimum . This field is read-only. + + + + + Represents the zero . This field is read-only. + + + + + Initializes a new to the specified number of ticks. + + A time period expressed in 100ns units. + + + + Initializes a new to hold the same time as a + + A time period expressed in a + + + + Initializes a new to the specified number of months, days + & ticks. + + Number of months. + Number of days. + Number of 100ns units. + + + + Initializes a new to the specified number of + days, hours, minutes & seconds. + + Number of days. + Number of hours. + Number of minutes. + Number of seconds. + + + + Initializes a new to the specified number of + days, hours, minutes, seconds & milliseconds. + + Number of days. + Number of hours. + Number of minutes. + Number of seconds. + Number of milliseconds. + + + + Initializes a new to the specified number of + months, days, hours, minutes, seconds & milliseconds. + + Number of months. + Number of days. + Number of hours. + Number of minutes. + Number of seconds. + Number of milliseconds. + + + + Initializes a new to the specified number of + years, months, days, hours, minutes, seconds & milliseconds. + Years are calculated exactly equivalent to 12 months. + + Number of years. + Number of months. + Number of days. + Number of hours. + Number of minutes. + Number of seconds. + Number of milliseconds. + + + + Creates an from a number of ticks. + + The number of ticks (100ns units) in the interval. + A d with the given number of ticks. + + + + Creates an from a number of microseconds. + + The number of microseconds in the interval. + A d with the given number of microseconds. + + + + Creates an from a number of milliseconds. + + The number of milliseconds in the interval. + A d with the given number of milliseconds. + + + + Creates an from a number of seconds. + + The number of seconds in the interval. + A d with the given number of seconds. + + + + Creates an from a number of minutes. + + The number of minutes in the interval. + A d with the given number of minutes. + + + + Creates an from a number of hours. + + The number of hours in the interval. + A d with the given number of hours. + + + + Creates an from a number of days. + + The number of days in the interval. + A d with the given number of days. + + + + Creates an from a number of months. + + The number of months in the interval. + A d with the given number of months. + + + + Adds another interval to this instance and returns the result. + + An to add to this instance. + An whose values are the sums of the two instances. + + + + Subtracts another interval from this instance and returns the result. + + An to subtract from this instance. + An whose values are the differences of the two instances. + + + + Returns an whose value is the negated value of this instance. + + An whose value is the negated value of this instance. + + + + This absolute value of this instance. In the case of some, but not all, components being negative, + the rules used for justification are used to determine if the instance is positive or negative. + + An whose value is the absolute value of this instance. + + + + Equivalent to PostgreSQL's justify_days function. + + An based on this one, but with any hours outside of the range [-23, 23] + converted into days. + + + + Opposite to PostgreSQL's justify_days function. + + An based on this one, but with any days converted to multiples of ±24hours. + + + + Equivalent to PostgreSQL's justify_months function. + + An based on this one, but with any days outside of the range [-30, 30] + converted into months. + + + + Opposite to PostgreSQL's justify_months function. + + An based on this one, but with any months converted to multiples of ±30days. + + + + Equivalent to PostgreSQL's justify_interval function. + + An based on this one, + but with any months converted to multiples of ±30days + and then with any days converted to multiples of ±24hours + + + + Opposite to PostgreSQL's justify_interval function. + + An based on this one, but with any months converted to multiples of ±30days and then any days converted to multiples of ±24hours; + + + + Produces a canonical NpgslInterval with 0 months and hours in the range of [-23, 23]. + + + While the fact that for many purposes, two different instances could be considered + equivalent (e.g. one with 2days, 3hours and one with 1day 27hours) there are different possible canonical forms. + + E.g. we could move all excess hours into days and all excess days into months and have the most readable form, + or we could move everything into the ticks and have the form that allows for the easiest arithmetic) the form + chosen has two important properties that make it the best choice. + First, it is closest two how + objects are most often represented. Second, it is compatible with results of many + PostgreSQL functions, particularly with age() and the results of subtracting one date, time or timestamp from + another. + + Note that the results of casting a to is + canonicalised. + + + An based on this one, but with months converted to multiples of ±30days and with any hours outside of the range [-23, 23] + converted into days. + + + + Implicit cast of a to an + + A + An eqivalent, canonical, . + + + + Implicit cast of an to a . + + A . + An equivalent . + + + + Returns true if another is exactly the same as this instance. + + An for comparison. + true if the two instances are exactly the same, + false otherwise. + + + + Returns true if another object is an , that is exactly the same as + this instance + + An for comparison. + true if the argument is an and is exactly the same + as this one, false otherwise. + + + + Compares two instances. + + The first . + The second . + 0 if the two are equal or equivalent. A value greater than zero if x is greater than y, + a value less than zero if x is less than y. + + + + A hash code suitable for uses with hashing algorithms. + + An signed integer. + + + + Compares this instance with another/ + + An to compare this with. + 0 if the instances are equal or equivalent. A value less than zero if + this instance is less than the argument. A value greater than zero if this instance + is greater than the instance. + + + + Compares this instance with another/ + + An object to compare this with. + 0 if the argument is an and the instances are equal or equivalent. + A value less than zero if the argument is an and + this instance is less than the argument. + A value greater than zero if the argument is an and this instance + is greater than the instance. + A value greater than zero if the argument is null. + The argument is not an . + + + + Parses a and returns a instance. + Designed to use the formats generally returned by PostgreSQL. + + The to parse. + An represented by the argument. + The string was null. + A value obtained from parsing the string exceeded the values allowed for the relevant component. + The string was not in a format that could be parsed to produce an . + + + + Attempt to parse a to produce an . + + The to parse. + (out) The produced, or if the parsing failed. + true if the parsing succeeded, false otherwise. + + + + Create a representation of the instance. + The format returned is of the form: + [M mon[s]] [d day[s]] [HH:mm:ss[.f[f[f[f[f[f[f[f[f]]]]]]]]]] + A zero is represented as 00:00:00 + + Ticks are 100ns, Postgress resolution is only to 1µs at most. Hence we lose 1 or more decimal + precision in storing values in the database. Despite this, this method will output that extra + digit of precision. It's forward-compatible with any future increases in resolution up to 100ns, + and also makes this ToString() more applicable to any other use-case. + + + The representation. + + + + Adds two together. + + The first to add. + The second to add. + An whose values are the sum of the arguments. + + + + Subtracts one from another. + + The to subtract the other from. + The to subtract from the other. + An whose values are the difference of the arguments + + + + Returns true if two are exactly the same. + + The first to compare. + The second to compare. + true if the two arguments are exactly the same, false otherwise. + + + + Returns false if two are exactly the same. + + The first to compare. + The second to compare. + false if the two arguments are exactly the same, true otherwise. + + + + Compares two instances to see if the first is less than the second + + The first to compare. + The second to compare. + true if the first is less than second, false otherwise. + + + + Compares two instances to see if the first is less than or equivalent to the second + + The first to compare. + The second to compare. + true if the first is less than or equivalent to second, false otherwise. + + + + Compares two instances to see if the first is greater than the second + + The first to compare. + The second to compare. + true if the first is greater than second, false otherwise. + + + + Compares two instances to see if the first is greater than or equivalent the second + + The first to compare. + The second to compare. + true if the first is greater than or equivalent to the second, false otherwise. + + + + Returns the instance. + + An . + The argument. + + + + Negates an instance. + + An . + The negation of the argument. + + + + The total number of ticks(100ns units) contained. This is the resolution of the + type. This ignores the number of days and + months held. If you want them included use first. + The resolution of the PostgreSQL + interval type is by default 1µs = 1,000 ns. It may be smaller as follows: + + + interval(0) + resolution of 1s (1 second) + + + interval(1) + resolution of 100ms = 0.1s (100 milliseconds) + + + interval(2) + resolution of 10ms = 0.01s (10 milliseconds) + + + interval(3) + resolution of 1ms = 0.001s (1 millisecond) + + + interval(4) + resolution of 100µs = 0.0001s (100 microseconds) + + + interval(5) + resolution of 10µs = 0.00001s (10 microseconds) + + + interval(6) or interval + resolution of 1µs = 0.000001s (1 microsecond) + + + As such, if the 100-nanosecond resolution is significant to an application, a PostgreSQL interval will + not suffice for those purposes. + In more frequent cases though, the resolution of the interval suffices. + will always suffice to handle the resolution of any interval value, and upon + writing to the database, will be rounded to the resolution used. + + The number of ticks in the instance. + + + + + Gets the number of whole microseconds held in the instance. + An in the range [-999999, 999999]. + + + + + Gets the number of whole milliseconds held in the instance. + An in the range [-999, 999]. + + + + + Gets the number of whole seconds held in the instance. + An in the range [-59, 59]. + + + + + Gets the number of whole minutes held in the instance. + An in the range [-59, 59]. + + + + + Gets the number of whole hours held in the instance. + Note that this can be less than -23 or greater than 23 unless + has been used to produce this instance. + + + + + Gets the number of days held in the instance. + Note that this does not pay attention to a time component with -24 or less hours or + 24 or more hours, unless has been called to produce this instance. + + + + + Gets the number of months held in the instance. + Note that this does not pay attention to a day component with -30 or less days or + 30 or more days, unless has been called to produce this instance. + + + + + Returns a representing the time component of the instance. + Note that this may have a value beyond the range ±23:59:59.9999999 unless + has been called to produce this instance. + + + + + The total number of ticks (100ns units) in the instance, assuming 24 hours in each day and + 30 days in a month. + + + + + The total number of microseconds in the instance, assuming 24 hours in each day and + 30 days in a month. + + + + + The total number of milliseconds in the instance, assuming 24 hours in each day and + 30 days in a month. + + + + + The total number of seconds in the instance, assuming 24 hours in each day and + 30 days in a month. + + + + + The total number of minutes in the instance, assuming 24 hours in each day and + 30 days in a month. + + + + + The total number of hours in the instance, assuming 24 hours in each day and + 30 days in a month. + + + + + The total number of days in the instance, assuming 24 hours in each day and + 30 days in a month. + + + + + The total number of months in the instance, assuming 24 hours in each day and + 30 days in a month. + + + + + Normalise this time; if it is 24:00:00, convert it to 00:00:00 + + This time, normalised + + + + The total number of ticks(100ns units) contained. This is the resolution of the + type. + The resolution of the PostgreSQL + interval type is by default 1µs = 1,000 ns. It may be smaller as follows: + + + time(0) + resolution of 1s (1 second) + + + time(1) + resolution of 100ms = 0.1s (100 milliseconds) + + + time(2) + resolution of 10ms = 0.01s (10 milliseconds) + + + time(3) + resolution of 1ms = 0.001s (1 millisecond) + + + time(4) + resolution of 100µs = 0.0001s (100 microseconds) + + + time(5) + resolution of 10µs = 0.00001s (10 microseconds) + + + time(6) or interval + resolution of 1µs = 0.000001s (1 microsecond) + + + As such, if the 100-nanosecond resolution is significant to an application, a PostgreSQL time will + not suffice for those purposes. + In more frequent cases though, the resolution of time suffices. + will always suffice to handle the resolution of any time value, and upon + writing to the database, will be rounded to the resolution used. + + The number of ticks in the instance. + + + + + Gets the number of whole microseconds held in the instance. + An integer in the range [0, 999999]. + + + + + Gets the number of whole milliseconds held in the instance. + An integer in the range [0, 999]. + + + + + Gets the number of whole seconds held in the instance. + An interger in the range [0, 59]. + + + + + Gets the number of whole minutes held in the instance. + An integer in the range [0, 59]. + + + + + Gets the number of whole hours held in the instance. + Note that the time 24:00:00 can be stored for roundtrip compatibility. Any calculations on such a + value will normalised it to 00:00:00. + + + + + Normalise this time; if it is 24:00:00, convert it to 00:00:00 + + This time, normalised + + + + Compares this with another . As per postgres' rules, + first the times are compared as if they were both in the same timezone. If they are equal then + then timezones are compared (+01:00 being "smaller" than -01:00). + + the to compare with. + An integer which is 0 if they are equal, < 0 if this is the smaller and > 0 if this is the larger. + + + + Gets the number of whole microseconds held in the instance. + An integer in the range [0, 999999]. + + + + + Gets the number of whole milliseconds held in the instance. + An integer in the range [0, 999]. + + + + + Gets the number of whole seconds held in the instance. + An interger in the range [0, 59]. + + + + + Gets the number of whole minutes held in the instance. + An integer in the range [0, 59]. + + + + + Gets the number of whole hours held in the instance. + Note that the time 24:00:00 can be stored for roundtrip compatibility. Any calculations on such a + value will normalised it to 00:00:00. + + + + + This class implements the Fastpath api. + + + + + This maps the functions names to their id's (possible unique just + to a connection). + + + + + Our connection. + + + + + The network stream. + + + + + Initialises the fastpath system. + + BaseConnection to attach to. + The network stream to the backend. + + + + Initialises the fastpath system. + + BaseConnection to attach to. + + + + Send a function call to the PostgreSQL backend. + + Function id. + True if the result is an integer, false for other results. + FastpathArguments to pass to fastpath. + null if no data, Integer if an integer result, or byte[] otherwise. + + + + Send a function call to the PostgreSQL backend by name. + Note: the mapping for the procedure name to function id needs to exist, + usually to an earlier call to addfunction(). + This is the prefered method to call, as function id's can/may change + between versions of the backend. + For an example of how this works, refer to NpgsqlTypes.LargeObject + + Function name. + True if the result is an integer, false for other results. + FastpathArguments to pass to fastpath. + null if no data, Integer if an integer result, or byte[] otherwise. + + + + This convenience method assumes that the return value is an Integer. + + Function name. + Function arguments. + Integer result. + + + + This convenience method assumes that the return value is an Integer. + + Function name. + Function arguments. + Array containing result + + + + This adds a function to our lookup table. + User code should use the addFunctions method, which is based upon a + query, rather than hard coding the oid. The oid for a function is not + guaranteed to remain static, even on different servers of the same + version. + + Function name. + Function id. + + + + This takes a ResultSet containing two columns. Column 1 contains the + function name, Column 2 the oid. + It reads the entire ResultSet, loading the values into the function + table. + REMEMBER to close() the resultset after calling this!! + Implementation note about function name lookups: + PostgreSQL stores the function id's and their corresponding names in + the pg_proc table. To speed things up locally, instead of querying each + function from that table when required, a Dictionary is used. Also, only + the function's required are entered into this table, keeping connection + times as fast as possible. + The org.postgresql.largeobject.LargeObject class performs a query upon it's startup, + and passes the returned ResultSet to the addFunctions() method here. + Once this has been done, the LargeObject api refers to the functions by + name. + Dont think that manually converting them to the oid's will work. Ok, + they will for now, but they can change during development (there was some + discussion about this for V7.0), so this is implemented to prevent any + unwarranted headaches in the future. + + ResultSet + + + + This returns the function id associated by its name + If addFunction() or addFunctions() have not been called for this name, + then an NpgsqlException is thrown. + + Function name to lookup. + Function ID for fastpath call. + + + + Fast Path Arg. + + + + + Type of argument, true=integer, false=byte[]. + + + + + Integer value if type=true. + + + + + Byte value if type=false; + + + + + Constructs an argument that consists of an integer value. + + Int value to set. + + + + Constructs an argument that consists of an array of bytes. + + Array to store. + + + + Constructs an argument that consists of part of a byte array. + + Source array. + offset within array. + length of data to include. + + + + Constructs an argument that consists of a String. + + String to store. + + + + This sends this argument down the network stream. + The stream sent consists of the length.int4 then the contents. + Note: This is called from Fastpath, and cannot be called from + client code. + + + + + + Report send size. + + Send size. + + + + Large Object. + + + + + Indicates a seek from the begining of a file. + + + + + Indicates a seek from the current position. + + + + + Indicates a seek from the end of a file. + + + + + This opens a large object. + If the object does not exist, then an NpgsqlException is thrown. + + FastPath API for the connection to use. + OID of the Large Object to open. + Mode of opening the large object + + + + OID getter. + + The OID of this LargeObject. + + + + This method closes the object. You must not call methods in this + object after this is called. + + + + + Reads some data from the object, and return as a byte[] array. + + Number of bytes to read. + Array containing data read. + + + + Reads some data from the object into an existing array. + + Destination array. + Offset within array. + Maximum number of bytes to read. + The number of bytes actually read. + + + + Writes an array to the object. + + Array to write. + + + + Writes some data from an array to the object. + + Destination array. + Offset within array. + Number of bytes to write. + + + + Sets the current position within the object. + This is similar to the fseek() call in the standard C library. It + allows you to have random access to the large object. + + Position within object. + Either SEEK_SET, SEEK_CUR or SEEK_END. + + + + Sets the current position within the object. + This is similar to the fseek() call in the standard C library. It + allows you to have random access to the large object. + + Position within object from begining. + + + + Report the current position within the object. + + The current position within the object. + + + + This method is inefficient, as the only way to find out the size of + the object is to seek to the end, record the current position, then + return to the original position. + A better method will be found in the future. + + The size of the large object. + + + + OID. + + + + + Large Object Manager. + + + + + This mode indicates we want to write to an object + + + + + This mode indicates we want to read an object + + + + + This mode is the default. It indicates we want read and write access to + + + + + Constructs the LargeObject API. + There should only be one LargeObjectManager per Connection. The + org.postgresql.Connection class keeps track of the various extension API's + and it's advised you use those to gain access, and not going direct. + + + + + + This opens an existing large object, based on its OID. This method + assumes that READ and WRITE access is required (the default). + + OID of large object. + LargeObject instance providing access to the object + + + + This opens an existing large object, based on its OID. + + OID of large object. + Mode of open. + + + + + This creates a large object, returning its OID. + + OID of new object. + + + + This creates a large object, returning its OID. + + Bitmask describing different attributes of the new object. + OID of new object. + + + + This deletes a large object. + + OID describing object to delete. + + + + This deletes a large object. + It is identical to the Delete() method, and is supplied as the C API uses unlink. + + OID describing object to delete. + + + + Options that control certain aspects of native to backend conversions that depend + on backend version and status. + + + + + Clone the current object. + + A new NativeToBackendTypeConverterOptions object. + + + + Clone the current object with a different OID/Name mapping. + + OID/Name mapping object to use in the new instance. + A new NativeToBackendTypeConverterOptions object. + + + + Provide event handlers to convert all native supported basic data types from their backend + text representation to a .NET object. + + + + + Convert UTF8 encoded text a string. + + + + + Byte array from bytea encoded as ASCII text, escaped or hex format. + + + + + Byte array from bytea encoded as binary. + + + + + Convert a postgresql boolean to a System.Boolean. + + + + + Convert a postgresql boolean to a System.Boolean. + + + + + Convert a postgresql bit to a System.Boolean. + + + + + Convert a postgresql datetime to a System.DateTime. + + + + + Convert a postgresql date to a System.DateTime. + + + + + Convert a postgresql time to a System.DateTime. + + + + + Convert a postgresql money to a System.Decimal. + + + + + Convert a postgresql float4 or float8 to a System.Float or System.Double respectively. + + + + + Provide event handlers to convert extended native supported data types from their backend + text representation to a .NET object. + + + + + Convert a postgresql point to a System.NpgsqlPoint. + + + + + Convert a postgresql point to a System.RectangleF. + + + + + LDeg. + + + + + Path. + + + + + Polygon. + + + + + Circle. + + + + + Inet. + + + + + MAC Address. + + + + + interval + + + + + Provide event handlers to convert the basic native supported data types from + native form to backend representation. + + + + + Convert a string to UTF8 encoded text, escaped and quoted as required. + + + + + Convert a string to UTF8 encoded text. + + + + + Binary data, escaped and quoted as required. + + + + + Binary data with possible older style octal escapes, quoted. + + + + + Binary data in the new hex format (>= 9.0), quoted. + + + + + Binary data, raw. + + + + + Convert to a postgresql boolean text format. + + + + + Convert to a postgresql boolean binary format. + + + + + Convert to a postgresql binary int2. + + + + + Convert to a postgresql binary int4. + + + + + Convert to a postgresql binary int8. + + + + + Convert to a postgresql bit. + + + + + Convert to a postgresql timestamp. + + + + + Convert to a postgresql date. + + + + + Convert to a postgresql time. + + + + + Convert to a postgres money. + + + + + Convert to a postgres double with maximum precision. + + + + + Convert a System.Float to a postgres float4. + + + + + Convert a System.Double to a postgres float8. + + + + + Provide event handlers to convert extended native supported data types from + native form to backend representation. + + + + + Point. + + + + + Box. + + + + + LSeg. + + + + + Open path. + + + + + Polygon. + + + + + Convert to a postgres MAC Address. + + + + + Circle. + + + + + Convert to a postgres inet. + + + + + Convert to a postgres interval + + + + + Delegate called to convert the given backend text data to its native representation. + + + + + Delegate called to convert the given backend binary data to its native representation. + + + + + Represents a backend data type. + This class can be called upon to convert a backend field representation to a native object. + + + + + Construct a new NpgsqlTypeInfo with the given attributes and conversion handlers. + + Type OID provided by the backend server. + Type name provided by the backend server. + NpgsqlDbType + DbType + System type to convert fields of this type to. + Data conversion handler for text encoding. + Data conversion handler for binary data. + + + + Perform a data conversion from a backend representation to + a native object. + + Data sent from the backend. + fieldValueSize + Type modifier field sent from the backend. + + + + Perform a data conversion from a backend representation to + a native object. + + Data sent from the backend. + TypeSize + Type modifier field sent from the backend. + + + + Type OID provided by the backend server. + + + + + Type name provided by the backend server. + + + + + NpgsqlDbType. + + + + + NpgsqlDbType. + + + + + Provider type to convert fields of this type to. + + + + + System type to convert fields of this type to. + + + + + Reports whether a backend binary to native decoder is available for this type. + + + + + Delegate called to convert the given native data to its backand representation. + + + + + Represents a backend data type. + This class can be called upon to convert a native object to its backend field representation, + + + + + Returns an NpgsqlNativeTypeInfo for an array where the elements are of the type + described by the NpgsqlNativeTypeInfo supplied. + + + + + Construct a new NpgsqlTypeInfo with the given attributes and conversion handlers. + + Type name provided by the backend server. + DbType + Quote + NpgsqlDbType + Data conversion handler for text backend encoding. + Data conversion handler for binary backend encoding (for extended queries). + + + + Perform a data conversion from a native object to + a backend representation. + DBNull and null values are handled differently depending if a plain query is used + When + + Native .NET object to be converted. + Specifies that the value should be formatted for the extended query syntax. + Options to guide serialization. If null, a default options set is used. + Specifies that the value should be formatted as an extended query array element. + + + + Type name provided by the backend server. + + + + + NpgsqlDbType. + + + + + DbType. + + + + + Apply quoting. + + + + + Use parameter size information. + + + + + Reports whether a native to backend binary encoder is available for this type. + + + + + Provide mapping between type OID, type name, and a NpgsqlBackendTypeInfo object that represents it. + + + + + Construct an empty mapping. + + + + + Copy constuctor. + + + + + Add the given NpgsqlBackendTypeInfo to this mapping. + + + + + Add a new NpgsqlBackendTypeInfo with the given attributes and conversion handlers to this mapping. + + Type OID provided by the backend server. + Type name provided by the backend server. + NpgsqlDbType + DbType + System type to convert fields of this type to. + Data conversion handler for text encoding. + Data conversion handler for binary data. + + + + Make a shallow copy of this type mapping. + + + + + Determine if a NpgsqlBackendTypeInfo with the given backend type OID exists in this mapping. + + + + + Determine if a NpgsqlBackendTypeInfo with the given backend type name exists in this mapping. + + + + + Get the number of type infos held. + + + + + Retrieve the NpgsqlBackendTypeInfo with the given backend type OID, or null if none found. + + + + + Retrieve the NpgsqlBackendTypeInfo with the given backend type name, or null if none found. + + + + + Provide mapping between type Type, NpgsqlDbType and a NpgsqlNativeTypeInfo object that represents it. + + + + + Add the given NpgsqlNativeTypeInfo to this mapping. + + + + + Add a new NpgsqlNativeTypeInfo with the given attributes and conversion handlers to this mapping. + + Type name provided by the backend server. + NpgsqlDbType + DbType + Quote + Data conversion handler for text backend encoding. + Data conversion handler for binary backend encoding (for extended query). + + + + Retrieve the NpgsqlNativeTypeInfo with the given NpgsqlDbType. + + + + + Retrieve the NpgsqlNativeTypeInfo with the given DbType. + + + + + Retrieve the NpgsqlNativeTypeInfo with the given Type. + + + + + Determine if a NpgsqlNativeTypeInfo with the given backend type name exists in this mapping. + + + + + Determine if a NpgsqlNativeTypeInfo with the given NpgsqlDbType exists in this mapping. + + + + + Determine if a NpgsqlNativeTypeInfo with the given Type name exists in this mapping. + + + + + Get the number of type infos held. + + + + + Represents a PostgreSQL Point type + + + + + Represents a PostgreSQL Line Segment type. + + + + + Represents a PostgreSQL Path type. + + + + + Represents a PostgreSQL Polygon type. + + + + + Represents a PostgreSQL Circle type. + + + + + Represents a PostgreSQL inet type. + + + + + Represents a PostgreSQL MacAddress type. + + + + + + + The macAddr parameter must contain a string that can only consist of numbers + and upper-case letters as hexadecimal digits. (See PhysicalAddress.Parse method on MSDN) + + + + This class contains helper methods for type conversion between + the .Net type system and postgresql. + + + + + A cache of basic datatype mappings keyed by server version. This way we don't + have to load the basic type mappings for every connection. + + + + + Find a NpgsqlNativeTypeInfo in the default types map that can handle objects + of the given NpgsqlDbType. + + + + + Find a NpgsqlNativeTypeInfo in the default types map that can handle objects + of the given NpgsqlDbType. + + + + + Find a NpgsqlNativeTypeInfo in the default types map that can handle objects + of the given DbType. + + + + + Find a NpgsqlNativeTypeInfo in the default types map that can handle objects + of the given System.Type. + + + + + This method is responsible to convert the byte[] received from the backend + to the corresponding NpgsqlType. + The given TypeInfo is called upon to do the conversion. + If no TypeInfo object is provided, no conversion is performed. + + + + + This method is responsible to convert the string received from the backend + to the corresponding NpgsqlType. + The given TypeInfo is called upon to do the conversion. + If no TypeInfo object is provided, no conversion is performed. + + + + + Create the one and only native to backend type map. + This map is used when formatting native data + types to backend representations. + + + + + This method creates (or retrieves from cache) a mapping between type and OID + of all natively supported postgresql data types. + This is needed as from one version to another, this mapping can be changed and + so we avoid hardcoding them. + + NpgsqlTypeMapping containing all known data types. The mapping must be + cloned before it is modified because it is cached; changes made by one connection may + effect another connection. + + + + + Attempt to map types by issuing a query against pg_type. + This function takes a list of NpgsqlTypeInfo and attempts to resolve the OID field + of each by querying pg_type. If the mapping is found, the type info object is + updated (OID) and added to the provided NpgsqlTypeMapping object. + + NpgsqlConnector to send query through. + Mapping object to add types too. + List of types that need to have OID's mapped. + + + + Summary description for NpgsqlQuery + + + + + For classes representing messages sent from the client to the server. + + + + + Set Cache Size. The default value is 20. + + + + + Lookup cached entity. null will returned if not match. + For both get{} and set{} apply LRU rule. + + key + + + + + The globally available text encoding used for frontend/backend communication. + + + + This class represents the base class for the state pattern design pattern + implementation. + + + This class represents the base class for the state pattern design pattern + implementation. + + + + + + This method is used by the states to change the state of the context. + + + + + Call ProcessBackendResponsesEnum(), and scan and discard all results. + + + + + This method is responsible to handle all protocol messages sent from the backend. + It holds all the logic to do it. + To exchange data, it uses a Mediator object from which it reads/writes information + to handle backend requests. + + + + + + Checks for context socket availability. + Socket.Poll supports integer as microseconds parameter. + This limits the usable command timeout value + to 2,147 seconds: (2,147 x 1,000,000 less than max_int). + In order to bypass this limit, the availability of + the socket is checked in 2,147 seconds cycles + + true, if for context socket availability was checked, false otherwise. + Context. + Select mode. + + + + Called from constructor of derived class. + + + + + Finalizer for HashAlgorithm + + + + + Computes the entire hash of all the bytes in the byte array. + + + + + When overridden in a derived class, drives the hashing function. + + + + + + + + When overridden in a derived class, this pads and hashes whatever data might be left in the buffers and then returns the hash created. + + + + + When overridden in a derived class, initializes the object to prepare for hashing. + + + + + Used for stream chaining. Computes hash as data passes through it. + + The buffer from which to grab the data to be copied. + The offset into the input buffer to start reading at. + The number of bytes to be copied. + The buffer to write the copied data to. + At what point in the outputBuffer to write the data at. + + + + Used for stream chaining. Computes hash as data passes through it. Finishes off the hash. + + The buffer from which to grab the data to be copied. + The offset into the input buffer to start reading at. + The number of bytes to be copied. + + + + Get whether or not the hash can transform multiple blocks at a time. + Note: MUST be overriden if descendant can transform multiple block + on a single call! + + + + + Gets the previously computed hash. + + + + + Returns the size in bits of the hash. + + + + + Must be overriden if not 1 + + + + + Must be overriden if not 1 + + + + + Common base class for all derived MD5 implementations. + + + + + Called from constructor of derived class. + + + + + Creates the default derived class. + + + + + C# implementation of the MD5 cryptographic hash function. + + + + + Creates a new MD5CryptoServiceProvider. + + + + + Drives the hashing function. + + Byte array containing the data to hash. + Where in the input buffer to start. + Size in bytes of the data in the buffer to hash. + + + + This finalizes the hash. Takes the data from the chaining variables and returns it. + + + + + Resets the class after use. Called automatically after hashing is done. + + + + + This is the meat of the hash function. It is what processes each block one at a time. + + Byte array to process data from. + Where in the byte array to start processing. + + + + Pads and then processes the final block. + + Buffer to grab data from. + Position in buffer in bytes to get data from. + How much data in bytes in the buffer to use. + + + + Implements for version 3 of the protocol. + + + + + Reads a row, field by field, allowing a DataRow to be built appropriately. + + + + + Marker interface which identifies a class which may take possession of a stream for the duration of + it's lifetime (possibly temporarily giving that possession to another class for part of that time. + + It inherits from IDisposable, since any such class must make sure it leaves the stream in a valid state. + + The most important such class is that compiler-generated from ProcessBackendResponsesEnum. Of course + we can't make that inherit from this interface, alas. + + + + + Marker interface which identifies a class which represents part of + a response from the server. + + + + + Reads part of a field, as needed (for + and + + + + + Adds further functionality to stream that is dependant upon the type of data read. + + + + + Completes the implementation of Streamer for char data. + + + + + Completes the implementation of Streamer for byte data. + + + + + This class represents a BackEndKeyData message received + from PostgreSQL + + + + + This class represents the Bind message sent to PostgreSQL + server. + + + + + + This class represents the CancelRequest message sent to PostgreSQL + server. + + + + + + Represents a SQL statement or function (stored procedure) to execute + against a PostgreSQL database. This class cannot be inherited. + + + Represents a SQL statement or function (stored procedure) to execute + against a PostgreSQL database. This class cannot be inherited. + + + Represents a SQL statement or function (stored procedure) to execute + against a PostgreSQL database. This class cannot be inherited. + + + + + 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. + + + + Used to execute internal commands. + + + + + Attempts to cancel the execution of a NpgsqlCommand. + + This Method isn't implemented yet. + + + + Create a new command based on this one. + + A new NpgsqlCommand object. + + + + Create a new command based on this one. + + A new NpgsqlCommand object. + + + + Creates a new instance of an DbParameter object. + + An DbParameter object. + + + + Creates a new instance of a NpgsqlParameter object. + + A NpgsqlParameter object. + + + + Releases the resources used by the NpgsqlCommand. + + + + + Internal query shortcut for use in cases where the number + of affected rows is of no interest. + + + + + Special adaptation of ExecuteBlind() that sets statement_timeout. + This exists to prevent Connector.SetBackendCommandTimeout() from calling Command.ExecuteBlind(), + which will cause an endless recursive loop. + + + Timeout in seconds. + + + + Executes a SQL statement against the connection and returns the number of rows affected. + + The number of rows affected if known; -1 otherwise. + + + + Sends the CommandText to + the Connection and builds a + NpgsqlDataReader + using one of the CommandBehavior values. + + One of the CommandBehavior values. + A NpgsqlDataReader object. + + + + Sends the CommandText to + the Connection and builds a + NpgsqlDataReader. + + A NpgsqlDataReader object. + + + + Sends the CommandText to + the Connection and builds a + NpgsqlDataReader + using one of the CommandBehavior values. + + One of the CommandBehavior values. + A NpgsqlDataReader object. + Currently the CommandBehavior parameter is ignored. + + + + This method binds the parameters from parameters collection to the bind + message. + + + + + Executes the query, and returns the first column of the first row + in the result set returned by the query. Extra columns or rows are ignored. + + The first column of the first row in the result set, + or a null reference if the result set is empty. + + + + Creates a prepared version of the command on a PostgreSQL server. + + + + + This method checks the connection state to see if the connection + is set or it is open. If one of this conditions is not met, throws + an InvalidOperationException + + + + + This method substitutes the Parameters, if exist, in the command + to their actual values. + The parameter name format is :ParameterName. + + A version of CommandText with the Parameters inserted. + + + + Process this.commandText, trimming each distinct command and substituting paramater + tokens. + + + UTF8 encoded command ready to be sent to the backend. + + + + Append a region of a source command text to an output command, performing parameter token + substitutions. + + Stream to which to append output. + Command text. + + + false if the query has multiple statements which are not allowed + + + + 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 is 20 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. + + + + DB parameter collection. + + + + + Gets the NpgsqlParameterCollection. + + The parameters of the SQL statement or function (stored procedure). The default is an empty collection. + + + + DB transaction. + + + + + Gets or sets the NpgsqlTransaction + within which the NpgsqlCommand executes. + + The NpgsqlTransaction. + The default value is a null reference. + + + + Gets or sets how command results are applied to the DataRow + when used by the Update + method of the DbDataAdapter. + + One of the UpdateRowSource values. + + + + Returns oid of inserted row. This is only updated when using executenonQuery and when command inserts just a single row. If table is created without oids, this will always be 0. + + + + + Returns whether this query will execute as a prepared (compiled) query. + + + + + Design time visible. + + + + + This class is responsible to create database commands for automatic insert, update and delete operations. + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + The adapter. + + + + + This method is reponsible to derive the command parameter list with values obtained from function definition. + It clears the Parameters collection of command. Also, if there is any parameter type which is not supported by Npgsql, an InvalidOperationException will be thrown. + Parameters name will be parameter1, parameter2, ... + + NpgsqlCommand whose function parameters will be obtained. + + + + Gets the automatically generated object required + to perform insertions at the data source. + + + The automatically generated object required to perform insertions. + + + + + Gets the automatically generated object required to perform insertions + at the data source, optionally using columns for parameter names. + + + If true, generate parameter names matching column names, if possible. + If false, generate @p1, @p2, and so on. + + + The automatically generated object required to perform insertions. + + + + + Gets the automatically generated System.Data.Common.DbCommand object required + to perform updates at the data source. + + + The automatically generated System.Data.Common.DbCommand object required to perform updates. + + + + + Gets the automatically generated object required to perform updates + at the data source, optionally using columns for parameter names. + + + If true, generate parameter names matching column names, if possible. + If false, generate @p1, @p2, and so on. + + + The automatically generated object required to perform updates. + + + + + Gets the automatically generated System.Data.Common.DbCommand object required + to perform deletions at the data source. + + + The automatically generated System.Data.Common.DbCommand object required to perform deletions. + + + + + Gets the automatically generated object required to perform deletions + at the data source, optionally using columns for parameter names. + + + If true, generate parameter names matching column names, if possible. + If false, generate @p1, @p2, and so on. + + + The automatically generated object required to perform deletions. + + + + + Applies the parameter information. + + The parameter. + The row. + Type of the statement. + if set to true [where clause]. + + + + Returns the name of the specified parameter in the format of @p#. + + The number to be included as part of the parameter's name.. + + The name of the parameter with the specified number appended as part of the parameter name. + + + + + Returns the full parameter name, given the partial parameter name. + + The partial name of the parameter. + + The full parameter name corresponding to the partial parameter name requested. + + + + + Returns the placeholder for the parameter in the associated SQL statement. + + The number to be included as part of the parameter's name. + + The name of the parameter with the specified number appended. + + + + + Registers the to handle the event for a . + + The to be used for the update. + + + + Adds an event handler for the event. + + The sender + A instance containing information about the event. + + + + Given an unquoted identifier in the correct catalog case, returns the correct quoted form of that identifier, including properly escaping any embedded quotes in the identifier. + + The original unquoted identifier. + + The quoted version of the identifier. Embedded quotes within the identifier are properly escaped. + + + + + Unquoted identifier parameter cannot be null + + + + Given a quoted identifier, returns the correct unquoted form of that identifier, including properly un-escaping any embedded quotes in the identifier. + + The identifier that will have its embedded quotes removed. + + The unquoted identifier, with embedded quotes properly un-escaped. + + + + + Quoted identifier parameter cannot be null + + + + Gets or sets the beginning character or characters to use when specifying database objects (for example, tables or columns) whose names contain characters such as spaces or reserved tokens. + + + The beginning character or characters to use. The default is an empty string. + + + + + + + + Gets or sets the ending character or characters to use when specifying database objects (for example, tables or columns) whose names contain characters such as spaces or reserved tokens. + + + The ending character or characters to use. The default is an empty string. + + + + + + + + Represents the method that handles the Notice events. + + The source of the event. + A NpgsqlNoticeEventArgs that contains the event data. + + + + Represents the method that handles the Notification events. + + The source of the event. + A NpgsqlNotificationEventArgs that contains the event data. + + + + This class represents a connection to a + PostgreSQL server. + + + + + 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. + + + + 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. + + + + + 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. + + + + + Opens a database connection with the property settings specified by the + ConnectionString. + + + + + 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. + + + + 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. + + + + + 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. + + + + + 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. + + + + Releases all resources used by the + NpgsqlConnection. + + true when called from Dispose(); + false when being called from the finalizer. + + + + Create a new connection based on this one. + + A new NpgsqlConnection object. + + + + Create a new connection based on this one. + + A new NpgsqlConnection object. + + + + Returns a copy of the NpgsqlConnectionStringBuilder that contains the parsed connection string values. + + + + + Default SSL CertificateSelectionCallback implementation. + + + + + Default SSL CertificateValidationCallback implementation. + + + + + Default SSL PrivateKeySelectionCallback implementation. + + + + + Default SSL ProvideClientCertificatesCallback implementation. + + + + + Default SSL ValidateRemoteCertificateCallback implementation. + + + + + Write each key/value pair in the connection string to the log. + + + + + Sets the `settings` ConnectionStringBuilder based on the given `connectionString` + + The connection string to load the builder from + + + + Sets the `settings` ConnectionStringBuilder based on the given `connectionString` + + The connection string to load the builder from + + + + Refresh the cached _connectionString whenever the builder settings change + + + + + Returns the supported collections + + + + + 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. + + + + Clear connection pool. + + + + + Clear all connection pools. + + + + + Enlist transation. + + + + + + Occurs on NoticeResponses from the PostgreSQL backend. + + + + + Occurs on NotificationResponses from the PostgreSQL backend. + + + + + Called to provide client certificates for SSL handshake. + + + + + Mono.Security.Protocol.Tls.CertificateSelectionCallback delegate. + + + + + Mono.Security.Protocol.Tls.CertificateValidationCallback delegate. + + + + + Mono.Security.Protocol.Tls.PrivateKeySelectionCallback delegate. + + + + + Called to validate server's certificate during SSL handshake + + + + + 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). + + + + + Gets or sets the string used to connect to a PostgreSQL database. + Valid values are: +
    +
  • + Server: Address/Name of Postgresql Server; +
  • +
  • + Port: Port to connect to; +
  • +
  • + Protocol: Protocol version to use, instead of automatic; Integer 2 or 3; +
  • +
  • + Database: Database name. Defaults to user name if not specified; +
  • +
  • + User Id: User name; +
  • +
  • + Password: Password for clear text authentication; +
  • +
  • + SSL: True or False. Controls whether to attempt a secure connection. Default = False; +
  • +
  • + Pooling: True or False. Controls whether connection pooling is used. Default = True; +
  • +
  • + MinPoolSize: Min size of connection pool; +
  • +
  • + MaxPoolSize: Max size of connection pool; +
  • +
  • + Timeout: Time to wait for connection open in seconds. Default is 15. +
  • +
  • + CommandTimeout: Time to wait for command to finish execution before throw an exception. In seconds. Default is 20. +
  • +
  • + Sslmode: Mode for ssl connection control. Can be Prefer, Require, Allow or Disable. Default is Disable. Check user manual for explanation of values. +
  • +
  • + ConnectionLifeTime: Time to wait before closing unused connections in the pool in seconds. Default is 15. +
  • +
  • + SyncNotification: Specifies if Npgsql should use synchronous notifications. +
  • +
  • + SearchPath: Changes search path to specified and public schemas. +
  • +
+
+ 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 SSL. + + + + + 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 time to wait before closing unused connections in the pool if the count + of all connections exeeds MinPoolSize. + + + If connection pool contains unused connections for ConnectionLifeTime seconds, + the half of them will be closed. If there will be unused connections in a second + later then again the half of them will be closed and so on. + This strategy provide smooth change of connection count in the pool. + + The time (in seconds) to wait. The default value is 15 seconds. + + + + Gets 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. + + + + Whether datareaders are loaded in their entirety (for compatibility with earlier code). + + + + + Gets the database server name. + + + + + Gets flag indicating if we are using Synchronous notification or not. + The default value is false. + + + + + 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 or ConnectionState.Closed + + + + Compatibility version. + + + + + Version of the PostgreSQL backend. + This can only be called when there is an active connection. + + + + + PostgreSQL server version. + + + + + Protocol version in use. + This can only be called when there is an active connection. + Always retuna Version3 + + + + + Whether the backend is an AWS Redshift instance + + + + + 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). + + + + + Report whether the backend understands the hex byte format (>= 9.0). + + + + + The connector object connected to the backend. + + + + + Gets the NpgsqlConnectionStringBuilder containing the parsed connection string values. + + + + + User name. + + + + + Use extended types. + + + + + Password. + + + + + Determine if connection pooling will be used for this connection. + + + + + DB provider factory. + + + + + Return an exact copy of this NpgsqlConnectionString. + + + + + No integrated security if we're on mono and .NET 4.5 because of ClaimsIdentity, + see https://github.com/npgsql/Npgsql/issues/133 + + + + + This function will set value for known key, both private member and base[key]. + + + + + value, coerced as needed to the stored type. + + + + The function will modify private member only, not base[key]. + + + + value, coerced as needed to the stored type. + + + + The function will access private member only, not base[key]. + + + value. + + + + Clear the member and assign them to the default value. + + + + + Gets or sets the backend server host name. + + + + + Gets or sets the backend server port. + + + + + Gets or sets the name of the database to be used after a connection is opened. + + The name of the database to be + used after a connection is opened. + + + + Gets or sets the login user name. + + + + + Gets or sets the login password as a UTF8 encoded byte array. + + + + + Sets the login password as a string. + + + + + Gets or sets the krbsrvname. + + + + + Gets or sets a value indicating whether to attempt to use SSL. + + + + + Gets or sets a value indicating whether to attempt to use SSL. + + + + + Gets or sets the time to wait while trying to establish a connection + before terminating the attempt and generating an error. + + The time (in seconds) to wait for a connection to open. The default value is 15 seconds. + + + + Gets or sets the schema search path. + + + + + Gets or sets a value indicating whether connection pooling should be used. + + + + + Gets or sets the time to wait before closing unused connections in the pool if the count + of all connections exeeds MinPoolSize. + + + If connection pool contains unused connections for ConnectionLifeTime seconds, + the half of them will be closed. If there will be unused connections in a second + later then again the half of them will be closed and so on. + This strategy provide smooth change of connection count in the pool. + + The time (in seconds) to wait. The default value is 15 seconds. + + + + Gets or sets the minimum connection pool size. + + + + + Gets or sets the maximum connection pool size. + + + + + Gets or sets a value indicating whether to listen for notifications and report them between command activity. + + + + + Gets the time to wait while trying to execute a command + before terminating the attempt and generating an error. + + The time (in seconds) to wait for a command to complete. The default value is 20 seconds. + + + + Gets or sets a value indicating whether datareaders are loaded in their entirety (for compatibility with earlier code). + + + + + Compatibilty version. When possible, behaviour caused by breaking changes will be preserved + if this version is less than that where the breaking change was introduced. + + + + + Gets or sets the ootional application name parameter to be sent to the backend during connection initiation. + + + + + Gets or sets a value indicating whether to silently Prepare() all commands before execution. + + + + + Gets or sets the specified backend communication protocol version. + + + + + Gets the backend encoding. Always returns "UTF8". + + + + + Case insensative accessor for indivual connection string values. + + + + + Set both ImplicitDefault and ExplicitDefault to the 's default value. + + + + + + + + Set ImplicitDefault to the default value of 's type, + and ExplicitDefault to . + + + + + + + + Represents the method that allows the application to provide a certificate collection to be used for SSL clien authentication + + A X509CertificateCollection to be filled with one or more client certificates. + + + + Represents the method that is called to validate the certificate provided by the server during an SSL handshake + + The server's certificate + The certificate chain containing the certificate's CA and any intermediate authorities + Any errors that were detected + + + + !!! Helper class, for compilation only. + Connector implements the logic for the Connection Objects to + access the physical connection to the database, and isolate + the application developer from connection pooling internals. + + + + + Whether the backend is an AWS Redshift instance + + + + + Constructor. + + Connection string. + Pooled + Controls whether the connector can be shared. + + + + This method checks if the connector is still ok. + We try to send a simple query text, select 1 as ConnectionTest; + + + + + This method is responsible for releasing all resources associated with this Connector. + + + + + This method is responsible to release all portals used by this Connector. + + + + + Modify the backend statement_timeout value if needed. + + New timeout + + + + Default SSL CertificateSelectionCallback implementation. + + + + + Default SSL CertificateValidationCallback implementation. + + + + + Default SSL PrivateKeySelectionCallback implementation. + + + + + Default SSL ProvideClientCertificatesCallback implementation. + + + + + Default SSL ValidateRemoteCertificateCallback implementation. + + + + + This method is required to set all the version dependent features flags. + SupportsPrepare means the server can use prepared query plans (7.3+) + + + + + Opens the physical connection to the server. + + Usually called by the RequestConnector + Method of the connection pool manager. + + + + Closes the physical connection to the server. + + + + + Returns next portal index. + + + + + Returns next plan index. + + + + + Occurs on NoticeResponses from the PostgreSQL backend. + + + + + Occurs on NotificationResponses from the PostgreSQL backend. + + + + + Called to provide client certificates for SSL handshake. + + + + + Mono.Security.Protocol.Tls.CertificateSelectionCallback delegate. + + + + + Mono.Security.Protocol.Tls.CertificateValidationCallback delegate. + + + + + Mono.Security.Protocol.Tls.PrivateKeySelectionCallback delegate. + + + + + Called to validate server's certificate during SSL handshake + + + + + Gets the current state of the connection. + + + + + Return Connection String. + + + + + Version of backend server this connector is connected to. + + + + + Whether the backend is an AWS Redshift instance + + + + + The physical connection socket to the backend. + + + + + The physical connection stream to the backend. + + + + + The top level stream to the backend. + + + + + Reports if this connector is fully connected. + + + + + The connection mediator. + + + + + Report if the connection is in a transaction. + + + + + Options that control certain aspects of native to backend conversions that depend + on backend version and status. + + + + + This class manages all connector objects, pooled AND non-pooled. + + + + Unique static instance of the connector pool + mamager. + + + Map of index to unused pooled connectors, avaliable to the + next RequestConnector() call. + This hashmap will be indexed by connection string. + This key will hold a list of queues of pooled connectors available to be used. + + + Timer for tracking unused connections in pools. + + + + Searches the shared and pooled connector lists for a + matching connector object or creates a new one. + + The NpgsqlConnection that is requesting + the connector. Its ConnectionString will be used to search the + pool for available connectors. + A connector object. + + + + Find a pooled connector. Handle shared/non-shared here. + + + + + Releases a connector, possibly back to the pool for future use. + + + Pooled connectors will be put back into the pool if there is room. + Shared connectors should just have their use count decremented + since they always stay in the shared pool. + + Connection to which the connector is leased. + The connector to release. + + + + Release a pooled connector. Handle shared/non-shared here. + + + + + Find an available pooled connector in the non-shared pool, or create + a new one if none found. + + + + + Put a pooled connector into the pool queue. + + Connection is leased to. + Connector to pool + + + + A queue with an extra Int32 for keeping track of busy connections. + + + + + Connections available to the end user + + + + + Connections currently in use + + + + + Represents information about COPY operation data transfer format as returned by server. + + + + + Only created when a CopyInResponse or CopyOutResponse is received by NpgsqlState.ProcessBackendResponses() + + + + + Returns true if this operation is currently active and field at given location is in binary format. + + + + + Returns true if this operation is currently active and in binary format. + + + + + Returns number of fields if this operation is currently active, otherwise -1 + + + + + Represents a PostgreSQL COPY FROM STDIN operation with a corresponding SQL statement + to execute against a PostgreSQL database + and an associated stream used to read data from (if provided by user) + or for writing it (when generated by driver). + Eg. new NpgsqlCopyIn("COPY mytable FROM STDIN", connection, streamToRead).Start(); + + + + + Creates NpgsqlCommand to run given query upon Start(). Data for the requested COPY IN operation can then be written to CopyData stream followed by a call to End() or Cancel(). + + + + + Given command is run upon Start(). Data for the requested COPY IN operation can then be written to CopyData stream followed by a call to End() or Cancel(). + + + + + Given command is executed upon Start() and all data from fromStream is passed to it as copy data. + + + + + Returns true if this operation is currently active and field at given location is in binary format. + + + + + Command specified upon creation is executed as a non-query. + If CopyStream is set upon creation, it will be flushed to server as copy data, and operation will be finished immediately. + Otherwise the CopyStream member can be used for writing copy data to server and operation finished with a call to End() or Cancel(). + + + + + Called after writing all data to CopyStream to successfully complete this copy operation. + + + + + Withdraws an already started copy operation. The operation will fail with given error message. + Will do nothing if current operation is not active. + + + + + Returns true if the connection is currently reserved for this operation. + + + + + The stream provided by user or generated upon Start(). + User may provide a stream to constructor; it is used to pass to server all data read from it. + Otherwise, call to Start() sets this to a writable NpgsqlCopyInStream that passes all data written to it to server. + In latter case this is only available while the copy operation is active and null otherwise. + + + + + Returns true if this operation is currently active and in binary format. + + + + + Returns number of fields expected on each input row if this operation is currently active, otherwise -1 + + + + + The Command used to execute this copy operation. + + + + + Set before a COPY IN query to define size of internal buffer for reading from given CopyStream. + + + + + Represents an ongoing COPY FROM STDIN operation. + Provides methods to push data to server and end or cancel the operation. + + + + + Called from NpgsqlState.ProcessBackendResponses upon CopyInResponse. + If CopyStream is already set, it is used to read data to push to server, after which the copy is completed. + Otherwise CopyStream is set to a writable NpgsqlCopyInStream that calls SendCopyData each time it is written to. + + + + + Sends given packet to server as a CopyData message. + Does not check for notifications! Use another thread for that. + + + + + Sends CopyDone message to server. Handles responses, ie. may throw an exception. + + + + + Sends CopyFail message to server. Handles responses, ie. should always throw an exception: + in CopyIn state the server responds to CopyFail with an error response; + outside of a CopyIn state the server responds to CopyFail with an error response; + without network connection or whatever, there's going to eventually be a failure, timeout or user intervention. + + + + + Copy format information returned from server. + + + + + Stream for writing data to a table on a PostgreSQL version 7.4 or newer database during an active COPY FROM STDIN operation. + Passes data exactly as is and when given, so see to it that you use server encoding, correct format and reasonably sized writes! + + + + + Created only by NpgsqlCopyInState.StartCopy() + + + + + Successfully completes copying data to server. Returns after operation is finished. + Does nothing if this stream is not the active copy operation writer. + + + + + Withdraws an already started copy operation. The operation will fail with given error message. + Does nothing if this stream is not the active copy operation writer. + + + + + Writes given bytes to server. + Fails if this stream is not the active copy operation writer. + + + + + Flushes stream contents to server. + Fails if this stream is not the active copy operation writer. + + + + + Not readable + + + + + Not seekable + + + + + Not supported + + + + + True while this stream can be used to write copy data to server + + + + + False + + + + + True + + + + + False + + + + + Number of bytes written so far + + + + + Number of bytes written so far; not settable + + + + + Represents a PostgreSQL COPY TO STDOUT operation with a corresponding SQL statement + to execute against a PostgreSQL database + and an associated stream used to write results to (if provided by user) + or for reading the results (when generated by driver). + Eg. new NpgsqlCopyOut("COPY (SELECT * FROM mytable) TO STDOUT", connection, streamToWrite).Start(); + + + + + Creates NpgsqlCommand to run given query upon Start(), after which CopyStream provides data from database as requested in the query. + + + + + Given command is run upon Start(), after which CopyStream provides data from database as requested in the query. + + + + + Given command is executed upon Start() and all requested copy data is written to toStream immediately. + + + + + Returns true if this operation is currently active and field at given location is in binary format. + + + + + Command specified upon creation is executed as a non-query. + If CopyStream is set upon creation, all copy data from server will be written to it, and operation will be finished immediately. + Otherwise the CopyStream member can be used for reading copy data from server until no more data is available. + + + + + Flush generated CopyStream at once. Effectively reads and discard all the rest of copy data from server. + + + + + Returns true if the connection is currently reserved for this operation. + + + + + The stream provided by user or generated upon Start() + + + + + The Command used to execute this copy operation. + + + + + Returns true if this operation is currently active and in binary format. + + + + + Returns number of fields if this operation is currently active, otherwise -1 + + + + + Faster alternative to using the generated CopyStream. + + + + + Represents an ongoing COPY TO STDOUT operation. + Provides methods to read data from server or end the operation. + + + + + Called from NpgsqlState.ProcessBackendResponses upon CopyOutResponse. + If CopyStream is already set, it is used to write data received from server, after which the copy ends. + Otherwise CopyStream is set to a readable NpgsqlCopyOutStream that receives data from server. + + + + + Called from NpgsqlOutStream.Read to read copy data from server. + + + + + Copy format information returned from server. + + + + + Stream for reading data from a table or select on a PostgreSQL version 7.4 or newer database during an active COPY TO STDOUT operation. + Passes data exactly as provided by the server. + + + + + Created only by NpgsqlCopyOutState.StartCopy() + + + + + Discards copy data as long as server pushes it. Returns after operation is finished. + Does nothing if this stream is not the active copy operation reader. + + + + + Not writable. + + + + + Not flushable. + + + + + Copies data read from server to given byte buffer. + Since server returns data row by row, length will differ each time, but it is only zero once the operation ends. + Can be mixed with calls to the more efficient NpgsqlCopyOutStream.Read() : byte[] though that would not make much sense. + + + + + Not seekable + + + + + Not supported + + + + + Returns a whole row of data from server without extra work. + If standard Stream.Read(...) has been called before, it's internal buffers remains are returned. + + + + + True while this stream can be used to read copy data from server + + + + + True + + + + + False + + + + + False + + + + + Number of bytes read so far + + + + + Number of bytes read so far; can not be set. + + + + + Writes given objects into a stream for PostgreSQL COPY in default copy format (not CSV or BINARY). + + + + + Default delimiter. + + + + + Default separator. + + + + + Default null. + + + + + Default escape. + + + + + Default quote. + + + + + Default buffer size. + + + + + Constructor. + + + + + + Flush buffers. + + + + + Flush rows. + + + + + Flush fields. + + + + + Close the serializer. + + + + + Escape sequence for the given character. + + + + + + + Make room for bytes. + + + + + + Add bytes. + + + + + + End row. + + + + + Prefix field. + + + + + Field added. + + + + + Add null. + + + + + Add string. + + + + + + add Int32. + + + + + + Add Int64. + + + + + + Add number. + + + + + + Add bool + + + + + + Add DateTime. + + + + + + Report whether the serializer is active. + + + + + To Stream. + + + + + Delimiter. + + + + + Separator. + + + + + Escape. + + + + + Null. + + + + + Buffer size. + + + + + Report whether space remains in the buffer. + + + + + Strings to escape. + + + + + Escape sequence bytes. + + + + + 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. + + + + + Default constructor. + + + + + Constructor. + + + + + + Constructor. + + + + + + + Constructor. + + + + + + + Create row updated event. + + + + + + + + + + Create row updating event. + + + + + + + + + + Raise the RowUpdated event. + + + + + + Raise the RowUpdating event. + + + + + + Row updated event. + + + + + Row updating event. + + + + + Delete command. + + + + + Select command. + + + + + Update command. + + + + + Insert command. + + + + + Provides a means of reading a forward-only stream of rows from a PostgreSQL backend. This class cannot be inherited. + + + + + Return the data type name of the column at index . + + + + + Return the data type of the column at index . + + + + + Return the Npgsql specific data type of the column at requested ordinal. + + column position + Appropriate Npgsql type for column. + + + + Return the column name of the column at index . + + + + + Return the data type OID of the column at index . + + FIXME: Why this method returns String? + + + + Has ordinal. + + + + + + + Return the column name of the column named . + + + + + Return the data DbType of the column at index . + + + + + Return the data NpgsqlDbType of the column at index . + + + + + Get specified field value. + /// + + + + + + Get the value of a column as a . + If the differences between and + in handling of days and months is not important to your application, use + instead. + + Index of the field to find. + value of the field. + + + + Get specified field value. + /// + + + + + + Get specified field value. + /// + + + + + + Get specified field value. + /// + + + + + + Get specified field value. + /// + + + + + + Get specified field value. + /// + + + + + + Send closed event. + + + + + Gets the value of a column converted to a Guid. + + + + + Gets the value of a column as Int16. + + + + + Gets the value of a column as Int32. + + + + + Gets the value of a column as Int64. + + + + + Gets the value of a column as Single. + + + + + Gets the value of a column as Double. + + + + + Gets the value of a column as String. + + + + + Gets the value of a column as Decimal. + + + + + Gets the value of a column as TimeSpan. + + + + + Copy values from each column in the current row into . + + Destination for column values. + The number of column values copied. + + + + Copy values from each column in the current row into . + + An array appropriately sized to store values from all columns. + The number of column values copied. + + + + Gets the value of a column as Boolean. + + + + + Gets the value of a column as Byte. + + + + + Gets the value of a column as Char. + + + + + Gets the value of a column as DateTime. + + + + + Returns a System.Data.DataTable that describes the column metadata of the DataReader. + + + + + This methods parses the command text and tries to get the tablename + from it. + + + + + Get enumerator. + + + + + + Is raised whenever Close() is called. + + + + + Gets the number of columns in the current row. + + + + + Gets the value of a column in its native format. + + + + + Gets the value of a column in its native format. + + + + + 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. + + + + + Contains the column names as the keys + + + + + Contains all unique columns + + + + + This is the primary implementation of NpgsqlDataReader. It is the one used in normal cases (where the + preload-reader option is not set in the connection string to resolve some potential backwards-compatibility + issues), the only implementation used internally, and in cases where CachingDataReader is used, it is still + used to do the actual "leg-work" of turning a response stream from the server into a datareader-style + object - with CachingDataReader then filling it's cache from here. + + + + + Iterate through the objects returned through from the server. + If it's a CompletedResponse the rowsaffected count is updated appropriately, + and we iterate again, otherwise we return it (perhaps updating our cache of pending + rows if appropriate). + + The next we will deal with. + + + + Advances the data reader to the next result, when multiple result sets were returned by the PostgreSQL backend. + + True if the reader was advanced, otherwise false. + + + + Releases the resources used by the NpgsqlCommand. + + + + + Closes the data reader object. + + + + + Advances the data reader to the next result, when multiple result sets were returned by the PostgreSQL backend. + + True if the reader was advanced, otherwise false. + + + + Advances the data reader to the next row. + + True if the reader was advanced, otherwise false. + + + + Return the value of the column at index . + + + + + Gets raw data from a column. + + + + + Gets raw data from a column. + + + + + Report whether the value in a column is DBNull. + + + + + Gets the number of rows changed, inserted, or deleted by execution of the SQL statement. + + + + + Indicates if NpgsqlDatareader has rows to be read. + + + + + Provides an implementation of NpgsqlDataReader in which all data is pre-loaded into memory. + This operates by first creating a ForwardsOnlyDataReader as usual, and then loading all of it's + Rows into memory. There is a general principle that when there is a trade-off between a class design that + is more efficient and/or scalable on the one hand and one that is less efficient but has more functionality + (in this case the internal-only functionality of caching results) that one can build the less efficent class + from the most efficient without significant extra loss in efficiency, but not the other way around. The relationship + between ForwardsOnlyDataReader and CachingDataReader is an example of this). + Since the interface presented to the user is still forwards-only, queues are used to + store this information, so that dequeueing as we go we give the garbage collector the best opportunity + possible to reclaim any memory that is no longer in use. + ForwardsOnlyDataReader being used to actually + obtain the information from the server means that the "leg-work" is still only done (and need only be + maintained) in one place. + This class exists to allow for certain potential backwards-compatibility issues to be resolved + with little effort on the part of affected users. It is considerably less efficient than ForwardsOnlyDataReader + and hence never used internally. + + + + + This is the base class for NpgsqlDescribeStatement and NpgsqlDescribePortal. + + + + + + This class represents the Statement Describe message sent to PostgreSQL + server. + + + + + + This class represents the Portal Describe message sent to PostgreSQL + server. + + + + + + EventArgs class to send Notice parameters, which are just NpgsqlError's in a lighter context. + + + + + Notice information. + + + + + This class represents the ErrorResponse and NoticeResponse + message sent from PostgreSQL server. + + + + + Return a string representation of this error object. + + + + + Severity code. All versions. + + + + + Error code. PostgreSQL 7.4 and up. + + + + + Terse error message. All versions. + + + + + Detailed error message. PostgreSQL 7.4 and up. + + + + + Suggestion to help resolve the error. PostgreSQL 7.4 and up. + + + + + Position (one based) within the query string where the error was encounterd. PostgreSQL 7.4 and up. + + + + + Position (one based) within the query string where the error was encounterd. This position refers to an internal command executed for example inside a PL/pgSQL function. PostgreSQL 7.4 and up. + + + + + Internal query string where the error was encounterd. This position refers to an internal command executed for example inside a PL/pgSQL function. PostgreSQL 7.4 and up. + + + + + Trace back information. PostgreSQL 7.4 and up. + + + + + Source file (in backend) reporting the error. PostgreSQL 7.4 and up. + + + + + Source file line number (in backend) reporting the error. PostgreSQL 7.4 and up. + + + + + Source routine (in backend) reporting the error. PostgreSQL 7.4 and up. + + + + + Schema name which relates to the error. PostgreSQL 9.3 and up. + + + + + Table name which relates to the error. PostgreSQL 9.3 and up. + + + + + Column name which relates to the error. PostgreSQL 9.3 and up. + + + + + Data type of column which relates to the error. PostgreSQL 9.3 and up. + + + + + Constraint name which relates to the error. PostgreSQL 9.3 and up. + + + + + String containing the sql sent which produced this error. + + + + + Backend protocol version in use. + + + + + Error and notice message field codes + + + + + Severity: the field contents are ERROR, FATAL, or PANIC (in an error message), + or WARNING, NOTICE, DEBUG, INFO, or LOG (in a notice message), or a localized + translation of one of these. Always present. + + + + + Code: the SQLSTATE code for the error (see Appendix A). Not localizable. Always present. + + + + + Message: the primary human-readable error message. This should be accurate + but terse (typically one line). Always present. + + + + + Detail: an optional secondary error message carrying more detail about the problem. + Might run to multiple lines. + + + + + Hint: an optional suggestion what to do about the problem. This is intended to differ + from Detail in that it offers advice (potentially inappropriate) rather than hard facts. + Might run to multiple lines. + + + + + Position: the field value is a decimal ASCII integer, indicating an error cursor + position as an index into the original query string. The first character has index 1, + and positions are measured in characters not bytes. + + + + + Internal position: this is defined the same as the P field, but it is used when the + cursor position refers to an internally generated command rather than the one submitted + by the client. + The q field will always appear when this field appears. + + + + + Internal query: the text of a failed internally-generated command. + This could be, for example, a SQL query issued by a PL/pgSQL function. + + + + + Where: an indication of the context in which the error occurred. + Presently this includes a call stack traceback of active procedural language functions + and internally-generated queries. The trace is one entry per line, most recent first. + + + + + Schema name: if the error was associated with a specific database object, + the name of the schema containing that object, if any. + + + + + Table name: if the error was associated with a specific table, the name of the table. + (Refer to the schema name field for the name of the table's schema.) + + + + + Column name: if the error was associated with a specific table column, the name of the column. + (Refer to the schema and table name fields to identify the table.) + + + + + Data type name: if the error was associated with a specific data type, the name of the data type. + (Refer to the schema name field for the name of the data type's schema.) + + + + + Constraint name: if the error was associated with a specific constraint, the name of the constraint. + Refer to fields listed above for the associated table or domain. + (For this purpose, indexes are treated as constraints, even if they weren't created with constraint syntax.) + + + + + File: the file name of the source-code location where the error was reported. + + + + + Line: the line number of the source-code location where the error was reported. + + + + + Routine: the name of the source-code routine reporting the error. + + + + + The level of verbosity of the NpgsqlEventLog + + + + + Don't log at all + + + + + Only log the most common issues + + + + + Log everything + + + + + This class handles all the Npgsql event and debug logging + + + + + Writes a string to the Npgsql event log if msglevel is bigger then NpgsqlEventLog.Level + + + This method is obsolete and should no longer be used. + It is likely to be removed in future versions of Npgsql + + The message to write to the event log + The minimum LogLevel for which this message should be logged. + + + + Writes a string to the Npgsql event log if msglevel is bigger then NpgsqlEventLog.Level + + The ResourceManager to get the localized resources + The name of the resource that should be fetched by the ResourceManager + The minimum LogLevel for which this message should be logged. + The additional parameters that shall be included into the log-message (must be compatible with the string in the resource): + + + + Writes the default log-message for the action of calling the Get-part of an Indexer to the log file. + + The minimum LogLevel for which this message should be logged. + The name of the class that contains the Indexer + The parameter given to the Indexer + + + + Writes the default log-message for the action of calling the Set-part of an Indexer to the logfile. + + The minimum LogLevel for which this message should be logged. + The name of the class that contains the Indexer + The parameter given to the Indexer + The value the Indexer is set to + + + + Writes the default log-message for the action of calling the Get-part of a Property to the logfile. + + The minimum LogLevel for which this message should be logged. + The name of the class that contains the Property + The name of the Property + + + + Writes the default log-message for the action of calling the Set-part of a Property to the logfile. + + The minimum LogLevel for which this message should be logged. + The name of the class that contains the Property + The name of the Property + The value the Property is set to + + + + Writes the default log-message for the action of calling a Method without Arguments to the logfile. + + The minimum LogLevel for which this message should be logged. + The name of the class that contains the Method + The name of the Method + + + + Writes the default log-message for the action of calling a Method with one Argument to the logfile. + + The minimum LogLevel for which this message should be logged. + The name of the class that contains the Method + The name of the Method + The value of the Argument of the Method + + + + Writes the default log-message for the action of calling a Method with two Arguments to the logfile. + + The minimum LogLevel for which this message should be logged. + The name of the class that contains the Method + The name of the Method + The value of the first Argument of the Method + The value of the second Argument of the Method + + + + Writes the default log-message for the action of calling a Method with three Arguments to the logfile. + + The minimum LogLevel for which this message should be logged. + The name of the class that contains the Method + The name of the Method + The value of the first Argument of the Method + The value of the second Argument of the Method + The value of the third Argument of the Method + + + + Writes the default log-message for the action of calling a Method with more than three Arguments to the logfile. + + The minimum LogLevel for which this message should be logged. + The name of the class that contains the Method + The name of the Method + A Object-Array with zero or more Ojects that are Arguments of the Method. + + + + Sets/Returns the filename to use for logging. + + The filename of the current Log file. + + + + Sets/Returns whether Log messages should be echoed to the console + + true if Log messages are echoed to the console, otherwise false + + + + The exception that is thrown when the PostgreSQL backend reports errors. + + + + + Construct a backend error exception based on a list of one or more + backend errors. The basic Exception.Message will be built from the + first (usually the only) error in the list. + + + + + Get object data. + + + + + + + Format a .NET style exception string. + Include all errors in the list, including any hints. + + + + + Append a line to the given Stream, first checking for zero-length. + + + + + Provide access to the entire list of errors provided by the PostgreSQL backend. + + + + + Severity code. All versions. + + + + + Error code. PostgreSQL 7.4 and up. + + + + + Basic error message. All versions. + + + + + Detailed error message. PostgreSQL 7.4 and up. + + + + + Suggestion to help resolve the error. PostgreSQL 7.4 and up. + + + + + Position (one based) within the query string where the error was encounterd. PostgreSQL 7.4 and up. + + + + + Trace back information. PostgreSQL 7.4 and up. + + + + + Source file (in backend) reporting the error. PostgreSQL 7.4 and up. + + + + + Source file line number (in backend) reporting the error. PostgreSQL 7.4 and up. + + + + + Source routine (in backend) reporting the error. PostgreSQL 7.4 and up. + + + + + Schema name which relates to the error. PostgreSQL 9.3 and up. + + + + + Table name which relates to the error. PostgreSQL 9.3 and up. + + + + + Column name which relates to the error. PostgreSQL 9.3 and up. + + + + + Data type of column which relates to the error. PostgreSQL 9.3 and up. + + + + + Constraint name which relates to the error. PostgreSQL 9.3 and up. + + + + + String containing the sql sent which produced this error. + + + + + Returns the entire list of errors provided by the PostgreSQL backend. + + + + + This class represents the Execute message sent to PostgreSQL + server. + + + + + + A factory to create instances of various Npgsql objects. + + + + + Creates an NpgsqlCommand object. + + + + + This class represents the Flush message sent to PostgreSQL + server. + + + + + + For classes representing simple messages, + consisting only of a message code and length identifier, + sent from the client to the server. + + + + + This class is responsible for serving as bridge between the backend + protocol handling and the core classes. It is used as the mediator for + exchanging data generated/sent from/to backend. + + + + + + The current command timeout on the backend. This is set via "SET statement_timeout = (milliseconds)". + A value of -1 means the backend's timeout value is unknown because it has not yet been set. + + + + + EventArgs class to send Notification parameters. + + + + + Process ID of the PostgreSQL backend that sent this notification. + + + + + Condition that triggered that notification. + + + + + Additional Information From Notifiying Process (for future use, currently postgres always sets this to an empty string) + + + + + This class represents a parameter to a command that will be sent to server + + + + + Initializes a new instance of the NpgsqlParameter class. + + + + + Initializes a new instance of the NpgsqlParameter + class with the parameter m_Name and a value of the new NpgsqlParameter. + + The m_Name of the parameter to map. + An Object that is the value of the NpgsqlParameter. + +

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

+

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

+
+
+ + + Initializes a new instance of the NpgsqlParameter + class with the parameter m_Name and the data type. + + The m_Name of the parameter to map. + One of the DbType values. + + + + Initializes a new instance of the NpgsqlParameter. + + The m_Name of the parameter to map. + One of the DbType values. + + + + Initializes a new instance of the NpgsqlParameter. + + The m_Name of the parameter to map. + One of the NpgsqlDbType values. + The length of the parameter. + + + + Initializes a new instance of the NpgsqlParameter. + + The m_Name of the parameter to map. + One of the DbType values. + The length of the parameter. + + + + Initializes a new instance of the NpgsqlParameter + + The m_Name of the parameter to map. + One of the NpgsqlDbType values. + The length of the parameter. + The m_Name of the source column. + + + + Initializes a new instance of the NpgsqlParameter. + + The m_Name of the parameter to map. + One of the DbType values. + The length of the parameter. + The m_Name of the source column. + + + + Initializes a new instance of the NpgsqlParameter. + + The m_Name of the parameter to map. + One of the NpgsqlDbType values. + The length of the parameter. + The m_Name of the source column. + One of the ParameterDirection values. + true if the value of the field can be null, otherwise false. + The total number of digits to the left and right of the decimal point to which + Value is resolved. + The total number of decimal places to which + Value is resolved. + One of the DataRowVersion values. + An Object that is the value + of the NpgsqlParameter. + + + + Initializes a new instance of the NpgsqlParameter. + + The m_Name of the parameter to map. + One of the DbType values. + The length of the parameter. + The m_Name of the source column. + One of the ParameterDirection values. + true if the value of the field can be null, otherwise false. + The total number of digits to the left and right of the decimal point to which + Value is resolved. + The total number of decimal places to which + Value is resolved. + One of the DataRowVersion values. + An Object that is the value + of the NpgsqlParameter. + + + + Reset DBType. + + + + + Creates a new NpgsqlParameter that + is a copy of the current instance. + + A new NpgsqlParameter that is a copy of this instance. + + + + The collection to which this parameter belongs, if any. + + + + + Gets or sets the maximum number of digits used to represent the + 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. + + + + Whether to use an explicit cast when included in a query. + + + + + 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 String. + + + + Gets or sets the DbType of the parameter. + + One of the DbType values. The default is String. + + + + Gets or sets a value indicating whether the parameter is input-only, + output-only, bidirectional, or a stored procedure return value parameter. + + One of the ParameterDirection + values. The default is Input. + + + + Gets or sets a value indicating whether the parameter accepts null values. + + true if null values are accepted; otherwise, false. The default is false. + + + + Gets or sets the m_Name of the NpgsqlParameter. + + The m_Name of the NpgsqlParameter. + The default is an empty string. + + + + The m_Name scrubbed of any optional marker + + + + + Gets or sets the m_Name of the source column that is mapped to the + DataSet and used for loading or + returning the Value. + + The m_Name of the source column that is mapped to the + DataSet. The default is an empty string. + + + + Gets or sets the DataRowVersion + to use when loading Value. + + One of the DataRowVersion values. + The default is Current. + + + + 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. + + + + Source column mapping. + + + + + 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. + + + + + Adds the specified NpgsqlParameter object to the NpgsqlParameterCollection. + + The NpgsqlParameter to add to the collection. + The index of the new NpgsqlParameter object. + + + + Obsolete. Use AddWithValue instead. + + + Use caution when using this overload of the + Add method to specify integer parameter values. + Because this overload takes a value of type Object, + you must convert the integral value to an Object + type when the value is zero, as the following C# example demonstrates. + parameters.Add(":pname", Convert.ToInt32(0)); + If you do not perform this conversion, the compiler will assume you + are attempting to call the NpgsqlParameterCollection.Add(string, DbType) overload. + + + + + Adds a NpgsqlParameter to the NpgsqlParameterCollection given the specified parameter name and value. + + The name of the NpgsqlParameter. + The Value of the NpgsqlParameter to add to the collection. + The paramater that was added. + + + + Adds a NpgsqlParameter to the NpgsqlParameterCollection given the specified parameter name and value. + + The name of the NpgsqlParameter. + The Value of the NpgsqlParameter to add to the collection. + One of the NpgsqlDbType values. + The paramater that was added. + + + + Adds a NpgsqlParameter to the NpgsqlParameterCollection given the specified parameter name and value. + + The name of the NpgsqlParameter. + The Value of the NpgsqlParameter to add to the collection. + One of the NpgsqlDbType values. + The length of the column. + The paramater that was added. + + + + Adds a NpgsqlParameter to the NpgsqlParameterCollection given the specified parameter name and value. + + The name of the NpgsqlParameter. + The Value of the NpgsqlParameter to add to the collection. + One of the NpgsqlDbType values. + The length of the column. + The name of the source column. + The paramater that was added. + + + + Adds a NpgsqlParameter to the NpgsqlParameterCollection given the parameter name and the data type. + + 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. + + + + 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. + + + + 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. + + + + + + + In methods taking an object as argument this method is used to verify + that the argument has the type NpgsqlParameter + + The object to verify + + + + 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[] + + + + 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. + + + + Report whether the collection is read only. Always false. + + + + + 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. + + + + Sync root. + + + + + This class represents the ParameterStatus message sent from PostgreSQL + server. + + + + + + This class represents the Parse message sent to PostgreSQL + server. + + + + + + This class represents a PasswordPacket message sent to backend + PostgreSQL. + + + + + Used when a connection is closed + + + + + This is the abstract base class for NpgsqlAsciiRow and NpgsqlBinaryRow. + + + + + The index of the current field in the stream, i.e. the one that hasn't + been read yet + + + + + This class represents a RowDescription message sent from + the PostgreSQL. + + + + + + This struct represents the internal data of the RowDescription message. + + + + + 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. + + + + This class represents a StartupPacket message of PostgreSQL + protocol. + + + + + + Represents a completed response message. + + + + + This class represents the Sync message sent to PostgreSQL + server. + + + + + + Represents a transaction to be made in a PostgreSQL database. This class cannot be inherited. + + + + + Dispose. + + + + + + Commits the database transaction. + + + + + Rolls back a transaction from a pending state. + + + + + Rolls back a transaction from a pending savepoint state. + + + + + Creates a transaction save point. + + + + + Cancel the transaction without telling the backend about it. This is + used to make the transaction go away when closing a connection. + + + + + Gets the NpgsqlConnection + object associated with the transaction, or a null reference if the + transaction is no longer valid. + + The NpgsqlConnection + object associated with the transaction. + + + + DB connection. + + + + + Specifies the IsolationLevel for this transaction. + + The IsolationLevel for this transaction. + The default is ReadCommitted. + + + + This class provides many util methods to handle + reading and writing of PostgreSQL protocol messages. + + + + + This method takes a ProtocolVersion and returns an integer + version number that the Postgres backend will recognize in a + startup packet. + + + + + This method takes a version string as returned by SELECT VERSION() and returns + a valid version string ("7.2.2" for example). + This is only needed when running protocol version 2. + This does not do any validity checks. + + + + + This method gets a C NULL terminated string from the network stream. + It keeps reading a byte in each time until a NULL byte is returned. + It returns the resultant string of bytes read. + This string is sent from backend. + + + + + Reads requested number of bytes from stream with retries until Stream.Read returns 0 or count is reached. + + Stream to read + byte buffer to fill + starting position to fill the buffer + number of bytes to read + The number of bytes read. May be less than count if no more bytes are available. + + + + Reads requested number of bytes from . If output matches exactly, and == false, is returned directly. + + Source array. + Starting position to read from + Number of bytes to read + Force a copy, even if the output is an exact copy of . + byte[] containing data requested. + + + + This method writes a string to the network stream. + + + + + This method writes a string to the network stream. + + + + + This method writes a C NULL terminated string to the network stream. + It appends a NULL terminator to the end of the String. + + + + + This method writes a C NULL terminated string to the network stream. + It appends a NULL terminator to the end of the String. + + + + + This method writes a byte to the stream. It also enables logging of them. + + + + + This method writes a byte to the stream. It also enables logging of them. + + + + + This method writes a set of bytes to the stream. It also enables logging of them. + + + + + This method writes a set of bytes to the stream. It also enables logging of them. + + + + + This method writes a C NULL terminated string limited in length to the + backend server. + It pads the string with null bytes to the size specified. + + + + + This method writes a C NULL terminated byte[] limited in length to the + backend server. + It pads the string with null bytes to the size specified. + + + + + Write a 32-bit integer to the given stream in the correct byte order. + + + + + Read a 32-bit integer from the given stream in the correct byte order. + + + + + Read a 32-bit integer from the given array in the correct byte order. + + + + + Write a 16-bit integer to the given stream in the correct byte order. + + + + + Read a 16-bit integer from the given stream in the correct byte order. + + + + + Read a 16-bit integer from the given array in the correct byte order. + + + + + Copy and possibly reverse a byte array, depending on host architecture endienness. + + Source byte array. + Force a copy even if no swap is performed. + , reversed if on a little-endian architecture, copied if required. + + + + Copy and possibly reverse a byte array, depending on host architecture endienness. + + Source byte array. + Starting offset in source array. + Number of bytes to copy. + Force a copy even if no swap is performed. + , reversed if on a little-endian architecture, copied if required. + + + + Represent the frontend/backend protocol version. + + + + + Represent the backend server version. + As this class offers no functionality beyond that offered by it has been + deprecated in favour of that class. + + + + + + Returns the string representation of this version in three place dot notation (Major.Minor.Patch). + + + + + Server version major number. + + + + + Server version minor number. + + + + + Server version patch level number. + + + + + A class to handle everything associated with SSPI authentication + + + + + Simplified SecBufferDesc struct with only one SecBuffer + + +
+
diff --git a/src/Frapid.Web/Areas/Frapid.Account/packages/Npgsql.2.2.6/lib/net45/de/Npgsql.resources.dll b/src/Frapid.Web/Areas/Frapid.Account/packages/Npgsql.2.2.6/lib/net45/de/Npgsql.resources.dll new file mode 100644 index 00000000..978dec26 Binary files /dev/null and b/src/Frapid.Web/Areas/Frapid.Account/packages/Npgsql.2.2.6/lib/net45/de/Npgsql.resources.dll differ diff --git a/src/Frapid.Web/Areas/Frapid.Account/packages/Npgsql.2.2.6/lib/net45/es/Npgsql.resources.dll b/src/Frapid.Web/Areas/Frapid.Account/packages/Npgsql.2.2.6/lib/net45/es/Npgsql.resources.dll new file mode 100644 index 00000000..307d497e Binary files /dev/null and b/src/Frapid.Web/Areas/Frapid.Account/packages/Npgsql.2.2.6/lib/net45/es/Npgsql.resources.dll differ diff --git a/src/Frapid.Web/Areas/Frapid.Account/packages/Npgsql.2.2.6/lib/net45/fi/Npgsql.resources.dll b/src/Frapid.Web/Areas/Frapid.Account/packages/Npgsql.2.2.6/lib/net45/fi/Npgsql.resources.dll new file mode 100644 index 00000000..e11ec04e Binary files /dev/null and b/src/Frapid.Web/Areas/Frapid.Account/packages/Npgsql.2.2.6/lib/net45/fi/Npgsql.resources.dll differ diff --git a/src/Frapid.Web/Areas/Frapid.Account/packages/Npgsql.2.2.6/lib/net45/fr/Npgsql.resources.dll b/src/Frapid.Web/Areas/Frapid.Account/packages/Npgsql.2.2.6/lib/net45/fr/Npgsql.resources.dll new file mode 100644 index 00000000..f97065e0 Binary files /dev/null and b/src/Frapid.Web/Areas/Frapid.Account/packages/Npgsql.2.2.6/lib/net45/fr/Npgsql.resources.dll differ diff --git a/src/Frapid.Web/Areas/Frapid.Account/packages/Npgsql.2.2.6/lib/net45/ja/Npgsql.resources.dll b/src/Frapid.Web/Areas/Frapid.Account/packages/Npgsql.2.2.6/lib/net45/ja/Npgsql.resources.dll new file mode 100644 index 00000000..b2bc366f Binary files /dev/null and b/src/Frapid.Web/Areas/Frapid.Account/packages/Npgsql.2.2.6/lib/net45/ja/Npgsql.resources.dll differ diff --git a/src/Frapid.Web/Areas/Frapid.Account/packages/Npgsql.2.2.6/lib/net45/zh-CN/Npgsql.resources.dll b/src/Frapid.Web/Areas/Frapid.Account/packages/Npgsql.2.2.6/lib/net45/zh-CN/Npgsql.resources.dll new file mode 100644 index 00000000..cd1328bc Binary files /dev/null and b/src/Frapid.Web/Areas/Frapid.Account/packages/Npgsql.2.2.6/lib/net45/zh-CN/Npgsql.resources.dll differ diff --git a/src/Frapid.Web/Areas/Frapid.Account/packages/Npgsql.3.0.3/Npgsql.3.0.3.nupkg b/src/Frapid.Web/Areas/Frapid.Account/packages/Npgsql.3.0.3/Npgsql.3.0.3.nupkg deleted file mode 100644 index 7ea4568d..00000000 Binary files a/src/Frapid.Web/Areas/Frapid.Account/packages/Npgsql.3.0.3/Npgsql.3.0.3.nupkg and /dev/null differ diff --git a/src/Frapid.Web/Areas/Frapid.Account/packages/Npgsql.3.0.3/lib/net45/Npgsql.dll b/src/Frapid.Web/Areas/Frapid.Account/packages/Npgsql.3.0.3/lib/net45/Npgsql.dll deleted file mode 100644 index 27b64271..00000000 Binary files a/src/Frapid.Web/Areas/Frapid.Account/packages/Npgsql.3.0.3/lib/net45/Npgsql.dll and /dev/null differ diff --git a/src/Frapid.Web/Areas/Frapid.Account/packages/Npgsql.3.0.3/lib/net45/Npgsql.xml b/src/Frapid.Web/Areas/Frapid.Account/packages/Npgsql.3.0.3/lib/net45/Npgsql.xml deleted file mode 100644 index eeadd648..00000000 --- a/src/Frapid.Web/Areas/Frapid.Account/packages/Npgsql.3.0.3/lib/net45/Npgsql.xml +++ /dev/null @@ -1,6175 +0,0 @@ - - - - Npgsql - - - - - 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 - - - - - 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 - - - - - 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. - - - - - 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. - - - - - 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. - - - - - 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 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 destination portal (an empty string selects the unnamed portal). - - - - - The name of the source prepared statement (an empty string selects the unnamed prepared statement). - - - - - A simple query message. - - Note that since this is only used to send some specific control messages (e.g. start transaction) - and never arbitrary-length user-provided queries, this message is treated as simple and not chunking, - and only ASCII is supported. - - - - - 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 - - - - The query string to be parsed. - - - - - The name of the destination prepared statement (an empty string selects the unnamed prepared statement). - - - - - 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. - - - - - A generic interface for logging. - - - - Used to create logger instances of the given name. - - - - Creates a new INpgsqlLogger instance of the given name. - - - - - Manages logging for Npgsql, used to set the loggging provider. - - - - - The logging provider used for logging in Npgsql. - - - - - 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 NpgsqlException 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. - - - - 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. - - - - - 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 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. - - - - - 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. - - - - - 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. - - - - - 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. - - - - - - - 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. - - - - - 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 - - - - 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-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 line 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 polygon 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 line segment type. - - - 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 - - - - - The text handler to which we delegate encoding/decoding of the actual strings - - - - - 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). - - - - - 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-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 - - - - - Type handler for the Postgresql "char" type, used only internally - - - http://www.postgresql.org/docs/current/static/datatype-character.html - - - - - 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 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 type of the elements contained within this array - - - - - - The provider-specific type of the elements contained within this array, - - - - - - 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, - - - - - - http://www.postgresql.org/docs/current/static/datatype-oid.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 - - - - - 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 - - - - - http://www.postgresql.org/docs/current/static/datatype-uuid.html - - - - - http://www.postgresql.org/docs/current/static/datatype-money.html - - - - - http://www.postgresql.org/docs/current/static/datatype-datetime.html - - - - - 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 - - - - - 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 - - - - - 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-boolean.html - - - - - http://www.postgresql.org/docs/current/static/datatype-binary.html - - - - - 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) - - - - - 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 - - - - - 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. - - - - - Specifies the maximum number of queries we allow in a multiquery, separated by semicolons. - We limit this because of deadlocks: as we send Parse and Bind messages to the backend, the backend - replies with ParseComplete and BindComplete messages which we do not read until we finished sending - all messages. Once our buffer gets full the backend will get stuck writing, and then so will we. - - - - - 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 Update - method of the DbDataAdapter. - - 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. - - - - - 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 we send the Describe command right after the Parse and before the Bind, 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 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 - - - - 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. - - - - - 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 time to wait before closing unused connections in the pool if the count - of all connections exeeds MinPoolSize. - - - If connection pool contains unused connections for ConnectionLifeTime seconds, - the half of them will be closed. If there will be unused connections in a second - later then again the half of them will be closed and so on. - This strategy provide smooth change of connection count in the pool. - - The time (in seconds) to wait. The default value is 15 seconds. - - - - Gets 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 database server name. - - - - - Gets flag indicating if we are using Synchronous notification or not. - The default value is false. - - - - - Whether to use Windows integrated security to log in. - - - - - User name. - - - - - Determine if connection pooling will be used for this connection. - - - - - 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. - - - - - 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). - - - - - Report whether the backend understands the hex byte format (>= 9.0). - - - - - 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 STDIN operation, a high-performance data export mechanism from a PostgreSQL table. - - A COPY TO STDIN 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 FROM STDIN operation, a data import mechanism to a PostgreSQL table. - It is the user's responsibility to parse the textual input according to the format specified - in . - - A COPY TO STDIN 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 or FROM), 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 FROM STDIN or COPY TO 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. - - - - - Registers an enum type for use with this connection. - - Enum labels are mapped by string. The .NET enum labels must correspond exactly to the PostgreSQL labels; - if another label is used in the database, this can be specified for each label with a EnumLabelAttribute. - 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 registration is lost. - - - To avoid registering the type for each connection, use the method. - - - A PostgreSQL type name for the corresponding enum type in the database. - If null, the .NET type's name in lowercase will be used - - The .NET enum type to be registered - - - - Registers an enum type for use with all connections created from now on. Existing connections aren't affected. - - Enum labels are mapped by string. The .NET enum labels must correspond exactly to the PostgreSQL labels; - if another label is used in the database, this can be specified for each label with a EnumLabelAttribute. - If there is a discrepancy between the .NET and database labels while an enum is read or written, - an exception will be raised. - - - To register the type for a specific connection, use the method. - - - A PostgreSQL type name for the corresponding enum type in the database. - If null, the .NET type's name in lowercase will be used - - The .NET enum type to be associated - - - - 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. - - - - 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 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. - - - - - 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. - - - - - Whether connection pooling should be used. - - - - - The minimum connection pool size. - - - - - The maximum connection pool size. - - - - - The time to wait before closing unused connections in the pool if the count - of all connections exeeds MinPoolSize. - - - If connection pool contains unused connections for ConnectionLifeTime seconds, - the half of them will be closed. If there will be unused connections in a second - later then again the half of them will be closed and so on. - This strategy provide smooth change of connection count in the pool. - - The time (in seconds) to wait. The default value is 15 seconds. - - - - 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. - - - - - Whether to have the backend enforce and - via the statement_timeout variable. Defaults to true. - - - - - 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 - - - - - Whether to process messages that arrive between command activity. - - - - - 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 https://github.com/npgsql/Npgsql/wiki/PreloadReader-Removal - - - - - Obsolete, see https://github.com/npgsql/Npgsql/wiki/UseExtendedTypes-Removal - - - - - No integrated security if we're on mono and .NET 4.5 because of ClaimsIdentity, - see https://github.com/npgsql/Npgsql/issues/133 - - - - - 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. - - - - - 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. - - - - - Buffer used for reading 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 - - - - - The number of messages that were prepended and sent to the last message chain. - Note that this only tracks messages which produce a ReadyForQuery message - - - - - A chain of messages to be sent to the backend. - - - - - 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 frontend 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 statement_timeout parameter at the backend, - used to determine whether we need to change it when commands are sent. - - - 0 means means no timeout. - -1 means that the current value is unknown. - - - - - 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 non-user-triggered async action is in progress, e.g. handling of an - asynchronous notification or a connection keepalive. Does not get taken for a user async - action such as . - - - - - 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. - - - - - Number of seconds added as a margin to the backend timeout to yield the frontend timeout. - We prefer the backend to timeout - it's a clean error which doesn't break the connector. - - - - - 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. - - - - Gets the current state of the connector - - - - - Returns whether the connector is open, regardless of any task it is currently performing - - - - - Returns whether the connector is open and performing a task, i.e. not ready for a query - - - - - Opens the physical connection to the server. - - Usually called by the RequestConnector - Method of the connection pool manager. - - - - 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. - - - - - - Given a user timeout in seconds, sets the socket's ReceiveTimeout (if needed). - Note that if backend timeouts are enabled, we add a few seconds of margin to allow - the backend timeout to happen first. - - - - - Reads and processes any messages that are already in our buffers (either Npgsql or TCP). - Handles asynchronous messages (Notification, Notice, ParameterStatus) that may after a - ReadyForQuery, as well as async notification mode. - - - - - 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. - - - - - 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 - - - - - Represents the method that allows the application to provide a certificate collection to be used for SSL client authentication - - - - - Verifies the remote Secure Sockets Layer (SSL) certificate used for authentication. - - - See - - - - - Creates another connector and sends a cancel request through it for this connector. - - - - - Closes the physical connection to the server. - - - - - Called when an unexpected message has been received during an action. Breaks the - connector and returns the appropriate message. - - - - - 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 - . - - - - - This method is required to set all the version dependent features flags. - SupportsPrepare means the server can use prepared query plans (7.3+) - - - - - Whether the backend is an AWS Redshift instance - - - - - Called in various cases to indicate that the backend's statement_timeout parameter - may have changed and is currently unknown. It will be set the next time a command - is sent. - - - - - Returns next portal index. - - - - - Returns next plan index. - - - - - 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 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 - - - - - This class manages all connector objects, pooled AND non-pooled. - - - - - A queue with an extra Int32 for keeping track of busy connections. - - - - - Connections available to the end user - - - - - Connections currently in use - - - - Unique static instance of the connector pool - mamager. - - - - Maximum number of possible connections in the pool. - - - - Map of index to unused pooled connectors, avaliable to the - next RequestConnector() call. - This hashmap will be indexed by connection string. - This key will hold a list of queues of pooled connectors available to be used. - - - - Searches the pooled connector lists for a matching connector object or creates a new one. - - The NpgsqlConnection that is requesting - the connector. Its ConnectionString will be used to search the - pool for available connectors. - A connector object. - - - - Find an available pooled connector in the pool, or create a new one if none found. - - - - - Releases a connector, possibly back to the pool for future use. - - - Pooled connectors will be put back into the pool if there is room. - - Connection to which the connector is leased. - The connector to release. - - - - 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. - - - - - 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 - - - - - 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 - - - - - 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. - - - - 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. - - - - - Returns a System.Data.DataTable that describes the column metadata of the DataReader. - - - - - Contains the column names as the keys - - - - - Contains all unique columns - - - - - The exception that is thrown when the PostgreSQL backend reports errors. - Note that other errors (network issues, Npgsql client-side problems) are reported as regular - .NET exceptions. - - - 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 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. - - - - - Same as , for backwards-compatibility with Npgsql 2.x - - - - - Gets a the PostgreSQL error message and code. - - - - - 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 factory to create instances of various Npgsql objects. - - - - - Creates an NpgsqlCommand object. - - - - - 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. - - - - - 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. - - - - - Represents an arbitrary-length message capable of flushing the buffer internally as it's - writing itself out. - - - - the buffer into which to write the message. - - an option buffer that, if returned, will be written to the server directly, bypassing our - NpgsqlBuffer. This is an optimization hack for bytea. - - - 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. - - - - - Specifies the type of SQL statement, e.g. SELECT - - - - - 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. - - - - - 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 and value. - - The name of the NpgsqlParameter. - The Value of the NpgsqlParameter to add to the collection. - One of the NpgsqlDbType values. - The paramater that was added. - - - - Adds a NpgsqlParameter to the NpgsqlParameterCollection given the specified parameter name and value. - - The name of the NpgsqlParameter. - The Value of the NpgsqlParameter to add to the collection. - One of the NpgsqlDbType values. - The length of the column. - The paramater that was added. - - - - Adds a NpgsqlParameter to the NpgsqlParameterCollection given the specified parameter name and value. - - The name of the NpgsqlParameter. - The Value of the NpgsqlParameter to add to the collection. - One of the NpgsqlDbType values. - The length of the column. - The name of the source column. - The paramater that was added. - - - - Adds a NpgsqlParameter to the NpgsqlParameterCollection given the parameter name and the data type. - - 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. - - - - - - - In methods taking an object as argument this method is used to verify - that the argument has the type NpgsqlParameter - - The object to verify - - - - 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 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. - - - - 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 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. - - - - - 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. - - - - - Creates a transaction save point. - - - - - Rolls back a transaction from a pending savepoint state. - - - - - Rolls back a transaction from a pending savepoint state. - - - - - Dispose. - - - - - - This method takes a version string as returned by SELECT VERSION() and returns - a valid version string ("7.2.2" for example). - This is only needed when running protocol version 2. - This does not do any validity checks. - - - - - Write a 32-bit integer to the given stream in the correct byte order. - - - - - 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 - - - - Represent the frontend/backend protocol version. - - - - - Protocol version 3 (the current version). - - - - - A class to handle everything associated with SSPI authentication - - - - - Simplified SecBufferDesc struct with only one SecBuffer - - - - - A handler which can read small, usually fixed-length values. - - the type of the value returned by this type handler - - - - The entire data required to read the value is expected to be in the buffer. - - - - - - - - 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 which handles values of totally arbitrary length, and therefore supports chunking them. - - - - - A marking interface to allow us to know whether a given type handler has a provider-specific type - distinct from its regular type - - - - - 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 - - - - 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 - - - - - 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. - - - - 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. - - - - - Returns a string that represents the current object. - - - - - Specifies the type of a type, as represented in the PostgreSQL typtype column of the pg_type table. - See http://www.postgresql.org/docs/current/static/catalog-pg-type.html - - - - - 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. - - - - 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 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 - - - - - Indicates that the PostgreSQL enum value differs from the .NET value. - - - - - The database label that corresponds to the .NET enum value on which this attribute is placed. - - - - - Indicates that the PostgreSQL enum value differs from the .NET value. - - What label to use instead. - - - - Represents the date 1970-01-01 - - - - - Represents the date 0001-01-01 - - - - - 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 "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. - - - - - 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. - - - - - 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 - - - - - 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 - - - - - - - -
-
diff --git a/src/Frapid.Web/Areas/Frapid.Config/AppInfo.json b/src/Frapid.Web/Areas/Frapid.Config/AppInfo.json new file mode 100644 index 00000000..cb75d3ec --- /dev/null +++ b/src/Frapid.Web/Areas/Frapid.Config/AppInfo.json @@ -0,0 +1,23 @@ +{ + "ApplicationName": "Frapid.Config", + "AutoInstall": true, + "Thumbnail": null, + "Publisher": "MixERP Inc.", + "Url": "http://frapid.com", + "DocumentationUrl": "http://frapid.com", + "AssemblyName": "Frapid.Config", + "Version": "1.0", + "RealeasedOn": null, + "Description": "Frapid configuration module.", + "Category": "Core Modules", + "Bundle": "Frapid Framework", + "IsMeta": false, + "DbSchema": "config", + "BlankDbPath": "~/Areas/Frapid.Config/db/config.sql", + "SampleDbPath": null, + "InstallSample": false, + "My": "~/Areas/Frapid.Config/.my/db.sql", + "OverrideTemplatePath": null, + "OverrideDestination":"~/Catalogs/{0}/Areas/Frapid.Config", + "DependsOn": [] +} \ No newline at end of file diff --git a/src/Frapid.Web/Areas/Frapid.Config/DataAccess/Frapid.Config.DataAccess.csproj b/src/Frapid.Web/Areas/Frapid.Config/DataAccess/Frapid.Config.DataAccess.csproj index 4b87939e..32023451 100644 --- a/src/Frapid.Web/Areas/Frapid.Config/DataAccess/Frapid.Config.DataAccess.csproj +++ b/src/Frapid.Web/Areas/Frapid.Config/DataAccess/Frapid.Config.DataAccess.csproj @@ -49,12 +49,16 @@ False ..\..\..\bin\Frapid.NPoco.dll + + ..\packages\Npgsql.2.2.6\lib\net45\Mono.Security.dll + True + ..\packages\Newtonsoft.Json.6.0.4\lib\net45\Newtonsoft.Json.dll True - - ..\packages\Npgsql.3.0.3\lib\net45\Npgsql.dll + + ..\packages\Npgsql.2.2.6\lib\net45\Npgsql.dll True diff --git a/src/Frapid.Web/Areas/Frapid.Config/DataAccess/packages.config b/src/Frapid.Web/Areas/Frapid.Config/DataAccess/packages.config index 98f4d7ea..b39ca462 100644 --- a/src/Frapid.Web/Areas/Frapid.Config/DataAccess/packages.config +++ b/src/Frapid.Web/Areas/Frapid.Config/DataAccess/packages.config @@ -4,6 +4,6 @@ - + \ No newline at end of file diff --git a/src/Frapid.Web/Areas/Frapid.Config/WebApi/Frapid.Config.Api.csproj b/src/Frapid.Web/Areas/Frapid.Config/WebApi/Frapid.Config.Api.csproj index 766ca1f6..61372149 100644 --- a/src/Frapid.Web/Areas/Frapid.Config/WebApi/Frapid.Config.Api.csproj +++ b/src/Frapid.Web/Areas/Frapid.Config/WebApi/Frapid.Config.Api.csproj @@ -46,12 +46,16 @@ False ..\..\bin\Frapid.Framework.dll + + ..\packages\Npgsql.2.2.6\lib\net45\Mono.Security.dll + True + ..\packages\Newtonsoft.Json.7.0.1\lib\net45\Newtonsoft.Json.dll True - - ..\packages\Npgsql.3.0.3\lib\net45\Npgsql.dll + + ..\packages\Npgsql.2.2.6\lib\net45\Npgsql.dll True diff --git a/src/Frapid.Web/Areas/Frapid.Config/WebApi/packages.config b/src/Frapid.Web/Areas/Frapid.Config/WebApi/packages.config index 3d262c3d..90a53ef1 100644 --- a/src/Frapid.Web/Areas/Frapid.Config/WebApi/packages.config +++ b/src/Frapid.Web/Areas/Frapid.Config/WebApi/packages.config @@ -5,7 +5,7 @@ - + diff --git a/src/Frapid.Web/Areas/Frapid.Config/db/1.x/1.0/config.sql b/src/Frapid.Web/Areas/Frapid.Config/db/1.x/1.0/config.sql index 195c5165..62a0be5c 100644 --- a/src/Frapid.Web/Areas/Frapid.Config/db/1.x/1.0/config.sql +++ b/src/Frapid.Web/Areas/Frapid.Config/db/1.x/1.0/config.sql @@ -204,6 +204,8 @@ CREATE TABLE config.smtp_configs CREATE TABLE config.email_queue ( queue_id BIGSERIAL NOT NULL PRIMARY KEY, + from_name national character varying(256) NOT NULL, + reply_to national character varying(256) NOT NULL, subject national character varying(256) NOT NULL, send_to national character varying(256) NOT NULL, attachments text, @@ -458,6 +460,13 @@ CREATE TABLE config.custom_field_setup ); +CREATE TABLE config.custom_fields +( + custom_field_id BIGSERIAL NOT NULL PRIMARY KEY, + custom_field_setup_id integer NOT NULL REFERENCES config.custom_field_setup, + resource_id text NOT NULL, + value text +); CREATE TABLE config.flag_types @@ -492,6 +501,35 @@ ON config.flags(user_id, UPPER(resource), UPPER(resource_key), UPPER(resource_id +DROP VIEW IF EXISTS config.custom_field_view; + +CREATE VIEW config.custom_field_view +AS +SELECT + config.custom_field_forms.table_name, + config.custom_field_forms.key_name, + config.custom_field_setup.custom_field_setup_id, + config.custom_field_setup.form_name, + config.custom_field_setup.field_order, + config.custom_field_setup.field_name, + config.custom_field_setup.field_label, + config.custom_field_setup.description, + config.custom_field_data_types.data_type, + config.custom_field_data_types.is_number, + config.custom_field_data_types.is_date, + config.custom_field_data_types.is_boolean, + config.custom_field_data_types.is_long_text, + config.custom_fields.resource_id, + config.custom_fields.value +FROM config.custom_field_setup +INNER JOIN config.custom_field_data_types +ON config.custom_field_data_types.data_type = config.custom_field_setup.data_type +INNER JOIN config.custom_field_forms +ON config.custom_field_forms.form_name = config.custom_field_setup.form_name +INNER JOIN config.custom_fields +ON config.custom_fields.custom_field_setup_id = config.custom_field_setup.custom_field_setup_id +ORDER BY field_order; + @@ -765,6 +803,28 @@ END $$ LANGUAGE plpgsql; +DROP FUNCTION IF EXISTS config.get_custom_field_form_name +( + _table_name character varying +); + +CREATE FUNCTION config.get_custom_field_form_name +( + _table_name character varying +) +RETURNS character varying +STABLE +AS +$$ +BEGIN + RETURN form_name + FROM config.custom_field_forms + WHERE table_name = _table_name; +END +$$ +LANGUAGE plpgsql; + + -->-->-- C:/Users/nirvan/Desktop/mixerp/frapid/src/Frapid.Web/Areas/Frapid.Config/db/1.x/1.0/src/06.functions-and-logic/config.create_app.sql --<--<-- DROP FUNCTION IF EXISTS config.create_app ( diff --git a/src/Frapid.Web/Areas/Frapid.Config/db/1.x/1.0/src/01.types-domains-tables-and-constraints/tables-and-constraints.sql b/src/Frapid.Web/Areas/Frapid.Config/db/1.x/1.0/src/01.types-domains-tables-and-constraints/tables-and-constraints.sql index de91f808..ea6d5e12 100644 --- a/src/Frapid.Web/Areas/Frapid.Config/db/1.x/1.0/src/01.types-domains-tables-and-constraints/tables-and-constraints.sql +++ b/src/Frapid.Web/Areas/Frapid.Config/db/1.x/1.0/src/01.types-domains-tables-and-constraints/tables-and-constraints.sql @@ -171,6 +171,8 @@ CREATE TABLE config.smtp_configs CREATE TABLE config.email_queue ( queue_id BIGSERIAL NOT NULL PRIMARY KEY, + from_name national character varying(256) NOT NULL, + reply_to national character varying(256) NOT NULL, subject national character varying(256) NOT NULL, send_to national character varying(256) NOT NULL, attachments text, diff --git a/src/Frapid.Web/Areas/Frapid.Config/db/config.sql b/src/Frapid.Web/Areas/Frapid.Config/db/config.sql index 195c5165..62a0be5c 100644 --- a/src/Frapid.Web/Areas/Frapid.Config/db/config.sql +++ b/src/Frapid.Web/Areas/Frapid.Config/db/config.sql @@ -204,6 +204,8 @@ CREATE TABLE config.smtp_configs CREATE TABLE config.email_queue ( queue_id BIGSERIAL NOT NULL PRIMARY KEY, + from_name national character varying(256) NOT NULL, + reply_to national character varying(256) NOT NULL, subject national character varying(256) NOT NULL, send_to national character varying(256) NOT NULL, attachments text, @@ -458,6 +460,13 @@ CREATE TABLE config.custom_field_setup ); +CREATE TABLE config.custom_fields +( + custom_field_id BIGSERIAL NOT NULL PRIMARY KEY, + custom_field_setup_id integer NOT NULL REFERENCES config.custom_field_setup, + resource_id text NOT NULL, + value text +); CREATE TABLE config.flag_types @@ -492,6 +501,35 @@ ON config.flags(user_id, UPPER(resource), UPPER(resource_key), UPPER(resource_id +DROP VIEW IF EXISTS config.custom_field_view; + +CREATE VIEW config.custom_field_view +AS +SELECT + config.custom_field_forms.table_name, + config.custom_field_forms.key_name, + config.custom_field_setup.custom_field_setup_id, + config.custom_field_setup.form_name, + config.custom_field_setup.field_order, + config.custom_field_setup.field_name, + config.custom_field_setup.field_label, + config.custom_field_setup.description, + config.custom_field_data_types.data_type, + config.custom_field_data_types.is_number, + config.custom_field_data_types.is_date, + config.custom_field_data_types.is_boolean, + config.custom_field_data_types.is_long_text, + config.custom_fields.resource_id, + config.custom_fields.value +FROM config.custom_field_setup +INNER JOIN config.custom_field_data_types +ON config.custom_field_data_types.data_type = config.custom_field_setup.data_type +INNER JOIN config.custom_field_forms +ON config.custom_field_forms.form_name = config.custom_field_setup.form_name +INNER JOIN config.custom_fields +ON config.custom_fields.custom_field_setup_id = config.custom_field_setup.custom_field_setup_id +ORDER BY field_order; + @@ -765,6 +803,28 @@ END $$ LANGUAGE plpgsql; +DROP FUNCTION IF EXISTS config.get_custom_field_form_name +( + _table_name character varying +); + +CREATE FUNCTION config.get_custom_field_form_name +( + _table_name character varying +) +RETURNS character varying +STABLE +AS +$$ +BEGIN + RETURN form_name + FROM config.custom_field_forms + WHERE table_name = _table_name; +END +$$ +LANGUAGE plpgsql; + + -->-->-- C:/Users/nirvan/Desktop/mixerp/frapid/src/Frapid.Web/Areas/Frapid.Config/db/1.x/1.0/src/06.functions-and-logic/config.create_app.sql --<--<-- DROP FUNCTION IF EXISTS config.create_app ( diff --git a/src/Frapid.Web/Areas/Frapid.Config/packages/Npgsql.2.2.6/Npgsql.2.2.6.nupkg b/src/Frapid.Web/Areas/Frapid.Config/packages/Npgsql.2.2.6/Npgsql.2.2.6.nupkg new file mode 100644 index 00000000..55ca38b8 Binary files /dev/null and b/src/Frapid.Web/Areas/Frapid.Config/packages/Npgsql.2.2.6/Npgsql.2.2.6.nupkg differ diff --git a/src/Frapid.Web/Areas/Frapid.Config/packages/Npgsql.2.2.6/lib/net20/Mono.Security.dll b/src/Frapid.Web/Areas/Frapid.Config/packages/Npgsql.2.2.6/lib/net20/Mono.Security.dll new file mode 100644 index 00000000..5173f0dc Binary files /dev/null and b/src/Frapid.Web/Areas/Frapid.Config/packages/Npgsql.2.2.6/lib/net20/Mono.Security.dll differ diff --git a/src/Frapid.Web/Areas/Frapid.Config/packages/Npgsql.2.2.6/lib/net20/Npgsql.dll b/src/Frapid.Web/Areas/Frapid.Config/packages/Npgsql.2.2.6/lib/net20/Npgsql.dll new file mode 100644 index 00000000..933eff1b Binary files /dev/null and b/src/Frapid.Web/Areas/Frapid.Config/packages/Npgsql.2.2.6/lib/net20/Npgsql.dll differ diff --git a/src/Frapid.Web/Areas/Frapid.Config/packages/Npgsql.2.2.6/lib/net20/Npgsql.xml b/src/Frapid.Web/Areas/Frapid.Config/packages/Npgsql.2.2.6/lib/net20/Npgsql.xml new file mode 100644 index 00000000..ffe00a7a --- /dev/null +++ b/src/Frapid.Web/Areas/Frapid.Config/packages/Npgsql.2.2.6/lib/net20/Npgsql.xml @@ -0,0 +1,7603 @@ + + + + Npgsql + + + + + Handles serialisation of .NET array or IEnumeration to pg format. + Arrays of arrays, enumerations of enumerations, arrays of enumerations etc. + are treated as multi-dimensional arrays (in much the same manner as an array of arrays + is used to emulate multi-dimensional arrays in languages that lack native support for them). + If such an enumeration of enumerations is "jagged" (as opposed to rectangular, cuboid, + hypercuboid, hyperhypercuboid, etc) then this class will "correctly" serialise it, but pg + will raise an error as it doesn't allow jagged arrays. + + + + + Create an ArrayNativeToBackendTypeConverter with the element converter passed + + The that would be used to serialise the element type. + + + + Serialise the enumeration or array. + + + + + Convert a System.Array to PG binary format. + Write the array header and prepare to write array data to the stream. + + + + + Append all array data to the binary stream. + + + + + Handles parsing of pg arrays into .NET arrays. + + + + + Takes a string representation of a pg 1-dimensional array + (or a 1-dimensional row within an n-dimensional array) + and allows enumeration of the string represenations of each items. + + + + + Takes a string representation of a pg n-dimensional array + and allows enumeration of the string represenations of the next + lower level of rows (which in turn can be taken as (n-1)-dimensional arrays. + + + + + Takes an ArrayList which may be an ArrayList of ArrayLists, an ArrayList of ArrayLists of ArrayLists + and so on and enumerates the items that aren't ArrayLists (the leaf nodes if we think of the ArrayList + passed as a tree). Simply uses the ArrayLists' own IEnumerators to get that of the next, + pushing them onto a stack until we hit something that isn't an ArrayList. + ArrayList to enumerate + IEnumerable + + + + + Create a new ArrayBackendToNativeTypeConverter + + for the element type. + + + + Creates an array from pg text representation. + + + + + Creates an array list from pg represenation of an array. + Multidimensional arrays are treated as ArrayLists of ArrayLists + + + + + Creates an n-dimensional array from an ArrayList of ArrayLists or + a 1-dimensional array from something else. + + to convert + Type of the elements in the list + produced. + + + + Creates an n-dimensional System.Array from PG binary representation. + This function reads the array header and sets up an n-dimensional System.Array object to hold its data. + PopulateArrayFromBinaryArray() is then called to carry out array population. + + + + + Recursively populates an array from PB binary data representation. + + + + + Takes an array of ints and treats them like the limits of a set of counters. + Retains a matching set of ints that is set to all zeros on the first ++ + On a ++ it increments the "right-most" int. If that int reaches it's + limit it is set to zero and the one before it is incremented, and so on. + + Making this a more general purpose class is pretty straight-forward, but we'll just put what we need here. + + + + + Implements a bit string; a collection of zero or more bits which can each be 1 or 0. + BitString's behave as a list of bools, though like most strings and unlike most collections the position + tends to be of as much significance as the value. + BitStrings are often used as masks, and are commonly cast to and from other values. + + + + + Represents the empty string. + + + + + Create a BitString from an enumeration of boolean values. The BitString will contain + those booleans in the order they came in. + + The boolean values. + + + + Creates a BitString filled with a given number of true or false values. + + The value to fill the string with. + The number of bits to fill. + + + + Creats a bitstring from a string. + The string to copy from. + + + + + + Creates a single-bit element from a boolean value. + + The bool value which determines whether + the bit is 1 or 0. + + + + Creates a bitstring from an unsigned integer value. The string will be the shortest required to + contain the integer (e.g. 1 bit for 0 or 1, 2 for 2 or 3, 3 for 4-7, and so on). + + The integer. + This method is not CLS Compliant, and may not be available to some languages. + + + + Creates a bitstring from an integer value. The string will be the shortest required to + contain the integer (e.g. 1 bit for 0 or 1, 2 for 2 or 3, 3 for 4-7, and so on). + + The integer. + + + + Finds the first instance of a given value + + The value - whether true or false - to search for. + The index of the value found, or -1 if none are present. + + + + True if there is at least one bit with the value looked for. + + The value - true or false - to detect. + True if at least one bit was the same as item, false otherwise. + + + + Copies the bitstring to an array of bools. + + The boolean array to copy to. + The index in the array to start copying from. + + + + Returns an enumerator that enumerates through the string. + + The enumerator. + + + + Creats a bitstring by concatenating another onto this one. + + The string to append to this one. + The combined strings. + + + + Returns a substring of this string. + + The position to start from, must be between 0 and the length of the string. + The length of the string to return, must be greater than zero, and may not be + so large that the start + length exceeds the bounds of this instance. + The Bitstring identified + + + + Returns a substring of this string. + + The position to start from, must be between 0 and the length of the string, + the rest of the string is returned. + The Bitstring identified + + + + A logical and between this string and another. The two strings must be the same length. + + Another BitString to AND with this one. + A bitstring with 1 where both BitStrings had 1 and 0 otherwise. + + + + A logical or between this string and another. The two strings must be the same length. + + Another BitString to OR with this one. + A bitstring with 1 where either BitString had 1 and 0 otherwise. + + + + A logical xor between this string and another. The two strings must be the same length. + + Another BitString to XOR with this one. + A bitstring with 1 where one BitStrings and the other had 0, + and 0 where they both had 1 or both had 0. + + + + A bitstring that is the logical inverse of this one. + + A bitstring of the same length as this with 1 where this has 0 and vice-versa. + + + + Shifts the string operand bits to the left, filling with zeros to produce a + string of the same length. + + The number of bits to shift to the left. + A left-shifted bitstring. + The behaviour of LShift is closer to what one would expect from dealing + with PostgreSQL bit-strings than in using the same operations on integers in .NET + In particular, negative operands result in a right-shift, and operands greater than + the length of the string will shift it entirely, resulting in a zero-filled string. + + + + + Shifts the string operand bits to the right, filling with zeros to produce a + string of the same length. + + The number of bits to shift to the right. + A right-shifted bitstring. + The behaviour of RShift is closer to what one would expect from dealing + with PostgreSQL bit-strings than in using the same operations on integers in .NET + In particular, negative operands result in a left-shift, and operands greater than + the length of the string will shift it entirely, resulting in a zero-filled string. It also performs + a logical shift, rather than an arithmetic shift, so it always sets the vacated bit positions to zero + (like PostgreSQL and like .NET for unsigned integers but not for signed integers). + + + + + Returns true if the this string is identical to the argument passed. + + + + + Compares two strings. Strings are compared as strings, so while 0 being less than 1 will + mean a comparison between two strings of the same size is the same as treating them as numbers, + in the case of two strings of differing lengths the comparison starts at the right-most (most significant) + bit, and if all bits of the shorter string are exhausted without finding a comparison, then the larger + string is deemed to be greater than the shorter (0010 is greater than 0001 but less than 00100). + + Another string to compare with this one. + A value if the two strings are identical, an integer less + than zero if this is less than the argument, and an integer greater + than zero otherwise. + + + + Compares the string with another object. + + The object to compare with. + If the object is null then this string is considered greater. If the object is another BitString + then they are compared as in the explicit comparison for BitStrings + in any other case a is thrown. + + + + Compares this BitString with an object for equality. + + + + + Returns a code for use in hashing operations. + + + + + Returns a string representation of the BitString. + + + A string which can contain a letter and optionally a number which sets a minimum size for the string + returned. In each case using the lower-case form of the letter will result in a lower-case string + being returned. + + + B + A string of 1s and 0s. + + + X + An hexadecimal string (will result in an error unless the string's length is divisible by 4). + + + G + A string of 1s and 0s in single-quotes preceded by 'B' (Postgres bit string literal syntax). + + Y + An hexadecimal string in single-quotes preceded by 'X' (Postgres bit literal syntax, will result in an error unless the string's length is divisible by 4. + + C + The format produced by format-string "Y" if legal, otherwise that produced by format-string "G". + E + The most compact safe representation for Postgres. If single bit will be either a 0 or a 1. Otherwise if it + can be that produce by format string "Y" it will, otherwise if there are less than 9bits in length it will be that + produced by format-string "G". For longer strings that cannot be represented in hexadecimal it will be a string + representing the first part of the string in format "Y" followed by the PostgreSQL concatenation operator, followed + by the final bits in the format "G". E.g. "X'13DCE'||B'110'" + If format is empty or null, it is treated as if "B" had been passed (the default repreesentation, and that + generally used by PostgreSQL for display). + + The formatted string. + + + + Returns a string representation for the Bitstring + + A string containing '0' and '1' characters. + + + + Returns the same string as . formatProvider is ignored. + + + + + Parses a string to produce a BitString. Most formats that can be produced by + can be accepted, but hexadecimal + can be interpreted with the preceding X' to mark the following characters as + being hexadecimal rather than binary. + + + + + Performs a logical AND on the two operands. + + + + + Performs a logcial OR on the two operands. + + + + + Perofrms a logical EXCLUSIVE-OR on the two operands + + + + + Performs a logical NOT on the operand. + + + + + Concatenates the operands. + + + + + Left-shifts the string BitString. + + + + + Right-shifts the string BitString. + + + + + Compares the two operands. + + + + + Compares the two operands. + + + + + Compares the two operands. + + + + + Compares the two operands. + + + + + Compares the two operands. + + + + + Compares the two operands. + + + + + Interprets the bitstring as a series of bits in an encoded character string, + encoded according to the Encoding passed, and returns that string. + The bitstring must contain a whole number of octets(bytes) and also be + valid according to the Encoding passed. + + The to use in producing the string. + The string that was encoded in the BitString. + + + + Interprets the bitstring as a series of octets (bytes) and returns those octets. Fails + if the Bitstring does not contain a whole number of octets (its length is not evenly + divisible by 8). + + + + + Interprets the bitstring as a series of signed octets (bytes) and returns those octets. Fails + if the Bitstring does not contain a whole number of octets (its length is not evenly + divisible by 8). + This method is not CLS-Compliant and may not be available to languages that cannot + handle signed bytes. + + + + + Interprets the bitstring as a series of unsigned 16-bit integers and returns those integers. + Fails if the Bitstring's length is not evenly divisible by 16. + This method is not CLS-Compliant and may not be available to languages that cannot + handle unsigned integers. + + + + + Interprets the bitstring as a series of 16-bit integers and returns those integers. + Fails if the Bitstring's length is not evenly divisible by 16. + + + + + Interprets the bitstring as a series of unsigned 32-bit integers and returns those integers. + Fails if the Bitstring's length is not evenly divisible by 32. + This method is not CLS-Compliant and may not be available to languages that cannot + handle unsigned integers. + + + + + Interprets the bitstring as a series of signed 32-bit integers and returns those integers. + Fails if the Bitstring's length is not evenly divisible by 32. + + + + + Interprets the bitstring as a series of unsigned 64-bit integers and returns those integers. + Fails if the Bitstring's length is not evenly divisible by 64. + This method is not CLS-Compliant and may not be available to languages that cannot + handle unsigned integers. + + + + + Interprets the bitstring as a series of signed 64-bit integers and returns those integers. + Fails if the Bitstring's length is not evenly divisible by 64. + + + + + The length of the string. + + + + + Retrieves the value of the bit at the given index. + + + + + Represents the PostgreSQL interval datatype. + PostgreSQL differs from .NET in how it's interval type doesn't assume 24 hours in a day + (to deal with 23- and 25-hour days caused by daylight savings adjustments) and has a concept + of months that doesn't exist in .NET's class. (Neither datatype + has any concessions for leap-seconds). + For most uses just casting to and from TimeSpan will work correctly — in particular, + the results of subtracting one or the PostgreSQL date, time and + timestamp types from another should be the same whether you do so in .NET or PostgreSQL — + but if the handling of days and months in PostgreSQL is important to your application then you + should use this class instead of . + If you don't know whether these differences are important to your application, they + probably arent! Just use and do not use this class directly ☺ + To avoid forcing unnecessary provider-specific concerns on users who need not be concerned + with them a call to on a field containing an + value will return a rather than an + . If you need the extra functionality of + then use . + + + + + + + + + + Represents the number of ticks (100ns periods) in one microsecond. This field is constant. + + + + + Represents the number of ticks (100ns periods) in one millisecond. This field is constant. + + + + + Represents the number of ticks (100ns periods) in one second. This field is constant. + + + + + Represents the number of ticks (100ns periods) in one minute. This field is constant. + + + + + Represents the number of ticks (100ns periods) in one hour. This field is constant. + + + + + Represents the number of ticks (100ns periods) in one day. This field is constant. + + + + + Represents the number of hours in one day (assuming no daylight savings adjustments). This field is constant. + + + + + Represents the number of days assumed in one month if month justification or unjustifcation is performed. + This is set to 30 for consistency with PostgreSQL. Note that this is means that month adjustments cause + a year to be taken as 30 × 12 = 360 rather than 356/366 days. + + + + + Represents the number of ticks (100ns periods) in one day, assuming 30 days per month. + + + + + Represents the number of months in a year. This field is constant. + + + + + Represents the maximum . This field is read-only. + + + + + Represents the minimum . This field is read-only. + + + + + Represents the zero . This field is read-only. + + + + + Initializes a new to the specified number of ticks. + + A time period expressed in 100ns units. + + + + Initializes a new to hold the same time as a + + A time period expressed in a + + + + Initializes a new to the specified number of months, days + & ticks. + + Number of months. + Number of days. + Number of 100ns units. + + + + Initializes a new to the specified number of + days, hours, minutes & seconds. + + Number of days. + Number of hours. + Number of minutes. + Number of seconds. + + + + Initializes a new to the specified number of + days, hours, minutes, seconds & milliseconds. + + Number of days. + Number of hours. + Number of minutes. + Number of seconds. + Number of milliseconds. + + + + Initializes a new to the specified number of + months, days, hours, minutes, seconds & milliseconds. + + Number of months. + Number of days. + Number of hours. + Number of minutes. + Number of seconds. + Number of milliseconds. + + + + Initializes a new to the specified number of + years, months, days, hours, minutes, seconds & milliseconds. + Years are calculated exactly equivalent to 12 months. + + Number of years. + Number of months. + Number of days. + Number of hours. + Number of minutes. + Number of seconds. + Number of milliseconds. + + + + Creates an from a number of ticks. + + The number of ticks (100ns units) in the interval. + A d with the given number of ticks. + + + + Creates an from a number of microseconds. + + The number of microseconds in the interval. + A d with the given number of microseconds. + + + + Creates an from a number of milliseconds. + + The number of milliseconds in the interval. + A d with the given number of milliseconds. + + + + Creates an from a number of seconds. + + The number of seconds in the interval. + A d with the given number of seconds. + + + + Creates an from a number of minutes. + + The number of minutes in the interval. + A d with the given number of minutes. + + + + Creates an from a number of hours. + + The number of hours in the interval. + A d with the given number of hours. + + + + Creates an from a number of days. + + The number of days in the interval. + A d with the given number of days. + + + + Creates an from a number of months. + + The number of months in the interval. + A d with the given number of months. + + + + Adds another interval to this instance and returns the result. + + An to add to this instance. + An whose values are the sums of the two instances. + + + + Subtracts another interval from this instance and returns the result. + + An to subtract from this instance. + An whose values are the differences of the two instances. + + + + Returns an whose value is the negated value of this instance. + + An whose value is the negated value of this instance. + + + + This absolute value of this instance. In the case of some, but not all, components being negative, + the rules used for justification are used to determine if the instance is positive or negative. + + An whose value is the absolute value of this instance. + + + + Equivalent to PostgreSQL's justify_days function. + + An based on this one, but with any hours outside of the range [-23, 23] + converted into days. + + + + Opposite to PostgreSQL's justify_days function. + + An based on this one, but with any days converted to multiples of ±24hours. + + + + Equivalent to PostgreSQL's justify_months function. + + An based on this one, but with any days outside of the range [-30, 30] + converted into months. + + + + Opposite to PostgreSQL's justify_months function. + + An based on this one, but with any months converted to multiples of ±30days. + + + + Equivalent to PostgreSQL's justify_interval function. + + An based on this one, + but with any months converted to multiples of ±30days + and then with any days converted to multiples of ±24hours + + + + Opposite to PostgreSQL's justify_interval function. + + An based on this one, but with any months converted to multiples of ±30days and then any days converted to multiples of ±24hours; + + + + Produces a canonical NpgslInterval with 0 months and hours in the range of [-23, 23]. + + + While the fact that for many purposes, two different instances could be considered + equivalent (e.g. one with 2days, 3hours and one with 1day 27hours) there are different possible canonical forms. + + E.g. we could move all excess hours into days and all excess days into months and have the most readable form, + or we could move everything into the ticks and have the form that allows for the easiest arithmetic) the form + chosen has two important properties that make it the best choice. + First, it is closest two how + objects are most often represented. Second, it is compatible with results of many + PostgreSQL functions, particularly with age() and the results of subtracting one date, time or timestamp from + another. + + Note that the results of casting a to is + canonicalised. + + + An based on this one, but with months converted to multiples of ±30days and with any hours outside of the range [-23, 23] + converted into days. + + + + Implicit cast of a to an + + A + An eqivalent, canonical, . + + + + Implicit cast of an to a . + + A . + An equivalent . + + + + Returns true if another is exactly the same as this instance. + + An for comparison. + true if the two instances are exactly the same, + false otherwise. + + + + Returns true if another object is an , that is exactly the same as + this instance + + An for comparison. + true if the argument is an and is exactly the same + as this one, false otherwise. + + + + Compares two instances. + + The first . + The second . + 0 if the two are equal or equivalent. A value greater than zero if x is greater than y, + a value less than zero if x is less than y. + + + + A hash code suitable for uses with hashing algorithms. + + An signed integer. + + + + Compares this instance with another/ + + An to compare this with. + 0 if the instances are equal or equivalent. A value less than zero if + this instance is less than the argument. A value greater than zero if this instance + is greater than the instance. + + + + Compares this instance with another/ + + An object to compare this with. + 0 if the argument is an and the instances are equal or equivalent. + A value less than zero if the argument is an and + this instance is less than the argument. + A value greater than zero if the argument is an and this instance + is greater than the instance. + A value greater than zero if the argument is null. + The argument is not an . + + + + Parses a and returns a instance. + Designed to use the formats generally returned by PostgreSQL. + + The to parse. + An represented by the argument. + The string was null. + A value obtained from parsing the string exceeded the values allowed for the relevant component. + The string was not in a format that could be parsed to produce an . + + + + Attempt to parse a to produce an . + + The to parse. + (out) The produced, or if the parsing failed. + true if the parsing succeeded, false otherwise. + + + + Create a representation of the instance. + The format returned is of the form: + [M mon[s]] [d day[s]] [HH:mm:ss[.f[f[f[f[f[f[f[f[f]]]]]]]]]] + A zero is represented as 00:00:00 + + Ticks are 100ns, Postgress resolution is only to 1µs at most. Hence we lose 1 or more decimal + precision in storing values in the database. Despite this, this method will output that extra + digit of precision. It's forward-compatible with any future increases in resolution up to 100ns, + and also makes this ToString() more applicable to any other use-case. + + + The representation. + + + + Adds two together. + + The first to add. + The second to add. + An whose values are the sum of the arguments. + + + + Subtracts one from another. + + The to subtract the other from. + The to subtract from the other. + An whose values are the difference of the arguments + + + + Returns true if two are exactly the same. + + The first to compare. + The second to compare. + true if the two arguments are exactly the same, false otherwise. + + + + Returns false if two are exactly the same. + + The first to compare. + The second to compare. + false if the two arguments are exactly the same, true otherwise. + + + + Compares two instances to see if the first is less than the second + + The first to compare. + The second to compare. + true if the first is less than second, false otherwise. + + + + Compares two instances to see if the first is less than or equivalent to the second + + The first to compare. + The second to compare. + true if the first is less than or equivalent to second, false otherwise. + + + + Compares two instances to see if the first is greater than the second + + The first to compare. + The second to compare. + true if the first is greater than second, false otherwise. + + + + Compares two instances to see if the first is greater than or equivalent the second + + The first to compare. + The second to compare. + true if the first is greater than or equivalent to the second, false otherwise. + + + + Returns the instance. + + An . + The argument. + + + + Negates an instance. + + An . + The negation of the argument. + + + + The total number of ticks(100ns units) contained. This is the resolution of the + type. This ignores the number of days and + months held. If you want them included use first. + The resolution of the PostgreSQL + interval type is by default 1µs = 1,000 ns. It may be smaller as follows: + + + interval(0) + resolution of 1s (1 second) + + + interval(1) + resolution of 100ms = 0.1s (100 milliseconds) + + + interval(2) + resolution of 10ms = 0.01s (10 milliseconds) + + + interval(3) + resolution of 1ms = 0.001s (1 millisecond) + + + interval(4) + resolution of 100µs = 0.0001s (100 microseconds) + + + interval(5) + resolution of 10µs = 0.00001s (10 microseconds) + + + interval(6) or interval + resolution of 1µs = 0.000001s (1 microsecond) + + + As such, if the 100-nanosecond resolution is significant to an application, a PostgreSQL interval will + not suffice for those purposes. + In more frequent cases though, the resolution of the interval suffices. + will always suffice to handle the resolution of any interval value, and upon + writing to the database, will be rounded to the resolution used. + + The number of ticks in the instance. + + + + + Gets the number of whole microseconds held in the instance. + An in the range [-999999, 999999]. + + + + + Gets the number of whole milliseconds held in the instance. + An in the range [-999, 999]. + + + + + Gets the number of whole seconds held in the instance. + An in the range [-59, 59]. + + + + + Gets the number of whole minutes held in the instance. + An in the range [-59, 59]. + + + + + Gets the number of whole hours held in the instance. + Note that this can be less than -23 or greater than 23 unless + has been used to produce this instance. + + + + + Gets the number of days held in the instance. + Note that this does not pay attention to a time component with -24 or less hours or + 24 or more hours, unless has been called to produce this instance. + + + + + Gets the number of months held in the instance. + Note that this does not pay attention to a day component with -30 or less days or + 30 or more days, unless has been called to produce this instance. + + + + + Returns a representing the time component of the instance. + Note that this may have a value beyond the range ±23:59:59.9999999 unless + has been called to produce this instance. + + + + + The total number of ticks (100ns units) in the instance, assuming 24 hours in each day and + 30 days in a month. + + + + + The total number of microseconds in the instance, assuming 24 hours in each day and + 30 days in a month. + + + + + The total number of milliseconds in the instance, assuming 24 hours in each day and + 30 days in a month. + + + + + The total number of seconds in the instance, assuming 24 hours in each day and + 30 days in a month. + + + + + The total number of minutes in the instance, assuming 24 hours in each day and + 30 days in a month. + + + + + The total number of hours in the instance, assuming 24 hours in each day and + 30 days in a month. + + + + + The total number of days in the instance, assuming 24 hours in each day and + 30 days in a month. + + + + + The total number of months in the instance, assuming 24 hours in each day and + 30 days in a month. + + + + + Normalise this time; if it is 24:00:00, convert it to 00:00:00 + + This time, normalised + + + + The total number of ticks(100ns units) contained. This is the resolution of the + type. + The resolution of the PostgreSQL + interval type is by default 1µs = 1,000 ns. It may be smaller as follows: + + + time(0) + resolution of 1s (1 second) + + + time(1) + resolution of 100ms = 0.1s (100 milliseconds) + + + time(2) + resolution of 10ms = 0.01s (10 milliseconds) + + + time(3) + resolution of 1ms = 0.001s (1 millisecond) + + + time(4) + resolution of 100µs = 0.0001s (100 microseconds) + + + time(5) + resolution of 10µs = 0.00001s (10 microseconds) + + + time(6) or interval + resolution of 1µs = 0.000001s (1 microsecond) + + + As such, if the 100-nanosecond resolution is significant to an application, a PostgreSQL time will + not suffice for those purposes. + In more frequent cases though, the resolution of time suffices. + will always suffice to handle the resolution of any time value, and upon + writing to the database, will be rounded to the resolution used. + + The number of ticks in the instance. + + + + + Gets the number of whole microseconds held in the instance. + An integer in the range [0, 999999]. + + + + + Gets the number of whole milliseconds held in the instance. + An integer in the range [0, 999]. + + + + + Gets the number of whole seconds held in the instance. + An interger in the range [0, 59]. + + + + + Gets the number of whole minutes held in the instance. + An integer in the range [0, 59]. + + + + + Gets the number of whole hours held in the instance. + Note that the time 24:00:00 can be stored for roundtrip compatibility. Any calculations on such a + value will normalised it to 00:00:00. + + + + + Normalise this time; if it is 24:00:00, convert it to 00:00:00 + + This time, normalised + + + + Compares this with another . As per postgres' rules, + first the times are compared as if they were both in the same timezone. If they are equal then + then timezones are compared (+01:00 being "smaller" than -01:00). + + the to compare with. + An integer which is 0 if they are equal, < 0 if this is the smaller and > 0 if this is the larger. + + + + Gets the number of whole microseconds held in the instance. + An integer in the range [0, 999999]. + + + + + Gets the number of whole milliseconds held in the instance. + An integer in the range [0, 999]. + + + + + Gets the number of whole seconds held in the instance. + An interger in the range [0, 59]. + + + + + Gets the number of whole minutes held in the instance. + An integer in the range [0, 59]. + + + + + Gets the number of whole hours held in the instance. + Note that the time 24:00:00 can be stored for roundtrip compatibility. Any calculations on such a + value will normalised it to 00:00:00. + + + + + This class implements the Fastpath api. + + + + + This maps the functions names to their id's (possible unique just + to a connection). + + + + + Our connection. + + + + + The network stream. + + + + + Initialises the fastpath system. + + BaseConnection to attach to. + The network stream to the backend. + + + + Initialises the fastpath system. + + BaseConnection to attach to. + + + + Send a function call to the PostgreSQL backend. + + Function id. + True if the result is an integer, false for other results. + FastpathArguments to pass to fastpath. + null if no data, Integer if an integer result, or byte[] otherwise. + + + + Send a function call to the PostgreSQL backend by name. + Note: the mapping for the procedure name to function id needs to exist, + usually to an earlier call to addfunction(). + This is the prefered method to call, as function id's can/may change + between versions of the backend. + For an example of how this works, refer to NpgsqlTypes.LargeObject + + Function name. + True if the result is an integer, false for other results. + FastpathArguments to pass to fastpath. + null if no data, Integer if an integer result, or byte[] otherwise. + + + + This convenience method assumes that the return value is an Integer. + + Function name. + Function arguments. + Integer result. + + + + This convenience method assumes that the return value is an Integer. + + Function name. + Function arguments. + Array containing result + + + + This adds a function to our lookup table. + User code should use the addFunctions method, which is based upon a + query, rather than hard coding the oid. The oid for a function is not + guaranteed to remain static, even on different servers of the same + version. + + Function name. + Function id. + + + + This takes a ResultSet containing two columns. Column 1 contains the + function name, Column 2 the oid. + It reads the entire ResultSet, loading the values into the function + table. + REMEMBER to close() the resultset after calling this!! + Implementation note about function name lookups: + PostgreSQL stores the function id's and their corresponding names in + the pg_proc table. To speed things up locally, instead of querying each + function from that table when required, a Dictionary is used. Also, only + the function's required are entered into this table, keeping connection + times as fast as possible. + The org.postgresql.largeobject.LargeObject class performs a query upon it's startup, + and passes the returned ResultSet to the addFunctions() method here. + Once this has been done, the LargeObject api refers to the functions by + name. + Dont think that manually converting them to the oid's will work. Ok, + they will for now, but they can change during development (there was some + discussion about this for V7.0), so this is implemented to prevent any + unwarranted headaches in the future. + + ResultSet + + + + This returns the function id associated by its name + If addFunction() or addFunctions() have not been called for this name, + then an NpgsqlException is thrown. + + Function name to lookup. + Function ID for fastpath call. + + + + Fast Path Arg. + + + + + Type of argument, true=integer, false=byte[]. + + + + + Integer value if type=true. + + + + + Byte value if type=false; + + + + + Constructs an argument that consists of an integer value. + + Int value to set. + + + + Constructs an argument that consists of an array of bytes. + + Array to store. + + + + Constructs an argument that consists of part of a byte array. + + Source array. + offset within array. + length of data to include. + + + + Constructs an argument that consists of a String. + + String to store. + + + + This sends this argument down the network stream. + The stream sent consists of the length.int4 then the contents. + Note: This is called from Fastpath, and cannot be called from + client code. + + + + + + Report send size. + + Send size. + + + + Large Object. + + + + + Indicates a seek from the begining of a file. + + + + + Indicates a seek from the current position. + + + + + Indicates a seek from the end of a file. + + + + + This opens a large object. + If the object does not exist, then an NpgsqlException is thrown. + + FastPath API for the connection to use. + OID of the Large Object to open. + Mode of opening the large object + + + + OID getter. + + The OID of this LargeObject. + + + + This method closes the object. You must not call methods in this + object after this is called. + + + + + Reads some data from the object, and return as a byte[] array. + + Number of bytes to read. + Array containing data read. + + + + Reads some data from the object into an existing array. + + Destination array. + Offset within array. + Maximum number of bytes to read. + The number of bytes actually read. + + + + Writes an array to the object. + + Array to write. + + + + Writes some data from an array to the object. + + Destination array. + Offset within array. + Number of bytes to write. + + + + Sets the current position within the object. + This is similar to the fseek() call in the standard C library. It + allows you to have random access to the large object. + + Position within object. + Either SEEK_SET, SEEK_CUR or SEEK_END. + + + + Sets the current position within the object. + This is similar to the fseek() call in the standard C library. It + allows you to have random access to the large object. + + Position within object from begining. + + + + Report the current position within the object. + + The current position within the object. + + + + This method is inefficient, as the only way to find out the size of + the object is to seek to the end, record the current position, then + return to the original position. + A better method will be found in the future. + + The size of the large object. + + + + OID. + + + + + Large Object Manager. + + + + + This mode indicates we want to write to an object + + + + + This mode indicates we want to read an object + + + + + This mode is the default. It indicates we want read and write access to + + + + + Constructs the LargeObject API. + There should only be one LargeObjectManager per Connection. The + org.postgresql.Connection class keeps track of the various extension API's + and it's advised you use those to gain access, and not going direct. + + + + + + This opens an existing large object, based on its OID. This method + assumes that READ and WRITE access is required (the default). + + OID of large object. + LargeObject instance providing access to the object + + + + This opens an existing large object, based on its OID. + + OID of large object. + Mode of open. + + + + + This creates a large object, returning its OID. + + OID of new object. + + + + This creates a large object, returning its OID. + + Bitmask describing different attributes of the new object. + OID of new object. + + + + This deletes a large object. + + OID describing object to delete. + + + + This deletes a large object. + It is identical to the Delete() method, and is supplied as the C API uses unlink. + + OID describing object to delete. + + + + Options that control certain aspects of native to backend conversions that depend + on backend version and status. + + + + + Clone the current object. + + A new NativeToBackendTypeConverterOptions object. + + + + Clone the current object with a different OID/Name mapping. + + OID/Name mapping object to use in the new instance. + A new NativeToBackendTypeConverterOptions object. + + + + Provide event handlers to convert all native supported basic data types from their backend + text representation to a .NET object. + + + + + Convert UTF8 encoded text a string. + + + + + Byte array from bytea encoded as ASCII text, escaped or hex format. + + + + + Byte array from bytea encoded as binary. + + + + + Convert a postgresql boolean to a System.Boolean. + + + + + Convert a postgresql boolean to a System.Boolean. + + + + + Convert a postgresql bit to a System.Boolean. + + + + + Convert a postgresql datetime to a System.DateTime. + + + + + Convert a postgresql date to a System.DateTime. + + + + + Convert a postgresql time to a System.DateTime. + + + + + Convert a postgresql money to a System.Decimal. + + + + + Convert a postgresql float4 or float8 to a System.Float or System.Double respectively. + + + + + Provide event handlers to convert extended native supported data types from their backend + text representation to a .NET object. + + + + + Convert a postgresql point to a System.NpgsqlPoint. + + + + + Convert a postgresql point to a System.RectangleF. + + + + + LDeg. + + + + + Path. + + + + + Polygon. + + + + + Circle. + + + + + Inet. + + + + + MAC Address. + + + + + interval + + + + + Provide event handlers to convert the basic native supported data types from + native form to backend representation. + + + + + Convert a string to UTF8 encoded text, escaped and quoted as required. + + + + + Convert a string to UTF8 encoded text. + + + + + Binary data, escaped and quoted as required. + + + + + Binary data with possible older style octal escapes, quoted. + + + + + Binary data in the new hex format (>= 9.0), quoted. + + + + + Binary data, raw. + + + + + Convert to a postgresql boolean text format. + + + + + Convert to a postgresql boolean binary format. + + + + + Convert to a postgresql binary int2. + + + + + Convert to a postgresql binary int4. + + + + + Convert to a postgresql binary int8. + + + + + Convert to a postgresql bit. + + + + + Convert to a postgresql timestamp. + + + + + Convert to a postgresql date. + + + + + Convert to a postgresql time. + + + + + Convert to a postgres money. + + + + + Convert to a postgres double with maximum precision. + + + + + Convert a System.Float to a postgres float4. + + + + + Convert a System.Double to a postgres float8. + + + + + Provide event handlers to convert extended native supported data types from + native form to backend representation. + + + + + Point. + + + + + Box. + + + + + LSeg. + + + + + Open path. + + + + + Polygon. + + + + + Convert to a postgres MAC Address. + + + + + Circle. + + + + + Convert to a postgres inet. + + + + + Convert to a postgres interval + + + + + Delegate called to convert the given backend text data to its native representation. + + + + + Delegate called to convert the given backend binary data to its native representation. + + + + + Represents a backend data type. + This class can be called upon to convert a backend field representation to a native object. + + + + + Construct a new NpgsqlTypeInfo with the given attributes and conversion handlers. + + Type OID provided by the backend server. + Type name provided by the backend server. + NpgsqlDbType + DbType + System type to convert fields of this type to. + Data conversion handler for text encoding. + Data conversion handler for binary data. + + + + Perform a data conversion from a backend representation to + a native object. + + Data sent from the backend. + fieldValueSize + Type modifier field sent from the backend. + + + + Perform a data conversion from a backend representation to + a native object. + + Data sent from the backend. + TypeSize + Type modifier field sent from the backend. + + + + Type OID provided by the backend server. + + + + + Type name provided by the backend server. + + + + + NpgsqlDbType. + + + + + NpgsqlDbType. + + + + + Provider type to convert fields of this type to. + + + + + System type to convert fields of this type to. + + + + + Reports whether a backend binary to native decoder is available for this type. + + + + + Delegate called to convert the given native data to its backand representation. + + + + + Represents a backend data type. + This class can be called upon to convert a native object to its backend field representation, + + + + + Returns an NpgsqlNativeTypeInfo for an array where the elements are of the type + described by the NpgsqlNativeTypeInfo supplied. + + + + + Construct a new NpgsqlTypeInfo with the given attributes and conversion handlers. + + Type name provided by the backend server. + DbType + Quote + NpgsqlDbType + Data conversion handler for text backend encoding. + Data conversion handler for binary backend encoding (for extended queries). + + + + Perform a data conversion from a native object to + a backend representation. + DBNull and null values are handled differently depending if a plain query is used + When + + Native .NET object to be converted. + Specifies that the value should be formatted for the extended query syntax. + Options to guide serialization. If null, a default options set is used. + Specifies that the value should be formatted as an extended query array element. + + + + Type name provided by the backend server. + + + + + NpgsqlDbType. + + + + + DbType. + + + + + Apply quoting. + + + + + Use parameter size information. + + + + + Reports whether a native to backend binary encoder is available for this type. + + + + + Provide mapping between type OID, type name, and a NpgsqlBackendTypeInfo object that represents it. + + + + + Construct an empty mapping. + + + + + Copy constuctor. + + + + + Add the given NpgsqlBackendTypeInfo to this mapping. + + + + + Add a new NpgsqlBackendTypeInfo with the given attributes and conversion handlers to this mapping. + + Type OID provided by the backend server. + Type name provided by the backend server. + NpgsqlDbType + DbType + System type to convert fields of this type to. + Data conversion handler for text encoding. + Data conversion handler for binary data. + + + + Make a shallow copy of this type mapping. + + + + + Determine if a NpgsqlBackendTypeInfo with the given backend type OID exists in this mapping. + + + + + Determine if a NpgsqlBackendTypeInfo with the given backend type name exists in this mapping. + + + + + Get the number of type infos held. + + + + + Retrieve the NpgsqlBackendTypeInfo with the given backend type OID, or null if none found. + + + + + Retrieve the NpgsqlBackendTypeInfo with the given backend type name, or null if none found. + + + + + Provide mapping between type Type, NpgsqlDbType and a NpgsqlNativeTypeInfo object that represents it. + + + + + Add the given NpgsqlNativeTypeInfo to this mapping. + + + + + Add a new NpgsqlNativeTypeInfo with the given attributes and conversion handlers to this mapping. + + Type name provided by the backend server. + NpgsqlDbType + DbType + Quote + Data conversion handler for text backend encoding. + Data conversion handler for binary backend encoding (for extended query). + + + + Retrieve the NpgsqlNativeTypeInfo with the given NpgsqlDbType. + + + + + Retrieve the NpgsqlNativeTypeInfo with the given DbType. + + + + + Retrieve the NpgsqlNativeTypeInfo with the given Type. + + + + + Determine if a NpgsqlNativeTypeInfo with the given backend type name exists in this mapping. + + + + + Determine if a NpgsqlNativeTypeInfo with the given NpgsqlDbType exists in this mapping. + + + + + Determine if a NpgsqlNativeTypeInfo with the given Type name exists in this mapping. + + + + + Get the number of type infos held. + + + + + Represents a PostgreSQL Point type + + + + + Represents a PostgreSQL Line Segment type. + + + + + Represents a PostgreSQL Path type. + + + + + Represents a PostgreSQL Polygon type. + + + + + Represents a PostgreSQL Circle type. + + + + + Represents a PostgreSQL inet type. + + + + + Represents a PostgreSQL MacAddress type. + + + + + + + The macAddr parameter must contain a string that can only consist of numbers + and upper-case letters as hexadecimal digits. (See PhysicalAddress.Parse method on MSDN) + + + + This class contains helper methods for type conversion between + the .Net type system and postgresql. + + + + + A cache of basic datatype mappings keyed by server version. This way we don't + have to load the basic type mappings for every connection. + + + + + Find a NpgsqlNativeTypeInfo in the default types map that can handle objects + of the given NpgsqlDbType. + + + + + Find a NpgsqlNativeTypeInfo in the default types map that can handle objects + of the given NpgsqlDbType. + + + + + Find a NpgsqlNativeTypeInfo in the default types map that can handle objects + of the given DbType. + + + + + Find a NpgsqlNativeTypeInfo in the default types map that can handle objects + of the given System.Type. + + + + + This method is responsible to convert the byte[] received from the backend + to the corresponding NpgsqlType. + The given TypeInfo is called upon to do the conversion. + If no TypeInfo object is provided, no conversion is performed. + + + + + This method is responsible to convert the string received from the backend + to the corresponding NpgsqlType. + The given TypeInfo is called upon to do the conversion. + If no TypeInfo object is provided, no conversion is performed. + + + + + Create the one and only native to backend type map. + This map is used when formatting native data + types to backend representations. + + + + + This method creates (or retrieves from cache) a mapping between type and OID + of all natively supported postgresql data types. + This is needed as from one version to another, this mapping can be changed and + so we avoid hardcoding them. + + NpgsqlTypeMapping containing all known data types. The mapping must be + cloned before it is modified because it is cached; changes made by one connection may + effect another connection. + + + + + Attempt to map types by issuing a query against pg_type. + This function takes a list of NpgsqlTypeInfo and attempts to resolve the OID field + of each by querying pg_type. If the mapping is found, the type info object is + updated (OID) and added to the provided NpgsqlTypeMapping object. + + NpgsqlConnector to send query through. + Mapping object to add types too. + List of types that need to have OID's mapped. + + + + Summary description for NpgsqlQuery + + + + + For classes representing messages sent from the client to the server. + + + + + Set Cache Size. The default value is 20. + + + + + Lookup cached entity. null will returned if not match. + For both get{} and set{} apply LRU rule. + + key + + + + + The globally available text encoding used for frontend/backend communication. + + + + This class represents the base class for the state pattern design pattern + implementation. + + + This class represents the base class for the state pattern design pattern + implementation. + + + + + + This method is used by the states to change the state of the context. + + + + + Call ProcessBackendResponsesEnum(), and scan and discard all results. + + + + + This method is responsible to handle all protocol messages sent from the backend. + It holds all the logic to do it. + To exchange data, it uses a Mediator object from which it reads/writes information + to handle backend requests. + + + + + + Checks for context socket availability. + Socket.Poll supports integer as microseconds parameter. + This limits the usable command timeout value + to 2,147 seconds: (2,147 x 1,000,000 less than max_int). + In order to bypass this limit, the availability of + the socket is checked in 2,147 seconds cycles + + true, if for context socket availability was checked, false otherwise. + Context. + Select mode. + + + + Called from constructor of derived class. + + + + + Finalizer for HashAlgorithm + + + + + Computes the entire hash of all the bytes in the byte array. + + + + + When overridden in a derived class, drives the hashing function. + + + + + + + + When overridden in a derived class, this pads and hashes whatever data might be left in the buffers and then returns the hash created. + + + + + When overridden in a derived class, initializes the object to prepare for hashing. + + + + + Used for stream chaining. Computes hash as data passes through it. + + The buffer from which to grab the data to be copied. + The offset into the input buffer to start reading at. + The number of bytes to be copied. + The buffer to write the copied data to. + At what point in the outputBuffer to write the data at. + + + + Used for stream chaining. Computes hash as data passes through it. Finishes off the hash. + + The buffer from which to grab the data to be copied. + The offset into the input buffer to start reading at. + The number of bytes to be copied. + + + + Get whether or not the hash can transform multiple blocks at a time. + Note: MUST be overriden if descendant can transform multiple block + on a single call! + + + + + Gets the previously computed hash. + + + + + Returns the size in bits of the hash. + + + + + Must be overriden if not 1 + + + + + Must be overriden if not 1 + + + + + Common base class for all derived MD5 implementations. + + + + + Called from constructor of derived class. + + + + + Creates the default derived class. + + + + + C# implementation of the MD5 cryptographic hash function. + + + + + Creates a new MD5CryptoServiceProvider. + + + + + Drives the hashing function. + + Byte array containing the data to hash. + Where in the input buffer to start. + Size in bytes of the data in the buffer to hash. + + + + This finalizes the hash. Takes the data from the chaining variables and returns it. + + + + + Resets the class after use. Called automatically after hashing is done. + + + + + This is the meat of the hash function. It is what processes each block one at a time. + + Byte array to process data from. + Where in the byte array to start processing. + + + + Pads and then processes the final block. + + Buffer to grab data from. + Position in buffer in bytes to get data from. + How much data in bytes in the buffer to use. + + + + Implements for version 3 of the protocol. + + + + + Reads a row, field by field, allowing a DataRow to be built appropriately. + + + + + Marker interface which identifies a class which may take possession of a stream for the duration of + it's lifetime (possibly temporarily giving that possession to another class for part of that time. + + It inherits from IDisposable, since any such class must make sure it leaves the stream in a valid state. + + The most important such class is that compiler-generated from ProcessBackendResponsesEnum. Of course + we can't make that inherit from this interface, alas. + + + + + Marker interface which identifies a class which represents part of + a response from the server. + + + + + Reads part of a field, as needed (for + and + + + + + Adds further functionality to stream that is dependant upon the type of data read. + + + + + Completes the implementation of Streamer for char data. + + + + + Completes the implementation of Streamer for byte data. + + + + + This class represents a BackEndKeyData message received + from PostgreSQL + + + + + This class represents the Bind message sent to PostgreSQL + server. + + + + + + This class represents the CancelRequest message sent to PostgreSQL + server. + + + + + + Represents a SQL statement or function (stored procedure) to execute + against a PostgreSQL database. This class cannot be inherited. + + + Represents a SQL statement or function (stored procedure) to execute + against a PostgreSQL database. This class cannot be inherited. + + + Represents a SQL statement or function (stored procedure) to execute + against a PostgreSQL database. This class cannot be inherited. + + + + + 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. + + + + Used to execute internal commands. + + + + + Attempts to cancel the execution of a NpgsqlCommand. + + This Method isn't implemented yet. + + + + Create a new command based on this one. + + A new NpgsqlCommand object. + + + + Create a new command based on this one. + + A new NpgsqlCommand object. + + + + Creates a new instance of an DbParameter object. + + An DbParameter object. + + + + Creates a new instance of a NpgsqlParameter object. + + A NpgsqlParameter object. + + + + Releases the resources used by the NpgsqlCommand. + + + + + Internal query shortcut for use in cases where the number + of affected rows is of no interest. + + + + + Special adaptation of ExecuteBlind() that sets statement_timeout. + This exists to prevent Connector.SetBackendCommandTimeout() from calling Command.ExecuteBlind(), + which will cause an endless recursive loop. + + + Timeout in seconds. + + + + Executes a SQL statement against the connection and returns the number of rows affected. + + The number of rows affected if known; -1 otherwise. + + + + Sends the CommandText to + the Connection and builds a + NpgsqlDataReader + using one of the CommandBehavior values. + + One of the CommandBehavior values. + A NpgsqlDataReader object. + + + + Sends the CommandText to + the Connection and builds a + NpgsqlDataReader. + + A NpgsqlDataReader object. + + + + Sends the CommandText to + the Connection and builds a + NpgsqlDataReader + using one of the CommandBehavior values. + + One of the CommandBehavior values. + A NpgsqlDataReader object. + Currently the CommandBehavior parameter is ignored. + + + + This method binds the parameters from parameters collection to the bind + message. + + + + + Executes the query, and returns the first column of the first row + in the result set returned by the query. Extra columns or rows are ignored. + + The first column of the first row in the result set, + or a null reference if the result set is empty. + + + + Creates a prepared version of the command on a PostgreSQL server. + + + + + This method checks the connection state to see if the connection + is set or it is open. If one of this conditions is not met, throws + an InvalidOperationException + + + + + This method substitutes the Parameters, if exist, in the command + to their actual values. + The parameter name format is :ParameterName. + + A version of CommandText with the Parameters inserted. + + + + Process this.commandText, trimming each distinct command and substituting paramater + tokens. + + + UTF8 encoded command ready to be sent to the backend. + + + + Append a region of a source command text to an output command, performing parameter token + substitutions. + + Stream to which to append output. + Command text. + + + false if the query has multiple statements which are not allowed + + + + 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 is 20 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. + + + + DB parameter collection. + + + + + Gets the NpgsqlParameterCollection. + + The parameters of the SQL statement or function (stored procedure). The default is an empty collection. + + + + DB transaction. + + + + + Gets or sets the NpgsqlTransaction + within which the NpgsqlCommand executes. + + The NpgsqlTransaction. + The default value is a null reference. + + + + Gets or sets how command results are applied to the DataRow + when used by the Update + method of the DbDataAdapter. + + One of the UpdateRowSource values. + + + + Returns oid of inserted row. This is only updated when using executenonQuery and when command inserts just a single row. If table is created without oids, this will always be 0. + + + + + Returns whether this query will execute as a prepared (compiled) query. + + + + + Design time visible. + + + + + This class is responsible to create database commands for automatic insert, update and delete operations. + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + The adapter. + + + + + This method is reponsible to derive the command parameter list with values obtained from function definition. + It clears the Parameters collection of command. Also, if there is any parameter type which is not supported by Npgsql, an InvalidOperationException will be thrown. + Parameters name will be parameter1, parameter2, ... + + NpgsqlCommand whose function parameters will be obtained. + + + + Gets the automatically generated object required + to perform insertions at the data source. + + + The automatically generated object required to perform insertions. + + + + + Gets the automatically generated object required to perform insertions + at the data source, optionally using columns for parameter names. + + + If true, generate parameter names matching column names, if possible. + If false, generate @p1, @p2, and so on. + + + The automatically generated object required to perform insertions. + + + + + Gets the automatically generated System.Data.Common.DbCommand object required + to perform updates at the data source. + + + The automatically generated System.Data.Common.DbCommand object required to perform updates. + + + + + Gets the automatically generated object required to perform updates + at the data source, optionally using columns for parameter names. + + + If true, generate parameter names matching column names, if possible. + If false, generate @p1, @p2, and so on. + + + The automatically generated object required to perform updates. + + + + + Gets the automatically generated System.Data.Common.DbCommand object required + to perform deletions at the data source. + + + The automatically generated System.Data.Common.DbCommand object required to perform deletions. + + + + + Gets the automatically generated object required to perform deletions + at the data source, optionally using columns for parameter names. + + + If true, generate parameter names matching column names, if possible. + If false, generate @p1, @p2, and so on. + + + The automatically generated object required to perform deletions. + + + + + Applies the parameter information. + + The parameter. + The row. + Type of the statement. + if set to true [where clause]. + + + + Returns the name of the specified parameter in the format of @p#. + + The number to be included as part of the parameter's name.. + + The name of the parameter with the specified number appended as part of the parameter name. + + + + + Returns the full parameter name, given the partial parameter name. + + The partial name of the parameter. + + The full parameter name corresponding to the partial parameter name requested. + + + + + Returns the placeholder for the parameter in the associated SQL statement. + + The number to be included as part of the parameter's name. + + The name of the parameter with the specified number appended. + + + + + Registers the to handle the event for a . + + The to be used for the update. + + + + Adds an event handler for the event. + + The sender + A instance containing information about the event. + + + + Given an unquoted identifier in the correct catalog case, returns the correct quoted form of that identifier, including properly escaping any embedded quotes in the identifier. + + The original unquoted identifier. + + The quoted version of the identifier. Embedded quotes within the identifier are properly escaped. + + + + + Unquoted identifier parameter cannot be null + + + + Given a quoted identifier, returns the correct unquoted form of that identifier, including properly un-escaping any embedded quotes in the identifier. + + The identifier that will have its embedded quotes removed. + + The unquoted identifier, with embedded quotes properly un-escaped. + + + + + Quoted identifier parameter cannot be null + + + + Gets or sets the beginning character or characters to use when specifying database objects (for example, tables or columns) whose names contain characters such as spaces or reserved tokens. + + + The beginning character or characters to use. The default is an empty string. + + + + + + + + Gets or sets the ending character or characters to use when specifying database objects (for example, tables or columns) whose names contain characters such as spaces or reserved tokens. + + + The ending character or characters to use. The default is an empty string. + + + + + + + + Represents the method that handles the Notice events. + + The source of the event. + A NpgsqlNoticeEventArgs that contains the event data. + + + + Represents the method that handles the Notification events. + + The source of the event. + A NpgsqlNotificationEventArgs that contains the event data. + + + + This class represents a connection to a + PostgreSQL server. + + + + + 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. + + + + 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. + + + + + 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. + + + + + Opens a database connection with the property settings specified by the + ConnectionString. + + + + + 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. + + + + 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. + + + + + 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. + + + + + 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. + + + + Releases all resources used by the + NpgsqlConnection. + + true when called from Dispose(); + false when being called from the finalizer. + + + + Create a new connection based on this one. + + A new NpgsqlConnection object. + + + + Create a new connection based on this one. + + A new NpgsqlConnection object. + + + + Returns a copy of the NpgsqlConnectionStringBuilder that contains the parsed connection string values. + + + + + Default SSL CertificateSelectionCallback implementation. + + + + + Default SSL CertificateValidationCallback implementation. + + + + + Default SSL PrivateKeySelectionCallback implementation. + + + + + Default SSL ProvideClientCertificatesCallback implementation. + + + + + Default SSL ValidateRemoteCertificateCallback implementation. + + + + + Write each key/value pair in the connection string to the log. + + + + + Sets the `settings` ConnectionStringBuilder based on the given `connectionString` + + The connection string to load the builder from + + + + Sets the `settings` ConnectionStringBuilder based on the given `connectionString` + + The connection string to load the builder from + + + + Refresh the cached _connectionString whenever the builder settings change + + + + + Returns the supported collections + + + + + 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. + + + + Clear connection pool. + + + + + Clear all connection pools. + + + + + Enlist transation. + + + + + + Occurs on NoticeResponses from the PostgreSQL backend. + + + + + Occurs on NotificationResponses from the PostgreSQL backend. + + + + + Called to provide client certificates for SSL handshake. + + + + + Mono.Security.Protocol.Tls.CertificateSelectionCallback delegate. + + + + + Mono.Security.Protocol.Tls.CertificateValidationCallback delegate. + + + + + Mono.Security.Protocol.Tls.PrivateKeySelectionCallback delegate. + + + + + Called to validate server's certificate during SSL handshake + + + + + 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). + + + + + Gets or sets the string used to connect to a PostgreSQL database. + Valid values are: +
    +
  • + Server: Address/Name of Postgresql Server; +
  • +
  • + Port: Port to connect to; +
  • +
  • + Protocol: Protocol version to use, instead of automatic; Integer 2 or 3; +
  • +
  • + Database: Database name. Defaults to user name if not specified; +
  • +
  • + User Id: User name; +
  • +
  • + Password: Password for clear text authentication; +
  • +
  • + SSL: True or False. Controls whether to attempt a secure connection. Default = False; +
  • +
  • + Pooling: True or False. Controls whether connection pooling is used. Default = True; +
  • +
  • + MinPoolSize: Min size of connection pool; +
  • +
  • + MaxPoolSize: Max size of connection pool; +
  • +
  • + Timeout: Time to wait for connection open in seconds. Default is 15. +
  • +
  • + CommandTimeout: Time to wait for command to finish execution before throw an exception. In seconds. Default is 20. +
  • +
  • + Sslmode: Mode for ssl connection control. Can be Prefer, Require, Allow or Disable. Default is Disable. Check user manual for explanation of values. +
  • +
  • + ConnectionLifeTime: Time to wait before closing unused connections in the pool in seconds. Default is 15. +
  • +
  • + SyncNotification: Specifies if Npgsql should use synchronous notifications. +
  • +
  • + SearchPath: Changes search path to specified and public schemas. +
  • +
+
+ 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 SSL. + + + + + 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 time to wait before closing unused connections in the pool if the count + of all connections exeeds MinPoolSize. + + + If connection pool contains unused connections for ConnectionLifeTime seconds, + the half of them will be closed. If there will be unused connections in a second + later then again the half of them will be closed and so on. + This strategy provide smooth change of connection count in the pool. + + The time (in seconds) to wait. The default value is 15 seconds. + + + + Gets 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. + + + + Whether datareaders are loaded in their entirety (for compatibility with earlier code). + + + + + Gets the database server name. + + + + + Gets flag indicating if we are using Synchronous notification or not. + The default value is false. + + + + + 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 or ConnectionState.Closed + + + + Compatibility version. + + + + + Version of the PostgreSQL backend. + This can only be called when there is an active connection. + + + + + PostgreSQL server version. + + + + + Protocol version in use. + This can only be called when there is an active connection. + Always retuna Version3 + + + + + Whether the backend is an AWS Redshift instance + + + + + 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). + + + + + Report whether the backend understands the hex byte format (>= 9.0). + + + + + The connector object connected to the backend. + + + + + Gets the NpgsqlConnectionStringBuilder containing the parsed connection string values. + + + + + User name. + + + + + Use extended types. + + + + + Password. + + + + + Determine if connection pooling will be used for this connection. + + + + + Return an exact copy of this NpgsqlConnectionString. + + + + + No integrated security if we're on mono and .NET 4.5 because of ClaimsIdentity, + see https://github.com/npgsql/Npgsql/issues/133 + + + + + This function will set value for known key, both private member and base[key]. + + + + + value, coerced as needed to the stored type. + + + + The function will modify private member only, not base[key]. + + + + value, coerced as needed to the stored type. + + + + The function will access private member only, not base[key]. + + + value. + + + + Clear the member and assign them to the default value. + + + + + Gets or sets the backend server host name. + + + + + Gets or sets the backend server port. + + + + + Gets or sets the name of the database to be used after a connection is opened. + + The name of the database to be + used after a connection is opened. + + + + Gets or sets the login user name. + + + + + Gets or sets the login password as a UTF8 encoded byte array. + + + + + Sets the login password as a string. + + + + + Gets or sets the krbsrvname. + + + + + Gets or sets a value indicating whether to attempt to use SSL. + + + + + Gets or sets a value indicating whether to attempt to use SSL. + + + + + Gets or sets the time to wait while trying to establish a connection + before terminating the attempt and generating an error. + + The time (in seconds) to wait for a connection to open. The default value is 15 seconds. + + + + Gets or sets the schema search path. + + + + + Gets or sets a value indicating whether connection pooling should be used. + + + + + Gets or sets the time to wait before closing unused connections in the pool if the count + of all connections exeeds MinPoolSize. + + + If connection pool contains unused connections for ConnectionLifeTime seconds, + the half of them will be closed. If there will be unused connections in a second + later then again the half of them will be closed and so on. + This strategy provide smooth change of connection count in the pool. + + The time (in seconds) to wait. The default value is 15 seconds. + + + + Gets or sets the minimum connection pool size. + + + + + Gets or sets the maximum connection pool size. + + + + + Gets or sets a value indicating whether to listen for notifications and report them between command activity. + + + + + Gets the time to wait while trying to execute a command + before terminating the attempt and generating an error. + + The time (in seconds) to wait for a command to complete. The default value is 20 seconds. + + + + Gets or sets a value indicating whether datareaders are loaded in their entirety (for compatibility with earlier code). + + + + + Compatibilty version. When possible, behaviour caused by breaking changes will be preserved + if this version is less than that where the breaking change was introduced. + + + + + Gets or sets the ootional application name parameter to be sent to the backend during connection initiation. + + + + + Gets or sets a value indicating whether to silently Prepare() all commands before execution. + + + + + Gets or sets the specified backend communication protocol version. + + + + + Gets the backend encoding. Always returns "UTF8". + + + + + Case insensative accessor for indivual connection string values. + + + + + Set both ImplicitDefault and ExplicitDefault to the 's default value. + + + + + + + + Set ImplicitDefault to the default value of 's type, + and ExplicitDefault to . + + + + + + + + Represents the method that allows the application to provide a certificate collection to be used for SSL clien authentication + + A X509CertificateCollection to be filled with one or more client certificates. + + + + Represents the method that is called to validate the certificate provided by the server during an SSL handshake + + The server's certificate + The certificate chain containing the certificate's CA and any intermediate authorities + Any errors that were detected + + + + !!! Helper class, for compilation only. + Connector implements the logic for the Connection Objects to + access the physical connection to the database, and isolate + the application developer from connection pooling internals. + + + + + Whether the backend is an AWS Redshift instance + + + + + Constructor. + + Connection string. + Pooled + Controls whether the connector can be shared. + + + + This method checks if the connector is still ok. + We try to send a simple query text, select 1 as ConnectionTest; + + + + + This method is responsible for releasing all resources associated with this Connector. + + + + + This method is responsible to release all portals used by this Connector. + + + + + Modify the backend statement_timeout value if needed. + + New timeout + + + + Default SSL CertificateSelectionCallback implementation. + + + + + Default SSL CertificateValidationCallback implementation. + + + + + Default SSL PrivateKeySelectionCallback implementation. + + + + + Default SSL ProvideClientCertificatesCallback implementation. + + + + + Default SSL ValidateRemoteCertificateCallback implementation. + + + + + This method is required to set all the version dependent features flags. + SupportsPrepare means the server can use prepared query plans (7.3+) + + + + + Opens the physical connection to the server. + + Usually called by the RequestConnector + Method of the connection pool manager. + + + + Closes the physical connection to the server. + + + + + Returns next portal index. + + + + + Returns next plan index. + + + + + Occurs on NoticeResponses from the PostgreSQL backend. + + + + + Occurs on NotificationResponses from the PostgreSQL backend. + + + + + Called to provide client certificates for SSL handshake. + + + + + Mono.Security.Protocol.Tls.CertificateSelectionCallback delegate. + + + + + Mono.Security.Protocol.Tls.CertificateValidationCallback delegate. + + + + + Mono.Security.Protocol.Tls.PrivateKeySelectionCallback delegate. + + + + + Called to validate server's certificate during SSL handshake + + + + + Gets the current state of the connection. + + + + + Return Connection String. + + + + + Version of backend server this connector is connected to. + + + + + Whether the backend is an AWS Redshift instance + + + + + The physical connection socket to the backend. + + + + + The physical connection stream to the backend. + + + + + The top level stream to the backend. + + + + + Reports if this connector is fully connected. + + + + + The connection mediator. + + + + + Report if the connection is in a transaction. + + + + + Options that control certain aspects of native to backend conversions that depend + on backend version and status. + + + + + This class manages all connector objects, pooled AND non-pooled. + + + + Unique static instance of the connector pool + mamager. + + + Map of index to unused pooled connectors, avaliable to the + next RequestConnector() call. + This hashmap will be indexed by connection string. + This key will hold a list of queues of pooled connectors available to be used. + + + Timer for tracking unused connections in pools. + + + + Searches the shared and pooled connector lists for a + matching connector object or creates a new one. + + The NpgsqlConnection that is requesting + the connector. Its ConnectionString will be used to search the + pool for available connectors. + A connector object. + + + + Find a pooled connector. Handle shared/non-shared here. + + + + + Releases a connector, possibly back to the pool for future use. + + + Pooled connectors will be put back into the pool if there is room. + Shared connectors should just have their use count decremented + since they always stay in the shared pool. + + Connection to which the connector is leased. + The connector to release. + + + + Release a pooled connector. Handle shared/non-shared here. + + + + + Find an available pooled connector in the non-shared pool, or create + a new one if none found. + + + + + Put a pooled connector into the pool queue. + + Connection is leased to. + Connector to pool + + + + A queue with an extra Int32 for keeping track of busy connections. + + + + + Connections available to the end user + + + + + Connections currently in use + + + + + Represents information about COPY operation data transfer format as returned by server. + + + + + Only created when a CopyInResponse or CopyOutResponse is received by NpgsqlState.ProcessBackendResponses() + + + + + Returns true if this operation is currently active and field at given location is in binary format. + + + + + Returns true if this operation is currently active and in binary format. + + + + + Returns number of fields if this operation is currently active, otherwise -1 + + + + + Represents a PostgreSQL COPY FROM STDIN operation with a corresponding SQL statement + to execute against a PostgreSQL database + and an associated stream used to read data from (if provided by user) + or for writing it (when generated by driver). + Eg. new NpgsqlCopyIn("COPY mytable FROM STDIN", connection, streamToRead).Start(); + + + + + Creates NpgsqlCommand to run given query upon Start(). Data for the requested COPY IN operation can then be written to CopyData stream followed by a call to End() or Cancel(). + + + + + Given command is run upon Start(). Data for the requested COPY IN operation can then be written to CopyData stream followed by a call to End() or Cancel(). + + + + + Given command is executed upon Start() and all data from fromStream is passed to it as copy data. + + + + + Returns true if this operation is currently active and field at given location is in binary format. + + + + + Command specified upon creation is executed as a non-query. + If CopyStream is set upon creation, it will be flushed to server as copy data, and operation will be finished immediately. + Otherwise the CopyStream member can be used for writing copy data to server and operation finished with a call to End() or Cancel(). + + + + + Called after writing all data to CopyStream to successfully complete this copy operation. + + + + + Withdraws an already started copy operation. The operation will fail with given error message. + Will do nothing if current operation is not active. + + + + + Returns true if the connection is currently reserved for this operation. + + + + + The stream provided by user or generated upon Start(). + User may provide a stream to constructor; it is used to pass to server all data read from it. + Otherwise, call to Start() sets this to a writable NpgsqlCopyInStream that passes all data written to it to server. + In latter case this is only available while the copy operation is active and null otherwise. + + + + + Returns true if this operation is currently active and in binary format. + + + + + Returns number of fields expected on each input row if this operation is currently active, otherwise -1 + + + + + The Command used to execute this copy operation. + + + + + Set before a COPY IN query to define size of internal buffer for reading from given CopyStream. + + + + + Represents an ongoing COPY FROM STDIN operation. + Provides methods to push data to server and end or cancel the operation. + + + + + Called from NpgsqlState.ProcessBackendResponses upon CopyInResponse. + If CopyStream is already set, it is used to read data to push to server, after which the copy is completed. + Otherwise CopyStream is set to a writable NpgsqlCopyInStream that calls SendCopyData each time it is written to. + + + + + Sends given packet to server as a CopyData message. + Does not check for notifications! Use another thread for that. + + + + + Sends CopyDone message to server. Handles responses, ie. may throw an exception. + + + + + Sends CopyFail message to server. Handles responses, ie. should always throw an exception: + in CopyIn state the server responds to CopyFail with an error response; + outside of a CopyIn state the server responds to CopyFail with an error response; + without network connection or whatever, there's going to eventually be a failure, timeout or user intervention. + + + + + Copy format information returned from server. + + + + + Stream for writing data to a table on a PostgreSQL version 7.4 or newer database during an active COPY FROM STDIN operation. + Passes data exactly as is and when given, so see to it that you use server encoding, correct format and reasonably sized writes! + + + + + Created only by NpgsqlCopyInState.StartCopy() + + + + + Successfully completes copying data to server. Returns after operation is finished. + Does nothing if this stream is not the active copy operation writer. + + + + + Withdraws an already started copy operation. The operation will fail with given error message. + Does nothing if this stream is not the active copy operation writer. + + + + + Writes given bytes to server. + Fails if this stream is not the active copy operation writer. + + + + + Flushes stream contents to server. + Fails if this stream is not the active copy operation writer. + + + + + Not readable + + + + + Not seekable + + + + + Not supported + + + + + True while this stream can be used to write copy data to server + + + + + False + + + + + True + + + + + False + + + + + Number of bytes written so far + + + + + Number of bytes written so far; not settable + + + + + Represents a PostgreSQL COPY TO STDOUT operation with a corresponding SQL statement + to execute against a PostgreSQL database + and an associated stream used to write results to (if provided by user) + or for reading the results (when generated by driver). + Eg. new NpgsqlCopyOut("COPY (SELECT * FROM mytable) TO STDOUT", connection, streamToWrite).Start(); + + + + + Creates NpgsqlCommand to run given query upon Start(), after which CopyStream provides data from database as requested in the query. + + + + + Given command is run upon Start(), after which CopyStream provides data from database as requested in the query. + + + + + Given command is executed upon Start() and all requested copy data is written to toStream immediately. + + + + + Returns true if this operation is currently active and field at given location is in binary format. + + + + + Command specified upon creation is executed as a non-query. + If CopyStream is set upon creation, all copy data from server will be written to it, and operation will be finished immediately. + Otherwise the CopyStream member can be used for reading copy data from server until no more data is available. + + + + + Flush generated CopyStream at once. Effectively reads and discard all the rest of copy data from server. + + + + + Returns true if the connection is currently reserved for this operation. + + + + + The stream provided by user or generated upon Start() + + + + + The Command used to execute this copy operation. + + + + + Returns true if this operation is currently active and in binary format. + + + + + Returns number of fields if this operation is currently active, otherwise -1 + + + + + Faster alternative to using the generated CopyStream. + + + + + Represents an ongoing COPY TO STDOUT operation. + Provides methods to read data from server or end the operation. + + + + + Called from NpgsqlState.ProcessBackendResponses upon CopyOutResponse. + If CopyStream is already set, it is used to write data received from server, after which the copy ends. + Otherwise CopyStream is set to a readable NpgsqlCopyOutStream that receives data from server. + + + + + Called from NpgsqlOutStream.Read to read copy data from server. + + + + + Copy format information returned from server. + + + + + Stream for reading data from a table or select on a PostgreSQL version 7.4 or newer database during an active COPY TO STDOUT operation. + Passes data exactly as provided by the server. + + + + + Created only by NpgsqlCopyOutState.StartCopy() + + + + + Discards copy data as long as server pushes it. Returns after operation is finished. + Does nothing if this stream is not the active copy operation reader. + + + + + Not writable. + + + + + Not flushable. + + + + + Copies data read from server to given byte buffer. + Since server returns data row by row, length will differ each time, but it is only zero once the operation ends. + Can be mixed with calls to the more efficient NpgsqlCopyOutStream.Read() : byte[] though that would not make much sense. + + + + + Not seekable + + + + + Not supported + + + + + Returns a whole row of data from server without extra work. + If standard Stream.Read(...) has been called before, it's internal buffers remains are returned. + + + + + True while this stream can be used to read copy data from server + + + + + True + + + + + False + + + + + False + + + + + Number of bytes read so far + + + + + Number of bytes read so far; can not be set. + + + + + Writes given objects into a stream for PostgreSQL COPY in default copy format (not CSV or BINARY). + + + + + Default delimiter. + + + + + Default separator. + + + + + Default null. + + + + + Default escape. + + + + + Default quote. + + + + + Default buffer size. + + + + + Constructor. + + + + + + Flush buffers. + + + + + Flush rows. + + + + + Flush fields. + + + + + Close the serializer. + + + + + Escape sequence for the given character. + + + + + + + Make room for bytes. + + + + + + Add bytes. + + + + + + End row. + + + + + Prefix field. + + + + + Field added. + + + + + Add null. + + + + + Add string. + + + + + + add Int32. + + + + + + Add Int64. + + + + + + Add number. + + + + + + Add bool + + + + + + Add DateTime. + + + + + + Report whether the serializer is active. + + + + + To Stream. + + + + + Delimiter. + + + + + Separator. + + + + + Escape. + + + + + Null. + + + + + Buffer size. + + + + + Report whether space remains in the buffer. + + + + + Strings to escape. + + + + + Escape sequence bytes. + + + + + 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. + + + + + Default constructor. + + + + + Constructor. + + + + + + Constructor. + + + + + + + Constructor. + + + + + + + Create row updated event. + + + + + + + + + + Create row updating event. + + + + + + + + + + Raise the RowUpdated event. + + + + + + Raise the RowUpdating event. + + + + + + Row updated event. + + + + + Row updating event. + + + + + Delete command. + + + + + Select command. + + + + + Update command. + + + + + Insert command. + + + + + Provides a means of reading a forward-only stream of rows from a PostgreSQL backend. This class cannot be inherited. + + + + + Return the data type name of the column at index . + + + + + Return the data type of the column at index . + + + + + Return the Npgsql specific data type of the column at requested ordinal. + + column position + Appropriate Npgsql type for column. + + + + Return the column name of the column at index . + + + + + Return the data type OID of the column at index . + + FIXME: Why this method returns String? + + + + Has ordinal. + + + + + + + Return the column name of the column named . + + + + + Return the data DbType of the column at index . + + + + + Return the data NpgsqlDbType of the column at index . + + + + + Get specified field value. + /// + + + + + + Get the value of a column as a . + If the differences between and + in handling of days and months is not important to your application, use + instead. + + Index of the field to find. + value of the field. + + + + Get specified field value. + /// + + + + + + Get specified field value. + /// + + + + + + Get specified field value. + /// + + + + + + Get specified field value. + /// + + + + + + Get specified field value. + /// + + + + + + Send closed event. + + + + + Gets the value of a column converted to a Guid. + + + + + Gets the value of a column as Int16. + + + + + Gets the value of a column as Int32. + + + + + Gets the value of a column as Int64. + + + + + Gets the value of a column as Single. + + + + + Gets the value of a column as Double. + + + + + Gets the value of a column as String. + + + + + Gets the value of a column as Decimal. + + + + + Gets the value of a column as TimeSpan. + + + + + Copy values from each column in the current row into . + + Destination for column values. + The number of column values copied. + + + + Copy values from each column in the current row into . + + An array appropriately sized to store values from all columns. + The number of column values copied. + + + + Gets the value of a column as Boolean. + + + + + Gets the value of a column as Byte. + + + + + Gets the value of a column as Char. + + + + + Gets the value of a column as DateTime. + + + + + Returns a System.Data.DataTable that describes the column metadata of the DataReader. + + + + + This methods parses the command text and tries to get the tablename + from it. + + + + + Get enumerator. + + + + + + Is raised whenever Close() is called. + + + + + Gets the number of columns in the current row. + + + + + Gets the value of a column in its native format. + + + + + Gets the value of a column in its native format. + + + + + 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. + + + + + Contains the column names as the keys + + + + + Contains all unique columns + + + + + This is the primary implementation of NpgsqlDataReader. It is the one used in normal cases (where the + preload-reader option is not set in the connection string to resolve some potential backwards-compatibility + issues), the only implementation used internally, and in cases where CachingDataReader is used, it is still + used to do the actual "leg-work" of turning a response stream from the server into a datareader-style + object - with CachingDataReader then filling it's cache from here. + + + + + Iterate through the objects returned through from the server. + If it's a CompletedResponse the rowsaffected count is updated appropriately, + and we iterate again, otherwise we return it (perhaps updating our cache of pending + rows if appropriate). + + The next we will deal with. + + + + Advances the data reader to the next result, when multiple result sets were returned by the PostgreSQL backend. + + True if the reader was advanced, otherwise false. + + + + Releases the resources used by the NpgsqlCommand. + + + + + Closes the data reader object. + + + + + Advances the data reader to the next result, when multiple result sets were returned by the PostgreSQL backend. + + True if the reader was advanced, otherwise false. + + + + Advances the data reader to the next row. + + True if the reader was advanced, otherwise false. + + + + Return the value of the column at index . + + + + + Gets raw data from a column. + + + + + Gets raw data from a column. + + + + + Report whether the value in a column is DBNull. + + + + + Gets the number of rows changed, inserted, or deleted by execution of the SQL statement. + + + + + Indicates if NpgsqlDatareader has rows to be read. + + + + + Provides an implementation of NpgsqlDataReader in which all data is pre-loaded into memory. + This operates by first creating a ForwardsOnlyDataReader as usual, and then loading all of it's + Rows into memory. There is a general principle that when there is a trade-off between a class design that + is more efficient and/or scalable on the one hand and one that is less efficient but has more functionality + (in this case the internal-only functionality of caching results) that one can build the less efficent class + from the most efficient without significant extra loss in efficiency, but not the other way around. The relationship + between ForwardsOnlyDataReader and CachingDataReader is an example of this). + Since the interface presented to the user is still forwards-only, queues are used to + store this information, so that dequeueing as we go we give the garbage collector the best opportunity + possible to reclaim any memory that is no longer in use. + ForwardsOnlyDataReader being used to actually + obtain the information from the server means that the "leg-work" is still only done (and need only be + maintained) in one place. + This class exists to allow for certain potential backwards-compatibility issues to be resolved + with little effort on the part of affected users. It is considerably less efficient than ForwardsOnlyDataReader + and hence never used internally. + + + + + This is the base class for NpgsqlDescribeStatement and NpgsqlDescribePortal. + + + + + + This class represents the Statement Describe message sent to PostgreSQL + server. + + + + + + This class represents the Portal Describe message sent to PostgreSQL + server. + + + + + + EventArgs class to send Notice parameters, which are just NpgsqlError's in a lighter context. + + + + + Notice information. + + + + + This class represents the ErrorResponse and NoticeResponse + message sent from PostgreSQL server. + + + + + Return a string representation of this error object. + + + + + Severity code. All versions. + + + + + Error code. PostgreSQL 7.4 and up. + + + + + Terse error message. All versions. + + + + + Detailed error message. PostgreSQL 7.4 and up. + + + + + Suggestion to help resolve the error. PostgreSQL 7.4 and up. + + + + + Position (one based) within the query string where the error was encounterd. PostgreSQL 7.4 and up. + + + + + Position (one based) within the query string where the error was encounterd. This position refers to an internal command executed for example inside a PL/pgSQL function. PostgreSQL 7.4 and up. + + + + + Internal query string where the error was encounterd. This position refers to an internal command executed for example inside a PL/pgSQL function. PostgreSQL 7.4 and up. + + + + + Trace back information. PostgreSQL 7.4 and up. + + + + + Source file (in backend) reporting the error. PostgreSQL 7.4 and up. + + + + + Source file line number (in backend) reporting the error. PostgreSQL 7.4 and up. + + + + + Source routine (in backend) reporting the error. PostgreSQL 7.4 and up. + + + + + Schema name which relates to the error. PostgreSQL 9.3 and up. + + + + + Table name which relates to the error. PostgreSQL 9.3 and up. + + + + + Column name which relates to the error. PostgreSQL 9.3 and up. + + + + + Data type of column which relates to the error. PostgreSQL 9.3 and up. + + + + + Constraint name which relates to the error. PostgreSQL 9.3 and up. + + + + + String containing the sql sent which produced this error. + + + + + Backend protocol version in use. + + + + + Error and notice message field codes + + + + + Severity: the field contents are ERROR, FATAL, or PANIC (in an error message), + or WARNING, NOTICE, DEBUG, INFO, or LOG (in a notice message), or a localized + translation of one of these. Always present. + + + + + Code: the SQLSTATE code for the error (see Appendix A). Not localizable. Always present. + + + + + Message: the primary human-readable error message. This should be accurate + but terse (typically one line). Always present. + + + + + Detail: an optional secondary error message carrying more detail about the problem. + Might run to multiple lines. + + + + + Hint: an optional suggestion what to do about the problem. This is intended to differ + from Detail in that it offers advice (potentially inappropriate) rather than hard facts. + Might run to multiple lines. + + + + + Position: the field value is a decimal ASCII integer, indicating an error cursor + position as an index into the original query string. The first character has index 1, + and positions are measured in characters not bytes. + + + + + Internal position: this is defined the same as the P field, but it is used when the + cursor position refers to an internally generated command rather than the one submitted + by the client. + The q field will always appear when this field appears. + + + + + Internal query: the text of a failed internally-generated command. + This could be, for example, a SQL query issued by a PL/pgSQL function. + + + + + Where: an indication of the context in which the error occurred. + Presently this includes a call stack traceback of active procedural language functions + and internally-generated queries. The trace is one entry per line, most recent first. + + + + + Schema name: if the error was associated with a specific database object, + the name of the schema containing that object, if any. + + + + + Table name: if the error was associated with a specific table, the name of the table. + (Refer to the schema name field for the name of the table's schema.) + + + + + Column name: if the error was associated with a specific table column, the name of the column. + (Refer to the schema and table name fields to identify the table.) + + + + + Data type name: if the error was associated with a specific data type, the name of the data type. + (Refer to the schema name field for the name of the data type's schema.) + + + + + Constraint name: if the error was associated with a specific constraint, the name of the constraint. + Refer to fields listed above for the associated table or domain. + (For this purpose, indexes are treated as constraints, even if they weren't created with constraint syntax.) + + + + + File: the file name of the source-code location where the error was reported. + + + + + Line: the line number of the source-code location where the error was reported. + + + + + Routine: the name of the source-code routine reporting the error. + + + + + The level of verbosity of the NpgsqlEventLog + + + + + Don't log at all + + + + + Only log the most common issues + + + + + Log everything + + + + + This class handles all the Npgsql event and debug logging + + + + + Writes a string to the Npgsql event log if msglevel is bigger then NpgsqlEventLog.Level + + + This method is obsolete and should no longer be used. + It is likely to be removed in future versions of Npgsql + + The message to write to the event log + The minimum LogLevel for which this message should be logged. + + + + Writes a string to the Npgsql event log if msglevel is bigger then NpgsqlEventLog.Level + + The ResourceManager to get the localized resources + The name of the resource that should be fetched by the ResourceManager + The minimum LogLevel for which this message should be logged. + The additional parameters that shall be included into the log-message (must be compatible with the string in the resource): + + + + Writes the default log-message for the action of calling the Get-part of an Indexer to the log file. + + The minimum LogLevel for which this message should be logged. + The name of the class that contains the Indexer + The parameter given to the Indexer + + + + Writes the default log-message for the action of calling the Set-part of an Indexer to the logfile. + + The minimum LogLevel for which this message should be logged. + The name of the class that contains the Indexer + The parameter given to the Indexer + The value the Indexer is set to + + + + Writes the default log-message for the action of calling the Get-part of a Property to the logfile. + + The minimum LogLevel for which this message should be logged. + The name of the class that contains the Property + The name of the Property + + + + Writes the default log-message for the action of calling the Set-part of a Property to the logfile. + + The minimum LogLevel for which this message should be logged. + The name of the class that contains the Property + The name of the Property + The value the Property is set to + + + + Writes the default log-message for the action of calling a Method without Arguments to the logfile. + + The minimum LogLevel for which this message should be logged. + The name of the class that contains the Method + The name of the Method + + + + Writes the default log-message for the action of calling a Method with one Argument to the logfile. + + The minimum LogLevel for which this message should be logged. + The name of the class that contains the Method + The name of the Method + The value of the Argument of the Method + + + + Writes the default log-message for the action of calling a Method with two Arguments to the logfile. + + The minimum LogLevel for which this message should be logged. + The name of the class that contains the Method + The name of the Method + The value of the first Argument of the Method + The value of the second Argument of the Method + + + + Writes the default log-message for the action of calling a Method with three Arguments to the logfile. + + The minimum LogLevel for which this message should be logged. + The name of the class that contains the Method + The name of the Method + The value of the first Argument of the Method + The value of the second Argument of the Method + The value of the third Argument of the Method + + + + Writes the default log-message for the action of calling a Method with more than three Arguments to the logfile. + + The minimum LogLevel for which this message should be logged. + The name of the class that contains the Method + The name of the Method + A Object-Array with zero or more Ojects that are Arguments of the Method. + + + + Sets/Returns the filename to use for logging. + + The filename of the current Log file. + + + + Sets/Returns whether Log messages should be echoed to the console + + true if Log messages are echoed to the console, otherwise false + + + + The exception that is thrown when the PostgreSQL backend reports errors. + + + + + Construct a backend error exception based on a list of one or more + backend errors. The basic Exception.Message will be built from the + first (usually the only) error in the list. + + + + + Get object data. + + + + + + + Format a .NET style exception string. + Include all errors in the list, including any hints. + + + + + Append a line to the given Stream, first checking for zero-length. + + + + + Provide access to the entire list of errors provided by the PostgreSQL backend. + + + + + Severity code. All versions. + + + + + Error code. PostgreSQL 7.4 and up. + + + + + Basic error message. All versions. + + + + + Detailed error message. PostgreSQL 7.4 and up. + + + + + Suggestion to help resolve the error. PostgreSQL 7.4 and up. + + + + + Position (one based) within the query string where the error was encounterd. PostgreSQL 7.4 and up. + + + + + Trace back information. PostgreSQL 7.4 and up. + + + + + Source file (in backend) reporting the error. PostgreSQL 7.4 and up. + + + + + Source file line number (in backend) reporting the error. PostgreSQL 7.4 and up. + + + + + Source routine (in backend) reporting the error. PostgreSQL 7.4 and up. + + + + + Schema name which relates to the error. PostgreSQL 9.3 and up. + + + + + Table name which relates to the error. PostgreSQL 9.3 and up. + + + + + Column name which relates to the error. PostgreSQL 9.3 and up. + + + + + Data type of column which relates to the error. PostgreSQL 9.3 and up. + + + + + Constraint name which relates to the error. PostgreSQL 9.3 and up. + + + + + String containing the sql sent which produced this error. + + + + + Returns the entire list of errors provided by the PostgreSQL backend. + + + + + This class represents the Execute message sent to PostgreSQL + server. + + + + + + A factory to create instances of various Npgsql objects. + + + + + Creates an NpgsqlCommand object. + + + + + This class represents the Flush message sent to PostgreSQL + server. + + + + + + For classes representing simple messages, + consisting only of a message code and length identifier, + sent from the client to the server. + + + + + This class is responsible for serving as bridge between the backend + protocol handling and the core classes. It is used as the mediator for + exchanging data generated/sent from/to backend. + + + + + + The current command timeout on the backend. This is set via "SET statement_timeout = (milliseconds)". + A value of -1 means the backend's timeout value is unknown because it has not yet been set. + + + + + EventArgs class to send Notification parameters. + + + + + Process ID of the PostgreSQL backend that sent this notification. + + + + + Condition that triggered that notification. + + + + + Additional Information From Notifiying Process (for future use, currently postgres always sets this to an empty string) + + + + + This class represents a parameter to a command that will be sent to server + + + + + Initializes a new instance of the NpgsqlParameter class. + + + + + Initializes a new instance of the NpgsqlParameter + class with the parameter m_Name and a value of the new NpgsqlParameter. + + The m_Name of the parameter to map. + An Object that is the value of the NpgsqlParameter. + +

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

+

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

+
+
+ + + Initializes a new instance of the NpgsqlParameter + class with the parameter m_Name and the data type. + + The m_Name of the parameter to map. + One of the DbType values. + + + + Initializes a new instance of the NpgsqlParameter. + + The m_Name of the parameter to map. + One of the DbType values. + + + + Initializes a new instance of the NpgsqlParameter. + + The m_Name of the parameter to map. + One of the NpgsqlDbType values. + The length of the parameter. + + + + Initializes a new instance of the NpgsqlParameter. + + The m_Name of the parameter to map. + One of the DbType values. + The length of the parameter. + + + + Initializes a new instance of the NpgsqlParameter + + The m_Name of the parameter to map. + One of the NpgsqlDbType values. + The length of the parameter. + The m_Name of the source column. + + + + Initializes a new instance of the NpgsqlParameter. + + The m_Name of the parameter to map. + One of the DbType values. + The length of the parameter. + The m_Name of the source column. + + + + Initializes a new instance of the NpgsqlParameter. + + The m_Name of the parameter to map. + One of the NpgsqlDbType values. + The length of the parameter. + The m_Name of the source column. + One of the ParameterDirection values. + true if the value of the field can be null, otherwise false. + The total number of digits to the left and right of the decimal point to which + Value is resolved. + The total number of decimal places to which + Value is resolved. + One of the DataRowVersion values. + An Object that is the value + of the NpgsqlParameter. + + + + Initializes a new instance of the NpgsqlParameter. + + The m_Name of the parameter to map. + One of the DbType values. + The length of the parameter. + The m_Name of the source column. + One of the ParameterDirection values. + true if the value of the field can be null, otherwise false. + The total number of digits to the left and right of the decimal point to which + Value is resolved. + The total number of decimal places to which + Value is resolved. + One of the DataRowVersion values. + An Object that is the value + of the NpgsqlParameter. + + + + Reset DBType. + + + + + Creates a new NpgsqlParameter that + is a copy of the current instance. + + A new NpgsqlParameter that is a copy of this instance. + + + + The collection to which this parameter belongs, if any. + + + + + Gets or sets the maximum number of digits used to represent the + 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. + + + + Whether to use an explicit cast when included in a query. + + + + + 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 String. + + + + Gets or sets the DbType of the parameter. + + One of the DbType values. The default is String. + + + + Gets or sets a value indicating whether the parameter is input-only, + output-only, bidirectional, or a stored procedure return value parameter. + + One of the ParameterDirection + values. The default is Input. + + + + Gets or sets a value indicating whether the parameter accepts null values. + + true if null values are accepted; otherwise, false. The default is false. + + + + Gets or sets the m_Name of the NpgsqlParameter. + + The m_Name of the NpgsqlParameter. + The default is an empty string. + + + + The m_Name scrubbed of any optional marker + + + + + Gets or sets the m_Name of the source column that is mapped to the + DataSet and used for loading or + returning the Value. + + The m_Name of the source column that is mapped to the + DataSet. The default is an empty string. + + + + Gets or sets the DataRowVersion + to use when loading Value. + + One of the DataRowVersion values. + The default is Current. + + + + 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. + + + + Source column mapping. + + + + + 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. + + + + + Adds the specified NpgsqlParameter object to the NpgsqlParameterCollection. + + The NpgsqlParameter to add to the collection. + The index of the new NpgsqlParameter object. + + + + Obsolete. Use AddWithValue instead. + + + Use caution when using this overload of the + Add method to specify integer parameter values. + Because this overload takes a value of type Object, + you must convert the integral value to an Object + type when the value is zero, as the following C# example demonstrates. + parameters.Add(":pname", Convert.ToInt32(0)); + If you do not perform this conversion, the compiler will assume you + are attempting to call the NpgsqlParameterCollection.Add(string, DbType) overload. + + + + + Adds a NpgsqlParameter to the NpgsqlParameterCollection given the specified parameter name and value. + + The name of the NpgsqlParameter. + The Value of the NpgsqlParameter to add to the collection. + The paramater that was added. + + + + Adds a NpgsqlParameter to the NpgsqlParameterCollection given the specified parameter name and value. + + The name of the NpgsqlParameter. + The Value of the NpgsqlParameter to add to the collection. + One of the NpgsqlDbType values. + The paramater that was added. + + + + Adds a NpgsqlParameter to the NpgsqlParameterCollection given the specified parameter name and value. + + The name of the NpgsqlParameter. + The Value of the NpgsqlParameter to add to the collection. + One of the NpgsqlDbType values. + The length of the column. + The paramater that was added. + + + + Adds a NpgsqlParameter to the NpgsqlParameterCollection given the specified parameter name and value. + + The name of the NpgsqlParameter. + The Value of the NpgsqlParameter to add to the collection. + One of the NpgsqlDbType values. + The length of the column. + The name of the source column. + The paramater that was added. + + + + Adds a NpgsqlParameter to the NpgsqlParameterCollection given the parameter name and the data type. + + 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. + + + + 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. + + + + 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. + + + + + + + In methods taking an object as argument this method is used to verify + that the argument has the type NpgsqlParameter + + The object to verify + + + + 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[] + + + + 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. + + + + Report whether the collection is read only. Always false. + + + + + 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. + + + + Sync root. + + + + + This class represents the ParameterStatus message sent from PostgreSQL + server. + + + + + + This class represents the Parse message sent to PostgreSQL + server. + + + + + + This class represents a PasswordPacket message sent to backend + PostgreSQL. + + + + + Used when a connection is closed + + + + + This is the abstract base class for NpgsqlAsciiRow and NpgsqlBinaryRow. + + + + + The index of the current field in the stream, i.e. the one that hasn't + been read yet + + + + + This class represents a RowDescription message sent from + the PostgreSQL. + + + + + + This struct represents the internal data of the RowDescription message. + + + + + 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. + + + + This class represents a StartupPacket message of PostgreSQL + protocol. + + + + + + Represents a completed response message. + + + + + This class represents the Sync message sent to PostgreSQL + server. + + + + + + Represents a transaction to be made in a PostgreSQL database. This class cannot be inherited. + + + + + Dispose. + + + + + + Commits the database transaction. + + + + + Rolls back a transaction from a pending state. + + + + + Rolls back a transaction from a pending savepoint state. + + + + + Creates a transaction save point. + + + + + Cancel the transaction without telling the backend about it. This is + used to make the transaction go away when closing a connection. + + + + + Gets the NpgsqlConnection + object associated with the transaction, or a null reference if the + transaction is no longer valid. + + The NpgsqlConnection + object associated with the transaction. + + + + DB connection. + + + + + Specifies the IsolationLevel for this transaction. + + The IsolationLevel for this transaction. + The default is ReadCommitted. + + + + This class provides many util methods to handle + reading and writing of PostgreSQL protocol messages. + + + + + This method takes a ProtocolVersion and returns an integer + version number that the Postgres backend will recognize in a + startup packet. + + + + + This method takes a version string as returned by SELECT VERSION() and returns + a valid version string ("7.2.2" for example). + This is only needed when running protocol version 2. + This does not do any validity checks. + + + + + This method gets a C NULL terminated string from the network stream. + It keeps reading a byte in each time until a NULL byte is returned. + It returns the resultant string of bytes read. + This string is sent from backend. + + + + + Reads requested number of bytes from stream with retries until Stream.Read returns 0 or count is reached. + + Stream to read + byte buffer to fill + starting position to fill the buffer + number of bytes to read + The number of bytes read. May be less than count if no more bytes are available. + + + + Reads requested number of bytes from . If output matches exactly, and == false, is returned directly. + + Source array. + Starting position to read from + Number of bytes to read + Force a copy, even if the output is an exact copy of . + byte[] containing data requested. + + + + This method writes a string to the network stream. + + + + + This method writes a string to the network stream. + + + + + This method writes a C NULL terminated string to the network stream. + It appends a NULL terminator to the end of the String. + + + + + This method writes a C NULL terminated string to the network stream. + It appends a NULL terminator to the end of the String. + + + + + This method writes a byte to the stream. It also enables logging of them. + + + + + This method writes a byte to the stream. It also enables logging of them. + + + + + This method writes a set of bytes to the stream. It also enables logging of them. + + + + + This method writes a set of bytes to the stream. It also enables logging of them. + + + + + This method writes a C NULL terminated string limited in length to the + backend server. + It pads the string with null bytes to the size specified. + + + + + This method writes a C NULL terminated byte[] limited in length to the + backend server. + It pads the string with null bytes to the size specified. + + + + + Write a 32-bit integer to the given stream in the correct byte order. + + + + + Read a 32-bit integer from the given stream in the correct byte order. + + + + + Read a 32-bit integer from the given array in the correct byte order. + + + + + Write a 16-bit integer to the given stream in the correct byte order. + + + + + Read a 16-bit integer from the given stream in the correct byte order. + + + + + Read a 16-bit integer from the given array in the correct byte order. + + + + + Copy and possibly reverse a byte array, depending on host architecture endienness. + + Source byte array. + Force a copy even if no swap is performed. + , reversed if on a little-endian architecture, copied if required. + + + + Copy and possibly reverse a byte array, depending on host architecture endienness. + + Source byte array. + Starting offset in source array. + Number of bytes to copy. + Force a copy even if no swap is performed. + , reversed if on a little-endian architecture, copied if required. + + + + Represent the frontend/backend protocol version. + + + + + Represent the backend server version. + As this class offers no functionality beyond that offered by it has been + deprecated in favour of that class. + + + + + + Returns the string representation of this version in three place dot notation (Major.Minor.Patch). + + + + + Server version major number. + + + + + Server version minor number. + + + + + Server version patch level number. + + + + + A class to handle everything associated with SSPI authentication + + + + + Simplified SecBufferDesc struct with only one SecBuffer + + + + + Provides a set of static (Shared in Visual Basic) methods for + querying objects that implement . + + + + + Returns the input typed as . + + + + + Returns an empty that has the + specified type argument. + + + + + Converts the elements of an to the + specified type. + + + + + Filters the elements of an based on a specified type. + + + + + Generates a sequence of integral numbers within a specified range. + + The value of the first integer in the sequence. + The number of sequential integers to generate. + + + + Generates a sequence that contains one repeated value. + + + + + Filters a sequence of values based on a predicate. + + + + + Filters a sequence of values based on a predicate. + Each element's index is used in the logic of the predicate function. + + + + + Projects each element of a sequence into a new form. + + + + + Projects each element of a sequence into a new form by + incorporating the element's index. + + + + + Projects each element of a sequence to an + and flattens the resulting sequences into one sequence. + + + + + Projects each element of a sequence to an , + and flattens the resulting sequences into one sequence. The + index of each source element is used in the projected form of + that element. + + + + + Projects each element of a sequence to an , + flattens the resulting sequences into one sequence, and invokes + a result selector function on each element therein. + + + + + Projects each element of a sequence to an , + flattens the resulting sequences into one sequence, and invokes + a result selector function on each element therein. The index of + each source element is used in the intermediate projected form + of that element. + + + + + Returns elements from a sequence as long as a specified condition is true. + + + + + Returns elements from a sequence as long as a specified condition is true. + The element's index is used in the logic of the predicate function. + + + + + Returns a specified number of contiguous elements from the start + of a sequence. + + + + + Base implementation of First operator. + + + + + Returns the first element of a sequence. + + + + + Returns the first element in a sequence that satisfies a specified condition. + + + + + Returns the first element of a sequence, or a default value if + the sequence contains no elements. + + + + + Returns the first element of the sequence that satisfies a + condition or a default value if no such element is found. + + + + + Base implementation of Last operator. + + + + + Returns the last element of a sequence. + + + + + Returns the last element of a sequence that satisfies a + specified condition. + + + + + Returns the last element of a sequence, or a default value if + the sequence contains no elements. + + + + + Returns the last element of a sequence that satisfies a + condition or a default value if no such element is found. + + + + + Base implementation of Single operator. + + + + + Returns the only element of a sequence, and throws an exception + if there is not exactly one element in the sequence. + + + + + Returns the only element of a sequence that satisfies a + specified condition, and throws an exception if more than one + such element exists. + + + + + Returns the only element of a sequence, or a default value if + the sequence is empty; this method throws an exception if there + is more than one element in the sequence. + + + + + Returns the only element of a sequence that satisfies a + specified condition or a default value if no such element + exists; this method throws an exception if more than one element + satisfies the condition. + + + + + Returns the element at a specified index in a sequence. + + + + + Returns the element at a specified index in a sequence or a + default value if the index is out of range. + + + + + Inverts the order of the elements in a sequence. + + + + + Bypasses elements in a sequence as long as a specified condition + is true and then returns the remaining elements. + + + + + Bypasses elements in a sequence as long as a specified condition + is true and then returns the remaining elements. The element's + index is used in the logic of the predicate function. + + + + + Bypasses a specified number of elements in a sequence and then + returns the remaining elements. + + + + + Returns the number of elements in a sequence. + + + + + Returns a number that represents how many elements in the + specified sequence satisfy a condition. + + + + + Returns an that represents the total number + of elements in a sequence. + + + + + Returns an that represents how many elements + in a sequence satisfy a condition. + + + + + Concatenates two sequences. + + + + + Creates a from an . + + + + + Creates an array from an . + + + + + Returns distinct elements from a sequence by using the default + equality comparer to compare values. + + + + + Returns distinct elements from a sequence by using a specified + to compare values. + + + + + Creates a from an + according to a specified key + selector function. + + + + + Creates a from an + according to a specified key + selector function and a key comparer. + + + + + Creates a from an + according to specified key + and element selector functions. + + + + + Creates a from an + according to a specified key + selector function, a comparer and an element selector function. + + + + + Groups the elements of a sequence according to a specified key + selector function. + + + + + Groups the elements of a sequence according to a specified key + selector function and compares the keys by using a specified + comparer. + + + + + Groups the elements of a sequence according to a specified key + selector function and projects the elements for each group by + using a specified function. + + + + + Groups the elements of a sequence according to a specified key + selector function and creates a result value from each group and + its key. + + + + + Groups the elements of a sequence according to a key selector + function. The keys are compared by using a comparer and each + group's elements are projected by using a specified function. + + + + + Groups the elements of a sequence according to a specified key + selector function and creates a result value from each group and + its key. The elements of each group are projected by using a + specified function. + + + + + Groups the elements of a sequence according to a specified key + selector function and creates a result value from each group and + its key. The keys are compared by using a specified comparer. + + + + + Groups the elements of a sequence according to a specified key + selector function and creates a result value from each group and + its key. Key values are compared by using a specified comparer, + and the elements of each group are projected by using a + specified function. + + + + + Applies an accumulator function over a sequence. + + + + + Applies an accumulator function over a sequence. The specified + seed value is used as the initial accumulator value. + + + + + Applies an accumulator function over a sequence. The specified + seed value is used as the initial accumulator value, and the + specified function is used to select the result value. + + + + + Produces the set union of two sequences by using the default + equality comparer. + + + + + Produces the set union of two sequences by using a specified + . + + + + + Returns the elements of the specified sequence or the type + parameter's default value in a singleton collection if the + sequence is empty. + + + + + Returns the elements of the specified sequence or the specified + value in a singleton collection if the sequence is empty. + + + + + Determines whether all elements of a sequence satisfy a condition. + + + + + Determines whether a sequence contains any elements. + + + + + Determines whether any element of a sequence satisfies a + condition. + + + + + Determines whether a sequence contains a specified element by + using the default equality comparer. + + + + + Determines whether a sequence contains a specified element by + using a specified . + + + + + Determines whether two sequences are equal by comparing the + elements by using the default equality comparer for their type. + + + + + Determines whether two sequences are equal by comparing their + elements by using a specified . + + + + + Base implementation for Min/Max operator. + + + + + Base implementation for Min/Max operator for nullable types. + + + + + Returns the minimum value in a generic sequence. + + + + + Invokes a transform function on each element of a generic + sequence and returns the minimum resulting value. + + + + + Returns the maximum value in a generic sequence. + + + + + Invokes a transform function on each element of a generic + sequence and returns the maximum resulting value. + + + + + Makes an enumerator seen as enumerable once more. + + + The supplied enumerator must have been started. The first element + returned is the element the enumerator was on when passed in. + DO NOT use this method if the caller must be a generator. It is + mostly safe among aggregate operations. + + + + + Sorts the elements of a sequence in ascending order according to a key. + + + + + Sorts the elements of a sequence in ascending order by using a + specified comparer. + + + + + Sorts the elements of a sequence in descending order according to a key. + + + + + Sorts the elements of a sequence in descending order by using a + specified comparer. + + + + + Performs a subsequent ordering of the elements in a sequence in + ascending order according to a key. + + + + + Performs a subsequent ordering of the elements in a sequence in + ascending order by using a specified comparer. + + + + + Performs a subsequent ordering of the elements in a sequence in + descending order, according to a key. + + + + + Performs a subsequent ordering of the elements in a sequence in + descending order by using a specified comparer. + + + + + Base implementation for Intersect and Except operators. + + + + + Produces the set intersection of two sequences by using the + default equality comparer to compare values. + + + + + Produces the set intersection of two sequences by using the + specified to compare values. + + + + + Produces the set difference of two sequences by using the + default equality comparer to compare values. + + + + + Produces the set difference of two sequences by using the + specified to compare values. + + + + + Creates a from an + according to a specified key + selector function. + + + + + Creates a from an + according to a specified key + selector function and key comparer. + + + + + Creates a from an + according to specified key + selector and element selector functions. + + + + + Creates a from an + according to a specified key + selector function, a comparer, and an element selector function. + + + + + Correlates the elements of two sequences based on matching keys. + The default equality comparer is used to compare keys. + + + + + Correlates the elements of two sequences based on matching keys. + The default equality comparer is used to compare keys. A + specified is used to compare keys. + + + + + Correlates the elements of two sequences based on equality of + keys and groups the results. The default equality comparer is + used to compare keys. + + + + + Correlates the elements of two sequences based on equality of + keys and groups the results. The default equality comparer is + used to compare keys. A specified + is used to compare keys. + + + + + Computes the sum of a sequence of nullable values. + + + + + Computes the sum of a sequence of nullable + values that are obtained by invoking a transform function on + each element of the input sequence. + + + + + Computes the average of a sequence of nullable values. + + + + + Computes the average of a sequence of nullable values + that are obtained by invoking a transform function on each + element of the input sequence. + + + + + Computes the sum of a sequence of values. + + + + + Computes the sum of a sequence of + values that are obtained by invoking a transform function on + each element of the input sequence. + + + + + Computes the average of a sequence of values. + + + + + Computes the average of a sequence of values + that are obtained by invoking a transform function on each + element of the input sequence. + + + + + Returns the minimum value in a sequence of nullable + values. + + + + + Invokes a transform function on each element of a sequence and + returns the minimum nullable value. + + + + + Returns the maximum value in a sequence of nullable + values. + + + + + Invokes a transform function on each element of a sequence and + returns the maximum nullable value. + + + + + Computes the sum of a sequence of nullable values. + + + + + Computes the sum of a sequence of nullable + values that are obtained by invoking a transform function on + each element of the input sequence. + + + + + Computes the average of a sequence of nullable values. + + + + + Computes the average of a sequence of nullable values + that are obtained by invoking a transform function on each + element of the input sequence. + + + + + Computes the sum of a sequence of values. + + + + + Computes the sum of a sequence of + values that are obtained by invoking a transform function on + each element of the input sequence. + + + + + Computes the average of a sequence of values. + + + + + Computes the average of a sequence of values + that are obtained by invoking a transform function on each + element of the input sequence. + + + + + Returns the minimum value in a sequence of nullable + values. + + + + + Invokes a transform function on each element of a sequence and + returns the minimum nullable value. + + + + + Returns the maximum value in a sequence of nullable + values. + + + + + Invokes a transform function on each element of a sequence and + returns the maximum nullable value. + + + + + Computes the sum of a sequence of nullable values. + + + + + Computes the sum of a sequence of nullable + values that are obtained by invoking a transform function on + each element of the input sequence. + + + + + Computes the average of a sequence of nullable values. + + + + + Computes the average of a sequence of nullable values + that are obtained by invoking a transform function on each + element of the input sequence. + + + + + Computes the sum of a sequence of values. + + + + + Computes the sum of a sequence of + values that are obtained by invoking a transform function on + each element of the input sequence. + + + + + Computes the average of a sequence of values. + + + + + Computes the average of a sequence of values + that are obtained by invoking a transform function on each + element of the input sequence. + + + + + Returns the minimum value in a sequence of nullable + values. + + + + + Invokes a transform function on each element of a sequence and + returns the minimum nullable value. + + + + + Returns the maximum value in a sequence of nullable + values. + + + + + Invokes a transform function on each element of a sequence and + returns the maximum nullable value. + + + + + Computes the sum of a sequence of nullable values. + + + + + Computes the sum of a sequence of nullable + values that are obtained by invoking a transform function on + each element of the input sequence. + + + + + Computes the average of a sequence of nullable values. + + + + + Computes the average of a sequence of nullable values + that are obtained by invoking a transform function on each + element of the input sequence. + + + + + Computes the sum of a sequence of values. + + + + + Computes the sum of a sequence of + values that are obtained by invoking a transform function on + each element of the input sequence. + + + + + Computes the average of a sequence of values. + + + + + Computes the average of a sequence of values + that are obtained by invoking a transform function on each + element of the input sequence. + + + + + Returns the minimum value in a sequence of nullable + values. + + + + + Invokes a transform function on each element of a sequence and + returns the minimum nullable value. + + + + + Returns the maximum value in a sequence of nullable + values. + + + + + Invokes a transform function on each element of a sequence and + returns the maximum nullable value. + + + + + Computes the sum of a sequence of nullable values. + + + + + Computes the sum of a sequence of nullable + values that are obtained by invoking a transform function on + each element of the input sequence. + + + + + Computes the average of a sequence of nullable values. + + + + + Computes the average of a sequence of nullable values + that are obtained by invoking a transform function on each + element of the input sequence. + + + + + Computes the sum of a sequence of values. + + + + + Computes the sum of a sequence of + values that are obtained by invoking a transform function on + each element of the input sequence. + + + + + Computes the average of a sequence of values. + + + + + Computes the average of a sequence of values + that are obtained by invoking a transform function on each + element of the input sequence. + + + + + Returns the minimum value in a sequence of nullable + values. + + + + + Invokes a transform function on each element of a sequence and + returns the minimum nullable value. + + + + + Returns the maximum value in a sequence of nullable + values. + + + + + Invokes a transform function on each element of a sequence and + returns the maximum nullable value. + + + + + Represents a collection of objects that have a common key. + + + + + Gets the key of the . + + + + + This attribute allows us to define extension methods without + requiring .NET Framework 3.5. For more information, see the section, + Extension Methods in .NET Framework 2.0 Apps, + of Basic Instincts: Extension Methods + column in MSDN Magazine, + issue Nov 2007. + + + + + Defines an indexer, size property, and Boolean search method for + data structures that map keys to + sequences of values. + + + + + This type is not intended to be used directly from user code. + It may be removed or changed in a future version without notice. + + + + + This type is not intended to be used directly from user code. + It may be removed or changed in a future version without notice. + + + + + This type is not intended to be used directly from user code. + It may be removed or changed in a future version without notice. + + + + + Represents a sorted sequence. + + + + + Performs a subsequent ordering on the elements of an + according to a key. + + + + + Represents a collection of keys each mapped to one or more values. + + + + + Determines whether a specified key is in the . + + + + + Applies a transform function to each key and its associated + values and returns the results. + + + + + Returns a generic enumerator that iterates through the . + + + + + Gets the number of key/value collection pairs in the . + + + + + Gets the collection of values indexed by the specified key. + + +
+
diff --git a/src/Frapid.Web/Areas/Frapid.Config/packages/Npgsql.2.2.6/lib/net20/de/Npgsql.resources.dll b/src/Frapid.Web/Areas/Frapid.Config/packages/Npgsql.2.2.6/lib/net20/de/Npgsql.resources.dll new file mode 100644 index 00000000..1e018cad Binary files /dev/null and b/src/Frapid.Web/Areas/Frapid.Config/packages/Npgsql.2.2.6/lib/net20/de/Npgsql.resources.dll differ diff --git a/src/Frapid.Web/Areas/Frapid.Config/packages/Npgsql.2.2.6/lib/net20/es/Npgsql.resources.dll b/src/Frapid.Web/Areas/Frapid.Config/packages/Npgsql.2.2.6/lib/net20/es/Npgsql.resources.dll new file mode 100644 index 00000000..fbc889c3 Binary files /dev/null and b/src/Frapid.Web/Areas/Frapid.Config/packages/Npgsql.2.2.6/lib/net20/es/Npgsql.resources.dll differ diff --git a/src/Frapid.Web/Areas/Frapid.Config/packages/Npgsql.2.2.6/lib/net20/fi/Npgsql.resources.dll b/src/Frapid.Web/Areas/Frapid.Config/packages/Npgsql.2.2.6/lib/net20/fi/Npgsql.resources.dll new file mode 100644 index 00000000..9973ad78 Binary files /dev/null and b/src/Frapid.Web/Areas/Frapid.Config/packages/Npgsql.2.2.6/lib/net20/fi/Npgsql.resources.dll differ diff --git a/src/Frapid.Web/Areas/Frapid.Config/packages/Npgsql.2.2.6/lib/net20/fr/Npgsql.resources.dll b/src/Frapid.Web/Areas/Frapid.Config/packages/Npgsql.2.2.6/lib/net20/fr/Npgsql.resources.dll new file mode 100644 index 00000000..0a4f9460 Binary files /dev/null and b/src/Frapid.Web/Areas/Frapid.Config/packages/Npgsql.2.2.6/lib/net20/fr/Npgsql.resources.dll differ diff --git a/src/Frapid.Web/Areas/Frapid.Config/packages/Npgsql.2.2.6/lib/net20/ja/Npgsql.resources.dll b/src/Frapid.Web/Areas/Frapid.Config/packages/Npgsql.2.2.6/lib/net20/ja/Npgsql.resources.dll new file mode 100644 index 00000000..11feb58a Binary files /dev/null and b/src/Frapid.Web/Areas/Frapid.Config/packages/Npgsql.2.2.6/lib/net20/ja/Npgsql.resources.dll differ diff --git a/src/Frapid.Web/Areas/Frapid.Config/packages/Npgsql.2.2.6/lib/net20/zh-CN/Npgsql.resources.dll b/src/Frapid.Web/Areas/Frapid.Config/packages/Npgsql.2.2.6/lib/net20/zh-CN/Npgsql.resources.dll new file mode 100644 index 00000000..e14137b0 Binary files /dev/null and b/src/Frapid.Web/Areas/Frapid.Config/packages/Npgsql.2.2.6/lib/net20/zh-CN/Npgsql.resources.dll differ diff --git a/src/Frapid.Web/Areas/Frapid.Config/packages/Npgsql.2.2.6/lib/net35/Mono.Security.dll b/src/Frapid.Web/Areas/Frapid.Config/packages/Npgsql.2.2.6/lib/net35/Mono.Security.dll new file mode 100644 index 00000000..5173f0dc Binary files /dev/null and b/src/Frapid.Web/Areas/Frapid.Config/packages/Npgsql.2.2.6/lib/net35/Mono.Security.dll differ diff --git a/src/Frapid.Web/Areas/Frapid.Config/packages/Npgsql.2.2.6/lib/net35/Npgsql.dll b/src/Frapid.Web/Areas/Frapid.Config/packages/Npgsql.2.2.6/lib/net35/Npgsql.dll new file mode 100644 index 00000000..fd1bca6c Binary files /dev/null and b/src/Frapid.Web/Areas/Frapid.Config/packages/Npgsql.2.2.6/lib/net35/Npgsql.dll differ diff --git a/src/Frapid.Web/Areas/Frapid.Config/packages/Npgsql.2.2.6/lib/net35/Npgsql.xml b/src/Frapid.Web/Areas/Frapid.Config/packages/Npgsql.2.2.6/lib/net35/Npgsql.xml new file mode 100644 index 00000000..44c2c149 --- /dev/null +++ b/src/Frapid.Web/Areas/Frapid.Config/packages/Npgsql.2.2.6/lib/net35/Npgsql.xml @@ -0,0 +1,6536 @@ + + + + Npgsql + + + + + Handles serialisation of .NET array or IEnumeration to pg format. + Arrays of arrays, enumerations of enumerations, arrays of enumerations etc. + are treated as multi-dimensional arrays (in much the same manner as an array of arrays + is used to emulate multi-dimensional arrays in languages that lack native support for them). + If such an enumeration of enumerations is "jagged" (as opposed to rectangular, cuboid, + hypercuboid, hyperhypercuboid, etc) then this class will "correctly" serialise it, but pg + will raise an error as it doesn't allow jagged arrays. + + + + + Create an ArrayNativeToBackendTypeConverter with the element converter passed + + The that would be used to serialise the element type. + + + + Serialise the enumeration or array. + + + + + Convert a System.Array to PG binary format. + Write the array header and prepare to write array data to the stream. + + + + + Append all array data to the binary stream. + + + + + Handles parsing of pg arrays into .NET arrays. + + + + + Takes a string representation of a pg 1-dimensional array + (or a 1-dimensional row within an n-dimensional array) + and allows enumeration of the string represenations of each items. + + + + + Takes a string representation of a pg n-dimensional array + and allows enumeration of the string represenations of the next + lower level of rows (which in turn can be taken as (n-1)-dimensional arrays. + + + + + Takes an ArrayList which may be an ArrayList of ArrayLists, an ArrayList of ArrayLists of ArrayLists + and so on and enumerates the items that aren't ArrayLists (the leaf nodes if we think of the ArrayList + passed as a tree). Simply uses the ArrayLists' own IEnumerators to get that of the next, + pushing them onto a stack until we hit something that isn't an ArrayList. + ArrayList to enumerate + IEnumerable + + + + + Create a new ArrayBackendToNativeTypeConverter + + for the element type. + + + + Creates an array from pg text representation. + + + + + Creates an array list from pg represenation of an array. + Multidimensional arrays are treated as ArrayLists of ArrayLists + + + + + Creates an n-dimensional array from an ArrayList of ArrayLists or + a 1-dimensional array from something else. + + to convert + Type of the elements in the list + produced. + + + + Creates an n-dimensional System.Array from PG binary representation. + This function reads the array header and sets up an n-dimensional System.Array object to hold its data. + PopulateArrayFromBinaryArray() is then called to carry out array population. + + + + + Recursively populates an array from PB binary data representation. + + + + + Takes an array of ints and treats them like the limits of a set of counters. + Retains a matching set of ints that is set to all zeros on the first ++ + On a ++ it increments the "right-most" int. If that int reaches it's + limit it is set to zero and the one before it is incremented, and so on. + + Making this a more general purpose class is pretty straight-forward, but we'll just put what we need here. + + + + + Implements a bit string; a collection of zero or more bits which can each be 1 or 0. + BitString's behave as a list of bools, though like most strings and unlike most collections the position + tends to be of as much significance as the value. + BitStrings are often used as masks, and are commonly cast to and from other values. + + + + + Represents the empty string. + + + + + Create a BitString from an enumeration of boolean values. The BitString will contain + those booleans in the order they came in. + + The boolean values. + + + + Creates a BitString filled with a given number of true or false values. + + The value to fill the string with. + The number of bits to fill. + + + + Creats a bitstring from a string. + The string to copy from. + + + + + + Creates a single-bit element from a boolean value. + + The bool value which determines whether + the bit is 1 or 0. + + + + Creates a bitstring from an unsigned integer value. The string will be the shortest required to + contain the integer (e.g. 1 bit for 0 or 1, 2 for 2 or 3, 3 for 4-7, and so on). + + The integer. + This method is not CLS Compliant, and may not be available to some languages. + + + + Creates a bitstring from an integer value. The string will be the shortest required to + contain the integer (e.g. 1 bit for 0 or 1, 2 for 2 or 3, 3 for 4-7, and so on). + + The integer. + + + + Finds the first instance of a given value + + The value - whether true or false - to search for. + The index of the value found, or -1 if none are present. + + + + True if there is at least one bit with the value looked for. + + The value - true or false - to detect. + True if at least one bit was the same as item, false otherwise. + + + + Copies the bitstring to an array of bools. + + The boolean array to copy to. + The index in the array to start copying from. + + + + Returns an enumerator that enumerates through the string. + + The enumerator. + + + + Creats a bitstring by concatenating another onto this one. + + The string to append to this one. + The combined strings. + + + + Returns a substring of this string. + + The position to start from, must be between 0 and the length of the string. + The length of the string to return, must be greater than zero, and may not be + so large that the start + length exceeds the bounds of this instance. + The Bitstring identified + + + + Returns a substring of this string. + + The position to start from, must be between 0 and the length of the string, + the rest of the string is returned. + The Bitstring identified + + + + A logical and between this string and another. The two strings must be the same length. + + Another BitString to AND with this one. + A bitstring with 1 where both BitStrings had 1 and 0 otherwise. + + + + A logical or between this string and another. The two strings must be the same length. + + Another BitString to OR with this one. + A bitstring with 1 where either BitString had 1 and 0 otherwise. + + + + A logical xor between this string and another. The two strings must be the same length. + + Another BitString to XOR with this one. + A bitstring with 1 where one BitStrings and the other had 0, + and 0 where they both had 1 or both had 0. + + + + A bitstring that is the logical inverse of this one. + + A bitstring of the same length as this with 1 where this has 0 and vice-versa. + + + + Shifts the string operand bits to the left, filling with zeros to produce a + string of the same length. + + The number of bits to shift to the left. + A left-shifted bitstring. + The behaviour of LShift is closer to what one would expect from dealing + with PostgreSQL bit-strings than in using the same operations on integers in .NET + In particular, negative operands result in a right-shift, and operands greater than + the length of the string will shift it entirely, resulting in a zero-filled string. + + + + + Shifts the string operand bits to the right, filling with zeros to produce a + string of the same length. + + The number of bits to shift to the right. + A right-shifted bitstring. + The behaviour of RShift is closer to what one would expect from dealing + with PostgreSQL bit-strings than in using the same operations on integers in .NET + In particular, negative operands result in a left-shift, and operands greater than + the length of the string will shift it entirely, resulting in a zero-filled string. It also performs + a logical shift, rather than an arithmetic shift, so it always sets the vacated bit positions to zero + (like PostgreSQL and like .NET for unsigned integers but not for signed integers). + + + + + Returns true if the this string is identical to the argument passed. + + + + + Compares two strings. Strings are compared as strings, so while 0 being less than 1 will + mean a comparison between two strings of the same size is the same as treating them as numbers, + in the case of two strings of differing lengths the comparison starts at the right-most (most significant) + bit, and if all bits of the shorter string are exhausted without finding a comparison, then the larger + string is deemed to be greater than the shorter (0010 is greater than 0001 but less than 00100). + + Another string to compare with this one. + A value if the two strings are identical, an integer less + than zero if this is less than the argument, and an integer greater + than zero otherwise. + + + + Compares the string with another object. + + The object to compare with. + If the object is null then this string is considered greater. If the object is another BitString + then they are compared as in the explicit comparison for BitStrings + in any other case a is thrown. + + + + Compares this BitString with an object for equality. + + + + + Returns a code for use in hashing operations. + + + + + Returns a string representation of the BitString. + + + A string which can contain a letter and optionally a number which sets a minimum size for the string + returned. In each case using the lower-case form of the letter will result in a lower-case string + being returned. + + + B + A string of 1s and 0s. + + + X + An hexadecimal string (will result in an error unless the string's length is divisible by 4). + + + G + A string of 1s and 0s in single-quotes preceded by 'B' (Postgres bit string literal syntax). + + Y + An hexadecimal string in single-quotes preceded by 'X' (Postgres bit literal syntax, will result in an error unless the string's length is divisible by 4. + + C + The format produced by format-string "Y" if legal, otherwise that produced by format-string "G". + E + The most compact safe representation for Postgres. If single bit will be either a 0 or a 1. Otherwise if it + can be that produce by format string "Y" it will, otherwise if there are less than 9bits in length it will be that + produced by format-string "G". For longer strings that cannot be represented in hexadecimal it will be a string + representing the first part of the string in format "Y" followed by the PostgreSQL concatenation operator, followed + by the final bits in the format "G". E.g. "X'13DCE'||B'110'" + If format is empty or null, it is treated as if "B" had been passed (the default repreesentation, and that + generally used by PostgreSQL for display). + + The formatted string. + + + + Returns a string representation for the Bitstring + + A string containing '0' and '1' characters. + + + + Returns the same string as . formatProvider is ignored. + + + + + Parses a string to produce a BitString. Most formats that can be produced by + can be accepted, but hexadecimal + can be interpreted with the preceding X' to mark the following characters as + being hexadecimal rather than binary. + + + + + Performs a logical AND on the two operands. + + + + + Performs a logcial OR on the two operands. + + + + + Perofrms a logical EXCLUSIVE-OR on the two operands + + + + + Performs a logical NOT on the operand. + + + + + Concatenates the operands. + + + + + Left-shifts the string BitString. + + + + + Right-shifts the string BitString. + + + + + Compares the two operands. + + + + + Compares the two operands. + + + + + Compares the two operands. + + + + + Compares the two operands. + + + + + Compares the two operands. + + + + + Compares the two operands. + + + + + Interprets the bitstring as a series of bits in an encoded character string, + encoded according to the Encoding passed, and returns that string. + The bitstring must contain a whole number of octets(bytes) and also be + valid according to the Encoding passed. + + The to use in producing the string. + The string that was encoded in the BitString. + + + + Interprets the bitstring as a series of octets (bytes) and returns those octets. Fails + if the Bitstring does not contain a whole number of octets (its length is not evenly + divisible by 8). + + + + + Interprets the bitstring as a series of signed octets (bytes) and returns those octets. Fails + if the Bitstring does not contain a whole number of octets (its length is not evenly + divisible by 8). + This method is not CLS-Compliant and may not be available to languages that cannot + handle signed bytes. + + + + + Interprets the bitstring as a series of unsigned 16-bit integers and returns those integers. + Fails if the Bitstring's length is not evenly divisible by 16. + This method is not CLS-Compliant and may not be available to languages that cannot + handle unsigned integers. + + + + + Interprets the bitstring as a series of 16-bit integers and returns those integers. + Fails if the Bitstring's length is not evenly divisible by 16. + + + + + Interprets the bitstring as a series of unsigned 32-bit integers and returns those integers. + Fails if the Bitstring's length is not evenly divisible by 32. + This method is not CLS-Compliant and may not be available to languages that cannot + handle unsigned integers. + + + + + Interprets the bitstring as a series of signed 32-bit integers and returns those integers. + Fails if the Bitstring's length is not evenly divisible by 32. + + + + + Interprets the bitstring as a series of unsigned 64-bit integers and returns those integers. + Fails if the Bitstring's length is not evenly divisible by 64. + This method is not CLS-Compliant and may not be available to languages that cannot + handle unsigned integers. + + + + + Interprets the bitstring as a series of signed 64-bit integers and returns those integers. + Fails if the Bitstring's length is not evenly divisible by 64. + + + + + The length of the string. + + + + + Retrieves the value of the bit at the given index. + + + + + Represents the PostgreSQL interval datatype. + PostgreSQL differs from .NET in how it's interval type doesn't assume 24 hours in a day + (to deal with 23- and 25-hour days caused by daylight savings adjustments) and has a concept + of months that doesn't exist in .NET's class. (Neither datatype + has any concessions for leap-seconds). + For most uses just casting to and from TimeSpan will work correctly — in particular, + the results of subtracting one or the PostgreSQL date, time and + timestamp types from another should be the same whether you do so in .NET or PostgreSQL — + but if the handling of days and months in PostgreSQL is important to your application then you + should use this class instead of . + If you don't know whether these differences are important to your application, they + probably arent! Just use and do not use this class directly ☺ + To avoid forcing unnecessary provider-specific concerns on users who need not be concerned + with them a call to on a field containing an + value will return a rather than an + . If you need the extra functionality of + then use . + + + + + + + + + + Represents the number of ticks (100ns periods) in one microsecond. This field is constant. + + + + + Represents the number of ticks (100ns periods) in one millisecond. This field is constant. + + + + + Represents the number of ticks (100ns periods) in one second. This field is constant. + + + + + Represents the number of ticks (100ns periods) in one minute. This field is constant. + + + + + Represents the number of ticks (100ns periods) in one hour. This field is constant. + + + + + Represents the number of ticks (100ns periods) in one day. This field is constant. + + + + + Represents the number of hours in one day (assuming no daylight savings adjustments). This field is constant. + + + + + Represents the number of days assumed in one month if month justification or unjustifcation is performed. + This is set to 30 for consistency with PostgreSQL. Note that this is means that month adjustments cause + a year to be taken as 30 × 12 = 360 rather than 356/366 days. + + + + + Represents the number of ticks (100ns periods) in one day, assuming 30 days per month. + + + + + Represents the number of months in a year. This field is constant. + + + + + Represents the maximum . This field is read-only. + + + + + Represents the minimum . This field is read-only. + + + + + Represents the zero . This field is read-only. + + + + + Initializes a new to the specified number of ticks. + + A time period expressed in 100ns units. + + + + Initializes a new to hold the same time as a + + A time period expressed in a + + + + Initializes a new to the specified number of months, days + & ticks. + + Number of months. + Number of days. + Number of 100ns units. + + + + Initializes a new to the specified number of + days, hours, minutes & seconds. + + Number of days. + Number of hours. + Number of minutes. + Number of seconds. + + + + Initializes a new to the specified number of + days, hours, minutes, seconds & milliseconds. + + Number of days. + Number of hours. + Number of minutes. + Number of seconds. + Number of milliseconds. + + + + Initializes a new to the specified number of + months, days, hours, minutes, seconds & milliseconds. + + Number of months. + Number of days. + Number of hours. + Number of minutes. + Number of seconds. + Number of milliseconds. + + + + Initializes a new to the specified number of + years, months, days, hours, minutes, seconds & milliseconds. + Years are calculated exactly equivalent to 12 months. + + Number of years. + Number of months. + Number of days. + Number of hours. + Number of minutes. + Number of seconds. + Number of milliseconds. + + + + Creates an from a number of ticks. + + The number of ticks (100ns units) in the interval. + A d with the given number of ticks. + + + + Creates an from a number of microseconds. + + The number of microseconds in the interval. + A d with the given number of microseconds. + + + + Creates an from a number of milliseconds. + + The number of milliseconds in the interval. + A d with the given number of milliseconds. + + + + Creates an from a number of seconds. + + The number of seconds in the interval. + A d with the given number of seconds. + + + + Creates an from a number of minutes. + + The number of minutes in the interval. + A d with the given number of minutes. + + + + Creates an from a number of hours. + + The number of hours in the interval. + A d with the given number of hours. + + + + Creates an from a number of days. + + The number of days in the interval. + A d with the given number of days. + + + + Creates an from a number of months. + + The number of months in the interval. + A d with the given number of months. + + + + Adds another interval to this instance and returns the result. + + An to add to this instance. + An whose values are the sums of the two instances. + + + + Subtracts another interval from this instance and returns the result. + + An to subtract from this instance. + An whose values are the differences of the two instances. + + + + Returns an whose value is the negated value of this instance. + + An whose value is the negated value of this instance. + + + + This absolute value of this instance. In the case of some, but not all, components being negative, + the rules used for justification are used to determine if the instance is positive or negative. + + An whose value is the absolute value of this instance. + + + + Equivalent to PostgreSQL's justify_days function. + + An based on this one, but with any hours outside of the range [-23, 23] + converted into days. + + + + Opposite to PostgreSQL's justify_days function. + + An based on this one, but with any days converted to multiples of ±24hours. + + + + Equivalent to PostgreSQL's justify_months function. + + An based on this one, but with any days outside of the range [-30, 30] + converted into months. + + + + Opposite to PostgreSQL's justify_months function. + + An based on this one, but with any months converted to multiples of ±30days. + + + + Equivalent to PostgreSQL's justify_interval function. + + An based on this one, + but with any months converted to multiples of ±30days + and then with any days converted to multiples of ±24hours + + + + Opposite to PostgreSQL's justify_interval function. + + An based on this one, but with any months converted to multiples of ±30days and then any days converted to multiples of ±24hours; + + + + Produces a canonical NpgslInterval with 0 months and hours in the range of [-23, 23]. + + + While the fact that for many purposes, two different instances could be considered + equivalent (e.g. one with 2days, 3hours and one with 1day 27hours) there are different possible canonical forms. + + E.g. we could move all excess hours into days and all excess days into months and have the most readable form, + or we could move everything into the ticks and have the form that allows for the easiest arithmetic) the form + chosen has two important properties that make it the best choice. + First, it is closest two how + objects are most often represented. Second, it is compatible with results of many + PostgreSQL functions, particularly with age() and the results of subtracting one date, time or timestamp from + another. + + Note that the results of casting a to is + canonicalised. + + + An based on this one, but with months converted to multiples of ±30days and with any hours outside of the range [-23, 23] + converted into days. + + + + Implicit cast of a to an + + A + An eqivalent, canonical, . + + + + Implicit cast of an to a . + + A . + An equivalent . + + + + Returns true if another is exactly the same as this instance. + + An for comparison. + true if the two instances are exactly the same, + false otherwise. + + + + Returns true if another object is an , that is exactly the same as + this instance + + An for comparison. + true if the argument is an and is exactly the same + as this one, false otherwise. + + + + Compares two instances. + + The first . + The second . + 0 if the two are equal or equivalent. A value greater than zero if x is greater than y, + a value less than zero if x is less than y. + + + + A hash code suitable for uses with hashing algorithms. + + An signed integer. + + + + Compares this instance with another/ + + An to compare this with. + 0 if the instances are equal or equivalent. A value less than zero if + this instance is less than the argument. A value greater than zero if this instance + is greater than the instance. + + + + Compares this instance with another/ + + An object to compare this with. + 0 if the argument is an and the instances are equal or equivalent. + A value less than zero if the argument is an and + this instance is less than the argument. + A value greater than zero if the argument is an and this instance + is greater than the instance. + A value greater than zero if the argument is null. + The argument is not an . + + + + Parses a and returns a instance. + Designed to use the formats generally returned by PostgreSQL. + + The to parse. + An represented by the argument. + The string was null. + A value obtained from parsing the string exceeded the values allowed for the relevant component. + The string was not in a format that could be parsed to produce an . + + + + Attempt to parse a to produce an . + + The to parse. + (out) The produced, or if the parsing failed. + true if the parsing succeeded, false otherwise. + + + + Create a representation of the instance. + The format returned is of the form: + [M mon[s]] [d day[s]] [HH:mm:ss[.f[f[f[f[f[f[f[f[f]]]]]]]]]] + A zero is represented as 00:00:00 + + Ticks are 100ns, Postgress resolution is only to 1µs at most. Hence we lose 1 or more decimal + precision in storing values in the database. Despite this, this method will output that extra + digit of precision. It's forward-compatible with any future increases in resolution up to 100ns, + and also makes this ToString() more applicable to any other use-case. + + + The representation. + + + + Adds two together. + + The first to add. + The second to add. + An whose values are the sum of the arguments. + + + + Subtracts one from another. + + The to subtract the other from. + The to subtract from the other. + An whose values are the difference of the arguments + + + + Returns true if two are exactly the same. + + The first to compare. + The second to compare. + true if the two arguments are exactly the same, false otherwise. + + + + Returns false if two are exactly the same. + + The first to compare. + The second to compare. + false if the two arguments are exactly the same, true otherwise. + + + + Compares two instances to see if the first is less than the second + + The first to compare. + The second to compare. + true if the first is less than second, false otherwise. + + + + Compares two instances to see if the first is less than or equivalent to the second + + The first to compare. + The second to compare. + true if the first is less than or equivalent to second, false otherwise. + + + + Compares two instances to see if the first is greater than the second + + The first to compare. + The second to compare. + true if the first is greater than second, false otherwise. + + + + Compares two instances to see if the first is greater than or equivalent the second + + The first to compare. + The second to compare. + true if the first is greater than or equivalent to the second, false otherwise. + + + + Returns the instance. + + An . + The argument. + + + + Negates an instance. + + An . + The negation of the argument. + + + + The total number of ticks(100ns units) contained. This is the resolution of the + type. This ignores the number of days and + months held. If you want them included use first. + The resolution of the PostgreSQL + interval type is by default 1µs = 1,000 ns. It may be smaller as follows: + + + interval(0) + resolution of 1s (1 second) + + + interval(1) + resolution of 100ms = 0.1s (100 milliseconds) + + + interval(2) + resolution of 10ms = 0.01s (10 milliseconds) + + + interval(3) + resolution of 1ms = 0.001s (1 millisecond) + + + interval(4) + resolution of 100µs = 0.0001s (100 microseconds) + + + interval(5) + resolution of 10µs = 0.00001s (10 microseconds) + + + interval(6) or interval + resolution of 1µs = 0.000001s (1 microsecond) + + + As such, if the 100-nanosecond resolution is significant to an application, a PostgreSQL interval will + not suffice for those purposes. + In more frequent cases though, the resolution of the interval suffices. + will always suffice to handle the resolution of any interval value, and upon + writing to the database, will be rounded to the resolution used. + + The number of ticks in the instance. + + + + + Gets the number of whole microseconds held in the instance. + An in the range [-999999, 999999]. + + + + + Gets the number of whole milliseconds held in the instance. + An in the range [-999, 999]. + + + + + Gets the number of whole seconds held in the instance. + An in the range [-59, 59]. + + + + + Gets the number of whole minutes held in the instance. + An in the range [-59, 59]. + + + + + Gets the number of whole hours held in the instance. + Note that this can be less than -23 or greater than 23 unless + has been used to produce this instance. + + + + + Gets the number of days held in the instance. + Note that this does not pay attention to a time component with -24 or less hours or + 24 or more hours, unless has been called to produce this instance. + + + + + Gets the number of months held in the instance. + Note that this does not pay attention to a day component with -30 or less days or + 30 or more days, unless has been called to produce this instance. + + + + + Returns a representing the time component of the instance. + Note that this may have a value beyond the range ±23:59:59.9999999 unless + has been called to produce this instance. + + + + + The total number of ticks (100ns units) in the instance, assuming 24 hours in each day and + 30 days in a month. + + + + + The total number of microseconds in the instance, assuming 24 hours in each day and + 30 days in a month. + + + + + The total number of milliseconds in the instance, assuming 24 hours in each day and + 30 days in a month. + + + + + The total number of seconds in the instance, assuming 24 hours in each day and + 30 days in a month. + + + + + The total number of minutes in the instance, assuming 24 hours in each day and + 30 days in a month. + + + + + The total number of hours in the instance, assuming 24 hours in each day and + 30 days in a month. + + + + + The total number of days in the instance, assuming 24 hours in each day and + 30 days in a month. + + + + + The total number of months in the instance, assuming 24 hours in each day and + 30 days in a month. + + + + + Normalise this time; if it is 24:00:00, convert it to 00:00:00 + + This time, normalised + + + + The total number of ticks(100ns units) contained. This is the resolution of the + type. + The resolution of the PostgreSQL + interval type is by default 1µs = 1,000 ns. It may be smaller as follows: + + + time(0) + resolution of 1s (1 second) + + + time(1) + resolution of 100ms = 0.1s (100 milliseconds) + + + time(2) + resolution of 10ms = 0.01s (10 milliseconds) + + + time(3) + resolution of 1ms = 0.001s (1 millisecond) + + + time(4) + resolution of 100µs = 0.0001s (100 microseconds) + + + time(5) + resolution of 10µs = 0.00001s (10 microseconds) + + + time(6) or interval + resolution of 1µs = 0.000001s (1 microsecond) + + + As such, if the 100-nanosecond resolution is significant to an application, a PostgreSQL time will + not suffice for those purposes. + In more frequent cases though, the resolution of time suffices. + will always suffice to handle the resolution of any time value, and upon + writing to the database, will be rounded to the resolution used. + + The number of ticks in the instance. + + + + + Gets the number of whole microseconds held in the instance. + An integer in the range [0, 999999]. + + + + + Gets the number of whole milliseconds held in the instance. + An integer in the range [0, 999]. + + + + + Gets the number of whole seconds held in the instance. + An interger in the range [0, 59]. + + + + + Gets the number of whole minutes held in the instance. + An integer in the range [0, 59]. + + + + + Gets the number of whole hours held in the instance. + Note that the time 24:00:00 can be stored for roundtrip compatibility. Any calculations on such a + value will normalised it to 00:00:00. + + + + + Normalise this time; if it is 24:00:00, convert it to 00:00:00 + + This time, normalised + + + + Compares this with another . As per postgres' rules, + first the times are compared as if they were both in the same timezone. If they are equal then + then timezones are compared (+01:00 being "smaller" than -01:00). + + the to compare with. + An integer which is 0 if they are equal, < 0 if this is the smaller and > 0 if this is the larger. + + + + Gets the number of whole microseconds held in the instance. + An integer in the range [0, 999999]. + + + + + Gets the number of whole milliseconds held in the instance. + An integer in the range [0, 999]. + + + + + Gets the number of whole seconds held in the instance. + An interger in the range [0, 59]. + + + + + Gets the number of whole minutes held in the instance. + An integer in the range [0, 59]. + + + + + Gets the number of whole hours held in the instance. + Note that the time 24:00:00 can be stored for roundtrip compatibility. Any calculations on such a + value will normalised it to 00:00:00. + + + + + This class implements the Fastpath api. + + + + + This maps the functions names to their id's (possible unique just + to a connection). + + + + + Our connection. + + + + + The network stream. + + + + + Initialises the fastpath system. + + BaseConnection to attach to. + The network stream to the backend. + + + + Initialises the fastpath system. + + BaseConnection to attach to. + + + + Send a function call to the PostgreSQL backend. + + Function id. + True if the result is an integer, false for other results. + FastpathArguments to pass to fastpath. + null if no data, Integer if an integer result, or byte[] otherwise. + + + + Send a function call to the PostgreSQL backend by name. + Note: the mapping for the procedure name to function id needs to exist, + usually to an earlier call to addfunction(). + This is the prefered method to call, as function id's can/may change + between versions of the backend. + For an example of how this works, refer to NpgsqlTypes.LargeObject + + Function name. + True if the result is an integer, false for other results. + FastpathArguments to pass to fastpath. + null if no data, Integer if an integer result, or byte[] otherwise. + + + + This convenience method assumes that the return value is an Integer. + + Function name. + Function arguments. + Integer result. + + + + This convenience method assumes that the return value is an Integer. + + Function name. + Function arguments. + Array containing result + + + + This adds a function to our lookup table. + User code should use the addFunctions method, which is based upon a + query, rather than hard coding the oid. The oid for a function is not + guaranteed to remain static, even on different servers of the same + version. + + Function name. + Function id. + + + + This takes a ResultSet containing two columns. Column 1 contains the + function name, Column 2 the oid. + It reads the entire ResultSet, loading the values into the function + table. + REMEMBER to close() the resultset after calling this!! + Implementation note about function name lookups: + PostgreSQL stores the function id's and their corresponding names in + the pg_proc table. To speed things up locally, instead of querying each + function from that table when required, a Dictionary is used. Also, only + the function's required are entered into this table, keeping connection + times as fast as possible. + The org.postgresql.largeobject.LargeObject class performs a query upon it's startup, + and passes the returned ResultSet to the addFunctions() method here. + Once this has been done, the LargeObject api refers to the functions by + name. + Dont think that manually converting them to the oid's will work. Ok, + they will for now, but they can change during development (there was some + discussion about this for V7.0), so this is implemented to prevent any + unwarranted headaches in the future. + + ResultSet + + + + This returns the function id associated by its name + If addFunction() or addFunctions() have not been called for this name, + then an NpgsqlException is thrown. + + Function name to lookup. + Function ID for fastpath call. + + + + Fast Path Arg. + + + + + Type of argument, true=integer, false=byte[]. + + + + + Integer value if type=true. + + + + + Byte value if type=false; + + + + + Constructs an argument that consists of an integer value. + + Int value to set. + + + + Constructs an argument that consists of an array of bytes. + + Array to store. + + + + Constructs an argument that consists of part of a byte array. + + Source array. + offset within array. + length of data to include. + + + + Constructs an argument that consists of a String. + + String to store. + + + + This sends this argument down the network stream. + The stream sent consists of the length.int4 then the contents. + Note: This is called from Fastpath, and cannot be called from + client code. + + + + + + Report send size. + + Send size. + + + + Large Object. + + + + + Indicates a seek from the begining of a file. + + + + + Indicates a seek from the current position. + + + + + Indicates a seek from the end of a file. + + + + + This opens a large object. + If the object does not exist, then an NpgsqlException is thrown. + + FastPath API for the connection to use. + OID of the Large Object to open. + Mode of opening the large object + + + + OID getter. + + The OID of this LargeObject. + + + + This method closes the object. You must not call methods in this + object after this is called. + + + + + Reads some data from the object, and return as a byte[] array. + + Number of bytes to read. + Array containing data read. + + + + Reads some data from the object into an existing array. + + Destination array. + Offset within array. + Maximum number of bytes to read. + The number of bytes actually read. + + + + Writes an array to the object. + + Array to write. + + + + Writes some data from an array to the object. + + Destination array. + Offset within array. + Number of bytes to write. + + + + Sets the current position within the object. + This is similar to the fseek() call in the standard C library. It + allows you to have random access to the large object. + + Position within object. + Either SEEK_SET, SEEK_CUR or SEEK_END. + + + + Sets the current position within the object. + This is similar to the fseek() call in the standard C library. It + allows you to have random access to the large object. + + Position within object from begining. + + + + Report the current position within the object. + + The current position within the object. + + + + This method is inefficient, as the only way to find out the size of + the object is to seek to the end, record the current position, then + return to the original position. + A better method will be found in the future. + + The size of the large object. + + + + OID. + + + + + Large Object Manager. + + + + + This mode indicates we want to write to an object + + + + + This mode indicates we want to read an object + + + + + This mode is the default. It indicates we want read and write access to + + + + + Constructs the LargeObject API. + There should only be one LargeObjectManager per Connection. The + org.postgresql.Connection class keeps track of the various extension API's + and it's advised you use those to gain access, and not going direct. + + + + + + This opens an existing large object, based on its OID. This method + assumes that READ and WRITE access is required (the default). + + OID of large object. + LargeObject instance providing access to the object + + + + This opens an existing large object, based on its OID. + + OID of large object. + Mode of open. + + + + + This creates a large object, returning its OID. + + OID of new object. + + + + This creates a large object, returning its OID. + + Bitmask describing different attributes of the new object. + OID of new object. + + + + This deletes a large object. + + OID describing object to delete. + + + + This deletes a large object. + It is identical to the Delete() method, and is supplied as the C API uses unlink. + + OID describing object to delete. + + + + Options that control certain aspects of native to backend conversions that depend + on backend version and status. + + + + + Clone the current object. + + A new NativeToBackendTypeConverterOptions object. + + + + Clone the current object with a different OID/Name mapping. + + OID/Name mapping object to use in the new instance. + A new NativeToBackendTypeConverterOptions object. + + + + Provide event handlers to convert all native supported basic data types from their backend + text representation to a .NET object. + + + + + Convert UTF8 encoded text a string. + + + + + Byte array from bytea encoded as ASCII text, escaped or hex format. + + + + + Byte array from bytea encoded as binary. + + + + + Convert a postgresql boolean to a System.Boolean. + + + + + Convert a postgresql boolean to a System.Boolean. + + + + + Convert a postgresql bit to a System.Boolean. + + + + + Convert a postgresql datetime to a System.DateTime. + + + + + Convert a postgresql date to a System.DateTime. + + + + + Convert a postgresql time to a System.DateTime. + + + + + Convert a postgresql money to a System.Decimal. + + + + + Convert a postgresql float4 or float8 to a System.Float or System.Double respectively. + + + + + Provide event handlers to convert extended native supported data types from their backend + text representation to a .NET object. + + + + + Convert a postgresql point to a System.NpgsqlPoint. + + + + + Convert a postgresql point to a System.RectangleF. + + + + + LDeg. + + + + + Path. + + + + + Polygon. + + + + + Circle. + + + + + Inet. + + + + + MAC Address. + + + + + interval + + + + + Provide event handlers to convert the basic native supported data types from + native form to backend representation. + + + + + Convert a string to UTF8 encoded text, escaped and quoted as required. + + + + + Convert a string to UTF8 encoded text. + + + + + Binary data, escaped and quoted as required. + + + + + Binary data with possible older style octal escapes, quoted. + + + + + Binary data in the new hex format (>= 9.0), quoted. + + + + + Binary data, raw. + + + + + Convert to a postgresql boolean text format. + + + + + Convert to a postgresql boolean binary format. + + + + + Convert to a postgresql binary int2. + + + + + Convert to a postgresql binary int4. + + + + + Convert to a postgresql binary int8. + + + + + Convert to a postgresql bit. + + + + + Convert to a postgresql timestamp. + + + + + Convert to a postgresql date. + + + + + Convert to a postgresql time. + + + + + Convert to a postgres money. + + + + + Convert to a postgres double with maximum precision. + + + + + Convert a System.Float to a postgres float4. + + + + + Convert a System.Double to a postgres float8. + + + + + Provide event handlers to convert extended native supported data types from + native form to backend representation. + + + + + Point. + + + + + Box. + + + + + LSeg. + + + + + Open path. + + + + + Polygon. + + + + + Convert to a postgres MAC Address. + + + + + Circle. + + + + + Convert to a postgres inet. + + + + + Convert to a postgres interval + + + + + Delegate called to convert the given backend text data to its native representation. + + + + + Delegate called to convert the given backend binary data to its native representation. + + + + + Represents a backend data type. + This class can be called upon to convert a backend field representation to a native object. + + + + + Construct a new NpgsqlTypeInfo with the given attributes and conversion handlers. + + Type OID provided by the backend server. + Type name provided by the backend server. + NpgsqlDbType + DbType + System type to convert fields of this type to. + Data conversion handler for text encoding. + Data conversion handler for binary data. + + + + Perform a data conversion from a backend representation to + a native object. + + Data sent from the backend. + fieldValueSize + Type modifier field sent from the backend. + + + + Perform a data conversion from a backend representation to + a native object. + + Data sent from the backend. + TypeSize + Type modifier field sent from the backend. + + + + Type OID provided by the backend server. + + + + + Type name provided by the backend server. + + + + + NpgsqlDbType. + + + + + NpgsqlDbType. + + + + + Provider type to convert fields of this type to. + + + + + System type to convert fields of this type to. + + + + + Reports whether a backend binary to native decoder is available for this type. + + + + + Delegate called to convert the given native data to its backand representation. + + + + + Represents a backend data type. + This class can be called upon to convert a native object to its backend field representation, + + + + + Returns an NpgsqlNativeTypeInfo for an array where the elements are of the type + described by the NpgsqlNativeTypeInfo supplied. + + + + + Construct a new NpgsqlTypeInfo with the given attributes and conversion handlers. + + Type name provided by the backend server. + DbType + Quote + NpgsqlDbType + Data conversion handler for text backend encoding. + Data conversion handler for binary backend encoding (for extended queries). + + + + Perform a data conversion from a native object to + a backend representation. + DBNull and null values are handled differently depending if a plain query is used + When + + Native .NET object to be converted. + Specifies that the value should be formatted for the extended query syntax. + Options to guide serialization. If null, a default options set is used. + Specifies that the value should be formatted as an extended query array element. + + + + Type name provided by the backend server. + + + + + NpgsqlDbType. + + + + + DbType. + + + + + Apply quoting. + + + + + Use parameter size information. + + + + + Reports whether a native to backend binary encoder is available for this type. + + + + + Provide mapping between type OID, type name, and a NpgsqlBackendTypeInfo object that represents it. + + + + + Construct an empty mapping. + + + + + Copy constuctor. + + + + + Add the given NpgsqlBackendTypeInfo to this mapping. + + + + + Add a new NpgsqlBackendTypeInfo with the given attributes and conversion handlers to this mapping. + + Type OID provided by the backend server. + Type name provided by the backend server. + NpgsqlDbType + DbType + System type to convert fields of this type to. + Data conversion handler for text encoding. + Data conversion handler for binary data. + + + + Make a shallow copy of this type mapping. + + + + + Determine if a NpgsqlBackendTypeInfo with the given backend type OID exists in this mapping. + + + + + Determine if a NpgsqlBackendTypeInfo with the given backend type name exists in this mapping. + + + + + Get the number of type infos held. + + + + + Retrieve the NpgsqlBackendTypeInfo with the given backend type OID, or null if none found. + + + + + Retrieve the NpgsqlBackendTypeInfo with the given backend type name, or null if none found. + + + + + Provide mapping between type Type, NpgsqlDbType and a NpgsqlNativeTypeInfo object that represents it. + + + + + Add the given NpgsqlNativeTypeInfo to this mapping. + + + + + Add a new NpgsqlNativeTypeInfo with the given attributes and conversion handlers to this mapping. + + Type name provided by the backend server. + NpgsqlDbType + DbType + Quote + Data conversion handler for text backend encoding. + Data conversion handler for binary backend encoding (for extended query). + + + + Retrieve the NpgsqlNativeTypeInfo with the given NpgsqlDbType. + + + + + Retrieve the NpgsqlNativeTypeInfo with the given DbType. + + + + + Retrieve the NpgsqlNativeTypeInfo with the given Type. + + + + + Determine if a NpgsqlNativeTypeInfo with the given backend type name exists in this mapping. + + + + + Determine if a NpgsqlNativeTypeInfo with the given NpgsqlDbType exists in this mapping. + + + + + Determine if a NpgsqlNativeTypeInfo with the given Type name exists in this mapping. + + + + + Get the number of type infos held. + + + + + Represents a PostgreSQL Point type + + + + + Represents a PostgreSQL Line Segment type. + + + + + Represents a PostgreSQL Path type. + + + + + Represents a PostgreSQL Polygon type. + + + + + Represents a PostgreSQL Circle type. + + + + + Represents a PostgreSQL inet type. + + + + + Represents a PostgreSQL MacAddress type. + + + + + + + The macAddr parameter must contain a string that can only consist of numbers + and upper-case letters as hexadecimal digits. (See PhysicalAddress.Parse method on MSDN) + + + + This class contains helper methods for type conversion between + the .Net type system and postgresql. + + + + + A cache of basic datatype mappings keyed by server version. This way we don't + have to load the basic type mappings for every connection. + + + + + Find a NpgsqlNativeTypeInfo in the default types map that can handle objects + of the given NpgsqlDbType. + + + + + Find a NpgsqlNativeTypeInfo in the default types map that can handle objects + of the given NpgsqlDbType. + + + + + Find a NpgsqlNativeTypeInfo in the default types map that can handle objects + of the given DbType. + + + + + Find a NpgsqlNativeTypeInfo in the default types map that can handle objects + of the given System.Type. + + + + + This method is responsible to convert the byte[] received from the backend + to the corresponding NpgsqlType. + The given TypeInfo is called upon to do the conversion. + If no TypeInfo object is provided, no conversion is performed. + + + + + This method is responsible to convert the string received from the backend + to the corresponding NpgsqlType. + The given TypeInfo is called upon to do the conversion. + If no TypeInfo object is provided, no conversion is performed. + + + + + Create the one and only native to backend type map. + This map is used when formatting native data + types to backend representations. + + + + + This method creates (or retrieves from cache) a mapping between type and OID + of all natively supported postgresql data types. + This is needed as from one version to another, this mapping can be changed and + so we avoid hardcoding them. + + NpgsqlTypeMapping containing all known data types. The mapping must be + cloned before it is modified because it is cached; changes made by one connection may + effect another connection. + + + + + Attempt to map types by issuing a query against pg_type. + This function takes a list of NpgsqlTypeInfo and attempts to resolve the OID field + of each by querying pg_type. If the mapping is found, the type info object is + updated (OID) and added to the provided NpgsqlTypeMapping object. + + NpgsqlConnector to send query through. + Mapping object to add types too. + List of types that need to have OID's mapped. + + + + Summary description for NpgsqlQuery + + + + + For classes representing messages sent from the client to the server. + + + + + Set Cache Size. The default value is 20. + + + + + Lookup cached entity. null will returned if not match. + For both get{} and set{} apply LRU rule. + + key + + + + + The globally available text encoding used for frontend/backend communication. + + + + This class represents the base class for the state pattern design pattern + implementation. + + + This class represents the base class for the state pattern design pattern + implementation. + + + + + + This method is used by the states to change the state of the context. + + + + + Call ProcessBackendResponsesEnum(), and scan and discard all results. + + + + + This method is responsible to handle all protocol messages sent from the backend. + It holds all the logic to do it. + To exchange data, it uses a Mediator object from which it reads/writes information + to handle backend requests. + + + + + + Checks for context socket availability. + Socket.Poll supports integer as microseconds parameter. + This limits the usable command timeout value + to 2,147 seconds: (2,147 x 1,000,000 less than max_int). + In order to bypass this limit, the availability of + the socket is checked in 2,147 seconds cycles + + true, if for context socket availability was checked, false otherwise. + Context. + Select mode. + + + + Called from constructor of derived class. + + + + + Finalizer for HashAlgorithm + + + + + Computes the entire hash of all the bytes in the byte array. + + + + + When overridden in a derived class, drives the hashing function. + + + + + + + + When overridden in a derived class, this pads and hashes whatever data might be left in the buffers and then returns the hash created. + + + + + When overridden in a derived class, initializes the object to prepare for hashing. + + + + + Used for stream chaining. Computes hash as data passes through it. + + The buffer from which to grab the data to be copied. + The offset into the input buffer to start reading at. + The number of bytes to be copied. + The buffer to write the copied data to. + At what point in the outputBuffer to write the data at. + + + + Used for stream chaining. Computes hash as data passes through it. Finishes off the hash. + + The buffer from which to grab the data to be copied. + The offset into the input buffer to start reading at. + The number of bytes to be copied. + + + + Get whether or not the hash can transform multiple blocks at a time. + Note: MUST be overriden if descendant can transform multiple block + on a single call! + + + + + Gets the previously computed hash. + + + + + Returns the size in bits of the hash. + + + + + Must be overriden if not 1 + + + + + Must be overriden if not 1 + + + + + Common base class for all derived MD5 implementations. + + + + + Called from constructor of derived class. + + + + + Creates the default derived class. + + + + + C# implementation of the MD5 cryptographic hash function. + + + + + Creates a new MD5CryptoServiceProvider. + + + + + Drives the hashing function. + + Byte array containing the data to hash. + Where in the input buffer to start. + Size in bytes of the data in the buffer to hash. + + + + This finalizes the hash. Takes the data from the chaining variables and returns it. + + + + + Resets the class after use. Called automatically after hashing is done. + + + + + This is the meat of the hash function. It is what processes each block one at a time. + + Byte array to process data from. + Where in the byte array to start processing. + + + + Pads and then processes the final block. + + Buffer to grab data from. + Position in buffer in bytes to get data from. + How much data in bytes in the buffer to use. + + + + Implements for version 3 of the protocol. + + + + + Reads a row, field by field, allowing a DataRow to be built appropriately. + + + + + Marker interface which identifies a class which may take possession of a stream for the duration of + it's lifetime (possibly temporarily giving that possession to another class for part of that time. + + It inherits from IDisposable, since any such class must make sure it leaves the stream in a valid state. + + The most important such class is that compiler-generated from ProcessBackendResponsesEnum. Of course + we can't make that inherit from this interface, alas. + + + + + Marker interface which identifies a class which represents part of + a response from the server. + + + + + Reads part of a field, as needed (for + and + + + + + Adds further functionality to stream that is dependant upon the type of data read. + + + + + Completes the implementation of Streamer for char data. + + + + + Completes the implementation of Streamer for byte data. + + + + + This class represents a BackEndKeyData message received + from PostgreSQL + + + + + This class represents the Bind message sent to PostgreSQL + server. + + + + + + This class represents the CancelRequest message sent to PostgreSQL + server. + + + + + + Represents a SQL statement or function (stored procedure) to execute + against a PostgreSQL database. This class cannot be inherited. + + + Represents a SQL statement or function (stored procedure) to execute + against a PostgreSQL database. This class cannot be inherited. + + + Represents a SQL statement or function (stored procedure) to execute + against a PostgreSQL database. This class cannot be inherited. + + + + + 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. + + + + Used to execute internal commands. + + + + + Attempts to cancel the execution of a NpgsqlCommand. + + This Method isn't implemented yet. + + + + Create a new command based on this one. + + A new NpgsqlCommand object. + + + + Create a new command based on this one. + + A new NpgsqlCommand object. + + + + Creates a new instance of an DbParameter object. + + An DbParameter object. + + + + Creates a new instance of a NpgsqlParameter object. + + A NpgsqlParameter object. + + + + Releases the resources used by the NpgsqlCommand. + + + + + Internal query shortcut for use in cases where the number + of affected rows is of no interest. + + + + + Special adaptation of ExecuteBlind() that sets statement_timeout. + This exists to prevent Connector.SetBackendCommandTimeout() from calling Command.ExecuteBlind(), + which will cause an endless recursive loop. + + + Timeout in seconds. + + + + Executes a SQL statement against the connection and returns the number of rows affected. + + The number of rows affected if known; -1 otherwise. + + + + Sends the CommandText to + the Connection and builds a + NpgsqlDataReader + using one of the CommandBehavior values. + + One of the CommandBehavior values. + A NpgsqlDataReader object. + + + + Sends the CommandText to + the Connection and builds a + NpgsqlDataReader. + + A NpgsqlDataReader object. + + + + Sends the CommandText to + the Connection and builds a + NpgsqlDataReader + using one of the CommandBehavior values. + + One of the CommandBehavior values. + A NpgsqlDataReader object. + Currently the CommandBehavior parameter is ignored. + + + + This method binds the parameters from parameters collection to the bind + message. + + + + + Executes the query, and returns the first column of the first row + in the result set returned by the query. Extra columns or rows are ignored. + + The first column of the first row in the result set, + or a null reference if the result set is empty. + + + + Creates a prepared version of the command on a PostgreSQL server. + + + + + This method checks the connection state to see if the connection + is set or it is open. If one of this conditions is not met, throws + an InvalidOperationException + + + + + This method substitutes the Parameters, if exist, in the command + to their actual values. + The parameter name format is :ParameterName. + + A version of CommandText with the Parameters inserted. + + + + Process this.commandText, trimming each distinct command and substituting paramater + tokens. + + + UTF8 encoded command ready to be sent to the backend. + + + + Append a region of a source command text to an output command, performing parameter token + substitutions. + + Stream to which to append output. + Command text. + + + false if the query has multiple statements which are not allowed + + + + 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 is 20 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. + + + + DB parameter collection. + + + + + Gets the NpgsqlParameterCollection. + + The parameters of the SQL statement or function (stored procedure). The default is an empty collection. + + + + DB transaction. + + + + + Gets or sets the NpgsqlTransaction + within which the NpgsqlCommand executes. + + The NpgsqlTransaction. + The default value is a null reference. + + + + Gets or sets how command results are applied to the DataRow + when used by the Update + method of the DbDataAdapter. + + One of the UpdateRowSource values. + + + + Returns oid of inserted row. This is only updated when using executenonQuery and when command inserts just a single row. If table is created without oids, this will always be 0. + + + + + Returns whether this query will execute as a prepared (compiled) query. + + + + + Design time visible. + + + + + This class is responsible to create database commands for automatic insert, update and delete operations. + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + The adapter. + + + + + This method is reponsible to derive the command parameter list with values obtained from function definition. + It clears the Parameters collection of command. Also, if there is any parameter type which is not supported by Npgsql, an InvalidOperationException will be thrown. + Parameters name will be parameter1, parameter2, ... + + NpgsqlCommand whose function parameters will be obtained. + + + + Gets the automatically generated object required + to perform insertions at the data source. + + + The automatically generated object required to perform insertions. + + + + + Gets the automatically generated object required to perform insertions + at the data source, optionally using columns for parameter names. + + + If true, generate parameter names matching column names, if possible. + If false, generate @p1, @p2, and so on. + + + The automatically generated object required to perform insertions. + + + + + Gets the automatically generated System.Data.Common.DbCommand object required + to perform updates at the data source. + + + The automatically generated System.Data.Common.DbCommand object required to perform updates. + + + + + Gets the automatically generated object required to perform updates + at the data source, optionally using columns for parameter names. + + + If true, generate parameter names matching column names, if possible. + If false, generate @p1, @p2, and so on. + + + The automatically generated object required to perform updates. + + + + + Gets the automatically generated System.Data.Common.DbCommand object required + to perform deletions at the data source. + + + The automatically generated System.Data.Common.DbCommand object required to perform deletions. + + + + + Gets the automatically generated object required to perform deletions + at the data source, optionally using columns for parameter names. + + + If true, generate parameter names matching column names, if possible. + If false, generate @p1, @p2, and so on. + + + The automatically generated object required to perform deletions. + + + + + Applies the parameter information. + + The parameter. + The row. + Type of the statement. + if set to true [where clause]. + + + + Returns the name of the specified parameter in the format of @p#. + + The number to be included as part of the parameter's name.. + + The name of the parameter with the specified number appended as part of the parameter name. + + + + + Returns the full parameter name, given the partial parameter name. + + The partial name of the parameter. + + The full parameter name corresponding to the partial parameter name requested. + + + + + Returns the placeholder for the parameter in the associated SQL statement. + + The number to be included as part of the parameter's name. + + The name of the parameter with the specified number appended. + + + + + Registers the to handle the event for a . + + The to be used for the update. + + + + Adds an event handler for the event. + + The sender + A instance containing information about the event. + + + + Given an unquoted identifier in the correct catalog case, returns the correct quoted form of that identifier, including properly escaping any embedded quotes in the identifier. + + The original unquoted identifier. + + The quoted version of the identifier. Embedded quotes within the identifier are properly escaped. + + + + + Unquoted identifier parameter cannot be null + + + + Given a quoted identifier, returns the correct unquoted form of that identifier, including properly un-escaping any embedded quotes in the identifier. + + The identifier that will have its embedded quotes removed. + + The unquoted identifier, with embedded quotes properly un-escaped. + + + + + Quoted identifier parameter cannot be null + + + + Gets or sets the beginning character or characters to use when specifying database objects (for example, tables or columns) whose names contain characters such as spaces or reserved tokens. + + + The beginning character or characters to use. The default is an empty string. + + + + + + + + Gets or sets the ending character or characters to use when specifying database objects (for example, tables or columns) whose names contain characters such as spaces or reserved tokens. + + + The ending character or characters to use. The default is an empty string. + + + + + + + + Represents the method that handles the Notice events. + + The source of the event. + A NpgsqlNoticeEventArgs that contains the event data. + + + + Represents the method that handles the Notification events. + + The source of the event. + A NpgsqlNotificationEventArgs that contains the event data. + + + + This class represents a connection to a + PostgreSQL server. + + + + + 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. + + + + 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. + + + + + 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. + + + + + Opens a database connection with the property settings specified by the + ConnectionString. + + + + + 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. + + + + 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. + + + + + 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. + + + + + 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. + + + + Releases all resources used by the + NpgsqlConnection. + + true when called from Dispose(); + false when being called from the finalizer. + + + + Create a new connection based on this one. + + A new NpgsqlConnection object. + + + + Create a new connection based on this one. + + A new NpgsqlConnection object. + + + + Returns a copy of the NpgsqlConnectionStringBuilder that contains the parsed connection string values. + + + + + Default SSL CertificateSelectionCallback implementation. + + + + + Default SSL CertificateValidationCallback implementation. + + + + + Default SSL PrivateKeySelectionCallback implementation. + + + + + Default SSL ProvideClientCertificatesCallback implementation. + + + + + Default SSL ValidateRemoteCertificateCallback implementation. + + + + + Write each key/value pair in the connection string to the log. + + + + + Sets the `settings` ConnectionStringBuilder based on the given `connectionString` + + The connection string to load the builder from + + + + Sets the `settings` ConnectionStringBuilder based on the given `connectionString` + + The connection string to load the builder from + + + + Refresh the cached _connectionString whenever the builder settings change + + + + + Returns the supported collections + + + + + 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. + + + + Clear connection pool. + + + + + Clear all connection pools. + + + + + Enlist transation. + + + + + + Occurs on NoticeResponses from the PostgreSQL backend. + + + + + Occurs on NotificationResponses from the PostgreSQL backend. + + + + + Called to provide client certificates for SSL handshake. + + + + + Mono.Security.Protocol.Tls.CertificateSelectionCallback delegate. + + + + + Mono.Security.Protocol.Tls.CertificateValidationCallback delegate. + + + + + Mono.Security.Protocol.Tls.PrivateKeySelectionCallback delegate. + + + + + Called to validate server's certificate during SSL handshake + + + + + 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). + + + + + Gets or sets the string used to connect to a PostgreSQL database. + Valid values are: +
    +
  • + Server: Address/Name of Postgresql Server; +
  • +
  • + Port: Port to connect to; +
  • +
  • + Protocol: Protocol version to use, instead of automatic; Integer 2 or 3; +
  • +
  • + Database: Database name. Defaults to user name if not specified; +
  • +
  • + User Id: User name; +
  • +
  • + Password: Password for clear text authentication; +
  • +
  • + SSL: True or False. Controls whether to attempt a secure connection. Default = False; +
  • +
  • + Pooling: True or False. Controls whether connection pooling is used. Default = True; +
  • +
  • + MinPoolSize: Min size of connection pool; +
  • +
  • + MaxPoolSize: Max size of connection pool; +
  • +
  • + Timeout: Time to wait for connection open in seconds. Default is 15. +
  • +
  • + CommandTimeout: Time to wait for command to finish execution before throw an exception. In seconds. Default is 20. +
  • +
  • + Sslmode: Mode for ssl connection control. Can be Prefer, Require, Allow or Disable. Default is Disable. Check user manual for explanation of values. +
  • +
  • + ConnectionLifeTime: Time to wait before closing unused connections in the pool in seconds. Default is 15. +
  • +
  • + SyncNotification: Specifies if Npgsql should use synchronous notifications. +
  • +
  • + SearchPath: Changes search path to specified and public schemas. +
  • +
+
+ 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 SSL. + + + + + 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 time to wait before closing unused connections in the pool if the count + of all connections exeeds MinPoolSize. + + + If connection pool contains unused connections for ConnectionLifeTime seconds, + the half of them will be closed. If there will be unused connections in a second + later then again the half of them will be closed and so on. + This strategy provide smooth change of connection count in the pool. + + The time (in seconds) to wait. The default value is 15 seconds. + + + + Gets 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. + + + + Whether datareaders are loaded in their entirety (for compatibility with earlier code). + + + + + Gets the database server name. + + + + + Gets flag indicating if we are using Synchronous notification or not. + The default value is false. + + + + + 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 or ConnectionState.Closed + + + + Compatibility version. + + + + + Version of the PostgreSQL backend. + This can only be called when there is an active connection. + + + + + PostgreSQL server version. + + + + + Protocol version in use. + This can only be called when there is an active connection. + Always retuna Version3 + + + + + Whether the backend is an AWS Redshift instance + + + + + 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). + + + + + Report whether the backend understands the hex byte format (>= 9.0). + + + + + The connector object connected to the backend. + + + + + Gets the NpgsqlConnectionStringBuilder containing the parsed connection string values. + + + + + User name. + + + + + Use extended types. + + + + + Password. + + + + + Determine if connection pooling will be used for this connection. + + + + + DB provider factory. + + + + + Return an exact copy of this NpgsqlConnectionString. + + + + + No integrated security if we're on mono and .NET 4.5 because of ClaimsIdentity, + see https://github.com/npgsql/Npgsql/issues/133 + + + + + This function will set value for known key, both private member and base[key]. + + + + + value, coerced as needed to the stored type. + + + + The function will modify private member only, not base[key]. + + + + value, coerced as needed to the stored type. + + + + The function will access private member only, not base[key]. + + + value. + + + + Clear the member and assign them to the default value. + + + + + Gets or sets the backend server host name. + + + + + Gets or sets the backend server port. + + + + + Gets or sets the name of the database to be used after a connection is opened. + + The name of the database to be + used after a connection is opened. + + + + Gets or sets the login user name. + + + + + Gets or sets the login password as a UTF8 encoded byte array. + + + + + Sets the login password as a string. + + + + + Gets or sets the krbsrvname. + + + + + Gets or sets a value indicating whether to attempt to use SSL. + + + + + Gets or sets a value indicating whether to attempt to use SSL. + + + + + Gets or sets the time to wait while trying to establish a connection + before terminating the attempt and generating an error. + + The time (in seconds) to wait for a connection to open. The default value is 15 seconds. + + + + Gets or sets the schema search path. + + + + + Gets or sets a value indicating whether connection pooling should be used. + + + + + Gets or sets the time to wait before closing unused connections in the pool if the count + of all connections exeeds MinPoolSize. + + + If connection pool contains unused connections for ConnectionLifeTime seconds, + the half of them will be closed. If there will be unused connections in a second + later then again the half of them will be closed and so on. + This strategy provide smooth change of connection count in the pool. + + The time (in seconds) to wait. The default value is 15 seconds. + + + + Gets or sets the minimum connection pool size. + + + + + Gets or sets the maximum connection pool size. + + + + + Gets or sets a value indicating whether to listen for notifications and report them between command activity. + + + + + Gets the time to wait while trying to execute a command + before terminating the attempt and generating an error. + + The time (in seconds) to wait for a command to complete. The default value is 20 seconds. + + + + Gets or sets a value indicating whether datareaders are loaded in their entirety (for compatibility with earlier code). + + + + + Compatibilty version. When possible, behaviour caused by breaking changes will be preserved + if this version is less than that where the breaking change was introduced. + + + + + Gets or sets the ootional application name parameter to be sent to the backend during connection initiation. + + + + + Gets or sets a value indicating whether to silently Prepare() all commands before execution. + + + + + Gets or sets the specified backend communication protocol version. + + + + + Gets the backend encoding. Always returns "UTF8". + + + + + Case insensative accessor for indivual connection string values. + + + + + Set both ImplicitDefault and ExplicitDefault to the 's default value. + + + + + + + + Set ImplicitDefault to the default value of 's type, + and ExplicitDefault to . + + + + + + + + Represents the method that allows the application to provide a certificate collection to be used for SSL clien authentication + + A X509CertificateCollection to be filled with one or more client certificates. + + + + Represents the method that is called to validate the certificate provided by the server during an SSL handshake + + The server's certificate + The certificate chain containing the certificate's CA and any intermediate authorities + Any errors that were detected + + + + !!! Helper class, for compilation only. + Connector implements the logic for the Connection Objects to + access the physical connection to the database, and isolate + the application developer from connection pooling internals. + + + + + Whether the backend is an AWS Redshift instance + + + + + Constructor. + + Connection string. + Pooled + Controls whether the connector can be shared. + + + + This method checks if the connector is still ok. + We try to send a simple query text, select 1 as ConnectionTest; + + + + + This method is responsible for releasing all resources associated with this Connector. + + + + + This method is responsible to release all portals used by this Connector. + + + + + Modify the backend statement_timeout value if needed. + + New timeout + + + + Default SSL CertificateSelectionCallback implementation. + + + + + Default SSL CertificateValidationCallback implementation. + + + + + Default SSL PrivateKeySelectionCallback implementation. + + + + + Default SSL ProvideClientCertificatesCallback implementation. + + + + + Default SSL ValidateRemoteCertificateCallback implementation. + + + + + This method is required to set all the version dependent features flags. + SupportsPrepare means the server can use prepared query plans (7.3+) + + + + + Opens the physical connection to the server. + + Usually called by the RequestConnector + Method of the connection pool manager. + + + + Closes the physical connection to the server. + + + + + Returns next portal index. + + + + + Returns next plan index. + + + + + Occurs on NoticeResponses from the PostgreSQL backend. + + + + + Occurs on NotificationResponses from the PostgreSQL backend. + + + + + Called to provide client certificates for SSL handshake. + + + + + Mono.Security.Protocol.Tls.CertificateSelectionCallback delegate. + + + + + Mono.Security.Protocol.Tls.CertificateValidationCallback delegate. + + + + + Mono.Security.Protocol.Tls.PrivateKeySelectionCallback delegate. + + + + + Called to validate server's certificate during SSL handshake + + + + + Gets the current state of the connection. + + + + + Return Connection String. + + + + + Version of backend server this connector is connected to. + + + + + Whether the backend is an AWS Redshift instance + + + + + The physical connection socket to the backend. + + + + + The physical connection stream to the backend. + + + + + The top level stream to the backend. + + + + + Reports if this connector is fully connected. + + + + + The connection mediator. + + + + + Report if the connection is in a transaction. + + + + + Options that control certain aspects of native to backend conversions that depend + on backend version and status. + + + + + This class manages all connector objects, pooled AND non-pooled. + + + + Unique static instance of the connector pool + mamager. + + + Map of index to unused pooled connectors, avaliable to the + next RequestConnector() call. + This hashmap will be indexed by connection string. + This key will hold a list of queues of pooled connectors available to be used. + + + Timer for tracking unused connections in pools. + + + + Searches the shared and pooled connector lists for a + matching connector object or creates a new one. + + The NpgsqlConnection that is requesting + the connector. Its ConnectionString will be used to search the + pool for available connectors. + A connector object. + + + + Find a pooled connector. Handle shared/non-shared here. + + + + + Releases a connector, possibly back to the pool for future use. + + + Pooled connectors will be put back into the pool if there is room. + Shared connectors should just have their use count decremented + since they always stay in the shared pool. + + Connection to which the connector is leased. + The connector to release. + + + + Release a pooled connector. Handle shared/non-shared here. + + + + + Find an available pooled connector in the non-shared pool, or create + a new one if none found. + + + + + Put a pooled connector into the pool queue. + + Connection is leased to. + Connector to pool + + + + A queue with an extra Int32 for keeping track of busy connections. + + + + + Connections available to the end user + + + + + Connections currently in use + + + + + Represents information about COPY operation data transfer format as returned by server. + + + + + Only created when a CopyInResponse or CopyOutResponse is received by NpgsqlState.ProcessBackendResponses() + + + + + Returns true if this operation is currently active and field at given location is in binary format. + + + + + Returns true if this operation is currently active and in binary format. + + + + + Returns number of fields if this operation is currently active, otherwise -1 + + + + + Represents a PostgreSQL COPY FROM STDIN operation with a corresponding SQL statement + to execute against a PostgreSQL database + and an associated stream used to read data from (if provided by user) + or for writing it (when generated by driver). + Eg. new NpgsqlCopyIn("COPY mytable FROM STDIN", connection, streamToRead).Start(); + + + + + Creates NpgsqlCommand to run given query upon Start(). Data for the requested COPY IN operation can then be written to CopyData stream followed by a call to End() or Cancel(). + + + + + Given command is run upon Start(). Data for the requested COPY IN operation can then be written to CopyData stream followed by a call to End() or Cancel(). + + + + + Given command is executed upon Start() and all data from fromStream is passed to it as copy data. + + + + + Returns true if this operation is currently active and field at given location is in binary format. + + + + + Command specified upon creation is executed as a non-query. + If CopyStream is set upon creation, it will be flushed to server as copy data, and operation will be finished immediately. + Otherwise the CopyStream member can be used for writing copy data to server and operation finished with a call to End() or Cancel(). + + + + + Called after writing all data to CopyStream to successfully complete this copy operation. + + + + + Withdraws an already started copy operation. The operation will fail with given error message. + Will do nothing if current operation is not active. + + + + + Returns true if the connection is currently reserved for this operation. + + + + + The stream provided by user or generated upon Start(). + User may provide a stream to constructor; it is used to pass to server all data read from it. + Otherwise, call to Start() sets this to a writable NpgsqlCopyInStream that passes all data written to it to server. + In latter case this is only available while the copy operation is active and null otherwise. + + + + + Returns true if this operation is currently active and in binary format. + + + + + Returns number of fields expected on each input row if this operation is currently active, otherwise -1 + + + + + The Command used to execute this copy operation. + + + + + Set before a COPY IN query to define size of internal buffer for reading from given CopyStream. + + + + + Represents an ongoing COPY FROM STDIN operation. + Provides methods to push data to server and end or cancel the operation. + + + + + Called from NpgsqlState.ProcessBackendResponses upon CopyInResponse. + If CopyStream is already set, it is used to read data to push to server, after which the copy is completed. + Otherwise CopyStream is set to a writable NpgsqlCopyInStream that calls SendCopyData each time it is written to. + + + + + Sends given packet to server as a CopyData message. + Does not check for notifications! Use another thread for that. + + + + + Sends CopyDone message to server. Handles responses, ie. may throw an exception. + + + + + Sends CopyFail message to server. Handles responses, ie. should always throw an exception: + in CopyIn state the server responds to CopyFail with an error response; + outside of a CopyIn state the server responds to CopyFail with an error response; + without network connection or whatever, there's going to eventually be a failure, timeout or user intervention. + + + + + Copy format information returned from server. + + + + + Stream for writing data to a table on a PostgreSQL version 7.4 or newer database during an active COPY FROM STDIN operation. + Passes data exactly as is and when given, so see to it that you use server encoding, correct format and reasonably sized writes! + + + + + Created only by NpgsqlCopyInState.StartCopy() + + + + + Successfully completes copying data to server. Returns after operation is finished. + Does nothing if this stream is not the active copy operation writer. + + + + + Withdraws an already started copy operation. The operation will fail with given error message. + Does nothing if this stream is not the active copy operation writer. + + + + + Writes given bytes to server. + Fails if this stream is not the active copy operation writer. + + + + + Flushes stream contents to server. + Fails if this stream is not the active copy operation writer. + + + + + Not readable + + + + + Not seekable + + + + + Not supported + + + + + True while this stream can be used to write copy data to server + + + + + False + + + + + True + + + + + False + + + + + Number of bytes written so far + + + + + Number of bytes written so far; not settable + + + + + Represents a PostgreSQL COPY TO STDOUT operation with a corresponding SQL statement + to execute against a PostgreSQL database + and an associated stream used to write results to (if provided by user) + or for reading the results (when generated by driver). + Eg. new NpgsqlCopyOut("COPY (SELECT * FROM mytable) TO STDOUT", connection, streamToWrite).Start(); + + + + + Creates NpgsqlCommand to run given query upon Start(), after which CopyStream provides data from database as requested in the query. + + + + + Given command is run upon Start(), after which CopyStream provides data from database as requested in the query. + + + + + Given command is executed upon Start() and all requested copy data is written to toStream immediately. + + + + + Returns true if this operation is currently active and field at given location is in binary format. + + + + + Command specified upon creation is executed as a non-query. + If CopyStream is set upon creation, all copy data from server will be written to it, and operation will be finished immediately. + Otherwise the CopyStream member can be used for reading copy data from server until no more data is available. + + + + + Flush generated CopyStream at once. Effectively reads and discard all the rest of copy data from server. + + + + + Returns true if the connection is currently reserved for this operation. + + + + + The stream provided by user or generated upon Start() + + + + + The Command used to execute this copy operation. + + + + + Returns true if this operation is currently active and in binary format. + + + + + Returns number of fields if this operation is currently active, otherwise -1 + + + + + Faster alternative to using the generated CopyStream. + + + + + Represents an ongoing COPY TO STDOUT operation. + Provides methods to read data from server or end the operation. + + + + + Called from NpgsqlState.ProcessBackendResponses upon CopyOutResponse. + If CopyStream is already set, it is used to write data received from server, after which the copy ends. + Otherwise CopyStream is set to a readable NpgsqlCopyOutStream that receives data from server. + + + + + Called from NpgsqlOutStream.Read to read copy data from server. + + + + + Copy format information returned from server. + + + + + Stream for reading data from a table or select on a PostgreSQL version 7.4 or newer database during an active COPY TO STDOUT operation. + Passes data exactly as provided by the server. + + + + + Created only by NpgsqlCopyOutState.StartCopy() + + + + + Discards copy data as long as server pushes it. Returns after operation is finished. + Does nothing if this stream is not the active copy operation reader. + + + + + Not writable. + + + + + Not flushable. + + + + + Copies data read from server to given byte buffer. + Since server returns data row by row, length will differ each time, but it is only zero once the operation ends. + Can be mixed with calls to the more efficient NpgsqlCopyOutStream.Read() : byte[] though that would not make much sense. + + + + + Not seekable + + + + + Not supported + + + + + Returns a whole row of data from server without extra work. + If standard Stream.Read(...) has been called before, it's internal buffers remains are returned. + + + + + True while this stream can be used to read copy data from server + + + + + True + + + + + False + + + + + False + + + + + Number of bytes read so far + + + + + Number of bytes read so far; can not be set. + + + + + Writes given objects into a stream for PostgreSQL COPY in default copy format (not CSV or BINARY). + + + + + Default delimiter. + + + + + Default separator. + + + + + Default null. + + + + + Default escape. + + + + + Default quote. + + + + + Default buffer size. + + + + + Constructor. + + + + + + Flush buffers. + + + + + Flush rows. + + + + + Flush fields. + + + + + Close the serializer. + + + + + Escape sequence for the given character. + + + + + + + Make room for bytes. + + + + + + Add bytes. + + + + + + End row. + + + + + Prefix field. + + + + + Field added. + + + + + Add null. + + + + + Add string. + + + + + + add Int32. + + + + + + Add Int64. + + + + + + Add number. + + + + + + Add bool + + + + + + Add DateTime. + + + + + + Report whether the serializer is active. + + + + + To Stream. + + + + + Delimiter. + + + + + Separator. + + + + + Escape. + + + + + Null. + + + + + Buffer size. + + + + + Report whether space remains in the buffer. + + + + + Strings to escape. + + + + + Escape sequence bytes. + + + + + 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. + + + + + Default constructor. + + + + + Constructor. + + + + + + Constructor. + + + + + + + Constructor. + + + + + + + Create row updated event. + + + + + + + + + + Create row updating event. + + + + + + + + + + Raise the RowUpdated event. + + + + + + Raise the RowUpdating event. + + + + + + Row updated event. + + + + + Row updating event. + + + + + Delete command. + + + + + Select command. + + + + + Update command. + + + + + Insert command. + + + + + Provides a means of reading a forward-only stream of rows from a PostgreSQL backend. This class cannot be inherited. + + + + + Return the data type name of the column at index . + + + + + Return the data type of the column at index . + + + + + Return the Npgsql specific data type of the column at requested ordinal. + + column position + Appropriate Npgsql type for column. + + + + Return the column name of the column at index . + + + + + Return the data type OID of the column at index . + + FIXME: Why this method returns String? + + + + Has ordinal. + + + + + + + Return the column name of the column named . + + + + + Return the data DbType of the column at index . + + + + + Return the data NpgsqlDbType of the column at index . + + + + + Get specified field value. + /// + + + + + + Get the value of a column as a . + If the differences between and + in handling of days and months is not important to your application, use + instead. + + Index of the field to find. + value of the field. + + + + Get specified field value. + /// + + + + + + Get specified field value. + /// + + + + + + Get specified field value. + /// + + + + + + Get specified field value. + /// + + + + + + Get specified field value. + /// + + + + + + Send closed event. + + + + + Gets the value of a column converted to a Guid. + + + + + Gets the value of a column as Int16. + + + + + Gets the value of a column as Int32. + + + + + Gets the value of a column as Int64. + + + + + Gets the value of a column as Single. + + + + + Gets the value of a column as Double. + + + + + Gets the value of a column as String. + + + + + Gets the value of a column as Decimal. + + + + + Gets the value of a column as TimeSpan. + + + + + Copy values from each column in the current row into . + + Destination for column values. + The number of column values copied. + + + + Copy values from each column in the current row into . + + An array appropriately sized to store values from all columns. + The number of column values copied. + + + + Gets the value of a column as Boolean. + + + + + Gets the value of a column as Byte. + + + + + Gets the value of a column as Char. + + + + + Gets the value of a column as DateTime. + + + + + Returns a System.Data.DataTable that describes the column metadata of the DataReader. + + + + + This methods parses the command text and tries to get the tablename + from it. + + + + + Get enumerator. + + + + + + Is raised whenever Close() is called. + + + + + Gets the number of columns in the current row. + + + + + Gets the value of a column in its native format. + + + + + Gets the value of a column in its native format. + + + + + 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. + + + + + Contains the column names as the keys + + + + + Contains all unique columns + + + + + This is the primary implementation of NpgsqlDataReader. It is the one used in normal cases (where the + preload-reader option is not set in the connection string to resolve some potential backwards-compatibility + issues), the only implementation used internally, and in cases where CachingDataReader is used, it is still + used to do the actual "leg-work" of turning a response stream from the server into a datareader-style + object - with CachingDataReader then filling it's cache from here. + + + + + Iterate through the objects returned through from the server. + If it's a CompletedResponse the rowsaffected count is updated appropriately, + and we iterate again, otherwise we return it (perhaps updating our cache of pending + rows if appropriate). + + The next we will deal with. + + + + Advances the data reader to the next result, when multiple result sets were returned by the PostgreSQL backend. + + True if the reader was advanced, otherwise false. + + + + Releases the resources used by the NpgsqlCommand. + + + + + Closes the data reader object. + + + + + Advances the data reader to the next result, when multiple result sets were returned by the PostgreSQL backend. + + True if the reader was advanced, otherwise false. + + + + Advances the data reader to the next row. + + True if the reader was advanced, otherwise false. + + + + Return the value of the column at index . + + + + + Gets raw data from a column. + + + + + Gets raw data from a column. + + + + + Report whether the value in a column is DBNull. + + + + + Gets the number of rows changed, inserted, or deleted by execution of the SQL statement. + + + + + Indicates if NpgsqlDatareader has rows to be read. + + + + + Provides an implementation of NpgsqlDataReader in which all data is pre-loaded into memory. + This operates by first creating a ForwardsOnlyDataReader as usual, and then loading all of it's + Rows into memory. There is a general principle that when there is a trade-off between a class design that + is more efficient and/or scalable on the one hand and one that is less efficient but has more functionality + (in this case the internal-only functionality of caching results) that one can build the less efficent class + from the most efficient without significant extra loss in efficiency, but not the other way around. The relationship + between ForwardsOnlyDataReader and CachingDataReader is an example of this). + Since the interface presented to the user is still forwards-only, queues are used to + store this information, so that dequeueing as we go we give the garbage collector the best opportunity + possible to reclaim any memory that is no longer in use. + ForwardsOnlyDataReader being used to actually + obtain the information from the server means that the "leg-work" is still only done (and need only be + maintained) in one place. + This class exists to allow for certain potential backwards-compatibility issues to be resolved + with little effort on the part of affected users. It is considerably less efficient than ForwardsOnlyDataReader + and hence never used internally. + + + + + This is the base class for NpgsqlDescribeStatement and NpgsqlDescribePortal. + + + + + + This class represents the Statement Describe message sent to PostgreSQL + server. + + + + + + This class represents the Portal Describe message sent to PostgreSQL + server. + + + + + + EventArgs class to send Notice parameters, which are just NpgsqlError's in a lighter context. + + + + + Notice information. + + + + + This class represents the ErrorResponse and NoticeResponse + message sent from PostgreSQL server. + + + + + Return a string representation of this error object. + + + + + Severity code. All versions. + + + + + Error code. PostgreSQL 7.4 and up. + + + + + Terse error message. All versions. + + + + + Detailed error message. PostgreSQL 7.4 and up. + + + + + Suggestion to help resolve the error. PostgreSQL 7.4 and up. + + + + + Position (one based) within the query string where the error was encounterd. PostgreSQL 7.4 and up. + + + + + Position (one based) within the query string where the error was encounterd. This position refers to an internal command executed for example inside a PL/pgSQL function. PostgreSQL 7.4 and up. + + + + + Internal query string where the error was encounterd. This position refers to an internal command executed for example inside a PL/pgSQL function. PostgreSQL 7.4 and up. + + + + + Trace back information. PostgreSQL 7.4 and up. + + + + + Source file (in backend) reporting the error. PostgreSQL 7.4 and up. + + + + + Source file line number (in backend) reporting the error. PostgreSQL 7.4 and up. + + + + + Source routine (in backend) reporting the error. PostgreSQL 7.4 and up. + + + + + Schema name which relates to the error. PostgreSQL 9.3 and up. + + + + + Table name which relates to the error. PostgreSQL 9.3 and up. + + + + + Column name which relates to the error. PostgreSQL 9.3 and up. + + + + + Data type of column which relates to the error. PostgreSQL 9.3 and up. + + + + + Constraint name which relates to the error. PostgreSQL 9.3 and up. + + + + + String containing the sql sent which produced this error. + + + + + Backend protocol version in use. + + + + + Error and notice message field codes + + + + + Severity: the field contents are ERROR, FATAL, or PANIC (in an error message), + or WARNING, NOTICE, DEBUG, INFO, or LOG (in a notice message), or a localized + translation of one of these. Always present. + + + + + Code: the SQLSTATE code for the error (see Appendix A). Not localizable. Always present. + + + + + Message: the primary human-readable error message. This should be accurate + but terse (typically one line). Always present. + + + + + Detail: an optional secondary error message carrying more detail about the problem. + Might run to multiple lines. + + + + + Hint: an optional suggestion what to do about the problem. This is intended to differ + from Detail in that it offers advice (potentially inappropriate) rather than hard facts. + Might run to multiple lines. + + + + + Position: the field value is a decimal ASCII integer, indicating an error cursor + position as an index into the original query string. The first character has index 1, + and positions are measured in characters not bytes. + + + + + Internal position: this is defined the same as the P field, but it is used when the + cursor position refers to an internally generated command rather than the one submitted + by the client. + The q field will always appear when this field appears. + + + + + Internal query: the text of a failed internally-generated command. + This could be, for example, a SQL query issued by a PL/pgSQL function. + + + + + Where: an indication of the context in which the error occurred. + Presently this includes a call stack traceback of active procedural language functions + and internally-generated queries. The trace is one entry per line, most recent first. + + + + + Schema name: if the error was associated with a specific database object, + the name of the schema containing that object, if any. + + + + + Table name: if the error was associated with a specific table, the name of the table. + (Refer to the schema name field for the name of the table's schema.) + + + + + Column name: if the error was associated with a specific table column, the name of the column. + (Refer to the schema and table name fields to identify the table.) + + + + + Data type name: if the error was associated with a specific data type, the name of the data type. + (Refer to the schema name field for the name of the data type's schema.) + + + + + Constraint name: if the error was associated with a specific constraint, the name of the constraint. + Refer to fields listed above for the associated table or domain. + (For this purpose, indexes are treated as constraints, even if they weren't created with constraint syntax.) + + + + + File: the file name of the source-code location where the error was reported. + + + + + Line: the line number of the source-code location where the error was reported. + + + + + Routine: the name of the source-code routine reporting the error. + + + + + The level of verbosity of the NpgsqlEventLog + + + + + Don't log at all + + + + + Only log the most common issues + + + + + Log everything + + + + + This class handles all the Npgsql event and debug logging + + + + + Writes a string to the Npgsql event log if msglevel is bigger then NpgsqlEventLog.Level + + + This method is obsolete and should no longer be used. + It is likely to be removed in future versions of Npgsql + + The message to write to the event log + The minimum LogLevel for which this message should be logged. + + + + Writes a string to the Npgsql event log if msglevel is bigger then NpgsqlEventLog.Level + + The ResourceManager to get the localized resources + The name of the resource that should be fetched by the ResourceManager + The minimum LogLevel for which this message should be logged. + The additional parameters that shall be included into the log-message (must be compatible with the string in the resource): + + + + Writes the default log-message for the action of calling the Get-part of an Indexer to the log file. + + The minimum LogLevel for which this message should be logged. + The name of the class that contains the Indexer + The parameter given to the Indexer + + + + Writes the default log-message for the action of calling the Set-part of an Indexer to the logfile. + + The minimum LogLevel for which this message should be logged. + The name of the class that contains the Indexer + The parameter given to the Indexer + The value the Indexer is set to + + + + Writes the default log-message for the action of calling the Get-part of a Property to the logfile. + + The minimum LogLevel for which this message should be logged. + The name of the class that contains the Property + The name of the Property + + + + Writes the default log-message for the action of calling the Set-part of a Property to the logfile. + + The minimum LogLevel for which this message should be logged. + The name of the class that contains the Property + The name of the Property + The value the Property is set to + + + + Writes the default log-message for the action of calling a Method without Arguments to the logfile. + + The minimum LogLevel for which this message should be logged. + The name of the class that contains the Method + The name of the Method + + + + Writes the default log-message for the action of calling a Method with one Argument to the logfile. + + The minimum LogLevel for which this message should be logged. + The name of the class that contains the Method + The name of the Method + The value of the Argument of the Method + + + + Writes the default log-message for the action of calling a Method with two Arguments to the logfile. + + The minimum LogLevel for which this message should be logged. + The name of the class that contains the Method + The name of the Method + The value of the first Argument of the Method + The value of the second Argument of the Method + + + + Writes the default log-message for the action of calling a Method with three Arguments to the logfile. + + The minimum LogLevel for which this message should be logged. + The name of the class that contains the Method + The name of the Method + The value of the first Argument of the Method + The value of the second Argument of the Method + The value of the third Argument of the Method + + + + Writes the default log-message for the action of calling a Method with more than three Arguments to the logfile. + + The minimum LogLevel for which this message should be logged. + The name of the class that contains the Method + The name of the Method + A Object-Array with zero or more Ojects that are Arguments of the Method. + + + + Sets/Returns the filename to use for logging. + + The filename of the current Log file. + + + + Sets/Returns whether Log messages should be echoed to the console + + true if Log messages are echoed to the console, otherwise false + + + + The exception that is thrown when the PostgreSQL backend reports errors. + + + + + Construct a backend error exception based on a list of one or more + backend errors. The basic Exception.Message will be built from the + first (usually the only) error in the list. + + + + + Get object data. + + + + + + + Format a .NET style exception string. + Include all errors in the list, including any hints. + + + + + Append a line to the given Stream, first checking for zero-length. + + + + + Provide access to the entire list of errors provided by the PostgreSQL backend. + + + + + Severity code. All versions. + + + + + Error code. PostgreSQL 7.4 and up. + + + + + Basic error message. All versions. + + + + + Detailed error message. PostgreSQL 7.4 and up. + + + + + Suggestion to help resolve the error. PostgreSQL 7.4 and up. + + + + + Position (one based) within the query string where the error was encounterd. PostgreSQL 7.4 and up. + + + + + Trace back information. PostgreSQL 7.4 and up. + + + + + Source file (in backend) reporting the error. PostgreSQL 7.4 and up. + + + + + Source file line number (in backend) reporting the error. PostgreSQL 7.4 and up. + + + + + Source routine (in backend) reporting the error. PostgreSQL 7.4 and up. + + + + + Schema name which relates to the error. PostgreSQL 9.3 and up. + + + + + Table name which relates to the error. PostgreSQL 9.3 and up. + + + + + Column name which relates to the error. PostgreSQL 9.3 and up. + + + + + Data type of column which relates to the error. PostgreSQL 9.3 and up. + + + + + Constraint name which relates to the error. PostgreSQL 9.3 and up. + + + + + String containing the sql sent which produced this error. + + + + + Returns the entire list of errors provided by the PostgreSQL backend. + + + + + This class represents the Execute message sent to PostgreSQL + server. + + + + + + A factory to create instances of various Npgsql objects. + + + + + Creates an NpgsqlCommand object. + + + + + This class represents the Flush message sent to PostgreSQL + server. + + + + + + For classes representing simple messages, + consisting only of a message code and length identifier, + sent from the client to the server. + + + + + This class is responsible for serving as bridge between the backend + protocol handling and the core classes. It is used as the mediator for + exchanging data generated/sent from/to backend. + + + + + + The current command timeout on the backend. This is set via "SET statement_timeout = (milliseconds)". + A value of -1 means the backend's timeout value is unknown because it has not yet been set. + + + + + EventArgs class to send Notification parameters. + + + + + Process ID of the PostgreSQL backend that sent this notification. + + + + + Condition that triggered that notification. + + + + + Additional Information From Notifiying Process (for future use, currently postgres always sets this to an empty string) + + + + + This class represents a parameter to a command that will be sent to server + + + + + Initializes a new instance of the NpgsqlParameter class. + + + + + Initializes a new instance of the NpgsqlParameter + class with the parameter m_Name and a value of the new NpgsqlParameter. + + The m_Name of the parameter to map. + An Object that is the value of the NpgsqlParameter. + +

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

+

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

+
+
+ + + Initializes a new instance of the NpgsqlParameter + class with the parameter m_Name and the data type. + + The m_Name of the parameter to map. + One of the DbType values. + + + + Initializes a new instance of the NpgsqlParameter. + + The m_Name of the parameter to map. + One of the DbType values. + + + + Initializes a new instance of the NpgsqlParameter. + + The m_Name of the parameter to map. + One of the NpgsqlDbType values. + The length of the parameter. + + + + Initializes a new instance of the NpgsqlParameter. + + The m_Name of the parameter to map. + One of the DbType values. + The length of the parameter. + + + + Initializes a new instance of the NpgsqlParameter + + The m_Name of the parameter to map. + One of the NpgsqlDbType values. + The length of the parameter. + The m_Name of the source column. + + + + Initializes a new instance of the NpgsqlParameter. + + The m_Name of the parameter to map. + One of the DbType values. + The length of the parameter. + The m_Name of the source column. + + + + Initializes a new instance of the NpgsqlParameter. + + The m_Name of the parameter to map. + One of the NpgsqlDbType values. + The length of the parameter. + The m_Name of the source column. + One of the ParameterDirection values. + true if the value of the field can be null, otherwise false. + The total number of digits to the left and right of the decimal point to which + Value is resolved. + The total number of decimal places to which + Value is resolved. + One of the DataRowVersion values. + An Object that is the value + of the NpgsqlParameter. + + + + Initializes a new instance of the NpgsqlParameter. + + The m_Name of the parameter to map. + One of the DbType values. + The length of the parameter. + The m_Name of the source column. + One of the ParameterDirection values. + true if the value of the field can be null, otherwise false. + The total number of digits to the left and right of the decimal point to which + Value is resolved. + The total number of decimal places to which + Value is resolved. + One of the DataRowVersion values. + An Object that is the value + of the NpgsqlParameter. + + + + Reset DBType. + + + + + Creates a new NpgsqlParameter that + is a copy of the current instance. + + A new NpgsqlParameter that is a copy of this instance. + + + + The collection to which this parameter belongs, if any. + + + + + Gets or sets the maximum number of digits used to represent the + 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. + + + + Whether to use an explicit cast when included in a query. + + + + + 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 String. + + + + Gets or sets the DbType of the parameter. + + One of the DbType values. The default is String. + + + + Gets or sets a value indicating whether the parameter is input-only, + output-only, bidirectional, or a stored procedure return value parameter. + + One of the ParameterDirection + values. The default is Input. + + + + Gets or sets a value indicating whether the parameter accepts null values. + + true if null values are accepted; otherwise, false. The default is false. + + + + Gets or sets the m_Name of the NpgsqlParameter. + + The m_Name of the NpgsqlParameter. + The default is an empty string. + + + + The m_Name scrubbed of any optional marker + + + + + Gets or sets the m_Name of the source column that is mapped to the + DataSet and used for loading or + returning the Value. + + The m_Name of the source column that is mapped to the + DataSet. The default is an empty string. + + + + Gets or sets the DataRowVersion + to use when loading Value. + + One of the DataRowVersion values. + The default is Current. + + + + 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. + + + + Source column mapping. + + + + + 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. + + + + + Adds the specified NpgsqlParameter object to the NpgsqlParameterCollection. + + The NpgsqlParameter to add to the collection. + The index of the new NpgsqlParameter object. + + + + Obsolete. Use AddWithValue instead. + + + Use caution when using this overload of the + Add method to specify integer parameter values. + Because this overload takes a value of type Object, + you must convert the integral value to an Object + type when the value is zero, as the following C# example demonstrates. + parameters.Add(":pname", Convert.ToInt32(0)); + If you do not perform this conversion, the compiler will assume you + are attempting to call the NpgsqlParameterCollection.Add(string, DbType) overload. + + + + + Adds a NpgsqlParameter to the NpgsqlParameterCollection given the specified parameter name and value. + + The name of the NpgsqlParameter. + The Value of the NpgsqlParameter to add to the collection. + The paramater that was added. + + + + Adds a NpgsqlParameter to the NpgsqlParameterCollection given the specified parameter name and value. + + The name of the NpgsqlParameter. + The Value of the NpgsqlParameter to add to the collection. + One of the NpgsqlDbType values. + The paramater that was added. + + + + Adds a NpgsqlParameter to the NpgsqlParameterCollection given the specified parameter name and value. + + The name of the NpgsqlParameter. + The Value of the NpgsqlParameter to add to the collection. + One of the NpgsqlDbType values. + The length of the column. + The paramater that was added. + + + + Adds a NpgsqlParameter to the NpgsqlParameterCollection given the specified parameter name and value. + + The name of the NpgsqlParameter. + The Value of the NpgsqlParameter to add to the collection. + One of the NpgsqlDbType values. + The length of the column. + The name of the source column. + The paramater that was added. + + + + Adds a NpgsqlParameter to the NpgsqlParameterCollection given the parameter name and the data type. + + 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. + + + + 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. + + + + 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. + + + + + + + In methods taking an object as argument this method is used to verify + that the argument has the type NpgsqlParameter + + The object to verify + + + + 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[] + + + + 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. + + + + Report whether the collection is read only. Always false. + + + + + 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. + + + + Sync root. + + + + + This class represents the ParameterStatus message sent from PostgreSQL + server. + + + + + + This class represents the Parse message sent to PostgreSQL + server. + + + + + + This class represents a PasswordPacket message sent to backend + PostgreSQL. + + + + + Used when a connection is closed + + + + + This is the abstract base class for NpgsqlAsciiRow and NpgsqlBinaryRow. + + + + + The index of the current field in the stream, i.e. the one that hasn't + been read yet + + + + + This class represents a RowDescription message sent from + the PostgreSQL. + + + + + + This struct represents the internal data of the RowDescription message. + + + + + 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. + + + + This class represents a StartupPacket message of PostgreSQL + protocol. + + + + + + Represents a completed response message. + + + + + This class represents the Sync message sent to PostgreSQL + server. + + + + + + Represents a transaction to be made in a PostgreSQL database. This class cannot be inherited. + + + + + Dispose. + + + + + + Commits the database transaction. + + + + + Rolls back a transaction from a pending state. + + + + + Rolls back a transaction from a pending savepoint state. + + + + + Creates a transaction save point. + + + + + Cancel the transaction without telling the backend about it. This is + used to make the transaction go away when closing a connection. + + + + + Gets the NpgsqlConnection + object associated with the transaction, or a null reference if the + transaction is no longer valid. + + The NpgsqlConnection + object associated with the transaction. + + + + DB connection. + + + + + Specifies the IsolationLevel for this transaction. + + The IsolationLevel for this transaction. + The default is ReadCommitted. + + + + This class provides many util methods to handle + reading and writing of PostgreSQL protocol messages. + + + + + This method takes a ProtocolVersion and returns an integer + version number that the Postgres backend will recognize in a + startup packet. + + + + + This method takes a version string as returned by SELECT VERSION() and returns + a valid version string ("7.2.2" for example). + This is only needed when running protocol version 2. + This does not do any validity checks. + + + + + This method gets a C NULL terminated string from the network stream. + It keeps reading a byte in each time until a NULL byte is returned. + It returns the resultant string of bytes read. + This string is sent from backend. + + + + + Reads requested number of bytes from stream with retries until Stream.Read returns 0 or count is reached. + + Stream to read + byte buffer to fill + starting position to fill the buffer + number of bytes to read + The number of bytes read. May be less than count if no more bytes are available. + + + + Reads requested number of bytes from . If output matches exactly, and == false, is returned directly. + + Source array. + Starting position to read from + Number of bytes to read + Force a copy, even if the output is an exact copy of . + byte[] containing data requested. + + + + This method writes a string to the network stream. + + + + + This method writes a string to the network stream. + + + + + This method writes a C NULL terminated string to the network stream. + It appends a NULL terminator to the end of the String. + + + + + This method writes a C NULL terminated string to the network stream. + It appends a NULL terminator to the end of the String. + + + + + This method writes a byte to the stream. It also enables logging of them. + + + + + This method writes a byte to the stream. It also enables logging of them. + + + + + This method writes a set of bytes to the stream. It also enables logging of them. + + + + + This method writes a set of bytes to the stream. It also enables logging of them. + + + + + This method writes a C NULL terminated string limited in length to the + backend server. + It pads the string with null bytes to the size specified. + + + + + This method writes a C NULL terminated byte[] limited in length to the + backend server. + It pads the string with null bytes to the size specified. + + + + + Write a 32-bit integer to the given stream in the correct byte order. + + + + + Read a 32-bit integer from the given stream in the correct byte order. + + + + + Read a 32-bit integer from the given array in the correct byte order. + + + + + Write a 16-bit integer to the given stream in the correct byte order. + + + + + Read a 16-bit integer from the given stream in the correct byte order. + + + + + Read a 16-bit integer from the given array in the correct byte order. + + + + + Copy and possibly reverse a byte array, depending on host architecture endienness. + + Source byte array. + Force a copy even if no swap is performed. + , reversed if on a little-endian architecture, copied if required. + + + + Copy and possibly reverse a byte array, depending on host architecture endienness. + + Source byte array. + Starting offset in source array. + Number of bytes to copy. + Force a copy even if no swap is performed. + , reversed if on a little-endian architecture, copied if required. + + + + Represent the frontend/backend protocol version. + + + + + Represent the backend server version. + As this class offers no functionality beyond that offered by it has been + deprecated in favour of that class. + + + + + + Returns the string representation of this version in three place dot notation (Major.Minor.Patch). + + + + + Server version major number. + + + + + Server version minor number. + + + + + Server version patch level number. + + + + + A class to handle everything associated with SSPI authentication + + + + + Simplified SecBufferDesc struct with only one SecBuffer + + +
+
diff --git a/src/Frapid.Web/Areas/Frapid.Config/packages/Npgsql.2.2.6/lib/net35/de/Npgsql.resources.dll b/src/Frapid.Web/Areas/Frapid.Config/packages/Npgsql.2.2.6/lib/net35/de/Npgsql.resources.dll new file mode 100644 index 00000000..d290d077 Binary files /dev/null and b/src/Frapid.Web/Areas/Frapid.Config/packages/Npgsql.2.2.6/lib/net35/de/Npgsql.resources.dll differ diff --git a/src/Frapid.Web/Areas/Frapid.Config/packages/Npgsql.2.2.6/lib/net35/es/Npgsql.resources.dll b/src/Frapid.Web/Areas/Frapid.Config/packages/Npgsql.2.2.6/lib/net35/es/Npgsql.resources.dll new file mode 100644 index 00000000..5fffbf61 Binary files /dev/null and b/src/Frapid.Web/Areas/Frapid.Config/packages/Npgsql.2.2.6/lib/net35/es/Npgsql.resources.dll differ diff --git a/src/Frapid.Web/Areas/Frapid.Config/packages/Npgsql.2.2.6/lib/net35/fi/Npgsql.resources.dll b/src/Frapid.Web/Areas/Frapid.Config/packages/Npgsql.2.2.6/lib/net35/fi/Npgsql.resources.dll new file mode 100644 index 00000000..ce7d5a66 Binary files /dev/null and b/src/Frapid.Web/Areas/Frapid.Config/packages/Npgsql.2.2.6/lib/net35/fi/Npgsql.resources.dll differ diff --git a/src/Frapid.Web/Areas/Frapid.Config/packages/Npgsql.2.2.6/lib/net35/fr/Npgsql.resources.dll b/src/Frapid.Web/Areas/Frapid.Config/packages/Npgsql.2.2.6/lib/net35/fr/Npgsql.resources.dll new file mode 100644 index 00000000..1ca521a9 Binary files /dev/null and b/src/Frapid.Web/Areas/Frapid.Config/packages/Npgsql.2.2.6/lib/net35/fr/Npgsql.resources.dll differ diff --git a/src/Frapid.Web/Areas/Frapid.Config/packages/Npgsql.2.2.6/lib/net35/ja/Npgsql.resources.dll b/src/Frapid.Web/Areas/Frapid.Config/packages/Npgsql.2.2.6/lib/net35/ja/Npgsql.resources.dll new file mode 100644 index 00000000..990b6075 Binary files /dev/null and b/src/Frapid.Web/Areas/Frapid.Config/packages/Npgsql.2.2.6/lib/net35/ja/Npgsql.resources.dll differ diff --git a/src/Frapid.Web/Areas/Frapid.Config/packages/Npgsql.2.2.6/lib/net35/zh-CN/Npgsql.resources.dll b/src/Frapid.Web/Areas/Frapid.Config/packages/Npgsql.2.2.6/lib/net35/zh-CN/Npgsql.resources.dll new file mode 100644 index 00000000..e0dd3dfa Binary files /dev/null and b/src/Frapid.Web/Areas/Frapid.Config/packages/Npgsql.2.2.6/lib/net35/zh-CN/Npgsql.resources.dll differ diff --git a/src/Frapid.Web/Areas/Frapid.Config/packages/Npgsql.2.2.6/lib/net40/Mono.Security.dll b/src/Frapid.Web/Areas/Frapid.Config/packages/Npgsql.2.2.6/lib/net40/Mono.Security.dll new file mode 100644 index 00000000..62ae3394 Binary files /dev/null and b/src/Frapid.Web/Areas/Frapid.Config/packages/Npgsql.2.2.6/lib/net40/Mono.Security.dll differ diff --git a/src/Frapid.Web/Areas/Frapid.Config/packages/Npgsql.2.2.6/lib/net40/Npgsql.dll b/src/Frapid.Web/Areas/Frapid.Config/packages/Npgsql.2.2.6/lib/net40/Npgsql.dll new file mode 100644 index 00000000..d910e814 Binary files /dev/null and b/src/Frapid.Web/Areas/Frapid.Config/packages/Npgsql.2.2.6/lib/net40/Npgsql.dll differ diff --git a/src/Frapid.Web/Areas/Frapid.Config/packages/Npgsql.2.2.6/lib/net40/Npgsql.xml b/src/Frapid.Web/Areas/Frapid.Config/packages/Npgsql.2.2.6/lib/net40/Npgsql.xml new file mode 100644 index 00000000..44c2c149 --- /dev/null +++ b/src/Frapid.Web/Areas/Frapid.Config/packages/Npgsql.2.2.6/lib/net40/Npgsql.xml @@ -0,0 +1,6536 @@ + + + + Npgsql + + + + + Handles serialisation of .NET array or IEnumeration to pg format. + Arrays of arrays, enumerations of enumerations, arrays of enumerations etc. + are treated as multi-dimensional arrays (in much the same manner as an array of arrays + is used to emulate multi-dimensional arrays in languages that lack native support for them). + If such an enumeration of enumerations is "jagged" (as opposed to rectangular, cuboid, + hypercuboid, hyperhypercuboid, etc) then this class will "correctly" serialise it, but pg + will raise an error as it doesn't allow jagged arrays. + + + + + Create an ArrayNativeToBackendTypeConverter with the element converter passed + + The that would be used to serialise the element type. + + + + Serialise the enumeration or array. + + + + + Convert a System.Array to PG binary format. + Write the array header and prepare to write array data to the stream. + + + + + Append all array data to the binary stream. + + + + + Handles parsing of pg arrays into .NET arrays. + + + + + Takes a string representation of a pg 1-dimensional array + (or a 1-dimensional row within an n-dimensional array) + and allows enumeration of the string represenations of each items. + + + + + Takes a string representation of a pg n-dimensional array + and allows enumeration of the string represenations of the next + lower level of rows (which in turn can be taken as (n-1)-dimensional arrays. + + + + + Takes an ArrayList which may be an ArrayList of ArrayLists, an ArrayList of ArrayLists of ArrayLists + and so on and enumerates the items that aren't ArrayLists (the leaf nodes if we think of the ArrayList + passed as a tree). Simply uses the ArrayLists' own IEnumerators to get that of the next, + pushing them onto a stack until we hit something that isn't an ArrayList. + ArrayList to enumerate + IEnumerable + + + + + Create a new ArrayBackendToNativeTypeConverter + + for the element type. + + + + Creates an array from pg text representation. + + + + + Creates an array list from pg represenation of an array. + Multidimensional arrays are treated as ArrayLists of ArrayLists + + + + + Creates an n-dimensional array from an ArrayList of ArrayLists or + a 1-dimensional array from something else. + + to convert + Type of the elements in the list + produced. + + + + Creates an n-dimensional System.Array from PG binary representation. + This function reads the array header and sets up an n-dimensional System.Array object to hold its data. + PopulateArrayFromBinaryArray() is then called to carry out array population. + + + + + Recursively populates an array from PB binary data representation. + + + + + Takes an array of ints and treats them like the limits of a set of counters. + Retains a matching set of ints that is set to all zeros on the first ++ + On a ++ it increments the "right-most" int. If that int reaches it's + limit it is set to zero and the one before it is incremented, and so on. + + Making this a more general purpose class is pretty straight-forward, but we'll just put what we need here. + + + + + Implements a bit string; a collection of zero or more bits which can each be 1 or 0. + BitString's behave as a list of bools, though like most strings and unlike most collections the position + tends to be of as much significance as the value. + BitStrings are often used as masks, and are commonly cast to and from other values. + + + + + Represents the empty string. + + + + + Create a BitString from an enumeration of boolean values. The BitString will contain + those booleans in the order they came in. + + The boolean values. + + + + Creates a BitString filled with a given number of true or false values. + + The value to fill the string with. + The number of bits to fill. + + + + Creats a bitstring from a string. + The string to copy from. + + + + + + Creates a single-bit element from a boolean value. + + The bool value which determines whether + the bit is 1 or 0. + + + + Creates a bitstring from an unsigned integer value. The string will be the shortest required to + contain the integer (e.g. 1 bit for 0 or 1, 2 for 2 or 3, 3 for 4-7, and so on). + + The integer. + This method is not CLS Compliant, and may not be available to some languages. + + + + Creates a bitstring from an integer value. The string will be the shortest required to + contain the integer (e.g. 1 bit for 0 or 1, 2 for 2 or 3, 3 for 4-7, and so on). + + The integer. + + + + Finds the first instance of a given value + + The value - whether true or false - to search for. + The index of the value found, or -1 if none are present. + + + + True if there is at least one bit with the value looked for. + + The value - true or false - to detect. + True if at least one bit was the same as item, false otherwise. + + + + Copies the bitstring to an array of bools. + + The boolean array to copy to. + The index in the array to start copying from. + + + + Returns an enumerator that enumerates through the string. + + The enumerator. + + + + Creats a bitstring by concatenating another onto this one. + + The string to append to this one. + The combined strings. + + + + Returns a substring of this string. + + The position to start from, must be between 0 and the length of the string. + The length of the string to return, must be greater than zero, and may not be + so large that the start + length exceeds the bounds of this instance. + The Bitstring identified + + + + Returns a substring of this string. + + The position to start from, must be between 0 and the length of the string, + the rest of the string is returned. + The Bitstring identified + + + + A logical and between this string and another. The two strings must be the same length. + + Another BitString to AND with this one. + A bitstring with 1 where both BitStrings had 1 and 0 otherwise. + + + + A logical or between this string and another. The two strings must be the same length. + + Another BitString to OR with this one. + A bitstring with 1 where either BitString had 1 and 0 otherwise. + + + + A logical xor between this string and another. The two strings must be the same length. + + Another BitString to XOR with this one. + A bitstring with 1 where one BitStrings and the other had 0, + and 0 where they both had 1 or both had 0. + + + + A bitstring that is the logical inverse of this one. + + A bitstring of the same length as this with 1 where this has 0 and vice-versa. + + + + Shifts the string operand bits to the left, filling with zeros to produce a + string of the same length. + + The number of bits to shift to the left. + A left-shifted bitstring. + The behaviour of LShift is closer to what one would expect from dealing + with PostgreSQL bit-strings than in using the same operations on integers in .NET + In particular, negative operands result in a right-shift, and operands greater than + the length of the string will shift it entirely, resulting in a zero-filled string. + + + + + Shifts the string operand bits to the right, filling with zeros to produce a + string of the same length. + + The number of bits to shift to the right. + A right-shifted bitstring. + The behaviour of RShift is closer to what one would expect from dealing + with PostgreSQL bit-strings than in using the same operations on integers in .NET + In particular, negative operands result in a left-shift, and operands greater than + the length of the string will shift it entirely, resulting in a zero-filled string. It also performs + a logical shift, rather than an arithmetic shift, so it always sets the vacated bit positions to zero + (like PostgreSQL and like .NET for unsigned integers but not for signed integers). + + + + + Returns true if the this string is identical to the argument passed. + + + + + Compares two strings. Strings are compared as strings, so while 0 being less than 1 will + mean a comparison between two strings of the same size is the same as treating them as numbers, + in the case of two strings of differing lengths the comparison starts at the right-most (most significant) + bit, and if all bits of the shorter string are exhausted without finding a comparison, then the larger + string is deemed to be greater than the shorter (0010 is greater than 0001 but less than 00100). + + Another string to compare with this one. + A value if the two strings are identical, an integer less + than zero if this is less than the argument, and an integer greater + than zero otherwise. + + + + Compares the string with another object. + + The object to compare with. + If the object is null then this string is considered greater. If the object is another BitString + then they are compared as in the explicit comparison for BitStrings + in any other case a is thrown. + + + + Compares this BitString with an object for equality. + + + + + Returns a code for use in hashing operations. + + + + + Returns a string representation of the BitString. + + + A string which can contain a letter and optionally a number which sets a minimum size for the string + returned. In each case using the lower-case form of the letter will result in a lower-case string + being returned. + + + B + A string of 1s and 0s. + + + X + An hexadecimal string (will result in an error unless the string's length is divisible by 4). + + + G + A string of 1s and 0s in single-quotes preceded by 'B' (Postgres bit string literal syntax). + + Y + An hexadecimal string in single-quotes preceded by 'X' (Postgres bit literal syntax, will result in an error unless the string's length is divisible by 4. + + C + The format produced by format-string "Y" if legal, otherwise that produced by format-string "G". + E + The most compact safe representation for Postgres. If single bit will be either a 0 or a 1. Otherwise if it + can be that produce by format string "Y" it will, otherwise if there are less than 9bits in length it will be that + produced by format-string "G". For longer strings that cannot be represented in hexadecimal it will be a string + representing the first part of the string in format "Y" followed by the PostgreSQL concatenation operator, followed + by the final bits in the format "G". E.g. "X'13DCE'||B'110'" + If format is empty or null, it is treated as if "B" had been passed (the default repreesentation, and that + generally used by PostgreSQL for display). + + The formatted string. + + + + Returns a string representation for the Bitstring + + A string containing '0' and '1' characters. + + + + Returns the same string as . formatProvider is ignored. + + + + + Parses a string to produce a BitString. Most formats that can be produced by + can be accepted, but hexadecimal + can be interpreted with the preceding X' to mark the following characters as + being hexadecimal rather than binary. + + + + + Performs a logical AND on the two operands. + + + + + Performs a logcial OR on the two operands. + + + + + Perofrms a logical EXCLUSIVE-OR on the two operands + + + + + Performs a logical NOT on the operand. + + + + + Concatenates the operands. + + + + + Left-shifts the string BitString. + + + + + Right-shifts the string BitString. + + + + + Compares the two operands. + + + + + Compares the two operands. + + + + + Compares the two operands. + + + + + Compares the two operands. + + + + + Compares the two operands. + + + + + Compares the two operands. + + + + + Interprets the bitstring as a series of bits in an encoded character string, + encoded according to the Encoding passed, and returns that string. + The bitstring must contain a whole number of octets(bytes) and also be + valid according to the Encoding passed. + + The to use in producing the string. + The string that was encoded in the BitString. + + + + Interprets the bitstring as a series of octets (bytes) and returns those octets. Fails + if the Bitstring does not contain a whole number of octets (its length is not evenly + divisible by 8). + + + + + Interprets the bitstring as a series of signed octets (bytes) and returns those octets. Fails + if the Bitstring does not contain a whole number of octets (its length is not evenly + divisible by 8). + This method is not CLS-Compliant and may not be available to languages that cannot + handle signed bytes. + + + + + Interprets the bitstring as a series of unsigned 16-bit integers and returns those integers. + Fails if the Bitstring's length is not evenly divisible by 16. + This method is not CLS-Compliant and may not be available to languages that cannot + handle unsigned integers. + + + + + Interprets the bitstring as a series of 16-bit integers and returns those integers. + Fails if the Bitstring's length is not evenly divisible by 16. + + + + + Interprets the bitstring as a series of unsigned 32-bit integers and returns those integers. + Fails if the Bitstring's length is not evenly divisible by 32. + This method is not CLS-Compliant and may not be available to languages that cannot + handle unsigned integers. + + + + + Interprets the bitstring as a series of signed 32-bit integers and returns those integers. + Fails if the Bitstring's length is not evenly divisible by 32. + + + + + Interprets the bitstring as a series of unsigned 64-bit integers and returns those integers. + Fails if the Bitstring's length is not evenly divisible by 64. + This method is not CLS-Compliant and may not be available to languages that cannot + handle unsigned integers. + + + + + Interprets the bitstring as a series of signed 64-bit integers and returns those integers. + Fails if the Bitstring's length is not evenly divisible by 64. + + + + + The length of the string. + + + + + Retrieves the value of the bit at the given index. + + + + + Represents the PostgreSQL interval datatype. + PostgreSQL differs from .NET in how it's interval type doesn't assume 24 hours in a day + (to deal with 23- and 25-hour days caused by daylight savings adjustments) and has a concept + of months that doesn't exist in .NET's class. (Neither datatype + has any concessions for leap-seconds). + For most uses just casting to and from TimeSpan will work correctly — in particular, + the results of subtracting one or the PostgreSQL date, time and + timestamp types from another should be the same whether you do so in .NET or PostgreSQL — + but if the handling of days and months in PostgreSQL is important to your application then you + should use this class instead of . + If you don't know whether these differences are important to your application, they + probably arent! Just use and do not use this class directly ☺ + To avoid forcing unnecessary provider-specific concerns on users who need not be concerned + with them a call to on a field containing an + value will return a rather than an + . If you need the extra functionality of + then use . + + + + + + + + + + Represents the number of ticks (100ns periods) in one microsecond. This field is constant. + + + + + Represents the number of ticks (100ns periods) in one millisecond. This field is constant. + + + + + Represents the number of ticks (100ns periods) in one second. This field is constant. + + + + + Represents the number of ticks (100ns periods) in one minute. This field is constant. + + + + + Represents the number of ticks (100ns periods) in one hour. This field is constant. + + + + + Represents the number of ticks (100ns periods) in one day. This field is constant. + + + + + Represents the number of hours in one day (assuming no daylight savings adjustments). This field is constant. + + + + + Represents the number of days assumed in one month if month justification or unjustifcation is performed. + This is set to 30 for consistency with PostgreSQL. Note that this is means that month adjustments cause + a year to be taken as 30 × 12 = 360 rather than 356/366 days. + + + + + Represents the number of ticks (100ns periods) in one day, assuming 30 days per month. + + + + + Represents the number of months in a year. This field is constant. + + + + + Represents the maximum . This field is read-only. + + + + + Represents the minimum . This field is read-only. + + + + + Represents the zero . This field is read-only. + + + + + Initializes a new to the specified number of ticks. + + A time period expressed in 100ns units. + + + + Initializes a new to hold the same time as a + + A time period expressed in a + + + + Initializes a new to the specified number of months, days + & ticks. + + Number of months. + Number of days. + Number of 100ns units. + + + + Initializes a new to the specified number of + days, hours, minutes & seconds. + + Number of days. + Number of hours. + Number of minutes. + Number of seconds. + + + + Initializes a new to the specified number of + days, hours, minutes, seconds & milliseconds. + + Number of days. + Number of hours. + Number of minutes. + Number of seconds. + Number of milliseconds. + + + + Initializes a new to the specified number of + months, days, hours, minutes, seconds & milliseconds. + + Number of months. + Number of days. + Number of hours. + Number of minutes. + Number of seconds. + Number of milliseconds. + + + + Initializes a new to the specified number of + years, months, days, hours, minutes, seconds & milliseconds. + Years are calculated exactly equivalent to 12 months. + + Number of years. + Number of months. + Number of days. + Number of hours. + Number of minutes. + Number of seconds. + Number of milliseconds. + + + + Creates an from a number of ticks. + + The number of ticks (100ns units) in the interval. + A d with the given number of ticks. + + + + Creates an from a number of microseconds. + + The number of microseconds in the interval. + A d with the given number of microseconds. + + + + Creates an from a number of milliseconds. + + The number of milliseconds in the interval. + A d with the given number of milliseconds. + + + + Creates an from a number of seconds. + + The number of seconds in the interval. + A d with the given number of seconds. + + + + Creates an from a number of minutes. + + The number of minutes in the interval. + A d with the given number of minutes. + + + + Creates an from a number of hours. + + The number of hours in the interval. + A d with the given number of hours. + + + + Creates an from a number of days. + + The number of days in the interval. + A d with the given number of days. + + + + Creates an from a number of months. + + The number of months in the interval. + A d with the given number of months. + + + + Adds another interval to this instance and returns the result. + + An to add to this instance. + An whose values are the sums of the two instances. + + + + Subtracts another interval from this instance and returns the result. + + An to subtract from this instance. + An whose values are the differences of the two instances. + + + + Returns an whose value is the negated value of this instance. + + An whose value is the negated value of this instance. + + + + This absolute value of this instance. In the case of some, but not all, components being negative, + the rules used for justification are used to determine if the instance is positive or negative. + + An whose value is the absolute value of this instance. + + + + Equivalent to PostgreSQL's justify_days function. + + An based on this one, but with any hours outside of the range [-23, 23] + converted into days. + + + + Opposite to PostgreSQL's justify_days function. + + An based on this one, but with any days converted to multiples of ±24hours. + + + + Equivalent to PostgreSQL's justify_months function. + + An based on this one, but with any days outside of the range [-30, 30] + converted into months. + + + + Opposite to PostgreSQL's justify_months function. + + An based on this one, but with any months converted to multiples of ±30days. + + + + Equivalent to PostgreSQL's justify_interval function. + + An based on this one, + but with any months converted to multiples of ±30days + and then with any days converted to multiples of ±24hours + + + + Opposite to PostgreSQL's justify_interval function. + + An based on this one, but with any months converted to multiples of ±30days and then any days converted to multiples of ±24hours; + + + + Produces a canonical NpgslInterval with 0 months and hours in the range of [-23, 23]. + + + While the fact that for many purposes, two different instances could be considered + equivalent (e.g. one with 2days, 3hours and one with 1day 27hours) there are different possible canonical forms. + + E.g. we could move all excess hours into days and all excess days into months and have the most readable form, + or we could move everything into the ticks and have the form that allows for the easiest arithmetic) the form + chosen has two important properties that make it the best choice. + First, it is closest two how + objects are most often represented. Second, it is compatible with results of many + PostgreSQL functions, particularly with age() and the results of subtracting one date, time or timestamp from + another. + + Note that the results of casting a to is + canonicalised. + + + An based on this one, but with months converted to multiples of ±30days and with any hours outside of the range [-23, 23] + converted into days. + + + + Implicit cast of a to an + + A + An eqivalent, canonical, . + + + + Implicit cast of an to a . + + A . + An equivalent . + + + + Returns true if another is exactly the same as this instance. + + An for comparison. + true if the two instances are exactly the same, + false otherwise. + + + + Returns true if another object is an , that is exactly the same as + this instance + + An for comparison. + true if the argument is an and is exactly the same + as this one, false otherwise. + + + + Compares two instances. + + The first . + The second . + 0 if the two are equal or equivalent. A value greater than zero if x is greater than y, + a value less than zero if x is less than y. + + + + A hash code suitable for uses with hashing algorithms. + + An signed integer. + + + + Compares this instance with another/ + + An to compare this with. + 0 if the instances are equal or equivalent. A value less than zero if + this instance is less than the argument. A value greater than zero if this instance + is greater than the instance. + + + + Compares this instance with another/ + + An object to compare this with. + 0 if the argument is an and the instances are equal or equivalent. + A value less than zero if the argument is an and + this instance is less than the argument. + A value greater than zero if the argument is an and this instance + is greater than the instance. + A value greater than zero if the argument is null. + The argument is not an . + + + + Parses a and returns a instance. + Designed to use the formats generally returned by PostgreSQL. + + The to parse. + An represented by the argument. + The string was null. + A value obtained from parsing the string exceeded the values allowed for the relevant component. + The string was not in a format that could be parsed to produce an . + + + + Attempt to parse a to produce an . + + The to parse. + (out) The produced, or if the parsing failed. + true if the parsing succeeded, false otherwise. + + + + Create a representation of the instance. + The format returned is of the form: + [M mon[s]] [d day[s]] [HH:mm:ss[.f[f[f[f[f[f[f[f[f]]]]]]]]]] + A zero is represented as 00:00:00 + + Ticks are 100ns, Postgress resolution is only to 1µs at most. Hence we lose 1 or more decimal + precision in storing values in the database. Despite this, this method will output that extra + digit of precision. It's forward-compatible with any future increases in resolution up to 100ns, + and also makes this ToString() more applicable to any other use-case. + + + The representation. + + + + Adds two together. + + The first to add. + The second to add. + An whose values are the sum of the arguments. + + + + Subtracts one from another. + + The to subtract the other from. + The to subtract from the other. + An whose values are the difference of the arguments + + + + Returns true if two are exactly the same. + + The first to compare. + The second to compare. + true if the two arguments are exactly the same, false otherwise. + + + + Returns false if two are exactly the same. + + The first to compare. + The second to compare. + false if the two arguments are exactly the same, true otherwise. + + + + Compares two instances to see if the first is less than the second + + The first to compare. + The second to compare. + true if the first is less than second, false otherwise. + + + + Compares two instances to see if the first is less than or equivalent to the second + + The first to compare. + The second to compare. + true if the first is less than or equivalent to second, false otherwise. + + + + Compares two instances to see if the first is greater than the second + + The first to compare. + The second to compare. + true if the first is greater than second, false otherwise. + + + + Compares two instances to see if the first is greater than or equivalent the second + + The first to compare. + The second to compare. + true if the first is greater than or equivalent to the second, false otherwise. + + + + Returns the instance. + + An . + The argument. + + + + Negates an instance. + + An . + The negation of the argument. + + + + The total number of ticks(100ns units) contained. This is the resolution of the + type. This ignores the number of days and + months held. If you want them included use first. + The resolution of the PostgreSQL + interval type is by default 1µs = 1,000 ns. It may be smaller as follows: + + + interval(0) + resolution of 1s (1 second) + + + interval(1) + resolution of 100ms = 0.1s (100 milliseconds) + + + interval(2) + resolution of 10ms = 0.01s (10 milliseconds) + + + interval(3) + resolution of 1ms = 0.001s (1 millisecond) + + + interval(4) + resolution of 100µs = 0.0001s (100 microseconds) + + + interval(5) + resolution of 10µs = 0.00001s (10 microseconds) + + + interval(6) or interval + resolution of 1µs = 0.000001s (1 microsecond) + + + As such, if the 100-nanosecond resolution is significant to an application, a PostgreSQL interval will + not suffice for those purposes. + In more frequent cases though, the resolution of the interval suffices. + will always suffice to handle the resolution of any interval value, and upon + writing to the database, will be rounded to the resolution used. + + The number of ticks in the instance. + + + + + Gets the number of whole microseconds held in the instance. + An in the range [-999999, 999999]. + + + + + Gets the number of whole milliseconds held in the instance. + An in the range [-999, 999]. + + + + + Gets the number of whole seconds held in the instance. + An in the range [-59, 59]. + + + + + Gets the number of whole minutes held in the instance. + An in the range [-59, 59]. + + + + + Gets the number of whole hours held in the instance. + Note that this can be less than -23 or greater than 23 unless + has been used to produce this instance. + + + + + Gets the number of days held in the instance. + Note that this does not pay attention to a time component with -24 or less hours or + 24 or more hours, unless has been called to produce this instance. + + + + + Gets the number of months held in the instance. + Note that this does not pay attention to a day component with -30 or less days or + 30 or more days, unless has been called to produce this instance. + + + + + Returns a representing the time component of the instance. + Note that this may have a value beyond the range ±23:59:59.9999999 unless + has been called to produce this instance. + + + + + The total number of ticks (100ns units) in the instance, assuming 24 hours in each day and + 30 days in a month. + + + + + The total number of microseconds in the instance, assuming 24 hours in each day and + 30 days in a month. + + + + + The total number of milliseconds in the instance, assuming 24 hours in each day and + 30 days in a month. + + + + + The total number of seconds in the instance, assuming 24 hours in each day and + 30 days in a month. + + + + + The total number of minutes in the instance, assuming 24 hours in each day and + 30 days in a month. + + + + + The total number of hours in the instance, assuming 24 hours in each day and + 30 days in a month. + + + + + The total number of days in the instance, assuming 24 hours in each day and + 30 days in a month. + + + + + The total number of months in the instance, assuming 24 hours in each day and + 30 days in a month. + + + + + Normalise this time; if it is 24:00:00, convert it to 00:00:00 + + This time, normalised + + + + The total number of ticks(100ns units) contained. This is the resolution of the + type. + The resolution of the PostgreSQL + interval type is by default 1µs = 1,000 ns. It may be smaller as follows: + + + time(0) + resolution of 1s (1 second) + + + time(1) + resolution of 100ms = 0.1s (100 milliseconds) + + + time(2) + resolution of 10ms = 0.01s (10 milliseconds) + + + time(3) + resolution of 1ms = 0.001s (1 millisecond) + + + time(4) + resolution of 100µs = 0.0001s (100 microseconds) + + + time(5) + resolution of 10µs = 0.00001s (10 microseconds) + + + time(6) or interval + resolution of 1µs = 0.000001s (1 microsecond) + + + As such, if the 100-nanosecond resolution is significant to an application, a PostgreSQL time will + not suffice for those purposes. + In more frequent cases though, the resolution of time suffices. + will always suffice to handle the resolution of any time value, and upon + writing to the database, will be rounded to the resolution used. + + The number of ticks in the instance. + + + + + Gets the number of whole microseconds held in the instance. + An integer in the range [0, 999999]. + + + + + Gets the number of whole milliseconds held in the instance. + An integer in the range [0, 999]. + + + + + Gets the number of whole seconds held in the instance. + An interger in the range [0, 59]. + + + + + Gets the number of whole minutes held in the instance. + An integer in the range [0, 59]. + + + + + Gets the number of whole hours held in the instance. + Note that the time 24:00:00 can be stored for roundtrip compatibility. Any calculations on such a + value will normalised it to 00:00:00. + + + + + Normalise this time; if it is 24:00:00, convert it to 00:00:00 + + This time, normalised + + + + Compares this with another . As per postgres' rules, + first the times are compared as if they were both in the same timezone. If they are equal then + then timezones are compared (+01:00 being "smaller" than -01:00). + + the to compare with. + An integer which is 0 if they are equal, < 0 if this is the smaller and > 0 if this is the larger. + + + + Gets the number of whole microseconds held in the instance. + An integer in the range [0, 999999]. + + + + + Gets the number of whole milliseconds held in the instance. + An integer in the range [0, 999]. + + + + + Gets the number of whole seconds held in the instance. + An interger in the range [0, 59]. + + + + + Gets the number of whole minutes held in the instance. + An integer in the range [0, 59]. + + + + + Gets the number of whole hours held in the instance. + Note that the time 24:00:00 can be stored for roundtrip compatibility. Any calculations on such a + value will normalised it to 00:00:00. + + + + + This class implements the Fastpath api. + + + + + This maps the functions names to their id's (possible unique just + to a connection). + + + + + Our connection. + + + + + The network stream. + + + + + Initialises the fastpath system. + + BaseConnection to attach to. + The network stream to the backend. + + + + Initialises the fastpath system. + + BaseConnection to attach to. + + + + Send a function call to the PostgreSQL backend. + + Function id. + True if the result is an integer, false for other results. + FastpathArguments to pass to fastpath. + null if no data, Integer if an integer result, or byte[] otherwise. + + + + Send a function call to the PostgreSQL backend by name. + Note: the mapping for the procedure name to function id needs to exist, + usually to an earlier call to addfunction(). + This is the prefered method to call, as function id's can/may change + between versions of the backend. + For an example of how this works, refer to NpgsqlTypes.LargeObject + + Function name. + True if the result is an integer, false for other results. + FastpathArguments to pass to fastpath. + null if no data, Integer if an integer result, or byte[] otherwise. + + + + This convenience method assumes that the return value is an Integer. + + Function name. + Function arguments. + Integer result. + + + + This convenience method assumes that the return value is an Integer. + + Function name. + Function arguments. + Array containing result + + + + This adds a function to our lookup table. + User code should use the addFunctions method, which is based upon a + query, rather than hard coding the oid. The oid for a function is not + guaranteed to remain static, even on different servers of the same + version. + + Function name. + Function id. + + + + This takes a ResultSet containing two columns. Column 1 contains the + function name, Column 2 the oid. + It reads the entire ResultSet, loading the values into the function + table. + REMEMBER to close() the resultset after calling this!! + Implementation note about function name lookups: + PostgreSQL stores the function id's and their corresponding names in + the pg_proc table. To speed things up locally, instead of querying each + function from that table when required, a Dictionary is used. Also, only + the function's required are entered into this table, keeping connection + times as fast as possible. + The org.postgresql.largeobject.LargeObject class performs a query upon it's startup, + and passes the returned ResultSet to the addFunctions() method here. + Once this has been done, the LargeObject api refers to the functions by + name. + Dont think that manually converting them to the oid's will work. Ok, + they will for now, but they can change during development (there was some + discussion about this for V7.0), so this is implemented to prevent any + unwarranted headaches in the future. + + ResultSet + + + + This returns the function id associated by its name + If addFunction() or addFunctions() have not been called for this name, + then an NpgsqlException is thrown. + + Function name to lookup. + Function ID for fastpath call. + + + + Fast Path Arg. + + + + + Type of argument, true=integer, false=byte[]. + + + + + Integer value if type=true. + + + + + Byte value if type=false; + + + + + Constructs an argument that consists of an integer value. + + Int value to set. + + + + Constructs an argument that consists of an array of bytes. + + Array to store. + + + + Constructs an argument that consists of part of a byte array. + + Source array. + offset within array. + length of data to include. + + + + Constructs an argument that consists of a String. + + String to store. + + + + This sends this argument down the network stream. + The stream sent consists of the length.int4 then the contents. + Note: This is called from Fastpath, and cannot be called from + client code. + + + + + + Report send size. + + Send size. + + + + Large Object. + + + + + Indicates a seek from the begining of a file. + + + + + Indicates a seek from the current position. + + + + + Indicates a seek from the end of a file. + + + + + This opens a large object. + If the object does not exist, then an NpgsqlException is thrown. + + FastPath API for the connection to use. + OID of the Large Object to open. + Mode of opening the large object + + + + OID getter. + + The OID of this LargeObject. + + + + This method closes the object. You must not call methods in this + object after this is called. + + + + + Reads some data from the object, and return as a byte[] array. + + Number of bytes to read. + Array containing data read. + + + + Reads some data from the object into an existing array. + + Destination array. + Offset within array. + Maximum number of bytes to read. + The number of bytes actually read. + + + + Writes an array to the object. + + Array to write. + + + + Writes some data from an array to the object. + + Destination array. + Offset within array. + Number of bytes to write. + + + + Sets the current position within the object. + This is similar to the fseek() call in the standard C library. It + allows you to have random access to the large object. + + Position within object. + Either SEEK_SET, SEEK_CUR or SEEK_END. + + + + Sets the current position within the object. + This is similar to the fseek() call in the standard C library. It + allows you to have random access to the large object. + + Position within object from begining. + + + + Report the current position within the object. + + The current position within the object. + + + + This method is inefficient, as the only way to find out the size of + the object is to seek to the end, record the current position, then + return to the original position. + A better method will be found in the future. + + The size of the large object. + + + + OID. + + + + + Large Object Manager. + + + + + This mode indicates we want to write to an object + + + + + This mode indicates we want to read an object + + + + + This mode is the default. It indicates we want read and write access to + + + + + Constructs the LargeObject API. + There should only be one LargeObjectManager per Connection. The + org.postgresql.Connection class keeps track of the various extension API's + and it's advised you use those to gain access, and not going direct. + + + + + + This opens an existing large object, based on its OID. This method + assumes that READ and WRITE access is required (the default). + + OID of large object. + LargeObject instance providing access to the object + + + + This opens an existing large object, based on its OID. + + OID of large object. + Mode of open. + + + + + This creates a large object, returning its OID. + + OID of new object. + + + + This creates a large object, returning its OID. + + Bitmask describing different attributes of the new object. + OID of new object. + + + + This deletes a large object. + + OID describing object to delete. + + + + This deletes a large object. + It is identical to the Delete() method, and is supplied as the C API uses unlink. + + OID describing object to delete. + + + + Options that control certain aspects of native to backend conversions that depend + on backend version and status. + + + + + Clone the current object. + + A new NativeToBackendTypeConverterOptions object. + + + + Clone the current object with a different OID/Name mapping. + + OID/Name mapping object to use in the new instance. + A new NativeToBackendTypeConverterOptions object. + + + + Provide event handlers to convert all native supported basic data types from their backend + text representation to a .NET object. + + + + + Convert UTF8 encoded text a string. + + + + + Byte array from bytea encoded as ASCII text, escaped or hex format. + + + + + Byte array from bytea encoded as binary. + + + + + Convert a postgresql boolean to a System.Boolean. + + + + + Convert a postgresql boolean to a System.Boolean. + + + + + Convert a postgresql bit to a System.Boolean. + + + + + Convert a postgresql datetime to a System.DateTime. + + + + + Convert a postgresql date to a System.DateTime. + + + + + Convert a postgresql time to a System.DateTime. + + + + + Convert a postgresql money to a System.Decimal. + + + + + Convert a postgresql float4 or float8 to a System.Float or System.Double respectively. + + + + + Provide event handlers to convert extended native supported data types from their backend + text representation to a .NET object. + + + + + Convert a postgresql point to a System.NpgsqlPoint. + + + + + Convert a postgresql point to a System.RectangleF. + + + + + LDeg. + + + + + Path. + + + + + Polygon. + + + + + Circle. + + + + + Inet. + + + + + MAC Address. + + + + + interval + + + + + Provide event handlers to convert the basic native supported data types from + native form to backend representation. + + + + + Convert a string to UTF8 encoded text, escaped and quoted as required. + + + + + Convert a string to UTF8 encoded text. + + + + + Binary data, escaped and quoted as required. + + + + + Binary data with possible older style octal escapes, quoted. + + + + + Binary data in the new hex format (>= 9.0), quoted. + + + + + Binary data, raw. + + + + + Convert to a postgresql boolean text format. + + + + + Convert to a postgresql boolean binary format. + + + + + Convert to a postgresql binary int2. + + + + + Convert to a postgresql binary int4. + + + + + Convert to a postgresql binary int8. + + + + + Convert to a postgresql bit. + + + + + Convert to a postgresql timestamp. + + + + + Convert to a postgresql date. + + + + + Convert to a postgresql time. + + + + + Convert to a postgres money. + + + + + Convert to a postgres double with maximum precision. + + + + + Convert a System.Float to a postgres float4. + + + + + Convert a System.Double to a postgres float8. + + + + + Provide event handlers to convert extended native supported data types from + native form to backend representation. + + + + + Point. + + + + + Box. + + + + + LSeg. + + + + + Open path. + + + + + Polygon. + + + + + Convert to a postgres MAC Address. + + + + + Circle. + + + + + Convert to a postgres inet. + + + + + Convert to a postgres interval + + + + + Delegate called to convert the given backend text data to its native representation. + + + + + Delegate called to convert the given backend binary data to its native representation. + + + + + Represents a backend data type. + This class can be called upon to convert a backend field representation to a native object. + + + + + Construct a new NpgsqlTypeInfo with the given attributes and conversion handlers. + + Type OID provided by the backend server. + Type name provided by the backend server. + NpgsqlDbType + DbType + System type to convert fields of this type to. + Data conversion handler for text encoding. + Data conversion handler for binary data. + + + + Perform a data conversion from a backend representation to + a native object. + + Data sent from the backend. + fieldValueSize + Type modifier field sent from the backend. + + + + Perform a data conversion from a backend representation to + a native object. + + Data sent from the backend. + TypeSize + Type modifier field sent from the backend. + + + + Type OID provided by the backend server. + + + + + Type name provided by the backend server. + + + + + NpgsqlDbType. + + + + + NpgsqlDbType. + + + + + Provider type to convert fields of this type to. + + + + + System type to convert fields of this type to. + + + + + Reports whether a backend binary to native decoder is available for this type. + + + + + Delegate called to convert the given native data to its backand representation. + + + + + Represents a backend data type. + This class can be called upon to convert a native object to its backend field representation, + + + + + Returns an NpgsqlNativeTypeInfo for an array where the elements are of the type + described by the NpgsqlNativeTypeInfo supplied. + + + + + Construct a new NpgsqlTypeInfo with the given attributes and conversion handlers. + + Type name provided by the backend server. + DbType + Quote + NpgsqlDbType + Data conversion handler for text backend encoding. + Data conversion handler for binary backend encoding (for extended queries). + + + + Perform a data conversion from a native object to + a backend representation. + DBNull and null values are handled differently depending if a plain query is used + When + + Native .NET object to be converted. + Specifies that the value should be formatted for the extended query syntax. + Options to guide serialization. If null, a default options set is used. + Specifies that the value should be formatted as an extended query array element. + + + + Type name provided by the backend server. + + + + + NpgsqlDbType. + + + + + DbType. + + + + + Apply quoting. + + + + + Use parameter size information. + + + + + Reports whether a native to backend binary encoder is available for this type. + + + + + Provide mapping between type OID, type name, and a NpgsqlBackendTypeInfo object that represents it. + + + + + Construct an empty mapping. + + + + + Copy constuctor. + + + + + Add the given NpgsqlBackendTypeInfo to this mapping. + + + + + Add a new NpgsqlBackendTypeInfo with the given attributes and conversion handlers to this mapping. + + Type OID provided by the backend server. + Type name provided by the backend server. + NpgsqlDbType + DbType + System type to convert fields of this type to. + Data conversion handler for text encoding. + Data conversion handler for binary data. + + + + Make a shallow copy of this type mapping. + + + + + Determine if a NpgsqlBackendTypeInfo with the given backend type OID exists in this mapping. + + + + + Determine if a NpgsqlBackendTypeInfo with the given backend type name exists in this mapping. + + + + + Get the number of type infos held. + + + + + Retrieve the NpgsqlBackendTypeInfo with the given backend type OID, or null if none found. + + + + + Retrieve the NpgsqlBackendTypeInfo with the given backend type name, or null if none found. + + + + + Provide mapping between type Type, NpgsqlDbType and a NpgsqlNativeTypeInfo object that represents it. + + + + + Add the given NpgsqlNativeTypeInfo to this mapping. + + + + + Add a new NpgsqlNativeTypeInfo with the given attributes and conversion handlers to this mapping. + + Type name provided by the backend server. + NpgsqlDbType + DbType + Quote + Data conversion handler for text backend encoding. + Data conversion handler for binary backend encoding (for extended query). + + + + Retrieve the NpgsqlNativeTypeInfo with the given NpgsqlDbType. + + + + + Retrieve the NpgsqlNativeTypeInfo with the given DbType. + + + + + Retrieve the NpgsqlNativeTypeInfo with the given Type. + + + + + Determine if a NpgsqlNativeTypeInfo with the given backend type name exists in this mapping. + + + + + Determine if a NpgsqlNativeTypeInfo with the given NpgsqlDbType exists in this mapping. + + + + + Determine if a NpgsqlNativeTypeInfo with the given Type name exists in this mapping. + + + + + Get the number of type infos held. + + + + + Represents a PostgreSQL Point type + + + + + Represents a PostgreSQL Line Segment type. + + + + + Represents a PostgreSQL Path type. + + + + + Represents a PostgreSQL Polygon type. + + + + + Represents a PostgreSQL Circle type. + + + + + Represents a PostgreSQL inet type. + + + + + Represents a PostgreSQL MacAddress type. + + + + + + + The macAddr parameter must contain a string that can only consist of numbers + and upper-case letters as hexadecimal digits. (See PhysicalAddress.Parse method on MSDN) + + + + This class contains helper methods for type conversion between + the .Net type system and postgresql. + + + + + A cache of basic datatype mappings keyed by server version. This way we don't + have to load the basic type mappings for every connection. + + + + + Find a NpgsqlNativeTypeInfo in the default types map that can handle objects + of the given NpgsqlDbType. + + + + + Find a NpgsqlNativeTypeInfo in the default types map that can handle objects + of the given NpgsqlDbType. + + + + + Find a NpgsqlNativeTypeInfo in the default types map that can handle objects + of the given DbType. + + + + + Find a NpgsqlNativeTypeInfo in the default types map that can handle objects + of the given System.Type. + + + + + This method is responsible to convert the byte[] received from the backend + to the corresponding NpgsqlType. + The given TypeInfo is called upon to do the conversion. + If no TypeInfo object is provided, no conversion is performed. + + + + + This method is responsible to convert the string received from the backend + to the corresponding NpgsqlType. + The given TypeInfo is called upon to do the conversion. + If no TypeInfo object is provided, no conversion is performed. + + + + + Create the one and only native to backend type map. + This map is used when formatting native data + types to backend representations. + + + + + This method creates (or retrieves from cache) a mapping between type and OID + of all natively supported postgresql data types. + This is needed as from one version to another, this mapping can be changed and + so we avoid hardcoding them. + + NpgsqlTypeMapping containing all known data types. The mapping must be + cloned before it is modified because it is cached; changes made by one connection may + effect another connection. + + + + + Attempt to map types by issuing a query against pg_type. + This function takes a list of NpgsqlTypeInfo and attempts to resolve the OID field + of each by querying pg_type. If the mapping is found, the type info object is + updated (OID) and added to the provided NpgsqlTypeMapping object. + + NpgsqlConnector to send query through. + Mapping object to add types too. + List of types that need to have OID's mapped. + + + + Summary description for NpgsqlQuery + + + + + For classes representing messages sent from the client to the server. + + + + + Set Cache Size. The default value is 20. + + + + + Lookup cached entity. null will returned if not match. + For both get{} and set{} apply LRU rule. + + key + + + + + The globally available text encoding used for frontend/backend communication. + + + + This class represents the base class for the state pattern design pattern + implementation. + + + This class represents the base class for the state pattern design pattern + implementation. + + + + + + This method is used by the states to change the state of the context. + + + + + Call ProcessBackendResponsesEnum(), and scan and discard all results. + + + + + This method is responsible to handle all protocol messages sent from the backend. + It holds all the logic to do it. + To exchange data, it uses a Mediator object from which it reads/writes information + to handle backend requests. + + + + + + Checks for context socket availability. + Socket.Poll supports integer as microseconds parameter. + This limits the usable command timeout value + to 2,147 seconds: (2,147 x 1,000,000 less than max_int). + In order to bypass this limit, the availability of + the socket is checked in 2,147 seconds cycles + + true, if for context socket availability was checked, false otherwise. + Context. + Select mode. + + + + Called from constructor of derived class. + + + + + Finalizer for HashAlgorithm + + + + + Computes the entire hash of all the bytes in the byte array. + + + + + When overridden in a derived class, drives the hashing function. + + + + + + + + When overridden in a derived class, this pads and hashes whatever data might be left in the buffers and then returns the hash created. + + + + + When overridden in a derived class, initializes the object to prepare for hashing. + + + + + Used for stream chaining. Computes hash as data passes through it. + + The buffer from which to grab the data to be copied. + The offset into the input buffer to start reading at. + The number of bytes to be copied. + The buffer to write the copied data to. + At what point in the outputBuffer to write the data at. + + + + Used for stream chaining. Computes hash as data passes through it. Finishes off the hash. + + The buffer from which to grab the data to be copied. + The offset into the input buffer to start reading at. + The number of bytes to be copied. + + + + Get whether or not the hash can transform multiple blocks at a time. + Note: MUST be overriden if descendant can transform multiple block + on a single call! + + + + + Gets the previously computed hash. + + + + + Returns the size in bits of the hash. + + + + + Must be overriden if not 1 + + + + + Must be overriden if not 1 + + + + + Common base class for all derived MD5 implementations. + + + + + Called from constructor of derived class. + + + + + Creates the default derived class. + + + + + C# implementation of the MD5 cryptographic hash function. + + + + + Creates a new MD5CryptoServiceProvider. + + + + + Drives the hashing function. + + Byte array containing the data to hash. + Where in the input buffer to start. + Size in bytes of the data in the buffer to hash. + + + + This finalizes the hash. Takes the data from the chaining variables and returns it. + + + + + Resets the class after use. Called automatically after hashing is done. + + + + + This is the meat of the hash function. It is what processes each block one at a time. + + Byte array to process data from. + Where in the byte array to start processing. + + + + Pads and then processes the final block. + + Buffer to grab data from. + Position in buffer in bytes to get data from. + How much data in bytes in the buffer to use. + + + + Implements for version 3 of the protocol. + + + + + Reads a row, field by field, allowing a DataRow to be built appropriately. + + + + + Marker interface which identifies a class which may take possession of a stream for the duration of + it's lifetime (possibly temporarily giving that possession to another class for part of that time. + + It inherits from IDisposable, since any such class must make sure it leaves the stream in a valid state. + + The most important such class is that compiler-generated from ProcessBackendResponsesEnum. Of course + we can't make that inherit from this interface, alas. + + + + + Marker interface which identifies a class which represents part of + a response from the server. + + + + + Reads part of a field, as needed (for + and + + + + + Adds further functionality to stream that is dependant upon the type of data read. + + + + + Completes the implementation of Streamer for char data. + + + + + Completes the implementation of Streamer for byte data. + + + + + This class represents a BackEndKeyData message received + from PostgreSQL + + + + + This class represents the Bind message sent to PostgreSQL + server. + + + + + + This class represents the CancelRequest message sent to PostgreSQL + server. + + + + + + Represents a SQL statement or function (stored procedure) to execute + against a PostgreSQL database. This class cannot be inherited. + + + Represents a SQL statement or function (stored procedure) to execute + against a PostgreSQL database. This class cannot be inherited. + + + Represents a SQL statement or function (stored procedure) to execute + against a PostgreSQL database. This class cannot be inherited. + + + + + 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. + + + + Used to execute internal commands. + + + + + Attempts to cancel the execution of a NpgsqlCommand. + + This Method isn't implemented yet. + + + + Create a new command based on this one. + + A new NpgsqlCommand object. + + + + Create a new command based on this one. + + A new NpgsqlCommand object. + + + + Creates a new instance of an DbParameter object. + + An DbParameter object. + + + + Creates a new instance of a NpgsqlParameter object. + + A NpgsqlParameter object. + + + + Releases the resources used by the NpgsqlCommand. + + + + + Internal query shortcut for use in cases where the number + of affected rows is of no interest. + + + + + Special adaptation of ExecuteBlind() that sets statement_timeout. + This exists to prevent Connector.SetBackendCommandTimeout() from calling Command.ExecuteBlind(), + which will cause an endless recursive loop. + + + Timeout in seconds. + + + + Executes a SQL statement against the connection and returns the number of rows affected. + + The number of rows affected if known; -1 otherwise. + + + + Sends the CommandText to + the Connection and builds a + NpgsqlDataReader + using one of the CommandBehavior values. + + One of the CommandBehavior values. + A NpgsqlDataReader object. + + + + Sends the CommandText to + the Connection and builds a + NpgsqlDataReader. + + A NpgsqlDataReader object. + + + + Sends the CommandText to + the Connection and builds a + NpgsqlDataReader + using one of the CommandBehavior values. + + One of the CommandBehavior values. + A NpgsqlDataReader object. + Currently the CommandBehavior parameter is ignored. + + + + This method binds the parameters from parameters collection to the bind + message. + + + + + Executes the query, and returns the first column of the first row + in the result set returned by the query. Extra columns or rows are ignored. + + The first column of the first row in the result set, + or a null reference if the result set is empty. + + + + Creates a prepared version of the command on a PostgreSQL server. + + + + + This method checks the connection state to see if the connection + is set or it is open. If one of this conditions is not met, throws + an InvalidOperationException + + + + + This method substitutes the Parameters, if exist, in the command + to their actual values. + The parameter name format is :ParameterName. + + A version of CommandText with the Parameters inserted. + + + + Process this.commandText, trimming each distinct command and substituting paramater + tokens. + + + UTF8 encoded command ready to be sent to the backend. + + + + Append a region of a source command text to an output command, performing parameter token + substitutions. + + Stream to which to append output. + Command text. + + + false if the query has multiple statements which are not allowed + + + + 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 is 20 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. + + + + DB parameter collection. + + + + + Gets the NpgsqlParameterCollection. + + The parameters of the SQL statement or function (stored procedure). The default is an empty collection. + + + + DB transaction. + + + + + Gets or sets the NpgsqlTransaction + within which the NpgsqlCommand executes. + + The NpgsqlTransaction. + The default value is a null reference. + + + + Gets or sets how command results are applied to the DataRow + when used by the Update + method of the DbDataAdapter. + + One of the UpdateRowSource values. + + + + Returns oid of inserted row. This is only updated when using executenonQuery and when command inserts just a single row. If table is created without oids, this will always be 0. + + + + + Returns whether this query will execute as a prepared (compiled) query. + + + + + Design time visible. + + + + + This class is responsible to create database commands for automatic insert, update and delete operations. + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + The adapter. + + + + + This method is reponsible to derive the command parameter list with values obtained from function definition. + It clears the Parameters collection of command. Also, if there is any parameter type which is not supported by Npgsql, an InvalidOperationException will be thrown. + Parameters name will be parameter1, parameter2, ... + + NpgsqlCommand whose function parameters will be obtained. + + + + Gets the automatically generated object required + to perform insertions at the data source. + + + The automatically generated object required to perform insertions. + + + + + Gets the automatically generated object required to perform insertions + at the data source, optionally using columns for parameter names. + + + If true, generate parameter names matching column names, if possible. + If false, generate @p1, @p2, and so on. + + + The automatically generated object required to perform insertions. + + + + + Gets the automatically generated System.Data.Common.DbCommand object required + to perform updates at the data source. + + + The automatically generated System.Data.Common.DbCommand object required to perform updates. + + + + + Gets the automatically generated object required to perform updates + at the data source, optionally using columns for parameter names. + + + If true, generate parameter names matching column names, if possible. + If false, generate @p1, @p2, and so on. + + + The automatically generated object required to perform updates. + + + + + Gets the automatically generated System.Data.Common.DbCommand object required + to perform deletions at the data source. + + + The automatically generated System.Data.Common.DbCommand object required to perform deletions. + + + + + Gets the automatically generated object required to perform deletions + at the data source, optionally using columns for parameter names. + + + If true, generate parameter names matching column names, if possible. + If false, generate @p1, @p2, and so on. + + + The automatically generated object required to perform deletions. + + + + + Applies the parameter information. + + The parameter. + The row. + Type of the statement. + if set to true [where clause]. + + + + Returns the name of the specified parameter in the format of @p#. + + The number to be included as part of the parameter's name.. + + The name of the parameter with the specified number appended as part of the parameter name. + + + + + Returns the full parameter name, given the partial parameter name. + + The partial name of the parameter. + + The full parameter name corresponding to the partial parameter name requested. + + + + + Returns the placeholder for the parameter in the associated SQL statement. + + The number to be included as part of the parameter's name. + + The name of the parameter with the specified number appended. + + + + + Registers the to handle the event for a . + + The to be used for the update. + + + + Adds an event handler for the event. + + The sender + A instance containing information about the event. + + + + Given an unquoted identifier in the correct catalog case, returns the correct quoted form of that identifier, including properly escaping any embedded quotes in the identifier. + + The original unquoted identifier. + + The quoted version of the identifier. Embedded quotes within the identifier are properly escaped. + + + + + Unquoted identifier parameter cannot be null + + + + Given a quoted identifier, returns the correct unquoted form of that identifier, including properly un-escaping any embedded quotes in the identifier. + + The identifier that will have its embedded quotes removed. + + The unquoted identifier, with embedded quotes properly un-escaped. + + + + + Quoted identifier parameter cannot be null + + + + Gets or sets the beginning character or characters to use when specifying database objects (for example, tables or columns) whose names contain characters such as spaces or reserved tokens. + + + The beginning character or characters to use. The default is an empty string. + + + + + + + + Gets or sets the ending character or characters to use when specifying database objects (for example, tables or columns) whose names contain characters such as spaces or reserved tokens. + + + The ending character or characters to use. The default is an empty string. + + + + + + + + Represents the method that handles the Notice events. + + The source of the event. + A NpgsqlNoticeEventArgs that contains the event data. + + + + Represents the method that handles the Notification events. + + The source of the event. + A NpgsqlNotificationEventArgs that contains the event data. + + + + This class represents a connection to a + PostgreSQL server. + + + + + 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. + + + + 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. + + + + + 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. + + + + + Opens a database connection with the property settings specified by the + ConnectionString. + + + + + 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. + + + + 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. + + + + + 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. + + + + + 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. + + + + Releases all resources used by the + NpgsqlConnection. + + true when called from Dispose(); + false when being called from the finalizer. + + + + Create a new connection based on this one. + + A new NpgsqlConnection object. + + + + Create a new connection based on this one. + + A new NpgsqlConnection object. + + + + Returns a copy of the NpgsqlConnectionStringBuilder that contains the parsed connection string values. + + + + + Default SSL CertificateSelectionCallback implementation. + + + + + Default SSL CertificateValidationCallback implementation. + + + + + Default SSL PrivateKeySelectionCallback implementation. + + + + + Default SSL ProvideClientCertificatesCallback implementation. + + + + + Default SSL ValidateRemoteCertificateCallback implementation. + + + + + Write each key/value pair in the connection string to the log. + + + + + Sets the `settings` ConnectionStringBuilder based on the given `connectionString` + + The connection string to load the builder from + + + + Sets the `settings` ConnectionStringBuilder based on the given `connectionString` + + The connection string to load the builder from + + + + Refresh the cached _connectionString whenever the builder settings change + + + + + Returns the supported collections + + + + + 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. + + + + Clear connection pool. + + + + + Clear all connection pools. + + + + + Enlist transation. + + + + + + Occurs on NoticeResponses from the PostgreSQL backend. + + + + + Occurs on NotificationResponses from the PostgreSQL backend. + + + + + Called to provide client certificates for SSL handshake. + + + + + Mono.Security.Protocol.Tls.CertificateSelectionCallback delegate. + + + + + Mono.Security.Protocol.Tls.CertificateValidationCallback delegate. + + + + + Mono.Security.Protocol.Tls.PrivateKeySelectionCallback delegate. + + + + + Called to validate server's certificate during SSL handshake + + + + + 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). + + + + + Gets or sets the string used to connect to a PostgreSQL database. + Valid values are: +
    +
  • + Server: Address/Name of Postgresql Server; +
  • +
  • + Port: Port to connect to; +
  • +
  • + Protocol: Protocol version to use, instead of automatic; Integer 2 or 3; +
  • +
  • + Database: Database name. Defaults to user name if not specified; +
  • +
  • + User Id: User name; +
  • +
  • + Password: Password for clear text authentication; +
  • +
  • + SSL: True or False. Controls whether to attempt a secure connection. Default = False; +
  • +
  • + Pooling: True or False. Controls whether connection pooling is used. Default = True; +
  • +
  • + MinPoolSize: Min size of connection pool; +
  • +
  • + MaxPoolSize: Max size of connection pool; +
  • +
  • + Timeout: Time to wait for connection open in seconds. Default is 15. +
  • +
  • + CommandTimeout: Time to wait for command to finish execution before throw an exception. In seconds. Default is 20. +
  • +
  • + Sslmode: Mode for ssl connection control. Can be Prefer, Require, Allow or Disable. Default is Disable. Check user manual for explanation of values. +
  • +
  • + ConnectionLifeTime: Time to wait before closing unused connections in the pool in seconds. Default is 15. +
  • +
  • + SyncNotification: Specifies if Npgsql should use synchronous notifications. +
  • +
  • + SearchPath: Changes search path to specified and public schemas. +
  • +
+
+ 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 SSL. + + + + + 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 time to wait before closing unused connections in the pool if the count + of all connections exeeds MinPoolSize. + + + If connection pool contains unused connections for ConnectionLifeTime seconds, + the half of them will be closed. If there will be unused connections in a second + later then again the half of them will be closed and so on. + This strategy provide smooth change of connection count in the pool. + + The time (in seconds) to wait. The default value is 15 seconds. + + + + Gets 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. + + + + Whether datareaders are loaded in their entirety (for compatibility with earlier code). + + + + + Gets the database server name. + + + + + Gets flag indicating if we are using Synchronous notification or not. + The default value is false. + + + + + 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 or ConnectionState.Closed + + + + Compatibility version. + + + + + Version of the PostgreSQL backend. + This can only be called when there is an active connection. + + + + + PostgreSQL server version. + + + + + Protocol version in use. + This can only be called when there is an active connection. + Always retuna Version3 + + + + + Whether the backend is an AWS Redshift instance + + + + + 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). + + + + + Report whether the backend understands the hex byte format (>= 9.0). + + + + + The connector object connected to the backend. + + + + + Gets the NpgsqlConnectionStringBuilder containing the parsed connection string values. + + + + + User name. + + + + + Use extended types. + + + + + Password. + + + + + Determine if connection pooling will be used for this connection. + + + + + DB provider factory. + + + + + Return an exact copy of this NpgsqlConnectionString. + + + + + No integrated security if we're on mono and .NET 4.5 because of ClaimsIdentity, + see https://github.com/npgsql/Npgsql/issues/133 + + + + + This function will set value for known key, both private member and base[key]. + + + + + value, coerced as needed to the stored type. + + + + The function will modify private member only, not base[key]. + + + + value, coerced as needed to the stored type. + + + + The function will access private member only, not base[key]. + + + value. + + + + Clear the member and assign them to the default value. + + + + + Gets or sets the backend server host name. + + + + + Gets or sets the backend server port. + + + + + Gets or sets the name of the database to be used after a connection is opened. + + The name of the database to be + used after a connection is opened. + + + + Gets or sets the login user name. + + + + + Gets or sets the login password as a UTF8 encoded byte array. + + + + + Sets the login password as a string. + + + + + Gets or sets the krbsrvname. + + + + + Gets or sets a value indicating whether to attempt to use SSL. + + + + + Gets or sets a value indicating whether to attempt to use SSL. + + + + + Gets or sets the time to wait while trying to establish a connection + before terminating the attempt and generating an error. + + The time (in seconds) to wait for a connection to open. The default value is 15 seconds. + + + + Gets or sets the schema search path. + + + + + Gets or sets a value indicating whether connection pooling should be used. + + + + + Gets or sets the time to wait before closing unused connections in the pool if the count + of all connections exeeds MinPoolSize. + + + If connection pool contains unused connections for ConnectionLifeTime seconds, + the half of them will be closed. If there will be unused connections in a second + later then again the half of them will be closed and so on. + This strategy provide smooth change of connection count in the pool. + + The time (in seconds) to wait. The default value is 15 seconds. + + + + Gets or sets the minimum connection pool size. + + + + + Gets or sets the maximum connection pool size. + + + + + Gets or sets a value indicating whether to listen for notifications and report them between command activity. + + + + + Gets the time to wait while trying to execute a command + before terminating the attempt and generating an error. + + The time (in seconds) to wait for a command to complete. The default value is 20 seconds. + + + + Gets or sets a value indicating whether datareaders are loaded in their entirety (for compatibility with earlier code). + + + + + Compatibilty version. When possible, behaviour caused by breaking changes will be preserved + if this version is less than that where the breaking change was introduced. + + + + + Gets or sets the ootional application name parameter to be sent to the backend during connection initiation. + + + + + Gets or sets a value indicating whether to silently Prepare() all commands before execution. + + + + + Gets or sets the specified backend communication protocol version. + + + + + Gets the backend encoding. Always returns "UTF8". + + + + + Case insensative accessor for indivual connection string values. + + + + + Set both ImplicitDefault and ExplicitDefault to the 's default value. + + + + + + + + Set ImplicitDefault to the default value of 's type, + and ExplicitDefault to . + + + + + + + + Represents the method that allows the application to provide a certificate collection to be used for SSL clien authentication + + A X509CertificateCollection to be filled with one or more client certificates. + + + + Represents the method that is called to validate the certificate provided by the server during an SSL handshake + + The server's certificate + The certificate chain containing the certificate's CA and any intermediate authorities + Any errors that were detected + + + + !!! Helper class, for compilation only. + Connector implements the logic for the Connection Objects to + access the physical connection to the database, and isolate + the application developer from connection pooling internals. + + + + + Whether the backend is an AWS Redshift instance + + + + + Constructor. + + Connection string. + Pooled + Controls whether the connector can be shared. + + + + This method checks if the connector is still ok. + We try to send a simple query text, select 1 as ConnectionTest; + + + + + This method is responsible for releasing all resources associated with this Connector. + + + + + This method is responsible to release all portals used by this Connector. + + + + + Modify the backend statement_timeout value if needed. + + New timeout + + + + Default SSL CertificateSelectionCallback implementation. + + + + + Default SSL CertificateValidationCallback implementation. + + + + + Default SSL PrivateKeySelectionCallback implementation. + + + + + Default SSL ProvideClientCertificatesCallback implementation. + + + + + Default SSL ValidateRemoteCertificateCallback implementation. + + + + + This method is required to set all the version dependent features flags. + SupportsPrepare means the server can use prepared query plans (7.3+) + + + + + Opens the physical connection to the server. + + Usually called by the RequestConnector + Method of the connection pool manager. + + + + Closes the physical connection to the server. + + + + + Returns next portal index. + + + + + Returns next plan index. + + + + + Occurs on NoticeResponses from the PostgreSQL backend. + + + + + Occurs on NotificationResponses from the PostgreSQL backend. + + + + + Called to provide client certificates for SSL handshake. + + + + + Mono.Security.Protocol.Tls.CertificateSelectionCallback delegate. + + + + + Mono.Security.Protocol.Tls.CertificateValidationCallback delegate. + + + + + Mono.Security.Protocol.Tls.PrivateKeySelectionCallback delegate. + + + + + Called to validate server's certificate during SSL handshake + + + + + Gets the current state of the connection. + + + + + Return Connection String. + + + + + Version of backend server this connector is connected to. + + + + + Whether the backend is an AWS Redshift instance + + + + + The physical connection socket to the backend. + + + + + The physical connection stream to the backend. + + + + + The top level stream to the backend. + + + + + Reports if this connector is fully connected. + + + + + The connection mediator. + + + + + Report if the connection is in a transaction. + + + + + Options that control certain aspects of native to backend conversions that depend + on backend version and status. + + + + + This class manages all connector objects, pooled AND non-pooled. + + + + Unique static instance of the connector pool + mamager. + + + Map of index to unused pooled connectors, avaliable to the + next RequestConnector() call. + This hashmap will be indexed by connection string. + This key will hold a list of queues of pooled connectors available to be used. + + + Timer for tracking unused connections in pools. + + + + Searches the shared and pooled connector lists for a + matching connector object or creates a new one. + + The NpgsqlConnection that is requesting + the connector. Its ConnectionString will be used to search the + pool for available connectors. + A connector object. + + + + Find a pooled connector. Handle shared/non-shared here. + + + + + Releases a connector, possibly back to the pool for future use. + + + Pooled connectors will be put back into the pool if there is room. + Shared connectors should just have their use count decremented + since they always stay in the shared pool. + + Connection to which the connector is leased. + The connector to release. + + + + Release a pooled connector. Handle shared/non-shared here. + + + + + Find an available pooled connector in the non-shared pool, or create + a new one if none found. + + + + + Put a pooled connector into the pool queue. + + Connection is leased to. + Connector to pool + + + + A queue with an extra Int32 for keeping track of busy connections. + + + + + Connections available to the end user + + + + + Connections currently in use + + + + + Represents information about COPY operation data transfer format as returned by server. + + + + + Only created when a CopyInResponse or CopyOutResponse is received by NpgsqlState.ProcessBackendResponses() + + + + + Returns true if this operation is currently active and field at given location is in binary format. + + + + + Returns true if this operation is currently active and in binary format. + + + + + Returns number of fields if this operation is currently active, otherwise -1 + + + + + Represents a PostgreSQL COPY FROM STDIN operation with a corresponding SQL statement + to execute against a PostgreSQL database + and an associated stream used to read data from (if provided by user) + or for writing it (when generated by driver). + Eg. new NpgsqlCopyIn("COPY mytable FROM STDIN", connection, streamToRead).Start(); + + + + + Creates NpgsqlCommand to run given query upon Start(). Data for the requested COPY IN operation can then be written to CopyData stream followed by a call to End() or Cancel(). + + + + + Given command is run upon Start(). Data for the requested COPY IN operation can then be written to CopyData stream followed by a call to End() or Cancel(). + + + + + Given command is executed upon Start() and all data from fromStream is passed to it as copy data. + + + + + Returns true if this operation is currently active and field at given location is in binary format. + + + + + Command specified upon creation is executed as a non-query. + If CopyStream is set upon creation, it will be flushed to server as copy data, and operation will be finished immediately. + Otherwise the CopyStream member can be used for writing copy data to server and operation finished with a call to End() or Cancel(). + + + + + Called after writing all data to CopyStream to successfully complete this copy operation. + + + + + Withdraws an already started copy operation. The operation will fail with given error message. + Will do nothing if current operation is not active. + + + + + Returns true if the connection is currently reserved for this operation. + + + + + The stream provided by user or generated upon Start(). + User may provide a stream to constructor; it is used to pass to server all data read from it. + Otherwise, call to Start() sets this to a writable NpgsqlCopyInStream that passes all data written to it to server. + In latter case this is only available while the copy operation is active and null otherwise. + + + + + Returns true if this operation is currently active and in binary format. + + + + + Returns number of fields expected on each input row if this operation is currently active, otherwise -1 + + + + + The Command used to execute this copy operation. + + + + + Set before a COPY IN query to define size of internal buffer for reading from given CopyStream. + + + + + Represents an ongoing COPY FROM STDIN operation. + Provides methods to push data to server and end or cancel the operation. + + + + + Called from NpgsqlState.ProcessBackendResponses upon CopyInResponse. + If CopyStream is already set, it is used to read data to push to server, after which the copy is completed. + Otherwise CopyStream is set to a writable NpgsqlCopyInStream that calls SendCopyData each time it is written to. + + + + + Sends given packet to server as a CopyData message. + Does not check for notifications! Use another thread for that. + + + + + Sends CopyDone message to server. Handles responses, ie. may throw an exception. + + + + + Sends CopyFail message to server. Handles responses, ie. should always throw an exception: + in CopyIn state the server responds to CopyFail with an error response; + outside of a CopyIn state the server responds to CopyFail with an error response; + without network connection or whatever, there's going to eventually be a failure, timeout or user intervention. + + + + + Copy format information returned from server. + + + + + Stream for writing data to a table on a PostgreSQL version 7.4 or newer database during an active COPY FROM STDIN operation. + Passes data exactly as is and when given, so see to it that you use server encoding, correct format and reasonably sized writes! + + + + + Created only by NpgsqlCopyInState.StartCopy() + + + + + Successfully completes copying data to server. Returns after operation is finished. + Does nothing if this stream is not the active copy operation writer. + + + + + Withdraws an already started copy operation. The operation will fail with given error message. + Does nothing if this stream is not the active copy operation writer. + + + + + Writes given bytes to server. + Fails if this stream is not the active copy operation writer. + + + + + Flushes stream contents to server. + Fails if this stream is not the active copy operation writer. + + + + + Not readable + + + + + Not seekable + + + + + Not supported + + + + + True while this stream can be used to write copy data to server + + + + + False + + + + + True + + + + + False + + + + + Number of bytes written so far + + + + + Number of bytes written so far; not settable + + + + + Represents a PostgreSQL COPY TO STDOUT operation with a corresponding SQL statement + to execute against a PostgreSQL database + and an associated stream used to write results to (if provided by user) + or for reading the results (when generated by driver). + Eg. new NpgsqlCopyOut("COPY (SELECT * FROM mytable) TO STDOUT", connection, streamToWrite).Start(); + + + + + Creates NpgsqlCommand to run given query upon Start(), after which CopyStream provides data from database as requested in the query. + + + + + Given command is run upon Start(), after which CopyStream provides data from database as requested in the query. + + + + + Given command is executed upon Start() and all requested copy data is written to toStream immediately. + + + + + Returns true if this operation is currently active and field at given location is in binary format. + + + + + Command specified upon creation is executed as a non-query. + If CopyStream is set upon creation, all copy data from server will be written to it, and operation will be finished immediately. + Otherwise the CopyStream member can be used for reading copy data from server until no more data is available. + + + + + Flush generated CopyStream at once. Effectively reads and discard all the rest of copy data from server. + + + + + Returns true if the connection is currently reserved for this operation. + + + + + The stream provided by user or generated upon Start() + + + + + The Command used to execute this copy operation. + + + + + Returns true if this operation is currently active and in binary format. + + + + + Returns number of fields if this operation is currently active, otherwise -1 + + + + + Faster alternative to using the generated CopyStream. + + + + + Represents an ongoing COPY TO STDOUT operation. + Provides methods to read data from server or end the operation. + + + + + Called from NpgsqlState.ProcessBackendResponses upon CopyOutResponse. + If CopyStream is already set, it is used to write data received from server, after which the copy ends. + Otherwise CopyStream is set to a readable NpgsqlCopyOutStream that receives data from server. + + + + + Called from NpgsqlOutStream.Read to read copy data from server. + + + + + Copy format information returned from server. + + + + + Stream for reading data from a table or select on a PostgreSQL version 7.4 or newer database during an active COPY TO STDOUT operation. + Passes data exactly as provided by the server. + + + + + Created only by NpgsqlCopyOutState.StartCopy() + + + + + Discards copy data as long as server pushes it. Returns after operation is finished. + Does nothing if this stream is not the active copy operation reader. + + + + + Not writable. + + + + + Not flushable. + + + + + Copies data read from server to given byte buffer. + Since server returns data row by row, length will differ each time, but it is only zero once the operation ends. + Can be mixed with calls to the more efficient NpgsqlCopyOutStream.Read() : byte[] though that would not make much sense. + + + + + Not seekable + + + + + Not supported + + + + + Returns a whole row of data from server without extra work. + If standard Stream.Read(...) has been called before, it's internal buffers remains are returned. + + + + + True while this stream can be used to read copy data from server + + + + + True + + + + + False + + + + + False + + + + + Number of bytes read so far + + + + + Number of bytes read so far; can not be set. + + + + + Writes given objects into a stream for PostgreSQL COPY in default copy format (not CSV or BINARY). + + + + + Default delimiter. + + + + + Default separator. + + + + + Default null. + + + + + Default escape. + + + + + Default quote. + + + + + Default buffer size. + + + + + Constructor. + + + + + + Flush buffers. + + + + + Flush rows. + + + + + Flush fields. + + + + + Close the serializer. + + + + + Escape sequence for the given character. + + + + + + + Make room for bytes. + + + + + + Add bytes. + + + + + + End row. + + + + + Prefix field. + + + + + Field added. + + + + + Add null. + + + + + Add string. + + + + + + add Int32. + + + + + + Add Int64. + + + + + + Add number. + + + + + + Add bool + + + + + + Add DateTime. + + + + + + Report whether the serializer is active. + + + + + To Stream. + + + + + Delimiter. + + + + + Separator. + + + + + Escape. + + + + + Null. + + + + + Buffer size. + + + + + Report whether space remains in the buffer. + + + + + Strings to escape. + + + + + Escape sequence bytes. + + + + + 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. + + + + + Default constructor. + + + + + Constructor. + + + + + + Constructor. + + + + + + + Constructor. + + + + + + + Create row updated event. + + + + + + + + + + Create row updating event. + + + + + + + + + + Raise the RowUpdated event. + + + + + + Raise the RowUpdating event. + + + + + + Row updated event. + + + + + Row updating event. + + + + + Delete command. + + + + + Select command. + + + + + Update command. + + + + + Insert command. + + + + + Provides a means of reading a forward-only stream of rows from a PostgreSQL backend. This class cannot be inherited. + + + + + Return the data type name of the column at index . + + + + + Return the data type of the column at index . + + + + + Return the Npgsql specific data type of the column at requested ordinal. + + column position + Appropriate Npgsql type for column. + + + + Return the column name of the column at index . + + + + + Return the data type OID of the column at index . + + FIXME: Why this method returns String? + + + + Has ordinal. + + + + + + + Return the column name of the column named . + + + + + Return the data DbType of the column at index . + + + + + Return the data NpgsqlDbType of the column at index . + + + + + Get specified field value. + /// + + + + + + Get the value of a column as a . + If the differences between and + in handling of days and months is not important to your application, use + instead. + + Index of the field to find. + value of the field. + + + + Get specified field value. + /// + + + + + + Get specified field value. + /// + + + + + + Get specified field value. + /// + + + + + + Get specified field value. + /// + + + + + + Get specified field value. + /// + + + + + + Send closed event. + + + + + Gets the value of a column converted to a Guid. + + + + + Gets the value of a column as Int16. + + + + + Gets the value of a column as Int32. + + + + + Gets the value of a column as Int64. + + + + + Gets the value of a column as Single. + + + + + Gets the value of a column as Double. + + + + + Gets the value of a column as String. + + + + + Gets the value of a column as Decimal. + + + + + Gets the value of a column as TimeSpan. + + + + + Copy values from each column in the current row into . + + Destination for column values. + The number of column values copied. + + + + Copy values from each column in the current row into . + + An array appropriately sized to store values from all columns. + The number of column values copied. + + + + Gets the value of a column as Boolean. + + + + + Gets the value of a column as Byte. + + + + + Gets the value of a column as Char. + + + + + Gets the value of a column as DateTime. + + + + + Returns a System.Data.DataTable that describes the column metadata of the DataReader. + + + + + This methods parses the command text and tries to get the tablename + from it. + + + + + Get enumerator. + + + + + + Is raised whenever Close() is called. + + + + + Gets the number of columns in the current row. + + + + + Gets the value of a column in its native format. + + + + + Gets the value of a column in its native format. + + + + + 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. + + + + + Contains the column names as the keys + + + + + Contains all unique columns + + + + + This is the primary implementation of NpgsqlDataReader. It is the one used in normal cases (where the + preload-reader option is not set in the connection string to resolve some potential backwards-compatibility + issues), the only implementation used internally, and in cases where CachingDataReader is used, it is still + used to do the actual "leg-work" of turning a response stream from the server into a datareader-style + object - with CachingDataReader then filling it's cache from here. + + + + + Iterate through the objects returned through from the server. + If it's a CompletedResponse the rowsaffected count is updated appropriately, + and we iterate again, otherwise we return it (perhaps updating our cache of pending + rows if appropriate). + + The next we will deal with. + + + + Advances the data reader to the next result, when multiple result sets were returned by the PostgreSQL backend. + + True if the reader was advanced, otherwise false. + + + + Releases the resources used by the NpgsqlCommand. + + + + + Closes the data reader object. + + + + + Advances the data reader to the next result, when multiple result sets were returned by the PostgreSQL backend. + + True if the reader was advanced, otherwise false. + + + + Advances the data reader to the next row. + + True if the reader was advanced, otherwise false. + + + + Return the value of the column at index . + + + + + Gets raw data from a column. + + + + + Gets raw data from a column. + + + + + Report whether the value in a column is DBNull. + + + + + Gets the number of rows changed, inserted, or deleted by execution of the SQL statement. + + + + + Indicates if NpgsqlDatareader has rows to be read. + + + + + Provides an implementation of NpgsqlDataReader in which all data is pre-loaded into memory. + This operates by first creating a ForwardsOnlyDataReader as usual, and then loading all of it's + Rows into memory. There is a general principle that when there is a trade-off between a class design that + is more efficient and/or scalable on the one hand and one that is less efficient but has more functionality + (in this case the internal-only functionality of caching results) that one can build the less efficent class + from the most efficient without significant extra loss in efficiency, but not the other way around. The relationship + between ForwardsOnlyDataReader and CachingDataReader is an example of this). + Since the interface presented to the user is still forwards-only, queues are used to + store this information, so that dequeueing as we go we give the garbage collector the best opportunity + possible to reclaim any memory that is no longer in use. + ForwardsOnlyDataReader being used to actually + obtain the information from the server means that the "leg-work" is still only done (and need only be + maintained) in one place. + This class exists to allow for certain potential backwards-compatibility issues to be resolved + with little effort on the part of affected users. It is considerably less efficient than ForwardsOnlyDataReader + and hence never used internally. + + + + + This is the base class for NpgsqlDescribeStatement and NpgsqlDescribePortal. + + + + + + This class represents the Statement Describe message sent to PostgreSQL + server. + + + + + + This class represents the Portal Describe message sent to PostgreSQL + server. + + + + + + EventArgs class to send Notice parameters, which are just NpgsqlError's in a lighter context. + + + + + Notice information. + + + + + This class represents the ErrorResponse and NoticeResponse + message sent from PostgreSQL server. + + + + + Return a string representation of this error object. + + + + + Severity code. All versions. + + + + + Error code. PostgreSQL 7.4 and up. + + + + + Terse error message. All versions. + + + + + Detailed error message. PostgreSQL 7.4 and up. + + + + + Suggestion to help resolve the error. PostgreSQL 7.4 and up. + + + + + Position (one based) within the query string where the error was encounterd. PostgreSQL 7.4 and up. + + + + + Position (one based) within the query string where the error was encounterd. This position refers to an internal command executed for example inside a PL/pgSQL function. PostgreSQL 7.4 and up. + + + + + Internal query string where the error was encounterd. This position refers to an internal command executed for example inside a PL/pgSQL function. PostgreSQL 7.4 and up. + + + + + Trace back information. PostgreSQL 7.4 and up. + + + + + Source file (in backend) reporting the error. PostgreSQL 7.4 and up. + + + + + Source file line number (in backend) reporting the error. PostgreSQL 7.4 and up. + + + + + Source routine (in backend) reporting the error. PostgreSQL 7.4 and up. + + + + + Schema name which relates to the error. PostgreSQL 9.3 and up. + + + + + Table name which relates to the error. PostgreSQL 9.3 and up. + + + + + Column name which relates to the error. PostgreSQL 9.3 and up. + + + + + Data type of column which relates to the error. PostgreSQL 9.3 and up. + + + + + Constraint name which relates to the error. PostgreSQL 9.3 and up. + + + + + String containing the sql sent which produced this error. + + + + + Backend protocol version in use. + + + + + Error and notice message field codes + + + + + Severity: the field contents are ERROR, FATAL, or PANIC (in an error message), + or WARNING, NOTICE, DEBUG, INFO, or LOG (in a notice message), or a localized + translation of one of these. Always present. + + + + + Code: the SQLSTATE code for the error (see Appendix A). Not localizable. Always present. + + + + + Message: the primary human-readable error message. This should be accurate + but terse (typically one line). Always present. + + + + + Detail: an optional secondary error message carrying more detail about the problem. + Might run to multiple lines. + + + + + Hint: an optional suggestion what to do about the problem. This is intended to differ + from Detail in that it offers advice (potentially inappropriate) rather than hard facts. + Might run to multiple lines. + + + + + Position: the field value is a decimal ASCII integer, indicating an error cursor + position as an index into the original query string. The first character has index 1, + and positions are measured in characters not bytes. + + + + + Internal position: this is defined the same as the P field, but it is used when the + cursor position refers to an internally generated command rather than the one submitted + by the client. + The q field will always appear when this field appears. + + + + + Internal query: the text of a failed internally-generated command. + This could be, for example, a SQL query issued by a PL/pgSQL function. + + + + + Where: an indication of the context in which the error occurred. + Presently this includes a call stack traceback of active procedural language functions + and internally-generated queries. The trace is one entry per line, most recent first. + + + + + Schema name: if the error was associated with a specific database object, + the name of the schema containing that object, if any. + + + + + Table name: if the error was associated with a specific table, the name of the table. + (Refer to the schema name field for the name of the table's schema.) + + + + + Column name: if the error was associated with a specific table column, the name of the column. + (Refer to the schema and table name fields to identify the table.) + + + + + Data type name: if the error was associated with a specific data type, the name of the data type. + (Refer to the schema name field for the name of the data type's schema.) + + + + + Constraint name: if the error was associated with a specific constraint, the name of the constraint. + Refer to fields listed above for the associated table or domain. + (For this purpose, indexes are treated as constraints, even if they weren't created with constraint syntax.) + + + + + File: the file name of the source-code location where the error was reported. + + + + + Line: the line number of the source-code location where the error was reported. + + + + + Routine: the name of the source-code routine reporting the error. + + + + + The level of verbosity of the NpgsqlEventLog + + + + + Don't log at all + + + + + Only log the most common issues + + + + + Log everything + + + + + This class handles all the Npgsql event and debug logging + + + + + Writes a string to the Npgsql event log if msglevel is bigger then NpgsqlEventLog.Level + + + This method is obsolete and should no longer be used. + It is likely to be removed in future versions of Npgsql + + The message to write to the event log + The minimum LogLevel for which this message should be logged. + + + + Writes a string to the Npgsql event log if msglevel is bigger then NpgsqlEventLog.Level + + The ResourceManager to get the localized resources + The name of the resource that should be fetched by the ResourceManager + The minimum LogLevel for which this message should be logged. + The additional parameters that shall be included into the log-message (must be compatible with the string in the resource): + + + + Writes the default log-message for the action of calling the Get-part of an Indexer to the log file. + + The minimum LogLevel for which this message should be logged. + The name of the class that contains the Indexer + The parameter given to the Indexer + + + + Writes the default log-message for the action of calling the Set-part of an Indexer to the logfile. + + The minimum LogLevel for which this message should be logged. + The name of the class that contains the Indexer + The parameter given to the Indexer + The value the Indexer is set to + + + + Writes the default log-message for the action of calling the Get-part of a Property to the logfile. + + The minimum LogLevel for which this message should be logged. + The name of the class that contains the Property + The name of the Property + + + + Writes the default log-message for the action of calling the Set-part of a Property to the logfile. + + The minimum LogLevel for which this message should be logged. + The name of the class that contains the Property + The name of the Property + The value the Property is set to + + + + Writes the default log-message for the action of calling a Method without Arguments to the logfile. + + The minimum LogLevel for which this message should be logged. + The name of the class that contains the Method + The name of the Method + + + + Writes the default log-message for the action of calling a Method with one Argument to the logfile. + + The minimum LogLevel for which this message should be logged. + The name of the class that contains the Method + The name of the Method + The value of the Argument of the Method + + + + Writes the default log-message for the action of calling a Method with two Arguments to the logfile. + + The minimum LogLevel for which this message should be logged. + The name of the class that contains the Method + The name of the Method + The value of the first Argument of the Method + The value of the second Argument of the Method + + + + Writes the default log-message for the action of calling a Method with three Arguments to the logfile. + + The minimum LogLevel for which this message should be logged. + The name of the class that contains the Method + The name of the Method + The value of the first Argument of the Method + The value of the second Argument of the Method + The value of the third Argument of the Method + + + + Writes the default log-message for the action of calling a Method with more than three Arguments to the logfile. + + The minimum LogLevel for which this message should be logged. + The name of the class that contains the Method + The name of the Method + A Object-Array with zero or more Ojects that are Arguments of the Method. + + + + Sets/Returns the filename to use for logging. + + The filename of the current Log file. + + + + Sets/Returns whether Log messages should be echoed to the console + + true if Log messages are echoed to the console, otherwise false + + + + The exception that is thrown when the PostgreSQL backend reports errors. + + + + + Construct a backend error exception based on a list of one or more + backend errors. The basic Exception.Message will be built from the + first (usually the only) error in the list. + + + + + Get object data. + + + + + + + Format a .NET style exception string. + Include all errors in the list, including any hints. + + + + + Append a line to the given Stream, first checking for zero-length. + + + + + Provide access to the entire list of errors provided by the PostgreSQL backend. + + + + + Severity code. All versions. + + + + + Error code. PostgreSQL 7.4 and up. + + + + + Basic error message. All versions. + + + + + Detailed error message. PostgreSQL 7.4 and up. + + + + + Suggestion to help resolve the error. PostgreSQL 7.4 and up. + + + + + Position (one based) within the query string where the error was encounterd. PostgreSQL 7.4 and up. + + + + + Trace back information. PostgreSQL 7.4 and up. + + + + + Source file (in backend) reporting the error. PostgreSQL 7.4 and up. + + + + + Source file line number (in backend) reporting the error. PostgreSQL 7.4 and up. + + + + + Source routine (in backend) reporting the error. PostgreSQL 7.4 and up. + + + + + Schema name which relates to the error. PostgreSQL 9.3 and up. + + + + + Table name which relates to the error. PostgreSQL 9.3 and up. + + + + + Column name which relates to the error. PostgreSQL 9.3 and up. + + + + + Data type of column which relates to the error. PostgreSQL 9.3 and up. + + + + + Constraint name which relates to the error. PostgreSQL 9.3 and up. + + + + + String containing the sql sent which produced this error. + + + + + Returns the entire list of errors provided by the PostgreSQL backend. + + + + + This class represents the Execute message sent to PostgreSQL + server. + + + + + + A factory to create instances of various Npgsql objects. + + + + + Creates an NpgsqlCommand object. + + + + + This class represents the Flush message sent to PostgreSQL + server. + + + + + + For classes representing simple messages, + consisting only of a message code and length identifier, + sent from the client to the server. + + + + + This class is responsible for serving as bridge between the backend + protocol handling and the core classes. It is used as the mediator for + exchanging data generated/sent from/to backend. + + + + + + The current command timeout on the backend. This is set via "SET statement_timeout = (milliseconds)". + A value of -1 means the backend's timeout value is unknown because it has not yet been set. + + + + + EventArgs class to send Notification parameters. + + + + + Process ID of the PostgreSQL backend that sent this notification. + + + + + Condition that triggered that notification. + + + + + Additional Information From Notifiying Process (for future use, currently postgres always sets this to an empty string) + + + + + This class represents a parameter to a command that will be sent to server + + + + + Initializes a new instance of the NpgsqlParameter class. + + + + + Initializes a new instance of the NpgsqlParameter + class with the parameter m_Name and a value of the new NpgsqlParameter. + + The m_Name of the parameter to map. + An Object that is the value of the NpgsqlParameter. + +

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

+

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

+
+
+ + + Initializes a new instance of the NpgsqlParameter + class with the parameter m_Name and the data type. + + The m_Name of the parameter to map. + One of the DbType values. + + + + Initializes a new instance of the NpgsqlParameter. + + The m_Name of the parameter to map. + One of the DbType values. + + + + Initializes a new instance of the NpgsqlParameter. + + The m_Name of the parameter to map. + One of the NpgsqlDbType values. + The length of the parameter. + + + + Initializes a new instance of the NpgsqlParameter. + + The m_Name of the parameter to map. + One of the DbType values. + The length of the parameter. + + + + Initializes a new instance of the NpgsqlParameter + + The m_Name of the parameter to map. + One of the NpgsqlDbType values. + The length of the parameter. + The m_Name of the source column. + + + + Initializes a new instance of the NpgsqlParameter. + + The m_Name of the parameter to map. + One of the DbType values. + The length of the parameter. + The m_Name of the source column. + + + + Initializes a new instance of the NpgsqlParameter. + + The m_Name of the parameter to map. + One of the NpgsqlDbType values. + The length of the parameter. + The m_Name of the source column. + One of the ParameterDirection values. + true if the value of the field can be null, otherwise false. + The total number of digits to the left and right of the decimal point to which + Value is resolved. + The total number of decimal places to which + Value is resolved. + One of the DataRowVersion values. + An Object that is the value + of the NpgsqlParameter. + + + + Initializes a new instance of the NpgsqlParameter. + + The m_Name of the parameter to map. + One of the DbType values. + The length of the parameter. + The m_Name of the source column. + One of the ParameterDirection values. + true if the value of the field can be null, otherwise false. + The total number of digits to the left and right of the decimal point to which + Value is resolved. + The total number of decimal places to which + Value is resolved. + One of the DataRowVersion values. + An Object that is the value + of the NpgsqlParameter. + + + + Reset DBType. + + + + + Creates a new NpgsqlParameter that + is a copy of the current instance. + + A new NpgsqlParameter that is a copy of this instance. + + + + The collection to which this parameter belongs, if any. + + + + + Gets or sets the maximum number of digits used to represent the + 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. + + + + Whether to use an explicit cast when included in a query. + + + + + 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 String. + + + + Gets or sets the DbType of the parameter. + + One of the DbType values. The default is String. + + + + Gets or sets a value indicating whether the parameter is input-only, + output-only, bidirectional, or a stored procedure return value parameter. + + One of the ParameterDirection + values. The default is Input. + + + + Gets or sets a value indicating whether the parameter accepts null values. + + true if null values are accepted; otherwise, false. The default is false. + + + + Gets or sets the m_Name of the NpgsqlParameter. + + The m_Name of the NpgsqlParameter. + The default is an empty string. + + + + The m_Name scrubbed of any optional marker + + + + + Gets or sets the m_Name of the source column that is mapped to the + DataSet and used for loading or + returning the Value. + + The m_Name of the source column that is mapped to the + DataSet. The default is an empty string. + + + + Gets or sets the DataRowVersion + to use when loading Value. + + One of the DataRowVersion values. + The default is Current. + + + + 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. + + + + Source column mapping. + + + + + 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. + + + + + Adds the specified NpgsqlParameter object to the NpgsqlParameterCollection. + + The NpgsqlParameter to add to the collection. + The index of the new NpgsqlParameter object. + + + + Obsolete. Use AddWithValue instead. + + + Use caution when using this overload of the + Add method to specify integer parameter values. + Because this overload takes a value of type Object, + you must convert the integral value to an Object + type when the value is zero, as the following C# example demonstrates. + parameters.Add(":pname", Convert.ToInt32(0)); + If you do not perform this conversion, the compiler will assume you + are attempting to call the NpgsqlParameterCollection.Add(string, DbType) overload. + + + + + Adds a NpgsqlParameter to the NpgsqlParameterCollection given the specified parameter name and value. + + The name of the NpgsqlParameter. + The Value of the NpgsqlParameter to add to the collection. + The paramater that was added. + + + + Adds a NpgsqlParameter to the NpgsqlParameterCollection given the specified parameter name and value. + + The name of the NpgsqlParameter. + The Value of the NpgsqlParameter to add to the collection. + One of the NpgsqlDbType values. + The paramater that was added. + + + + Adds a NpgsqlParameter to the NpgsqlParameterCollection given the specified parameter name and value. + + The name of the NpgsqlParameter. + The Value of the NpgsqlParameter to add to the collection. + One of the NpgsqlDbType values. + The length of the column. + The paramater that was added. + + + + Adds a NpgsqlParameter to the NpgsqlParameterCollection given the specified parameter name and value. + + The name of the NpgsqlParameter. + The Value of the NpgsqlParameter to add to the collection. + One of the NpgsqlDbType values. + The length of the column. + The name of the source column. + The paramater that was added. + + + + Adds a NpgsqlParameter to the NpgsqlParameterCollection given the parameter name and the data type. + + 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. + + + + 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. + + + + 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. + + + + + + + In methods taking an object as argument this method is used to verify + that the argument has the type NpgsqlParameter + + The object to verify + + + + 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[] + + + + 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. + + + + Report whether the collection is read only. Always false. + + + + + 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. + + + + Sync root. + + + + + This class represents the ParameterStatus message sent from PostgreSQL + server. + + + + + + This class represents the Parse message sent to PostgreSQL + server. + + + + + + This class represents a PasswordPacket message sent to backend + PostgreSQL. + + + + + Used when a connection is closed + + + + + This is the abstract base class for NpgsqlAsciiRow and NpgsqlBinaryRow. + + + + + The index of the current field in the stream, i.e. the one that hasn't + been read yet + + + + + This class represents a RowDescription message sent from + the PostgreSQL. + + + + + + This struct represents the internal data of the RowDescription message. + + + + + 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. + + + + This class represents a StartupPacket message of PostgreSQL + protocol. + + + + + + Represents a completed response message. + + + + + This class represents the Sync message sent to PostgreSQL + server. + + + + + + Represents a transaction to be made in a PostgreSQL database. This class cannot be inherited. + + + + + Dispose. + + + + + + Commits the database transaction. + + + + + Rolls back a transaction from a pending state. + + + + + Rolls back a transaction from a pending savepoint state. + + + + + Creates a transaction save point. + + + + + Cancel the transaction without telling the backend about it. This is + used to make the transaction go away when closing a connection. + + + + + Gets the NpgsqlConnection + object associated with the transaction, or a null reference if the + transaction is no longer valid. + + The NpgsqlConnection + object associated with the transaction. + + + + DB connection. + + + + + Specifies the IsolationLevel for this transaction. + + The IsolationLevel for this transaction. + The default is ReadCommitted. + + + + This class provides many util methods to handle + reading and writing of PostgreSQL protocol messages. + + + + + This method takes a ProtocolVersion and returns an integer + version number that the Postgres backend will recognize in a + startup packet. + + + + + This method takes a version string as returned by SELECT VERSION() and returns + a valid version string ("7.2.2" for example). + This is only needed when running protocol version 2. + This does not do any validity checks. + + + + + This method gets a C NULL terminated string from the network stream. + It keeps reading a byte in each time until a NULL byte is returned. + It returns the resultant string of bytes read. + This string is sent from backend. + + + + + Reads requested number of bytes from stream with retries until Stream.Read returns 0 or count is reached. + + Stream to read + byte buffer to fill + starting position to fill the buffer + number of bytes to read + The number of bytes read. May be less than count if no more bytes are available. + + + + Reads requested number of bytes from . If output matches exactly, and == false, is returned directly. + + Source array. + Starting position to read from + Number of bytes to read + Force a copy, even if the output is an exact copy of . + byte[] containing data requested. + + + + This method writes a string to the network stream. + + + + + This method writes a string to the network stream. + + + + + This method writes a C NULL terminated string to the network stream. + It appends a NULL terminator to the end of the String. + + + + + This method writes a C NULL terminated string to the network stream. + It appends a NULL terminator to the end of the String. + + + + + This method writes a byte to the stream. It also enables logging of them. + + + + + This method writes a byte to the stream. It also enables logging of them. + + + + + This method writes a set of bytes to the stream. It also enables logging of them. + + + + + This method writes a set of bytes to the stream. It also enables logging of them. + + + + + This method writes a C NULL terminated string limited in length to the + backend server. + It pads the string with null bytes to the size specified. + + + + + This method writes a C NULL terminated byte[] limited in length to the + backend server. + It pads the string with null bytes to the size specified. + + + + + Write a 32-bit integer to the given stream in the correct byte order. + + + + + Read a 32-bit integer from the given stream in the correct byte order. + + + + + Read a 32-bit integer from the given array in the correct byte order. + + + + + Write a 16-bit integer to the given stream in the correct byte order. + + + + + Read a 16-bit integer from the given stream in the correct byte order. + + + + + Read a 16-bit integer from the given array in the correct byte order. + + + + + Copy and possibly reverse a byte array, depending on host architecture endienness. + + Source byte array. + Force a copy even if no swap is performed. + , reversed if on a little-endian architecture, copied if required. + + + + Copy and possibly reverse a byte array, depending on host architecture endienness. + + Source byte array. + Starting offset in source array. + Number of bytes to copy. + Force a copy even if no swap is performed. + , reversed if on a little-endian architecture, copied if required. + + + + Represent the frontend/backend protocol version. + + + + + Represent the backend server version. + As this class offers no functionality beyond that offered by it has been + deprecated in favour of that class. + + + + + + Returns the string representation of this version in three place dot notation (Major.Minor.Patch). + + + + + Server version major number. + + + + + Server version minor number. + + + + + Server version patch level number. + + + + + A class to handle everything associated with SSPI authentication + + + + + Simplified SecBufferDesc struct with only one SecBuffer + + +
+
diff --git a/src/Frapid.Web/Areas/Frapid.Config/packages/Npgsql.2.2.6/lib/net40/de/Npgsql.resources.dll b/src/Frapid.Web/Areas/Frapid.Config/packages/Npgsql.2.2.6/lib/net40/de/Npgsql.resources.dll new file mode 100644 index 00000000..c6dd4e05 Binary files /dev/null and b/src/Frapid.Web/Areas/Frapid.Config/packages/Npgsql.2.2.6/lib/net40/de/Npgsql.resources.dll differ diff --git a/src/Frapid.Web/Areas/Frapid.Config/packages/Npgsql.2.2.6/lib/net40/es/Npgsql.resources.dll b/src/Frapid.Web/Areas/Frapid.Config/packages/Npgsql.2.2.6/lib/net40/es/Npgsql.resources.dll new file mode 100644 index 00000000..2bc2df41 Binary files /dev/null and b/src/Frapid.Web/Areas/Frapid.Config/packages/Npgsql.2.2.6/lib/net40/es/Npgsql.resources.dll differ diff --git a/src/Frapid.Web/Areas/Frapid.Config/packages/Npgsql.2.2.6/lib/net40/fi/Npgsql.resources.dll b/src/Frapid.Web/Areas/Frapid.Config/packages/Npgsql.2.2.6/lib/net40/fi/Npgsql.resources.dll new file mode 100644 index 00000000..7451bcf4 Binary files /dev/null and b/src/Frapid.Web/Areas/Frapid.Config/packages/Npgsql.2.2.6/lib/net40/fi/Npgsql.resources.dll differ diff --git a/src/Frapid.Web/Areas/Frapid.Config/packages/Npgsql.2.2.6/lib/net40/fr/Npgsql.resources.dll b/src/Frapid.Web/Areas/Frapid.Config/packages/Npgsql.2.2.6/lib/net40/fr/Npgsql.resources.dll new file mode 100644 index 00000000..dde4d72e Binary files /dev/null and b/src/Frapid.Web/Areas/Frapid.Config/packages/Npgsql.2.2.6/lib/net40/fr/Npgsql.resources.dll differ diff --git a/src/Frapid.Web/Areas/Frapid.Config/packages/Npgsql.2.2.6/lib/net40/ja/Npgsql.resources.dll b/src/Frapid.Web/Areas/Frapid.Config/packages/Npgsql.2.2.6/lib/net40/ja/Npgsql.resources.dll new file mode 100644 index 00000000..8a3385b7 Binary files /dev/null and b/src/Frapid.Web/Areas/Frapid.Config/packages/Npgsql.2.2.6/lib/net40/ja/Npgsql.resources.dll differ diff --git a/src/Frapid.Web/Areas/Frapid.Config/packages/Npgsql.2.2.6/lib/net40/zh-CN/Npgsql.resources.dll b/src/Frapid.Web/Areas/Frapid.Config/packages/Npgsql.2.2.6/lib/net40/zh-CN/Npgsql.resources.dll new file mode 100644 index 00000000..82a6bd23 Binary files /dev/null and b/src/Frapid.Web/Areas/Frapid.Config/packages/Npgsql.2.2.6/lib/net40/zh-CN/Npgsql.resources.dll differ diff --git a/src/Frapid.Web/Areas/Frapid.Config/packages/Npgsql.2.2.6/lib/net45/Mono.Security.dll b/src/Frapid.Web/Areas/Frapid.Config/packages/Npgsql.2.2.6/lib/net45/Mono.Security.dll new file mode 100644 index 00000000..62ae3394 Binary files /dev/null and b/src/Frapid.Web/Areas/Frapid.Config/packages/Npgsql.2.2.6/lib/net45/Mono.Security.dll differ diff --git a/src/Frapid.Web/Areas/Frapid.Config/packages/Npgsql.2.2.6/lib/net45/Npgsql.dll b/src/Frapid.Web/Areas/Frapid.Config/packages/Npgsql.2.2.6/lib/net45/Npgsql.dll new file mode 100644 index 00000000..87fc0adb Binary files /dev/null and b/src/Frapid.Web/Areas/Frapid.Config/packages/Npgsql.2.2.6/lib/net45/Npgsql.dll differ diff --git a/src/Frapid.Web/Areas/Frapid.Config/packages/Npgsql.2.2.6/lib/net45/Npgsql.xml b/src/Frapid.Web/Areas/Frapid.Config/packages/Npgsql.2.2.6/lib/net45/Npgsql.xml new file mode 100644 index 00000000..44c2c149 --- /dev/null +++ b/src/Frapid.Web/Areas/Frapid.Config/packages/Npgsql.2.2.6/lib/net45/Npgsql.xml @@ -0,0 +1,6536 @@ + + + + Npgsql + + + + + Handles serialisation of .NET array or IEnumeration to pg format. + Arrays of arrays, enumerations of enumerations, arrays of enumerations etc. + are treated as multi-dimensional arrays (in much the same manner as an array of arrays + is used to emulate multi-dimensional arrays in languages that lack native support for them). + If such an enumeration of enumerations is "jagged" (as opposed to rectangular, cuboid, + hypercuboid, hyperhypercuboid, etc) then this class will "correctly" serialise it, but pg + will raise an error as it doesn't allow jagged arrays. + + + + + Create an ArrayNativeToBackendTypeConverter with the element converter passed + + The that would be used to serialise the element type. + + + + Serialise the enumeration or array. + + + + + Convert a System.Array to PG binary format. + Write the array header and prepare to write array data to the stream. + + + + + Append all array data to the binary stream. + + + + + Handles parsing of pg arrays into .NET arrays. + + + + + Takes a string representation of a pg 1-dimensional array + (or a 1-dimensional row within an n-dimensional array) + and allows enumeration of the string represenations of each items. + + + + + Takes a string representation of a pg n-dimensional array + and allows enumeration of the string represenations of the next + lower level of rows (which in turn can be taken as (n-1)-dimensional arrays. + + + + + Takes an ArrayList which may be an ArrayList of ArrayLists, an ArrayList of ArrayLists of ArrayLists + and so on and enumerates the items that aren't ArrayLists (the leaf nodes if we think of the ArrayList + passed as a tree). Simply uses the ArrayLists' own IEnumerators to get that of the next, + pushing them onto a stack until we hit something that isn't an ArrayList. + ArrayList to enumerate + IEnumerable + + + + + Create a new ArrayBackendToNativeTypeConverter + + for the element type. + + + + Creates an array from pg text representation. + + + + + Creates an array list from pg represenation of an array. + Multidimensional arrays are treated as ArrayLists of ArrayLists + + + + + Creates an n-dimensional array from an ArrayList of ArrayLists or + a 1-dimensional array from something else. + + to convert + Type of the elements in the list + produced. + + + + Creates an n-dimensional System.Array from PG binary representation. + This function reads the array header and sets up an n-dimensional System.Array object to hold its data. + PopulateArrayFromBinaryArray() is then called to carry out array population. + + + + + Recursively populates an array from PB binary data representation. + + + + + Takes an array of ints and treats them like the limits of a set of counters. + Retains a matching set of ints that is set to all zeros on the first ++ + On a ++ it increments the "right-most" int. If that int reaches it's + limit it is set to zero and the one before it is incremented, and so on. + + Making this a more general purpose class is pretty straight-forward, but we'll just put what we need here. + + + + + Implements a bit string; a collection of zero or more bits which can each be 1 or 0. + BitString's behave as a list of bools, though like most strings and unlike most collections the position + tends to be of as much significance as the value. + BitStrings are often used as masks, and are commonly cast to and from other values. + + + + + Represents the empty string. + + + + + Create a BitString from an enumeration of boolean values. The BitString will contain + those booleans in the order they came in. + + The boolean values. + + + + Creates a BitString filled with a given number of true or false values. + + The value to fill the string with. + The number of bits to fill. + + + + Creats a bitstring from a string. + The string to copy from. + + + + + + Creates a single-bit element from a boolean value. + + The bool value which determines whether + the bit is 1 or 0. + + + + Creates a bitstring from an unsigned integer value. The string will be the shortest required to + contain the integer (e.g. 1 bit for 0 or 1, 2 for 2 or 3, 3 for 4-7, and so on). + + The integer. + This method is not CLS Compliant, and may not be available to some languages. + + + + Creates a bitstring from an integer value. The string will be the shortest required to + contain the integer (e.g. 1 bit for 0 or 1, 2 for 2 or 3, 3 for 4-7, and so on). + + The integer. + + + + Finds the first instance of a given value + + The value - whether true or false - to search for. + The index of the value found, or -1 if none are present. + + + + True if there is at least one bit with the value looked for. + + The value - true or false - to detect. + True if at least one bit was the same as item, false otherwise. + + + + Copies the bitstring to an array of bools. + + The boolean array to copy to. + The index in the array to start copying from. + + + + Returns an enumerator that enumerates through the string. + + The enumerator. + + + + Creats a bitstring by concatenating another onto this one. + + The string to append to this one. + The combined strings. + + + + Returns a substring of this string. + + The position to start from, must be between 0 and the length of the string. + The length of the string to return, must be greater than zero, and may not be + so large that the start + length exceeds the bounds of this instance. + The Bitstring identified + + + + Returns a substring of this string. + + The position to start from, must be between 0 and the length of the string, + the rest of the string is returned. + The Bitstring identified + + + + A logical and between this string and another. The two strings must be the same length. + + Another BitString to AND with this one. + A bitstring with 1 where both BitStrings had 1 and 0 otherwise. + + + + A logical or between this string and another. The two strings must be the same length. + + Another BitString to OR with this one. + A bitstring with 1 where either BitString had 1 and 0 otherwise. + + + + A logical xor between this string and another. The two strings must be the same length. + + Another BitString to XOR with this one. + A bitstring with 1 where one BitStrings and the other had 0, + and 0 where they both had 1 or both had 0. + + + + A bitstring that is the logical inverse of this one. + + A bitstring of the same length as this with 1 where this has 0 and vice-versa. + + + + Shifts the string operand bits to the left, filling with zeros to produce a + string of the same length. + + The number of bits to shift to the left. + A left-shifted bitstring. + The behaviour of LShift is closer to what one would expect from dealing + with PostgreSQL bit-strings than in using the same operations on integers in .NET + In particular, negative operands result in a right-shift, and operands greater than + the length of the string will shift it entirely, resulting in a zero-filled string. + + + + + Shifts the string operand bits to the right, filling with zeros to produce a + string of the same length. + + The number of bits to shift to the right. + A right-shifted bitstring. + The behaviour of RShift is closer to what one would expect from dealing + with PostgreSQL bit-strings than in using the same operations on integers in .NET + In particular, negative operands result in a left-shift, and operands greater than + the length of the string will shift it entirely, resulting in a zero-filled string. It also performs + a logical shift, rather than an arithmetic shift, so it always sets the vacated bit positions to zero + (like PostgreSQL and like .NET for unsigned integers but not for signed integers). + + + + + Returns true if the this string is identical to the argument passed. + + + + + Compares two strings. Strings are compared as strings, so while 0 being less than 1 will + mean a comparison between two strings of the same size is the same as treating them as numbers, + in the case of two strings of differing lengths the comparison starts at the right-most (most significant) + bit, and if all bits of the shorter string are exhausted without finding a comparison, then the larger + string is deemed to be greater than the shorter (0010 is greater than 0001 but less than 00100). + + Another string to compare with this one. + A value if the two strings are identical, an integer less + than zero if this is less than the argument, and an integer greater + than zero otherwise. + + + + Compares the string with another object. + + The object to compare with. + If the object is null then this string is considered greater. If the object is another BitString + then they are compared as in the explicit comparison for BitStrings + in any other case a is thrown. + + + + Compares this BitString with an object for equality. + + + + + Returns a code for use in hashing operations. + + + + + Returns a string representation of the BitString. + + + A string which can contain a letter and optionally a number which sets a minimum size for the string + returned. In each case using the lower-case form of the letter will result in a lower-case string + being returned. + + + B + A string of 1s and 0s. + + + X + An hexadecimal string (will result in an error unless the string's length is divisible by 4). + + + G + A string of 1s and 0s in single-quotes preceded by 'B' (Postgres bit string literal syntax). + + Y + An hexadecimal string in single-quotes preceded by 'X' (Postgres bit literal syntax, will result in an error unless the string's length is divisible by 4. + + C + The format produced by format-string "Y" if legal, otherwise that produced by format-string "G". + E + The most compact safe representation for Postgres. If single bit will be either a 0 or a 1. Otherwise if it + can be that produce by format string "Y" it will, otherwise if there are less than 9bits in length it will be that + produced by format-string "G". For longer strings that cannot be represented in hexadecimal it will be a string + representing the first part of the string in format "Y" followed by the PostgreSQL concatenation operator, followed + by the final bits in the format "G". E.g. "X'13DCE'||B'110'" + If format is empty or null, it is treated as if "B" had been passed (the default repreesentation, and that + generally used by PostgreSQL for display). + + The formatted string. + + + + Returns a string representation for the Bitstring + + A string containing '0' and '1' characters. + + + + Returns the same string as . formatProvider is ignored. + + + + + Parses a string to produce a BitString. Most formats that can be produced by + can be accepted, but hexadecimal + can be interpreted with the preceding X' to mark the following characters as + being hexadecimal rather than binary. + + + + + Performs a logical AND on the two operands. + + + + + Performs a logcial OR on the two operands. + + + + + Perofrms a logical EXCLUSIVE-OR on the two operands + + + + + Performs a logical NOT on the operand. + + + + + Concatenates the operands. + + + + + Left-shifts the string BitString. + + + + + Right-shifts the string BitString. + + + + + Compares the two operands. + + + + + Compares the two operands. + + + + + Compares the two operands. + + + + + Compares the two operands. + + + + + Compares the two operands. + + + + + Compares the two operands. + + + + + Interprets the bitstring as a series of bits in an encoded character string, + encoded according to the Encoding passed, and returns that string. + The bitstring must contain a whole number of octets(bytes) and also be + valid according to the Encoding passed. + + The to use in producing the string. + The string that was encoded in the BitString. + + + + Interprets the bitstring as a series of octets (bytes) and returns those octets. Fails + if the Bitstring does not contain a whole number of octets (its length is not evenly + divisible by 8). + + + + + Interprets the bitstring as a series of signed octets (bytes) and returns those octets. Fails + if the Bitstring does not contain a whole number of octets (its length is not evenly + divisible by 8). + This method is not CLS-Compliant and may not be available to languages that cannot + handle signed bytes. + + + + + Interprets the bitstring as a series of unsigned 16-bit integers and returns those integers. + Fails if the Bitstring's length is not evenly divisible by 16. + This method is not CLS-Compliant and may not be available to languages that cannot + handle unsigned integers. + + + + + Interprets the bitstring as a series of 16-bit integers and returns those integers. + Fails if the Bitstring's length is not evenly divisible by 16. + + + + + Interprets the bitstring as a series of unsigned 32-bit integers and returns those integers. + Fails if the Bitstring's length is not evenly divisible by 32. + This method is not CLS-Compliant and may not be available to languages that cannot + handle unsigned integers. + + + + + Interprets the bitstring as a series of signed 32-bit integers and returns those integers. + Fails if the Bitstring's length is not evenly divisible by 32. + + + + + Interprets the bitstring as a series of unsigned 64-bit integers and returns those integers. + Fails if the Bitstring's length is not evenly divisible by 64. + This method is not CLS-Compliant and may not be available to languages that cannot + handle unsigned integers. + + + + + Interprets the bitstring as a series of signed 64-bit integers and returns those integers. + Fails if the Bitstring's length is not evenly divisible by 64. + + + + + The length of the string. + + + + + Retrieves the value of the bit at the given index. + + + + + Represents the PostgreSQL interval datatype. + PostgreSQL differs from .NET in how it's interval type doesn't assume 24 hours in a day + (to deal with 23- and 25-hour days caused by daylight savings adjustments) and has a concept + of months that doesn't exist in .NET's class. (Neither datatype + has any concessions for leap-seconds). + For most uses just casting to and from TimeSpan will work correctly — in particular, + the results of subtracting one or the PostgreSQL date, time and + timestamp types from another should be the same whether you do so in .NET or PostgreSQL — + but if the handling of days and months in PostgreSQL is important to your application then you + should use this class instead of . + If you don't know whether these differences are important to your application, they + probably arent! Just use and do not use this class directly ☺ + To avoid forcing unnecessary provider-specific concerns on users who need not be concerned + with them a call to on a field containing an + value will return a rather than an + . If you need the extra functionality of + then use . + + + + + + + + + + Represents the number of ticks (100ns periods) in one microsecond. This field is constant. + + + + + Represents the number of ticks (100ns periods) in one millisecond. This field is constant. + + + + + Represents the number of ticks (100ns periods) in one second. This field is constant. + + + + + Represents the number of ticks (100ns periods) in one minute. This field is constant. + + + + + Represents the number of ticks (100ns periods) in one hour. This field is constant. + + + + + Represents the number of ticks (100ns periods) in one day. This field is constant. + + + + + Represents the number of hours in one day (assuming no daylight savings adjustments). This field is constant. + + + + + Represents the number of days assumed in one month if month justification or unjustifcation is performed. + This is set to 30 for consistency with PostgreSQL. Note that this is means that month adjustments cause + a year to be taken as 30 × 12 = 360 rather than 356/366 days. + + + + + Represents the number of ticks (100ns periods) in one day, assuming 30 days per month. + + + + + Represents the number of months in a year. This field is constant. + + + + + Represents the maximum . This field is read-only. + + + + + Represents the minimum . This field is read-only. + + + + + Represents the zero . This field is read-only. + + + + + Initializes a new to the specified number of ticks. + + A time period expressed in 100ns units. + + + + Initializes a new to hold the same time as a + + A time period expressed in a + + + + Initializes a new to the specified number of months, days + & ticks. + + Number of months. + Number of days. + Number of 100ns units. + + + + Initializes a new to the specified number of + days, hours, minutes & seconds. + + Number of days. + Number of hours. + Number of minutes. + Number of seconds. + + + + Initializes a new to the specified number of + days, hours, minutes, seconds & milliseconds. + + Number of days. + Number of hours. + Number of minutes. + Number of seconds. + Number of milliseconds. + + + + Initializes a new to the specified number of + months, days, hours, minutes, seconds & milliseconds. + + Number of months. + Number of days. + Number of hours. + Number of minutes. + Number of seconds. + Number of milliseconds. + + + + Initializes a new to the specified number of + years, months, days, hours, minutes, seconds & milliseconds. + Years are calculated exactly equivalent to 12 months. + + Number of years. + Number of months. + Number of days. + Number of hours. + Number of minutes. + Number of seconds. + Number of milliseconds. + + + + Creates an from a number of ticks. + + The number of ticks (100ns units) in the interval. + A d with the given number of ticks. + + + + Creates an from a number of microseconds. + + The number of microseconds in the interval. + A d with the given number of microseconds. + + + + Creates an from a number of milliseconds. + + The number of milliseconds in the interval. + A d with the given number of milliseconds. + + + + Creates an from a number of seconds. + + The number of seconds in the interval. + A d with the given number of seconds. + + + + Creates an from a number of minutes. + + The number of minutes in the interval. + A d with the given number of minutes. + + + + Creates an from a number of hours. + + The number of hours in the interval. + A d with the given number of hours. + + + + Creates an from a number of days. + + The number of days in the interval. + A d with the given number of days. + + + + Creates an from a number of months. + + The number of months in the interval. + A d with the given number of months. + + + + Adds another interval to this instance and returns the result. + + An to add to this instance. + An whose values are the sums of the two instances. + + + + Subtracts another interval from this instance and returns the result. + + An to subtract from this instance. + An whose values are the differences of the two instances. + + + + Returns an whose value is the negated value of this instance. + + An whose value is the negated value of this instance. + + + + This absolute value of this instance. In the case of some, but not all, components being negative, + the rules used for justification are used to determine if the instance is positive or negative. + + An whose value is the absolute value of this instance. + + + + Equivalent to PostgreSQL's justify_days function. + + An based on this one, but with any hours outside of the range [-23, 23] + converted into days. + + + + Opposite to PostgreSQL's justify_days function. + + An based on this one, but with any days converted to multiples of ±24hours. + + + + Equivalent to PostgreSQL's justify_months function. + + An based on this one, but with any days outside of the range [-30, 30] + converted into months. + + + + Opposite to PostgreSQL's justify_months function. + + An based on this one, but with any months converted to multiples of ±30days. + + + + Equivalent to PostgreSQL's justify_interval function. + + An based on this one, + but with any months converted to multiples of ±30days + and then with any days converted to multiples of ±24hours + + + + Opposite to PostgreSQL's justify_interval function. + + An based on this one, but with any months converted to multiples of ±30days and then any days converted to multiples of ±24hours; + + + + Produces a canonical NpgslInterval with 0 months and hours in the range of [-23, 23]. + + + While the fact that for many purposes, two different instances could be considered + equivalent (e.g. one with 2days, 3hours and one with 1day 27hours) there are different possible canonical forms. + + E.g. we could move all excess hours into days and all excess days into months and have the most readable form, + or we could move everything into the ticks and have the form that allows for the easiest arithmetic) the form + chosen has two important properties that make it the best choice. + First, it is closest two how + objects are most often represented. Second, it is compatible with results of many + PostgreSQL functions, particularly with age() and the results of subtracting one date, time or timestamp from + another. + + Note that the results of casting a to is + canonicalised. + + + An based on this one, but with months converted to multiples of ±30days and with any hours outside of the range [-23, 23] + converted into days. + + + + Implicit cast of a to an + + A + An eqivalent, canonical, . + + + + Implicit cast of an to a . + + A . + An equivalent . + + + + Returns true if another is exactly the same as this instance. + + An for comparison. + true if the two instances are exactly the same, + false otherwise. + + + + Returns true if another object is an , that is exactly the same as + this instance + + An for comparison. + true if the argument is an and is exactly the same + as this one, false otherwise. + + + + Compares two instances. + + The first . + The second . + 0 if the two are equal or equivalent. A value greater than zero if x is greater than y, + a value less than zero if x is less than y. + + + + A hash code suitable for uses with hashing algorithms. + + An signed integer. + + + + Compares this instance with another/ + + An to compare this with. + 0 if the instances are equal or equivalent. A value less than zero if + this instance is less than the argument. A value greater than zero if this instance + is greater than the instance. + + + + Compares this instance with another/ + + An object to compare this with. + 0 if the argument is an and the instances are equal or equivalent. + A value less than zero if the argument is an and + this instance is less than the argument. + A value greater than zero if the argument is an and this instance + is greater than the instance. + A value greater than zero if the argument is null. + The argument is not an . + + + + Parses a and returns a instance. + Designed to use the formats generally returned by PostgreSQL. + + The to parse. + An represented by the argument. + The string was null. + A value obtained from parsing the string exceeded the values allowed for the relevant component. + The string was not in a format that could be parsed to produce an . + + + + Attempt to parse a to produce an . + + The to parse. + (out) The produced, or if the parsing failed. + true if the parsing succeeded, false otherwise. + + + + Create a representation of the instance. + The format returned is of the form: + [M mon[s]] [d day[s]] [HH:mm:ss[.f[f[f[f[f[f[f[f[f]]]]]]]]]] + A zero is represented as 00:00:00 + + Ticks are 100ns, Postgress resolution is only to 1µs at most. Hence we lose 1 or more decimal + precision in storing values in the database. Despite this, this method will output that extra + digit of precision. It's forward-compatible with any future increases in resolution up to 100ns, + and also makes this ToString() more applicable to any other use-case. + + + The representation. + + + + Adds two together. + + The first to add. + The second to add. + An whose values are the sum of the arguments. + + + + Subtracts one from another. + + The to subtract the other from. + The to subtract from the other. + An whose values are the difference of the arguments + + + + Returns true if two are exactly the same. + + The first to compare. + The second to compare. + true if the two arguments are exactly the same, false otherwise. + + + + Returns false if two are exactly the same. + + The first to compare. + The second to compare. + false if the two arguments are exactly the same, true otherwise. + + + + Compares two instances to see if the first is less than the second + + The first to compare. + The second to compare. + true if the first is less than second, false otherwise. + + + + Compares two instances to see if the first is less than or equivalent to the second + + The first to compare. + The second to compare. + true if the first is less than or equivalent to second, false otherwise. + + + + Compares two instances to see if the first is greater than the second + + The first to compare. + The second to compare. + true if the first is greater than second, false otherwise. + + + + Compares two instances to see if the first is greater than or equivalent the second + + The first to compare. + The second to compare. + true if the first is greater than or equivalent to the second, false otherwise. + + + + Returns the instance. + + An . + The argument. + + + + Negates an instance. + + An . + The negation of the argument. + + + + The total number of ticks(100ns units) contained. This is the resolution of the + type. This ignores the number of days and + months held. If you want them included use first. + The resolution of the PostgreSQL + interval type is by default 1µs = 1,000 ns. It may be smaller as follows: + + + interval(0) + resolution of 1s (1 second) + + + interval(1) + resolution of 100ms = 0.1s (100 milliseconds) + + + interval(2) + resolution of 10ms = 0.01s (10 milliseconds) + + + interval(3) + resolution of 1ms = 0.001s (1 millisecond) + + + interval(4) + resolution of 100µs = 0.0001s (100 microseconds) + + + interval(5) + resolution of 10µs = 0.00001s (10 microseconds) + + + interval(6) or interval + resolution of 1µs = 0.000001s (1 microsecond) + + + As such, if the 100-nanosecond resolution is significant to an application, a PostgreSQL interval will + not suffice for those purposes. + In more frequent cases though, the resolution of the interval suffices. + will always suffice to handle the resolution of any interval value, and upon + writing to the database, will be rounded to the resolution used. + + The number of ticks in the instance. + + + + + Gets the number of whole microseconds held in the instance. + An in the range [-999999, 999999]. + + + + + Gets the number of whole milliseconds held in the instance. + An in the range [-999, 999]. + + + + + Gets the number of whole seconds held in the instance. + An in the range [-59, 59]. + + + + + Gets the number of whole minutes held in the instance. + An in the range [-59, 59]. + + + + + Gets the number of whole hours held in the instance. + Note that this can be less than -23 or greater than 23 unless + has been used to produce this instance. + + + + + Gets the number of days held in the instance. + Note that this does not pay attention to a time component with -24 or less hours or + 24 or more hours, unless has been called to produce this instance. + + + + + Gets the number of months held in the instance. + Note that this does not pay attention to a day component with -30 or less days or + 30 or more days, unless has been called to produce this instance. + + + + + Returns a representing the time component of the instance. + Note that this may have a value beyond the range ±23:59:59.9999999 unless + has been called to produce this instance. + + + + + The total number of ticks (100ns units) in the instance, assuming 24 hours in each day and + 30 days in a month. + + + + + The total number of microseconds in the instance, assuming 24 hours in each day and + 30 days in a month. + + + + + The total number of milliseconds in the instance, assuming 24 hours in each day and + 30 days in a month. + + + + + The total number of seconds in the instance, assuming 24 hours in each day and + 30 days in a month. + + + + + The total number of minutes in the instance, assuming 24 hours in each day and + 30 days in a month. + + + + + The total number of hours in the instance, assuming 24 hours in each day and + 30 days in a month. + + + + + The total number of days in the instance, assuming 24 hours in each day and + 30 days in a month. + + + + + The total number of months in the instance, assuming 24 hours in each day and + 30 days in a month. + + + + + Normalise this time; if it is 24:00:00, convert it to 00:00:00 + + This time, normalised + + + + The total number of ticks(100ns units) contained. This is the resolution of the + type. + The resolution of the PostgreSQL + interval type is by default 1µs = 1,000 ns. It may be smaller as follows: + + + time(0) + resolution of 1s (1 second) + + + time(1) + resolution of 100ms = 0.1s (100 milliseconds) + + + time(2) + resolution of 10ms = 0.01s (10 milliseconds) + + + time(3) + resolution of 1ms = 0.001s (1 millisecond) + + + time(4) + resolution of 100µs = 0.0001s (100 microseconds) + + + time(5) + resolution of 10µs = 0.00001s (10 microseconds) + + + time(6) or interval + resolution of 1µs = 0.000001s (1 microsecond) + + + As such, if the 100-nanosecond resolution is significant to an application, a PostgreSQL time will + not suffice for those purposes. + In more frequent cases though, the resolution of time suffices. + will always suffice to handle the resolution of any time value, and upon + writing to the database, will be rounded to the resolution used. + + The number of ticks in the instance. + + + + + Gets the number of whole microseconds held in the instance. + An integer in the range [0, 999999]. + + + + + Gets the number of whole milliseconds held in the instance. + An integer in the range [0, 999]. + + + + + Gets the number of whole seconds held in the instance. + An interger in the range [0, 59]. + + + + + Gets the number of whole minutes held in the instance. + An integer in the range [0, 59]. + + + + + Gets the number of whole hours held in the instance. + Note that the time 24:00:00 can be stored for roundtrip compatibility. Any calculations on such a + value will normalised it to 00:00:00. + + + + + Normalise this time; if it is 24:00:00, convert it to 00:00:00 + + This time, normalised + + + + Compares this with another . As per postgres' rules, + first the times are compared as if they were both in the same timezone. If they are equal then + then timezones are compared (+01:00 being "smaller" than -01:00). + + the to compare with. + An integer which is 0 if they are equal, < 0 if this is the smaller and > 0 if this is the larger. + + + + Gets the number of whole microseconds held in the instance. + An integer in the range [0, 999999]. + + + + + Gets the number of whole milliseconds held in the instance. + An integer in the range [0, 999]. + + + + + Gets the number of whole seconds held in the instance. + An interger in the range [0, 59]. + + + + + Gets the number of whole minutes held in the instance. + An integer in the range [0, 59]. + + + + + Gets the number of whole hours held in the instance. + Note that the time 24:00:00 can be stored for roundtrip compatibility. Any calculations on such a + value will normalised it to 00:00:00. + + + + + This class implements the Fastpath api. + + + + + This maps the functions names to their id's (possible unique just + to a connection). + + + + + Our connection. + + + + + The network stream. + + + + + Initialises the fastpath system. + + BaseConnection to attach to. + The network stream to the backend. + + + + Initialises the fastpath system. + + BaseConnection to attach to. + + + + Send a function call to the PostgreSQL backend. + + Function id. + True if the result is an integer, false for other results. + FastpathArguments to pass to fastpath. + null if no data, Integer if an integer result, or byte[] otherwise. + + + + Send a function call to the PostgreSQL backend by name. + Note: the mapping for the procedure name to function id needs to exist, + usually to an earlier call to addfunction(). + This is the prefered method to call, as function id's can/may change + between versions of the backend. + For an example of how this works, refer to NpgsqlTypes.LargeObject + + Function name. + True if the result is an integer, false for other results. + FastpathArguments to pass to fastpath. + null if no data, Integer if an integer result, or byte[] otherwise. + + + + This convenience method assumes that the return value is an Integer. + + Function name. + Function arguments. + Integer result. + + + + This convenience method assumes that the return value is an Integer. + + Function name. + Function arguments. + Array containing result + + + + This adds a function to our lookup table. + User code should use the addFunctions method, which is based upon a + query, rather than hard coding the oid. The oid for a function is not + guaranteed to remain static, even on different servers of the same + version. + + Function name. + Function id. + + + + This takes a ResultSet containing two columns. Column 1 contains the + function name, Column 2 the oid. + It reads the entire ResultSet, loading the values into the function + table. + REMEMBER to close() the resultset after calling this!! + Implementation note about function name lookups: + PostgreSQL stores the function id's and their corresponding names in + the pg_proc table. To speed things up locally, instead of querying each + function from that table when required, a Dictionary is used. Also, only + the function's required are entered into this table, keeping connection + times as fast as possible. + The org.postgresql.largeobject.LargeObject class performs a query upon it's startup, + and passes the returned ResultSet to the addFunctions() method here. + Once this has been done, the LargeObject api refers to the functions by + name. + Dont think that manually converting them to the oid's will work. Ok, + they will for now, but they can change during development (there was some + discussion about this for V7.0), so this is implemented to prevent any + unwarranted headaches in the future. + + ResultSet + + + + This returns the function id associated by its name + If addFunction() or addFunctions() have not been called for this name, + then an NpgsqlException is thrown. + + Function name to lookup. + Function ID for fastpath call. + + + + Fast Path Arg. + + + + + Type of argument, true=integer, false=byte[]. + + + + + Integer value if type=true. + + + + + Byte value if type=false; + + + + + Constructs an argument that consists of an integer value. + + Int value to set. + + + + Constructs an argument that consists of an array of bytes. + + Array to store. + + + + Constructs an argument that consists of part of a byte array. + + Source array. + offset within array. + length of data to include. + + + + Constructs an argument that consists of a String. + + String to store. + + + + This sends this argument down the network stream. + The stream sent consists of the length.int4 then the contents. + Note: This is called from Fastpath, and cannot be called from + client code. + + + + + + Report send size. + + Send size. + + + + Large Object. + + + + + Indicates a seek from the begining of a file. + + + + + Indicates a seek from the current position. + + + + + Indicates a seek from the end of a file. + + + + + This opens a large object. + If the object does not exist, then an NpgsqlException is thrown. + + FastPath API for the connection to use. + OID of the Large Object to open. + Mode of opening the large object + + + + OID getter. + + The OID of this LargeObject. + + + + This method closes the object. You must not call methods in this + object after this is called. + + + + + Reads some data from the object, and return as a byte[] array. + + Number of bytes to read. + Array containing data read. + + + + Reads some data from the object into an existing array. + + Destination array. + Offset within array. + Maximum number of bytes to read. + The number of bytes actually read. + + + + Writes an array to the object. + + Array to write. + + + + Writes some data from an array to the object. + + Destination array. + Offset within array. + Number of bytes to write. + + + + Sets the current position within the object. + This is similar to the fseek() call in the standard C library. It + allows you to have random access to the large object. + + Position within object. + Either SEEK_SET, SEEK_CUR or SEEK_END. + + + + Sets the current position within the object. + This is similar to the fseek() call in the standard C library. It + allows you to have random access to the large object. + + Position within object from begining. + + + + Report the current position within the object. + + The current position within the object. + + + + This method is inefficient, as the only way to find out the size of + the object is to seek to the end, record the current position, then + return to the original position. + A better method will be found in the future. + + The size of the large object. + + + + OID. + + + + + Large Object Manager. + + + + + This mode indicates we want to write to an object + + + + + This mode indicates we want to read an object + + + + + This mode is the default. It indicates we want read and write access to + + + + + Constructs the LargeObject API. + There should only be one LargeObjectManager per Connection. The + org.postgresql.Connection class keeps track of the various extension API's + and it's advised you use those to gain access, and not going direct. + + + + + + This opens an existing large object, based on its OID. This method + assumes that READ and WRITE access is required (the default). + + OID of large object. + LargeObject instance providing access to the object + + + + This opens an existing large object, based on its OID. + + OID of large object. + Mode of open. + + + + + This creates a large object, returning its OID. + + OID of new object. + + + + This creates a large object, returning its OID. + + Bitmask describing different attributes of the new object. + OID of new object. + + + + This deletes a large object. + + OID describing object to delete. + + + + This deletes a large object. + It is identical to the Delete() method, and is supplied as the C API uses unlink. + + OID describing object to delete. + + + + Options that control certain aspects of native to backend conversions that depend + on backend version and status. + + + + + Clone the current object. + + A new NativeToBackendTypeConverterOptions object. + + + + Clone the current object with a different OID/Name mapping. + + OID/Name mapping object to use in the new instance. + A new NativeToBackendTypeConverterOptions object. + + + + Provide event handlers to convert all native supported basic data types from their backend + text representation to a .NET object. + + + + + Convert UTF8 encoded text a string. + + + + + Byte array from bytea encoded as ASCII text, escaped or hex format. + + + + + Byte array from bytea encoded as binary. + + + + + Convert a postgresql boolean to a System.Boolean. + + + + + Convert a postgresql boolean to a System.Boolean. + + + + + Convert a postgresql bit to a System.Boolean. + + + + + Convert a postgresql datetime to a System.DateTime. + + + + + Convert a postgresql date to a System.DateTime. + + + + + Convert a postgresql time to a System.DateTime. + + + + + Convert a postgresql money to a System.Decimal. + + + + + Convert a postgresql float4 or float8 to a System.Float or System.Double respectively. + + + + + Provide event handlers to convert extended native supported data types from their backend + text representation to a .NET object. + + + + + Convert a postgresql point to a System.NpgsqlPoint. + + + + + Convert a postgresql point to a System.RectangleF. + + + + + LDeg. + + + + + Path. + + + + + Polygon. + + + + + Circle. + + + + + Inet. + + + + + MAC Address. + + + + + interval + + + + + Provide event handlers to convert the basic native supported data types from + native form to backend representation. + + + + + Convert a string to UTF8 encoded text, escaped and quoted as required. + + + + + Convert a string to UTF8 encoded text. + + + + + Binary data, escaped and quoted as required. + + + + + Binary data with possible older style octal escapes, quoted. + + + + + Binary data in the new hex format (>= 9.0), quoted. + + + + + Binary data, raw. + + + + + Convert to a postgresql boolean text format. + + + + + Convert to a postgresql boolean binary format. + + + + + Convert to a postgresql binary int2. + + + + + Convert to a postgresql binary int4. + + + + + Convert to a postgresql binary int8. + + + + + Convert to a postgresql bit. + + + + + Convert to a postgresql timestamp. + + + + + Convert to a postgresql date. + + + + + Convert to a postgresql time. + + + + + Convert to a postgres money. + + + + + Convert to a postgres double with maximum precision. + + + + + Convert a System.Float to a postgres float4. + + + + + Convert a System.Double to a postgres float8. + + + + + Provide event handlers to convert extended native supported data types from + native form to backend representation. + + + + + Point. + + + + + Box. + + + + + LSeg. + + + + + Open path. + + + + + Polygon. + + + + + Convert to a postgres MAC Address. + + + + + Circle. + + + + + Convert to a postgres inet. + + + + + Convert to a postgres interval + + + + + Delegate called to convert the given backend text data to its native representation. + + + + + Delegate called to convert the given backend binary data to its native representation. + + + + + Represents a backend data type. + This class can be called upon to convert a backend field representation to a native object. + + + + + Construct a new NpgsqlTypeInfo with the given attributes and conversion handlers. + + Type OID provided by the backend server. + Type name provided by the backend server. + NpgsqlDbType + DbType + System type to convert fields of this type to. + Data conversion handler for text encoding. + Data conversion handler for binary data. + + + + Perform a data conversion from a backend representation to + a native object. + + Data sent from the backend. + fieldValueSize + Type modifier field sent from the backend. + + + + Perform a data conversion from a backend representation to + a native object. + + Data sent from the backend. + TypeSize + Type modifier field sent from the backend. + + + + Type OID provided by the backend server. + + + + + Type name provided by the backend server. + + + + + NpgsqlDbType. + + + + + NpgsqlDbType. + + + + + Provider type to convert fields of this type to. + + + + + System type to convert fields of this type to. + + + + + Reports whether a backend binary to native decoder is available for this type. + + + + + Delegate called to convert the given native data to its backand representation. + + + + + Represents a backend data type. + This class can be called upon to convert a native object to its backend field representation, + + + + + Returns an NpgsqlNativeTypeInfo for an array where the elements are of the type + described by the NpgsqlNativeTypeInfo supplied. + + + + + Construct a new NpgsqlTypeInfo with the given attributes and conversion handlers. + + Type name provided by the backend server. + DbType + Quote + NpgsqlDbType + Data conversion handler for text backend encoding. + Data conversion handler for binary backend encoding (for extended queries). + + + + Perform a data conversion from a native object to + a backend representation. + DBNull and null values are handled differently depending if a plain query is used + When + + Native .NET object to be converted. + Specifies that the value should be formatted for the extended query syntax. + Options to guide serialization. If null, a default options set is used. + Specifies that the value should be formatted as an extended query array element. + + + + Type name provided by the backend server. + + + + + NpgsqlDbType. + + + + + DbType. + + + + + Apply quoting. + + + + + Use parameter size information. + + + + + Reports whether a native to backend binary encoder is available for this type. + + + + + Provide mapping between type OID, type name, and a NpgsqlBackendTypeInfo object that represents it. + + + + + Construct an empty mapping. + + + + + Copy constuctor. + + + + + Add the given NpgsqlBackendTypeInfo to this mapping. + + + + + Add a new NpgsqlBackendTypeInfo with the given attributes and conversion handlers to this mapping. + + Type OID provided by the backend server. + Type name provided by the backend server. + NpgsqlDbType + DbType + System type to convert fields of this type to. + Data conversion handler for text encoding. + Data conversion handler for binary data. + + + + Make a shallow copy of this type mapping. + + + + + Determine if a NpgsqlBackendTypeInfo with the given backend type OID exists in this mapping. + + + + + Determine if a NpgsqlBackendTypeInfo with the given backend type name exists in this mapping. + + + + + Get the number of type infos held. + + + + + Retrieve the NpgsqlBackendTypeInfo with the given backend type OID, or null if none found. + + + + + Retrieve the NpgsqlBackendTypeInfo with the given backend type name, or null if none found. + + + + + Provide mapping between type Type, NpgsqlDbType and a NpgsqlNativeTypeInfo object that represents it. + + + + + Add the given NpgsqlNativeTypeInfo to this mapping. + + + + + Add a new NpgsqlNativeTypeInfo with the given attributes and conversion handlers to this mapping. + + Type name provided by the backend server. + NpgsqlDbType + DbType + Quote + Data conversion handler for text backend encoding. + Data conversion handler for binary backend encoding (for extended query). + + + + Retrieve the NpgsqlNativeTypeInfo with the given NpgsqlDbType. + + + + + Retrieve the NpgsqlNativeTypeInfo with the given DbType. + + + + + Retrieve the NpgsqlNativeTypeInfo with the given Type. + + + + + Determine if a NpgsqlNativeTypeInfo with the given backend type name exists in this mapping. + + + + + Determine if a NpgsqlNativeTypeInfo with the given NpgsqlDbType exists in this mapping. + + + + + Determine if a NpgsqlNativeTypeInfo with the given Type name exists in this mapping. + + + + + Get the number of type infos held. + + + + + Represents a PostgreSQL Point type + + + + + Represents a PostgreSQL Line Segment type. + + + + + Represents a PostgreSQL Path type. + + + + + Represents a PostgreSQL Polygon type. + + + + + Represents a PostgreSQL Circle type. + + + + + Represents a PostgreSQL inet type. + + + + + Represents a PostgreSQL MacAddress type. + + + + + + + The macAddr parameter must contain a string that can only consist of numbers + and upper-case letters as hexadecimal digits. (See PhysicalAddress.Parse method on MSDN) + + + + This class contains helper methods for type conversion between + the .Net type system and postgresql. + + + + + A cache of basic datatype mappings keyed by server version. This way we don't + have to load the basic type mappings for every connection. + + + + + Find a NpgsqlNativeTypeInfo in the default types map that can handle objects + of the given NpgsqlDbType. + + + + + Find a NpgsqlNativeTypeInfo in the default types map that can handle objects + of the given NpgsqlDbType. + + + + + Find a NpgsqlNativeTypeInfo in the default types map that can handle objects + of the given DbType. + + + + + Find a NpgsqlNativeTypeInfo in the default types map that can handle objects + of the given System.Type. + + + + + This method is responsible to convert the byte[] received from the backend + to the corresponding NpgsqlType. + The given TypeInfo is called upon to do the conversion. + If no TypeInfo object is provided, no conversion is performed. + + + + + This method is responsible to convert the string received from the backend + to the corresponding NpgsqlType. + The given TypeInfo is called upon to do the conversion. + If no TypeInfo object is provided, no conversion is performed. + + + + + Create the one and only native to backend type map. + This map is used when formatting native data + types to backend representations. + + + + + This method creates (or retrieves from cache) a mapping between type and OID + of all natively supported postgresql data types. + This is needed as from one version to another, this mapping can be changed and + so we avoid hardcoding them. + + NpgsqlTypeMapping containing all known data types. The mapping must be + cloned before it is modified because it is cached; changes made by one connection may + effect another connection. + + + + + Attempt to map types by issuing a query against pg_type. + This function takes a list of NpgsqlTypeInfo and attempts to resolve the OID field + of each by querying pg_type. If the mapping is found, the type info object is + updated (OID) and added to the provided NpgsqlTypeMapping object. + + NpgsqlConnector to send query through. + Mapping object to add types too. + List of types that need to have OID's mapped. + + + + Summary description for NpgsqlQuery + + + + + For classes representing messages sent from the client to the server. + + + + + Set Cache Size. The default value is 20. + + + + + Lookup cached entity. null will returned if not match. + For both get{} and set{} apply LRU rule. + + key + + + + + The globally available text encoding used for frontend/backend communication. + + + + This class represents the base class for the state pattern design pattern + implementation. + + + This class represents the base class for the state pattern design pattern + implementation. + + + + + + This method is used by the states to change the state of the context. + + + + + Call ProcessBackendResponsesEnum(), and scan and discard all results. + + + + + This method is responsible to handle all protocol messages sent from the backend. + It holds all the logic to do it. + To exchange data, it uses a Mediator object from which it reads/writes information + to handle backend requests. + + + + + + Checks for context socket availability. + Socket.Poll supports integer as microseconds parameter. + This limits the usable command timeout value + to 2,147 seconds: (2,147 x 1,000,000 less than max_int). + In order to bypass this limit, the availability of + the socket is checked in 2,147 seconds cycles + + true, if for context socket availability was checked, false otherwise. + Context. + Select mode. + + + + Called from constructor of derived class. + + + + + Finalizer for HashAlgorithm + + + + + Computes the entire hash of all the bytes in the byte array. + + + + + When overridden in a derived class, drives the hashing function. + + + + + + + + When overridden in a derived class, this pads and hashes whatever data might be left in the buffers and then returns the hash created. + + + + + When overridden in a derived class, initializes the object to prepare for hashing. + + + + + Used for stream chaining. Computes hash as data passes through it. + + The buffer from which to grab the data to be copied. + The offset into the input buffer to start reading at. + The number of bytes to be copied. + The buffer to write the copied data to. + At what point in the outputBuffer to write the data at. + + + + Used for stream chaining. Computes hash as data passes through it. Finishes off the hash. + + The buffer from which to grab the data to be copied. + The offset into the input buffer to start reading at. + The number of bytes to be copied. + + + + Get whether or not the hash can transform multiple blocks at a time. + Note: MUST be overriden if descendant can transform multiple block + on a single call! + + + + + Gets the previously computed hash. + + + + + Returns the size in bits of the hash. + + + + + Must be overriden if not 1 + + + + + Must be overriden if not 1 + + + + + Common base class for all derived MD5 implementations. + + + + + Called from constructor of derived class. + + + + + Creates the default derived class. + + + + + C# implementation of the MD5 cryptographic hash function. + + + + + Creates a new MD5CryptoServiceProvider. + + + + + Drives the hashing function. + + Byte array containing the data to hash. + Where in the input buffer to start. + Size in bytes of the data in the buffer to hash. + + + + This finalizes the hash. Takes the data from the chaining variables and returns it. + + + + + Resets the class after use. Called automatically after hashing is done. + + + + + This is the meat of the hash function. It is what processes each block one at a time. + + Byte array to process data from. + Where in the byte array to start processing. + + + + Pads and then processes the final block. + + Buffer to grab data from. + Position in buffer in bytes to get data from. + How much data in bytes in the buffer to use. + + + + Implements for version 3 of the protocol. + + + + + Reads a row, field by field, allowing a DataRow to be built appropriately. + + + + + Marker interface which identifies a class which may take possession of a stream for the duration of + it's lifetime (possibly temporarily giving that possession to another class for part of that time. + + It inherits from IDisposable, since any such class must make sure it leaves the stream in a valid state. + + The most important such class is that compiler-generated from ProcessBackendResponsesEnum. Of course + we can't make that inherit from this interface, alas. + + + + + Marker interface which identifies a class which represents part of + a response from the server. + + + + + Reads part of a field, as needed (for + and + + + + + Adds further functionality to stream that is dependant upon the type of data read. + + + + + Completes the implementation of Streamer for char data. + + + + + Completes the implementation of Streamer for byte data. + + + + + This class represents a BackEndKeyData message received + from PostgreSQL + + + + + This class represents the Bind message sent to PostgreSQL + server. + + + + + + This class represents the CancelRequest message sent to PostgreSQL + server. + + + + + + Represents a SQL statement or function (stored procedure) to execute + against a PostgreSQL database. This class cannot be inherited. + + + Represents a SQL statement or function (stored procedure) to execute + against a PostgreSQL database. This class cannot be inherited. + + + Represents a SQL statement or function (stored procedure) to execute + against a PostgreSQL database. This class cannot be inherited. + + + + + 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. + + + + Used to execute internal commands. + + + + + Attempts to cancel the execution of a NpgsqlCommand. + + This Method isn't implemented yet. + + + + Create a new command based on this one. + + A new NpgsqlCommand object. + + + + Create a new command based on this one. + + A new NpgsqlCommand object. + + + + Creates a new instance of an DbParameter object. + + An DbParameter object. + + + + Creates a new instance of a NpgsqlParameter object. + + A NpgsqlParameter object. + + + + Releases the resources used by the NpgsqlCommand. + + + + + Internal query shortcut for use in cases where the number + of affected rows is of no interest. + + + + + Special adaptation of ExecuteBlind() that sets statement_timeout. + This exists to prevent Connector.SetBackendCommandTimeout() from calling Command.ExecuteBlind(), + which will cause an endless recursive loop. + + + Timeout in seconds. + + + + Executes a SQL statement against the connection and returns the number of rows affected. + + The number of rows affected if known; -1 otherwise. + + + + Sends the CommandText to + the Connection and builds a + NpgsqlDataReader + using one of the CommandBehavior values. + + One of the CommandBehavior values. + A NpgsqlDataReader object. + + + + Sends the CommandText to + the Connection and builds a + NpgsqlDataReader. + + A NpgsqlDataReader object. + + + + Sends the CommandText to + the Connection and builds a + NpgsqlDataReader + using one of the CommandBehavior values. + + One of the CommandBehavior values. + A NpgsqlDataReader object. + Currently the CommandBehavior parameter is ignored. + + + + This method binds the parameters from parameters collection to the bind + message. + + + + + Executes the query, and returns the first column of the first row + in the result set returned by the query. Extra columns or rows are ignored. + + The first column of the first row in the result set, + or a null reference if the result set is empty. + + + + Creates a prepared version of the command on a PostgreSQL server. + + + + + This method checks the connection state to see if the connection + is set or it is open. If one of this conditions is not met, throws + an InvalidOperationException + + + + + This method substitutes the Parameters, if exist, in the command + to their actual values. + The parameter name format is :ParameterName. + + A version of CommandText with the Parameters inserted. + + + + Process this.commandText, trimming each distinct command and substituting paramater + tokens. + + + UTF8 encoded command ready to be sent to the backend. + + + + Append a region of a source command text to an output command, performing parameter token + substitutions. + + Stream to which to append output. + Command text. + + + false if the query has multiple statements which are not allowed + + + + 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 is 20 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. + + + + DB parameter collection. + + + + + Gets the NpgsqlParameterCollection. + + The parameters of the SQL statement or function (stored procedure). The default is an empty collection. + + + + DB transaction. + + + + + Gets or sets the NpgsqlTransaction + within which the NpgsqlCommand executes. + + The NpgsqlTransaction. + The default value is a null reference. + + + + Gets or sets how command results are applied to the DataRow + when used by the Update + method of the DbDataAdapter. + + One of the UpdateRowSource values. + + + + Returns oid of inserted row. This is only updated when using executenonQuery and when command inserts just a single row. If table is created without oids, this will always be 0. + + + + + Returns whether this query will execute as a prepared (compiled) query. + + + + + Design time visible. + + + + + This class is responsible to create database commands for automatic insert, update and delete operations. + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + The adapter. + + + + + This method is reponsible to derive the command parameter list with values obtained from function definition. + It clears the Parameters collection of command. Also, if there is any parameter type which is not supported by Npgsql, an InvalidOperationException will be thrown. + Parameters name will be parameter1, parameter2, ... + + NpgsqlCommand whose function parameters will be obtained. + + + + Gets the automatically generated object required + to perform insertions at the data source. + + + The automatically generated object required to perform insertions. + + + + + Gets the automatically generated object required to perform insertions + at the data source, optionally using columns for parameter names. + + + If true, generate parameter names matching column names, if possible. + If false, generate @p1, @p2, and so on. + + + The automatically generated object required to perform insertions. + + + + + Gets the automatically generated System.Data.Common.DbCommand object required + to perform updates at the data source. + + + The automatically generated System.Data.Common.DbCommand object required to perform updates. + + + + + Gets the automatically generated object required to perform updates + at the data source, optionally using columns for parameter names. + + + If true, generate parameter names matching column names, if possible. + If false, generate @p1, @p2, and so on. + + + The automatically generated object required to perform updates. + + + + + Gets the automatically generated System.Data.Common.DbCommand object required + to perform deletions at the data source. + + + The automatically generated System.Data.Common.DbCommand object required to perform deletions. + + + + + Gets the automatically generated object required to perform deletions + at the data source, optionally using columns for parameter names. + + + If true, generate parameter names matching column names, if possible. + If false, generate @p1, @p2, and so on. + + + The automatically generated object required to perform deletions. + + + + + Applies the parameter information. + + The parameter. + The row. + Type of the statement. + if set to true [where clause]. + + + + Returns the name of the specified parameter in the format of @p#. + + The number to be included as part of the parameter's name.. + + The name of the parameter with the specified number appended as part of the parameter name. + + + + + Returns the full parameter name, given the partial parameter name. + + The partial name of the parameter. + + The full parameter name corresponding to the partial parameter name requested. + + + + + Returns the placeholder for the parameter in the associated SQL statement. + + The number to be included as part of the parameter's name. + + The name of the parameter with the specified number appended. + + + + + Registers the to handle the event for a . + + The to be used for the update. + + + + Adds an event handler for the event. + + The sender + A instance containing information about the event. + + + + Given an unquoted identifier in the correct catalog case, returns the correct quoted form of that identifier, including properly escaping any embedded quotes in the identifier. + + The original unquoted identifier. + + The quoted version of the identifier. Embedded quotes within the identifier are properly escaped. + + + + + Unquoted identifier parameter cannot be null + + + + Given a quoted identifier, returns the correct unquoted form of that identifier, including properly un-escaping any embedded quotes in the identifier. + + The identifier that will have its embedded quotes removed. + + The unquoted identifier, with embedded quotes properly un-escaped. + + + + + Quoted identifier parameter cannot be null + + + + Gets or sets the beginning character or characters to use when specifying database objects (for example, tables or columns) whose names contain characters such as spaces or reserved tokens. + + + The beginning character or characters to use. The default is an empty string. + + + + + + + + Gets or sets the ending character or characters to use when specifying database objects (for example, tables or columns) whose names contain characters such as spaces or reserved tokens. + + + The ending character or characters to use. The default is an empty string. + + + + + + + + Represents the method that handles the Notice events. + + The source of the event. + A NpgsqlNoticeEventArgs that contains the event data. + + + + Represents the method that handles the Notification events. + + The source of the event. + A NpgsqlNotificationEventArgs that contains the event data. + + + + This class represents a connection to a + PostgreSQL server. + + + + + 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. + + + + 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. + + + + + 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. + + + + + Opens a database connection with the property settings specified by the + ConnectionString. + + + + + 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. + + + + 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. + + + + + 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. + + + + + 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. + + + + Releases all resources used by the + NpgsqlConnection. + + true when called from Dispose(); + false when being called from the finalizer. + + + + Create a new connection based on this one. + + A new NpgsqlConnection object. + + + + Create a new connection based on this one. + + A new NpgsqlConnection object. + + + + Returns a copy of the NpgsqlConnectionStringBuilder that contains the parsed connection string values. + + + + + Default SSL CertificateSelectionCallback implementation. + + + + + Default SSL CertificateValidationCallback implementation. + + + + + Default SSL PrivateKeySelectionCallback implementation. + + + + + Default SSL ProvideClientCertificatesCallback implementation. + + + + + Default SSL ValidateRemoteCertificateCallback implementation. + + + + + Write each key/value pair in the connection string to the log. + + + + + Sets the `settings` ConnectionStringBuilder based on the given `connectionString` + + The connection string to load the builder from + + + + Sets the `settings` ConnectionStringBuilder based on the given `connectionString` + + The connection string to load the builder from + + + + Refresh the cached _connectionString whenever the builder settings change + + + + + Returns the supported collections + + + + + 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. + + + + Clear connection pool. + + + + + Clear all connection pools. + + + + + Enlist transation. + + + + + + Occurs on NoticeResponses from the PostgreSQL backend. + + + + + Occurs on NotificationResponses from the PostgreSQL backend. + + + + + Called to provide client certificates for SSL handshake. + + + + + Mono.Security.Protocol.Tls.CertificateSelectionCallback delegate. + + + + + Mono.Security.Protocol.Tls.CertificateValidationCallback delegate. + + + + + Mono.Security.Protocol.Tls.PrivateKeySelectionCallback delegate. + + + + + Called to validate server's certificate during SSL handshake + + + + + 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). + + + + + Gets or sets the string used to connect to a PostgreSQL database. + Valid values are: +
    +
  • + Server: Address/Name of Postgresql Server; +
  • +
  • + Port: Port to connect to; +
  • +
  • + Protocol: Protocol version to use, instead of automatic; Integer 2 or 3; +
  • +
  • + Database: Database name. Defaults to user name if not specified; +
  • +
  • + User Id: User name; +
  • +
  • + Password: Password for clear text authentication; +
  • +
  • + SSL: True or False. Controls whether to attempt a secure connection. Default = False; +
  • +
  • + Pooling: True or False. Controls whether connection pooling is used. Default = True; +
  • +
  • + MinPoolSize: Min size of connection pool; +
  • +
  • + MaxPoolSize: Max size of connection pool; +
  • +
  • + Timeout: Time to wait for connection open in seconds. Default is 15. +
  • +
  • + CommandTimeout: Time to wait for command to finish execution before throw an exception. In seconds. Default is 20. +
  • +
  • + Sslmode: Mode for ssl connection control. Can be Prefer, Require, Allow or Disable. Default is Disable. Check user manual for explanation of values. +
  • +
  • + ConnectionLifeTime: Time to wait before closing unused connections in the pool in seconds. Default is 15. +
  • +
  • + SyncNotification: Specifies if Npgsql should use synchronous notifications. +
  • +
  • + SearchPath: Changes search path to specified and public schemas. +
  • +
+
+ 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 SSL. + + + + + 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 time to wait before closing unused connections in the pool if the count + of all connections exeeds MinPoolSize. + + + If connection pool contains unused connections for ConnectionLifeTime seconds, + the half of them will be closed. If there will be unused connections in a second + later then again the half of them will be closed and so on. + This strategy provide smooth change of connection count in the pool. + + The time (in seconds) to wait. The default value is 15 seconds. + + + + Gets 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. + + + + Whether datareaders are loaded in their entirety (for compatibility with earlier code). + + + + + Gets the database server name. + + + + + Gets flag indicating if we are using Synchronous notification or not. + The default value is false. + + + + + 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 or ConnectionState.Closed + + + + Compatibility version. + + + + + Version of the PostgreSQL backend. + This can only be called when there is an active connection. + + + + + PostgreSQL server version. + + + + + Protocol version in use. + This can only be called when there is an active connection. + Always retuna Version3 + + + + + Whether the backend is an AWS Redshift instance + + + + + 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). + + + + + Report whether the backend understands the hex byte format (>= 9.0). + + + + + The connector object connected to the backend. + + + + + Gets the NpgsqlConnectionStringBuilder containing the parsed connection string values. + + + + + User name. + + + + + Use extended types. + + + + + Password. + + + + + Determine if connection pooling will be used for this connection. + + + + + DB provider factory. + + + + + Return an exact copy of this NpgsqlConnectionString. + + + + + No integrated security if we're on mono and .NET 4.5 because of ClaimsIdentity, + see https://github.com/npgsql/Npgsql/issues/133 + + + + + This function will set value for known key, both private member and base[key]. + + + + + value, coerced as needed to the stored type. + + + + The function will modify private member only, not base[key]. + + + + value, coerced as needed to the stored type. + + + + The function will access private member only, not base[key]. + + + value. + + + + Clear the member and assign them to the default value. + + + + + Gets or sets the backend server host name. + + + + + Gets or sets the backend server port. + + + + + Gets or sets the name of the database to be used after a connection is opened. + + The name of the database to be + used after a connection is opened. + + + + Gets or sets the login user name. + + + + + Gets or sets the login password as a UTF8 encoded byte array. + + + + + Sets the login password as a string. + + + + + Gets or sets the krbsrvname. + + + + + Gets or sets a value indicating whether to attempt to use SSL. + + + + + Gets or sets a value indicating whether to attempt to use SSL. + + + + + Gets or sets the time to wait while trying to establish a connection + before terminating the attempt and generating an error. + + The time (in seconds) to wait for a connection to open. The default value is 15 seconds. + + + + Gets or sets the schema search path. + + + + + Gets or sets a value indicating whether connection pooling should be used. + + + + + Gets or sets the time to wait before closing unused connections in the pool if the count + of all connections exeeds MinPoolSize. + + + If connection pool contains unused connections for ConnectionLifeTime seconds, + the half of them will be closed. If there will be unused connections in a second + later then again the half of them will be closed and so on. + This strategy provide smooth change of connection count in the pool. + + The time (in seconds) to wait. The default value is 15 seconds. + + + + Gets or sets the minimum connection pool size. + + + + + Gets or sets the maximum connection pool size. + + + + + Gets or sets a value indicating whether to listen for notifications and report them between command activity. + + + + + Gets the time to wait while trying to execute a command + before terminating the attempt and generating an error. + + The time (in seconds) to wait for a command to complete. The default value is 20 seconds. + + + + Gets or sets a value indicating whether datareaders are loaded in their entirety (for compatibility with earlier code). + + + + + Compatibilty version. When possible, behaviour caused by breaking changes will be preserved + if this version is less than that where the breaking change was introduced. + + + + + Gets or sets the ootional application name parameter to be sent to the backend during connection initiation. + + + + + Gets or sets a value indicating whether to silently Prepare() all commands before execution. + + + + + Gets or sets the specified backend communication protocol version. + + + + + Gets the backend encoding. Always returns "UTF8". + + + + + Case insensative accessor for indivual connection string values. + + + + + Set both ImplicitDefault and ExplicitDefault to the 's default value. + + + + + + + + Set ImplicitDefault to the default value of 's type, + and ExplicitDefault to . + + + + + + + + Represents the method that allows the application to provide a certificate collection to be used for SSL clien authentication + + A X509CertificateCollection to be filled with one or more client certificates. + + + + Represents the method that is called to validate the certificate provided by the server during an SSL handshake + + The server's certificate + The certificate chain containing the certificate's CA and any intermediate authorities + Any errors that were detected + + + + !!! Helper class, for compilation only. + Connector implements the logic for the Connection Objects to + access the physical connection to the database, and isolate + the application developer from connection pooling internals. + + + + + Whether the backend is an AWS Redshift instance + + + + + Constructor. + + Connection string. + Pooled + Controls whether the connector can be shared. + + + + This method checks if the connector is still ok. + We try to send a simple query text, select 1 as ConnectionTest; + + + + + This method is responsible for releasing all resources associated with this Connector. + + + + + This method is responsible to release all portals used by this Connector. + + + + + Modify the backend statement_timeout value if needed. + + New timeout + + + + Default SSL CertificateSelectionCallback implementation. + + + + + Default SSL CertificateValidationCallback implementation. + + + + + Default SSL PrivateKeySelectionCallback implementation. + + + + + Default SSL ProvideClientCertificatesCallback implementation. + + + + + Default SSL ValidateRemoteCertificateCallback implementation. + + + + + This method is required to set all the version dependent features flags. + SupportsPrepare means the server can use prepared query plans (7.3+) + + + + + Opens the physical connection to the server. + + Usually called by the RequestConnector + Method of the connection pool manager. + + + + Closes the physical connection to the server. + + + + + Returns next portal index. + + + + + Returns next plan index. + + + + + Occurs on NoticeResponses from the PostgreSQL backend. + + + + + Occurs on NotificationResponses from the PostgreSQL backend. + + + + + Called to provide client certificates for SSL handshake. + + + + + Mono.Security.Protocol.Tls.CertificateSelectionCallback delegate. + + + + + Mono.Security.Protocol.Tls.CertificateValidationCallback delegate. + + + + + Mono.Security.Protocol.Tls.PrivateKeySelectionCallback delegate. + + + + + Called to validate server's certificate during SSL handshake + + + + + Gets the current state of the connection. + + + + + Return Connection String. + + + + + Version of backend server this connector is connected to. + + + + + Whether the backend is an AWS Redshift instance + + + + + The physical connection socket to the backend. + + + + + The physical connection stream to the backend. + + + + + The top level stream to the backend. + + + + + Reports if this connector is fully connected. + + + + + The connection mediator. + + + + + Report if the connection is in a transaction. + + + + + Options that control certain aspects of native to backend conversions that depend + on backend version and status. + + + + + This class manages all connector objects, pooled AND non-pooled. + + + + Unique static instance of the connector pool + mamager. + + + Map of index to unused pooled connectors, avaliable to the + next RequestConnector() call. + This hashmap will be indexed by connection string. + This key will hold a list of queues of pooled connectors available to be used. + + + Timer for tracking unused connections in pools. + + + + Searches the shared and pooled connector lists for a + matching connector object or creates a new one. + + The NpgsqlConnection that is requesting + the connector. Its ConnectionString will be used to search the + pool for available connectors. + A connector object. + + + + Find a pooled connector. Handle shared/non-shared here. + + + + + Releases a connector, possibly back to the pool for future use. + + + Pooled connectors will be put back into the pool if there is room. + Shared connectors should just have their use count decremented + since they always stay in the shared pool. + + Connection to which the connector is leased. + The connector to release. + + + + Release a pooled connector. Handle shared/non-shared here. + + + + + Find an available pooled connector in the non-shared pool, or create + a new one if none found. + + + + + Put a pooled connector into the pool queue. + + Connection is leased to. + Connector to pool + + + + A queue with an extra Int32 for keeping track of busy connections. + + + + + Connections available to the end user + + + + + Connections currently in use + + + + + Represents information about COPY operation data transfer format as returned by server. + + + + + Only created when a CopyInResponse or CopyOutResponse is received by NpgsqlState.ProcessBackendResponses() + + + + + Returns true if this operation is currently active and field at given location is in binary format. + + + + + Returns true if this operation is currently active and in binary format. + + + + + Returns number of fields if this operation is currently active, otherwise -1 + + + + + Represents a PostgreSQL COPY FROM STDIN operation with a corresponding SQL statement + to execute against a PostgreSQL database + and an associated stream used to read data from (if provided by user) + or for writing it (when generated by driver). + Eg. new NpgsqlCopyIn("COPY mytable FROM STDIN", connection, streamToRead).Start(); + + + + + Creates NpgsqlCommand to run given query upon Start(). Data for the requested COPY IN operation can then be written to CopyData stream followed by a call to End() or Cancel(). + + + + + Given command is run upon Start(). Data for the requested COPY IN operation can then be written to CopyData stream followed by a call to End() or Cancel(). + + + + + Given command is executed upon Start() and all data from fromStream is passed to it as copy data. + + + + + Returns true if this operation is currently active and field at given location is in binary format. + + + + + Command specified upon creation is executed as a non-query. + If CopyStream is set upon creation, it will be flushed to server as copy data, and operation will be finished immediately. + Otherwise the CopyStream member can be used for writing copy data to server and operation finished with a call to End() or Cancel(). + + + + + Called after writing all data to CopyStream to successfully complete this copy operation. + + + + + Withdraws an already started copy operation. The operation will fail with given error message. + Will do nothing if current operation is not active. + + + + + Returns true if the connection is currently reserved for this operation. + + + + + The stream provided by user or generated upon Start(). + User may provide a stream to constructor; it is used to pass to server all data read from it. + Otherwise, call to Start() sets this to a writable NpgsqlCopyInStream that passes all data written to it to server. + In latter case this is only available while the copy operation is active and null otherwise. + + + + + Returns true if this operation is currently active and in binary format. + + + + + Returns number of fields expected on each input row if this operation is currently active, otherwise -1 + + + + + The Command used to execute this copy operation. + + + + + Set before a COPY IN query to define size of internal buffer for reading from given CopyStream. + + + + + Represents an ongoing COPY FROM STDIN operation. + Provides methods to push data to server and end or cancel the operation. + + + + + Called from NpgsqlState.ProcessBackendResponses upon CopyInResponse. + If CopyStream is already set, it is used to read data to push to server, after which the copy is completed. + Otherwise CopyStream is set to a writable NpgsqlCopyInStream that calls SendCopyData each time it is written to. + + + + + Sends given packet to server as a CopyData message. + Does not check for notifications! Use another thread for that. + + + + + Sends CopyDone message to server. Handles responses, ie. may throw an exception. + + + + + Sends CopyFail message to server. Handles responses, ie. should always throw an exception: + in CopyIn state the server responds to CopyFail with an error response; + outside of a CopyIn state the server responds to CopyFail with an error response; + without network connection or whatever, there's going to eventually be a failure, timeout or user intervention. + + + + + Copy format information returned from server. + + + + + Stream for writing data to a table on a PostgreSQL version 7.4 or newer database during an active COPY FROM STDIN operation. + Passes data exactly as is and when given, so see to it that you use server encoding, correct format and reasonably sized writes! + + + + + Created only by NpgsqlCopyInState.StartCopy() + + + + + Successfully completes copying data to server. Returns after operation is finished. + Does nothing if this stream is not the active copy operation writer. + + + + + Withdraws an already started copy operation. The operation will fail with given error message. + Does nothing if this stream is not the active copy operation writer. + + + + + Writes given bytes to server. + Fails if this stream is not the active copy operation writer. + + + + + Flushes stream contents to server. + Fails if this stream is not the active copy operation writer. + + + + + Not readable + + + + + Not seekable + + + + + Not supported + + + + + True while this stream can be used to write copy data to server + + + + + False + + + + + True + + + + + False + + + + + Number of bytes written so far + + + + + Number of bytes written so far; not settable + + + + + Represents a PostgreSQL COPY TO STDOUT operation with a corresponding SQL statement + to execute against a PostgreSQL database + and an associated stream used to write results to (if provided by user) + or for reading the results (when generated by driver). + Eg. new NpgsqlCopyOut("COPY (SELECT * FROM mytable) TO STDOUT", connection, streamToWrite).Start(); + + + + + Creates NpgsqlCommand to run given query upon Start(), after which CopyStream provides data from database as requested in the query. + + + + + Given command is run upon Start(), after which CopyStream provides data from database as requested in the query. + + + + + Given command is executed upon Start() and all requested copy data is written to toStream immediately. + + + + + Returns true if this operation is currently active and field at given location is in binary format. + + + + + Command specified upon creation is executed as a non-query. + If CopyStream is set upon creation, all copy data from server will be written to it, and operation will be finished immediately. + Otherwise the CopyStream member can be used for reading copy data from server until no more data is available. + + + + + Flush generated CopyStream at once. Effectively reads and discard all the rest of copy data from server. + + + + + Returns true if the connection is currently reserved for this operation. + + + + + The stream provided by user or generated upon Start() + + + + + The Command used to execute this copy operation. + + + + + Returns true if this operation is currently active and in binary format. + + + + + Returns number of fields if this operation is currently active, otherwise -1 + + + + + Faster alternative to using the generated CopyStream. + + + + + Represents an ongoing COPY TO STDOUT operation. + Provides methods to read data from server or end the operation. + + + + + Called from NpgsqlState.ProcessBackendResponses upon CopyOutResponse. + If CopyStream is already set, it is used to write data received from server, after which the copy ends. + Otherwise CopyStream is set to a readable NpgsqlCopyOutStream that receives data from server. + + + + + Called from NpgsqlOutStream.Read to read copy data from server. + + + + + Copy format information returned from server. + + + + + Stream for reading data from a table or select on a PostgreSQL version 7.4 or newer database during an active COPY TO STDOUT operation. + Passes data exactly as provided by the server. + + + + + Created only by NpgsqlCopyOutState.StartCopy() + + + + + Discards copy data as long as server pushes it. Returns after operation is finished. + Does nothing if this stream is not the active copy operation reader. + + + + + Not writable. + + + + + Not flushable. + + + + + Copies data read from server to given byte buffer. + Since server returns data row by row, length will differ each time, but it is only zero once the operation ends. + Can be mixed with calls to the more efficient NpgsqlCopyOutStream.Read() : byte[] though that would not make much sense. + + + + + Not seekable + + + + + Not supported + + + + + Returns a whole row of data from server without extra work. + If standard Stream.Read(...) has been called before, it's internal buffers remains are returned. + + + + + True while this stream can be used to read copy data from server + + + + + True + + + + + False + + + + + False + + + + + Number of bytes read so far + + + + + Number of bytes read so far; can not be set. + + + + + Writes given objects into a stream for PostgreSQL COPY in default copy format (not CSV or BINARY). + + + + + Default delimiter. + + + + + Default separator. + + + + + Default null. + + + + + Default escape. + + + + + Default quote. + + + + + Default buffer size. + + + + + Constructor. + + + + + + Flush buffers. + + + + + Flush rows. + + + + + Flush fields. + + + + + Close the serializer. + + + + + Escape sequence for the given character. + + + + + + + Make room for bytes. + + + + + + Add bytes. + + + + + + End row. + + + + + Prefix field. + + + + + Field added. + + + + + Add null. + + + + + Add string. + + + + + + add Int32. + + + + + + Add Int64. + + + + + + Add number. + + + + + + Add bool + + + + + + Add DateTime. + + + + + + Report whether the serializer is active. + + + + + To Stream. + + + + + Delimiter. + + + + + Separator. + + + + + Escape. + + + + + Null. + + + + + Buffer size. + + + + + Report whether space remains in the buffer. + + + + + Strings to escape. + + + + + Escape sequence bytes. + + + + + 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. + + + + + Default constructor. + + + + + Constructor. + + + + + + Constructor. + + + + + + + Constructor. + + + + + + + Create row updated event. + + + + + + + + + + Create row updating event. + + + + + + + + + + Raise the RowUpdated event. + + + + + + Raise the RowUpdating event. + + + + + + Row updated event. + + + + + Row updating event. + + + + + Delete command. + + + + + Select command. + + + + + Update command. + + + + + Insert command. + + + + + Provides a means of reading a forward-only stream of rows from a PostgreSQL backend. This class cannot be inherited. + + + + + Return the data type name of the column at index . + + + + + Return the data type of the column at index . + + + + + Return the Npgsql specific data type of the column at requested ordinal. + + column position + Appropriate Npgsql type for column. + + + + Return the column name of the column at index . + + + + + Return the data type OID of the column at index . + + FIXME: Why this method returns String? + + + + Has ordinal. + + + + + + + Return the column name of the column named . + + + + + Return the data DbType of the column at index . + + + + + Return the data NpgsqlDbType of the column at index . + + + + + Get specified field value. + /// + + + + + + Get the value of a column as a . + If the differences between and + in handling of days and months is not important to your application, use + instead. + + Index of the field to find. + value of the field. + + + + Get specified field value. + /// + + + + + + Get specified field value. + /// + + + + + + Get specified field value. + /// + + + + + + Get specified field value. + /// + + + + + + Get specified field value. + /// + + + + + + Send closed event. + + + + + Gets the value of a column converted to a Guid. + + + + + Gets the value of a column as Int16. + + + + + Gets the value of a column as Int32. + + + + + Gets the value of a column as Int64. + + + + + Gets the value of a column as Single. + + + + + Gets the value of a column as Double. + + + + + Gets the value of a column as String. + + + + + Gets the value of a column as Decimal. + + + + + Gets the value of a column as TimeSpan. + + + + + Copy values from each column in the current row into . + + Destination for column values. + The number of column values copied. + + + + Copy values from each column in the current row into . + + An array appropriately sized to store values from all columns. + The number of column values copied. + + + + Gets the value of a column as Boolean. + + + + + Gets the value of a column as Byte. + + + + + Gets the value of a column as Char. + + + + + Gets the value of a column as DateTime. + + + + + Returns a System.Data.DataTable that describes the column metadata of the DataReader. + + + + + This methods parses the command text and tries to get the tablename + from it. + + + + + Get enumerator. + + + + + + Is raised whenever Close() is called. + + + + + Gets the number of columns in the current row. + + + + + Gets the value of a column in its native format. + + + + + Gets the value of a column in its native format. + + + + + 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. + + + + + Contains the column names as the keys + + + + + Contains all unique columns + + + + + This is the primary implementation of NpgsqlDataReader. It is the one used in normal cases (where the + preload-reader option is not set in the connection string to resolve some potential backwards-compatibility + issues), the only implementation used internally, and in cases where CachingDataReader is used, it is still + used to do the actual "leg-work" of turning a response stream from the server into a datareader-style + object - with CachingDataReader then filling it's cache from here. + + + + + Iterate through the objects returned through from the server. + If it's a CompletedResponse the rowsaffected count is updated appropriately, + and we iterate again, otherwise we return it (perhaps updating our cache of pending + rows if appropriate). + + The next we will deal with. + + + + Advances the data reader to the next result, when multiple result sets were returned by the PostgreSQL backend. + + True if the reader was advanced, otherwise false. + + + + Releases the resources used by the NpgsqlCommand. + + + + + Closes the data reader object. + + + + + Advances the data reader to the next result, when multiple result sets were returned by the PostgreSQL backend. + + True if the reader was advanced, otherwise false. + + + + Advances the data reader to the next row. + + True if the reader was advanced, otherwise false. + + + + Return the value of the column at index . + + + + + Gets raw data from a column. + + + + + Gets raw data from a column. + + + + + Report whether the value in a column is DBNull. + + + + + Gets the number of rows changed, inserted, or deleted by execution of the SQL statement. + + + + + Indicates if NpgsqlDatareader has rows to be read. + + + + + Provides an implementation of NpgsqlDataReader in which all data is pre-loaded into memory. + This operates by first creating a ForwardsOnlyDataReader as usual, and then loading all of it's + Rows into memory. There is a general principle that when there is a trade-off between a class design that + is more efficient and/or scalable on the one hand and one that is less efficient but has more functionality + (in this case the internal-only functionality of caching results) that one can build the less efficent class + from the most efficient without significant extra loss in efficiency, but not the other way around. The relationship + between ForwardsOnlyDataReader and CachingDataReader is an example of this). + Since the interface presented to the user is still forwards-only, queues are used to + store this information, so that dequeueing as we go we give the garbage collector the best opportunity + possible to reclaim any memory that is no longer in use. + ForwardsOnlyDataReader being used to actually + obtain the information from the server means that the "leg-work" is still only done (and need only be + maintained) in one place. + This class exists to allow for certain potential backwards-compatibility issues to be resolved + with little effort on the part of affected users. It is considerably less efficient than ForwardsOnlyDataReader + and hence never used internally. + + + + + This is the base class for NpgsqlDescribeStatement and NpgsqlDescribePortal. + + + + + + This class represents the Statement Describe message sent to PostgreSQL + server. + + + + + + This class represents the Portal Describe message sent to PostgreSQL + server. + + + + + + EventArgs class to send Notice parameters, which are just NpgsqlError's in a lighter context. + + + + + Notice information. + + + + + This class represents the ErrorResponse and NoticeResponse + message sent from PostgreSQL server. + + + + + Return a string representation of this error object. + + + + + Severity code. All versions. + + + + + Error code. PostgreSQL 7.4 and up. + + + + + Terse error message. All versions. + + + + + Detailed error message. PostgreSQL 7.4 and up. + + + + + Suggestion to help resolve the error. PostgreSQL 7.4 and up. + + + + + Position (one based) within the query string where the error was encounterd. PostgreSQL 7.4 and up. + + + + + Position (one based) within the query string where the error was encounterd. This position refers to an internal command executed for example inside a PL/pgSQL function. PostgreSQL 7.4 and up. + + + + + Internal query string where the error was encounterd. This position refers to an internal command executed for example inside a PL/pgSQL function. PostgreSQL 7.4 and up. + + + + + Trace back information. PostgreSQL 7.4 and up. + + + + + Source file (in backend) reporting the error. PostgreSQL 7.4 and up. + + + + + Source file line number (in backend) reporting the error. PostgreSQL 7.4 and up. + + + + + Source routine (in backend) reporting the error. PostgreSQL 7.4 and up. + + + + + Schema name which relates to the error. PostgreSQL 9.3 and up. + + + + + Table name which relates to the error. PostgreSQL 9.3 and up. + + + + + Column name which relates to the error. PostgreSQL 9.3 and up. + + + + + Data type of column which relates to the error. PostgreSQL 9.3 and up. + + + + + Constraint name which relates to the error. PostgreSQL 9.3 and up. + + + + + String containing the sql sent which produced this error. + + + + + Backend protocol version in use. + + + + + Error and notice message field codes + + + + + Severity: the field contents are ERROR, FATAL, or PANIC (in an error message), + or WARNING, NOTICE, DEBUG, INFO, or LOG (in a notice message), or a localized + translation of one of these. Always present. + + + + + Code: the SQLSTATE code for the error (see Appendix A). Not localizable. Always present. + + + + + Message: the primary human-readable error message. This should be accurate + but terse (typically one line). Always present. + + + + + Detail: an optional secondary error message carrying more detail about the problem. + Might run to multiple lines. + + + + + Hint: an optional suggestion what to do about the problem. This is intended to differ + from Detail in that it offers advice (potentially inappropriate) rather than hard facts. + Might run to multiple lines. + + + + + Position: the field value is a decimal ASCII integer, indicating an error cursor + position as an index into the original query string. The first character has index 1, + and positions are measured in characters not bytes. + + + + + Internal position: this is defined the same as the P field, but it is used when the + cursor position refers to an internally generated command rather than the one submitted + by the client. + The q field will always appear when this field appears. + + + + + Internal query: the text of a failed internally-generated command. + This could be, for example, a SQL query issued by a PL/pgSQL function. + + + + + Where: an indication of the context in which the error occurred. + Presently this includes a call stack traceback of active procedural language functions + and internally-generated queries. The trace is one entry per line, most recent first. + + + + + Schema name: if the error was associated with a specific database object, + the name of the schema containing that object, if any. + + + + + Table name: if the error was associated with a specific table, the name of the table. + (Refer to the schema name field for the name of the table's schema.) + + + + + Column name: if the error was associated with a specific table column, the name of the column. + (Refer to the schema and table name fields to identify the table.) + + + + + Data type name: if the error was associated with a specific data type, the name of the data type. + (Refer to the schema name field for the name of the data type's schema.) + + + + + Constraint name: if the error was associated with a specific constraint, the name of the constraint. + Refer to fields listed above for the associated table or domain. + (For this purpose, indexes are treated as constraints, even if they weren't created with constraint syntax.) + + + + + File: the file name of the source-code location where the error was reported. + + + + + Line: the line number of the source-code location where the error was reported. + + + + + Routine: the name of the source-code routine reporting the error. + + + + + The level of verbosity of the NpgsqlEventLog + + + + + Don't log at all + + + + + Only log the most common issues + + + + + Log everything + + + + + This class handles all the Npgsql event and debug logging + + + + + Writes a string to the Npgsql event log if msglevel is bigger then NpgsqlEventLog.Level + + + This method is obsolete and should no longer be used. + It is likely to be removed in future versions of Npgsql + + The message to write to the event log + The minimum LogLevel for which this message should be logged. + + + + Writes a string to the Npgsql event log if msglevel is bigger then NpgsqlEventLog.Level + + The ResourceManager to get the localized resources + The name of the resource that should be fetched by the ResourceManager + The minimum LogLevel for which this message should be logged. + The additional parameters that shall be included into the log-message (must be compatible with the string in the resource): + + + + Writes the default log-message for the action of calling the Get-part of an Indexer to the log file. + + The minimum LogLevel for which this message should be logged. + The name of the class that contains the Indexer + The parameter given to the Indexer + + + + Writes the default log-message for the action of calling the Set-part of an Indexer to the logfile. + + The minimum LogLevel for which this message should be logged. + The name of the class that contains the Indexer + The parameter given to the Indexer + The value the Indexer is set to + + + + Writes the default log-message for the action of calling the Get-part of a Property to the logfile. + + The minimum LogLevel for which this message should be logged. + The name of the class that contains the Property + The name of the Property + + + + Writes the default log-message for the action of calling the Set-part of a Property to the logfile. + + The minimum LogLevel for which this message should be logged. + The name of the class that contains the Property + The name of the Property + The value the Property is set to + + + + Writes the default log-message for the action of calling a Method without Arguments to the logfile. + + The minimum LogLevel for which this message should be logged. + The name of the class that contains the Method + The name of the Method + + + + Writes the default log-message for the action of calling a Method with one Argument to the logfile. + + The minimum LogLevel for which this message should be logged. + The name of the class that contains the Method + The name of the Method + The value of the Argument of the Method + + + + Writes the default log-message for the action of calling a Method with two Arguments to the logfile. + + The minimum LogLevel for which this message should be logged. + The name of the class that contains the Method + The name of the Method + The value of the first Argument of the Method + The value of the second Argument of the Method + + + + Writes the default log-message for the action of calling a Method with three Arguments to the logfile. + + The minimum LogLevel for which this message should be logged. + The name of the class that contains the Method + The name of the Method + The value of the first Argument of the Method + The value of the second Argument of the Method + The value of the third Argument of the Method + + + + Writes the default log-message for the action of calling a Method with more than three Arguments to the logfile. + + The minimum LogLevel for which this message should be logged. + The name of the class that contains the Method + The name of the Method + A Object-Array with zero or more Ojects that are Arguments of the Method. + + + + Sets/Returns the filename to use for logging. + + The filename of the current Log file. + + + + Sets/Returns whether Log messages should be echoed to the console + + true if Log messages are echoed to the console, otherwise false + + + + The exception that is thrown when the PostgreSQL backend reports errors. + + + + + Construct a backend error exception based on a list of one or more + backend errors. The basic Exception.Message will be built from the + first (usually the only) error in the list. + + + + + Get object data. + + + + + + + Format a .NET style exception string. + Include all errors in the list, including any hints. + + + + + Append a line to the given Stream, first checking for zero-length. + + + + + Provide access to the entire list of errors provided by the PostgreSQL backend. + + + + + Severity code. All versions. + + + + + Error code. PostgreSQL 7.4 and up. + + + + + Basic error message. All versions. + + + + + Detailed error message. PostgreSQL 7.4 and up. + + + + + Suggestion to help resolve the error. PostgreSQL 7.4 and up. + + + + + Position (one based) within the query string where the error was encounterd. PostgreSQL 7.4 and up. + + + + + Trace back information. PostgreSQL 7.4 and up. + + + + + Source file (in backend) reporting the error. PostgreSQL 7.4 and up. + + + + + Source file line number (in backend) reporting the error. PostgreSQL 7.4 and up. + + + + + Source routine (in backend) reporting the error. PostgreSQL 7.4 and up. + + + + + Schema name which relates to the error. PostgreSQL 9.3 and up. + + + + + Table name which relates to the error. PostgreSQL 9.3 and up. + + + + + Column name which relates to the error. PostgreSQL 9.3 and up. + + + + + Data type of column which relates to the error. PostgreSQL 9.3 and up. + + + + + Constraint name which relates to the error. PostgreSQL 9.3 and up. + + + + + String containing the sql sent which produced this error. + + + + + Returns the entire list of errors provided by the PostgreSQL backend. + + + + + This class represents the Execute message sent to PostgreSQL + server. + + + + + + A factory to create instances of various Npgsql objects. + + + + + Creates an NpgsqlCommand object. + + + + + This class represents the Flush message sent to PostgreSQL + server. + + + + + + For classes representing simple messages, + consisting only of a message code and length identifier, + sent from the client to the server. + + + + + This class is responsible for serving as bridge between the backend + protocol handling and the core classes. It is used as the mediator for + exchanging data generated/sent from/to backend. + + + + + + The current command timeout on the backend. This is set via "SET statement_timeout = (milliseconds)". + A value of -1 means the backend's timeout value is unknown because it has not yet been set. + + + + + EventArgs class to send Notification parameters. + + + + + Process ID of the PostgreSQL backend that sent this notification. + + + + + Condition that triggered that notification. + + + + + Additional Information From Notifiying Process (for future use, currently postgres always sets this to an empty string) + + + + + This class represents a parameter to a command that will be sent to server + + + + + Initializes a new instance of the NpgsqlParameter class. + + + + + Initializes a new instance of the NpgsqlParameter + class with the parameter m_Name and a value of the new NpgsqlParameter. + + The m_Name of the parameter to map. + An Object that is the value of the NpgsqlParameter. + +

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

+

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

+
+
+ + + Initializes a new instance of the NpgsqlParameter + class with the parameter m_Name and the data type. + + The m_Name of the parameter to map. + One of the DbType values. + + + + Initializes a new instance of the NpgsqlParameter. + + The m_Name of the parameter to map. + One of the DbType values. + + + + Initializes a new instance of the NpgsqlParameter. + + The m_Name of the parameter to map. + One of the NpgsqlDbType values. + The length of the parameter. + + + + Initializes a new instance of the NpgsqlParameter. + + The m_Name of the parameter to map. + One of the DbType values. + The length of the parameter. + + + + Initializes a new instance of the NpgsqlParameter + + The m_Name of the parameter to map. + One of the NpgsqlDbType values. + The length of the parameter. + The m_Name of the source column. + + + + Initializes a new instance of the NpgsqlParameter. + + The m_Name of the parameter to map. + One of the DbType values. + The length of the parameter. + The m_Name of the source column. + + + + Initializes a new instance of the NpgsqlParameter. + + The m_Name of the parameter to map. + One of the NpgsqlDbType values. + The length of the parameter. + The m_Name of the source column. + One of the ParameterDirection values. + true if the value of the field can be null, otherwise false. + The total number of digits to the left and right of the decimal point to which + Value is resolved. + The total number of decimal places to which + Value is resolved. + One of the DataRowVersion values. + An Object that is the value + of the NpgsqlParameter. + + + + Initializes a new instance of the NpgsqlParameter. + + The m_Name of the parameter to map. + One of the DbType values. + The length of the parameter. + The m_Name of the source column. + One of the ParameterDirection values. + true if the value of the field can be null, otherwise false. + The total number of digits to the left and right of the decimal point to which + Value is resolved. + The total number of decimal places to which + Value is resolved. + One of the DataRowVersion values. + An Object that is the value + of the NpgsqlParameter. + + + + Reset DBType. + + + + + Creates a new NpgsqlParameter that + is a copy of the current instance. + + A new NpgsqlParameter that is a copy of this instance. + + + + The collection to which this parameter belongs, if any. + + + + + Gets or sets the maximum number of digits used to represent the + 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. + + + + Whether to use an explicit cast when included in a query. + + + + + 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 String. + + + + Gets or sets the DbType of the parameter. + + One of the DbType values. The default is String. + + + + Gets or sets a value indicating whether the parameter is input-only, + output-only, bidirectional, or a stored procedure return value parameter. + + One of the ParameterDirection + values. The default is Input. + + + + Gets or sets a value indicating whether the parameter accepts null values. + + true if null values are accepted; otherwise, false. The default is false. + + + + Gets or sets the m_Name of the NpgsqlParameter. + + The m_Name of the NpgsqlParameter. + The default is an empty string. + + + + The m_Name scrubbed of any optional marker + + + + + Gets or sets the m_Name of the source column that is mapped to the + DataSet and used for loading or + returning the Value. + + The m_Name of the source column that is mapped to the + DataSet. The default is an empty string. + + + + Gets or sets the DataRowVersion + to use when loading Value. + + One of the DataRowVersion values. + The default is Current. + + + + 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. + + + + Source column mapping. + + + + + 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. + + + + + Adds the specified NpgsqlParameter object to the NpgsqlParameterCollection. + + The NpgsqlParameter to add to the collection. + The index of the new NpgsqlParameter object. + + + + Obsolete. Use AddWithValue instead. + + + Use caution when using this overload of the + Add method to specify integer parameter values. + Because this overload takes a value of type Object, + you must convert the integral value to an Object + type when the value is zero, as the following C# example demonstrates. + parameters.Add(":pname", Convert.ToInt32(0)); + If you do not perform this conversion, the compiler will assume you + are attempting to call the NpgsqlParameterCollection.Add(string, DbType) overload. + + + + + Adds a NpgsqlParameter to the NpgsqlParameterCollection given the specified parameter name and value. + + The name of the NpgsqlParameter. + The Value of the NpgsqlParameter to add to the collection. + The paramater that was added. + + + + Adds a NpgsqlParameter to the NpgsqlParameterCollection given the specified parameter name and value. + + The name of the NpgsqlParameter. + The Value of the NpgsqlParameter to add to the collection. + One of the NpgsqlDbType values. + The paramater that was added. + + + + Adds a NpgsqlParameter to the NpgsqlParameterCollection given the specified parameter name and value. + + The name of the NpgsqlParameter. + The Value of the NpgsqlParameter to add to the collection. + One of the NpgsqlDbType values. + The length of the column. + The paramater that was added. + + + + Adds a NpgsqlParameter to the NpgsqlParameterCollection given the specified parameter name and value. + + The name of the NpgsqlParameter. + The Value of the NpgsqlParameter to add to the collection. + One of the NpgsqlDbType values. + The length of the column. + The name of the source column. + The paramater that was added. + + + + Adds a NpgsqlParameter to the NpgsqlParameterCollection given the parameter name and the data type. + + 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. + + + + 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. + + + + 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. + + + + + + + In methods taking an object as argument this method is used to verify + that the argument has the type NpgsqlParameter + + The object to verify + + + + 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[] + + + + 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. + + + + Report whether the collection is read only. Always false. + + + + + 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. + + + + Sync root. + + + + + This class represents the ParameterStatus message sent from PostgreSQL + server. + + + + + + This class represents the Parse message sent to PostgreSQL + server. + + + + + + This class represents a PasswordPacket message sent to backend + PostgreSQL. + + + + + Used when a connection is closed + + + + + This is the abstract base class for NpgsqlAsciiRow and NpgsqlBinaryRow. + + + + + The index of the current field in the stream, i.e. the one that hasn't + been read yet + + + + + This class represents a RowDescription message sent from + the PostgreSQL. + + + + + + This struct represents the internal data of the RowDescription message. + + + + + 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. + + + + This class represents a StartupPacket message of PostgreSQL + protocol. + + + + + + Represents a completed response message. + + + + + This class represents the Sync message sent to PostgreSQL + server. + + + + + + Represents a transaction to be made in a PostgreSQL database. This class cannot be inherited. + + + + + Dispose. + + + + + + Commits the database transaction. + + + + + Rolls back a transaction from a pending state. + + + + + Rolls back a transaction from a pending savepoint state. + + + + + Creates a transaction save point. + + + + + Cancel the transaction without telling the backend about it. This is + used to make the transaction go away when closing a connection. + + + + + Gets the NpgsqlConnection + object associated with the transaction, or a null reference if the + transaction is no longer valid. + + The NpgsqlConnection + object associated with the transaction. + + + + DB connection. + + + + + Specifies the IsolationLevel for this transaction. + + The IsolationLevel for this transaction. + The default is ReadCommitted. + + + + This class provides many util methods to handle + reading and writing of PostgreSQL protocol messages. + + + + + This method takes a ProtocolVersion and returns an integer + version number that the Postgres backend will recognize in a + startup packet. + + + + + This method takes a version string as returned by SELECT VERSION() and returns + a valid version string ("7.2.2" for example). + This is only needed when running protocol version 2. + This does not do any validity checks. + + + + + This method gets a C NULL terminated string from the network stream. + It keeps reading a byte in each time until a NULL byte is returned. + It returns the resultant string of bytes read. + This string is sent from backend. + + + + + Reads requested number of bytes from stream with retries until Stream.Read returns 0 or count is reached. + + Stream to read + byte buffer to fill + starting position to fill the buffer + number of bytes to read + The number of bytes read. May be less than count if no more bytes are available. + + + + Reads requested number of bytes from . If output matches exactly, and == false, is returned directly. + + Source array. + Starting position to read from + Number of bytes to read + Force a copy, even if the output is an exact copy of . + byte[] containing data requested. + + + + This method writes a string to the network stream. + + + + + This method writes a string to the network stream. + + + + + This method writes a C NULL terminated string to the network stream. + It appends a NULL terminator to the end of the String. + + + + + This method writes a C NULL terminated string to the network stream. + It appends a NULL terminator to the end of the String. + + + + + This method writes a byte to the stream. It also enables logging of them. + + + + + This method writes a byte to the stream. It also enables logging of them. + + + + + This method writes a set of bytes to the stream. It also enables logging of them. + + + + + This method writes a set of bytes to the stream. It also enables logging of them. + + + + + This method writes a C NULL terminated string limited in length to the + backend server. + It pads the string with null bytes to the size specified. + + + + + This method writes a C NULL terminated byte[] limited in length to the + backend server. + It pads the string with null bytes to the size specified. + + + + + Write a 32-bit integer to the given stream in the correct byte order. + + + + + Read a 32-bit integer from the given stream in the correct byte order. + + + + + Read a 32-bit integer from the given array in the correct byte order. + + + + + Write a 16-bit integer to the given stream in the correct byte order. + + + + + Read a 16-bit integer from the given stream in the correct byte order. + + + + + Read a 16-bit integer from the given array in the correct byte order. + + + + + Copy and possibly reverse a byte array, depending on host architecture endienness. + + Source byte array. + Force a copy even if no swap is performed. + , reversed if on a little-endian architecture, copied if required. + + + + Copy and possibly reverse a byte array, depending on host architecture endienness. + + Source byte array. + Starting offset in source array. + Number of bytes to copy. + Force a copy even if no swap is performed. + , reversed if on a little-endian architecture, copied if required. + + + + Represent the frontend/backend protocol version. + + + + + Represent the backend server version. + As this class offers no functionality beyond that offered by it has been + deprecated in favour of that class. + + + + + + Returns the string representation of this version in three place dot notation (Major.Minor.Patch). + + + + + Server version major number. + + + + + Server version minor number. + + + + + Server version patch level number. + + + + + A class to handle everything associated with SSPI authentication + + + + + Simplified SecBufferDesc struct with only one SecBuffer + + +
+
diff --git a/src/Frapid.Web/Areas/Frapid.Config/packages/Npgsql.2.2.6/lib/net45/de/Npgsql.resources.dll b/src/Frapid.Web/Areas/Frapid.Config/packages/Npgsql.2.2.6/lib/net45/de/Npgsql.resources.dll new file mode 100644 index 00000000..978dec26 Binary files /dev/null and b/src/Frapid.Web/Areas/Frapid.Config/packages/Npgsql.2.2.6/lib/net45/de/Npgsql.resources.dll differ diff --git a/src/Frapid.Web/Areas/Frapid.Config/packages/Npgsql.2.2.6/lib/net45/es/Npgsql.resources.dll b/src/Frapid.Web/Areas/Frapid.Config/packages/Npgsql.2.2.6/lib/net45/es/Npgsql.resources.dll new file mode 100644 index 00000000..307d497e Binary files /dev/null and b/src/Frapid.Web/Areas/Frapid.Config/packages/Npgsql.2.2.6/lib/net45/es/Npgsql.resources.dll differ diff --git a/src/Frapid.Web/Areas/Frapid.Config/packages/Npgsql.2.2.6/lib/net45/fi/Npgsql.resources.dll b/src/Frapid.Web/Areas/Frapid.Config/packages/Npgsql.2.2.6/lib/net45/fi/Npgsql.resources.dll new file mode 100644 index 00000000..e11ec04e Binary files /dev/null and b/src/Frapid.Web/Areas/Frapid.Config/packages/Npgsql.2.2.6/lib/net45/fi/Npgsql.resources.dll differ diff --git a/src/Frapid.Web/Areas/Frapid.Config/packages/Npgsql.2.2.6/lib/net45/fr/Npgsql.resources.dll b/src/Frapid.Web/Areas/Frapid.Config/packages/Npgsql.2.2.6/lib/net45/fr/Npgsql.resources.dll new file mode 100644 index 00000000..f97065e0 Binary files /dev/null and b/src/Frapid.Web/Areas/Frapid.Config/packages/Npgsql.2.2.6/lib/net45/fr/Npgsql.resources.dll differ diff --git a/src/Frapid.Web/Areas/Frapid.Config/packages/Npgsql.2.2.6/lib/net45/ja/Npgsql.resources.dll b/src/Frapid.Web/Areas/Frapid.Config/packages/Npgsql.2.2.6/lib/net45/ja/Npgsql.resources.dll new file mode 100644 index 00000000..b2bc366f Binary files /dev/null and b/src/Frapid.Web/Areas/Frapid.Config/packages/Npgsql.2.2.6/lib/net45/ja/Npgsql.resources.dll differ diff --git a/src/Frapid.Web/Areas/Frapid.Config/packages/Npgsql.2.2.6/lib/net45/zh-CN/Npgsql.resources.dll b/src/Frapid.Web/Areas/Frapid.Config/packages/Npgsql.2.2.6/lib/net45/zh-CN/Npgsql.resources.dll new file mode 100644 index 00000000..cd1328bc Binary files /dev/null and b/src/Frapid.Web/Areas/Frapid.Config/packages/Npgsql.2.2.6/lib/net45/zh-CN/Npgsql.resources.dll differ diff --git a/src/Frapid.Web/Areas/Frapid.Config/packages/Npgsql.3.0.3/Npgsql.3.0.3.nupkg b/src/Frapid.Web/Areas/Frapid.Config/packages/Npgsql.3.0.3/Npgsql.3.0.3.nupkg deleted file mode 100644 index 7ea4568d..00000000 Binary files a/src/Frapid.Web/Areas/Frapid.Config/packages/Npgsql.3.0.3/Npgsql.3.0.3.nupkg and /dev/null differ diff --git a/src/Frapid.Web/Areas/Frapid.Config/packages/Npgsql.3.0.3/lib/net45/Npgsql.dll b/src/Frapid.Web/Areas/Frapid.Config/packages/Npgsql.3.0.3/lib/net45/Npgsql.dll deleted file mode 100644 index 27b64271..00000000 Binary files a/src/Frapid.Web/Areas/Frapid.Config/packages/Npgsql.3.0.3/lib/net45/Npgsql.dll and /dev/null differ diff --git a/src/Frapid.Web/Areas/Frapid.Config/packages/Npgsql.3.0.3/lib/net45/Npgsql.xml b/src/Frapid.Web/Areas/Frapid.Config/packages/Npgsql.3.0.3/lib/net45/Npgsql.xml deleted file mode 100644 index eeadd648..00000000 --- a/src/Frapid.Web/Areas/Frapid.Config/packages/Npgsql.3.0.3/lib/net45/Npgsql.xml +++ /dev/null @@ -1,6175 +0,0 @@ - - - - Npgsql - - - - - 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 - - - - - 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 - - - - - 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. - - - - - 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. - - - - - 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. - - - - - 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 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 destination portal (an empty string selects the unnamed portal). - - - - - The name of the source prepared statement (an empty string selects the unnamed prepared statement). - - - - - A simple query message. - - Note that since this is only used to send some specific control messages (e.g. start transaction) - and never arbitrary-length user-provided queries, this message is treated as simple and not chunking, - and only ASCII is supported. - - - - - 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 - - - - The query string to be parsed. - - - - - The name of the destination prepared statement (an empty string selects the unnamed prepared statement). - - - - - 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. - - - - - A generic interface for logging. - - - - Used to create logger instances of the given name. - - - - Creates a new INpgsqlLogger instance of the given name. - - - - - Manages logging for Npgsql, used to set the loggging provider. - - - - - The logging provider used for logging in Npgsql. - - - - - 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 NpgsqlException 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. - - - - 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. - - - - - 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 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. - - - - - 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. - - - - - 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. - - - - - 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. - - - - - - - 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. - - - - - 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 - - - - 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-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 line 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 polygon 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 line segment type. - - - 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 - - - - - The text handler to which we delegate encoding/decoding of the actual strings - - - - - 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). - - - - - 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-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 - - - - - Type handler for the Postgresql "char" type, used only internally - - - http://www.postgresql.org/docs/current/static/datatype-character.html - - - - - 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 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 type of the elements contained within this array - - - - - - The provider-specific type of the elements contained within this array, - - - - - - 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, - - - - - - http://www.postgresql.org/docs/current/static/datatype-oid.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 - - - - - 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 - - - - - http://www.postgresql.org/docs/current/static/datatype-uuid.html - - - - - http://www.postgresql.org/docs/current/static/datatype-money.html - - - - - http://www.postgresql.org/docs/current/static/datatype-datetime.html - - - - - 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 - - - - - 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 - - - - - 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-boolean.html - - - - - http://www.postgresql.org/docs/current/static/datatype-binary.html - - - - - 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) - - - - - 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 - - - - - 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. - - - - - Specifies the maximum number of queries we allow in a multiquery, separated by semicolons. - We limit this because of deadlocks: as we send Parse and Bind messages to the backend, the backend - replies with ParseComplete and BindComplete messages which we do not read until we finished sending - all messages. Once our buffer gets full the backend will get stuck writing, and then so will we. - - - - - 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 Update - method of the DbDataAdapter. - - 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. - - - - - 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 we send the Describe command right after the Parse and before the Bind, 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 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 - - - - 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. - - - - - 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 time to wait before closing unused connections in the pool if the count - of all connections exeeds MinPoolSize. - - - If connection pool contains unused connections for ConnectionLifeTime seconds, - the half of them will be closed. If there will be unused connections in a second - later then again the half of them will be closed and so on. - This strategy provide smooth change of connection count in the pool. - - The time (in seconds) to wait. The default value is 15 seconds. - - - - Gets 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 database server name. - - - - - Gets flag indicating if we are using Synchronous notification or not. - The default value is false. - - - - - Whether to use Windows integrated security to log in. - - - - - User name. - - - - - Determine if connection pooling will be used for this connection. - - - - - 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. - - - - - 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). - - - - - Report whether the backend understands the hex byte format (>= 9.0). - - - - - 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 STDIN operation, a high-performance data export mechanism from a PostgreSQL table. - - A COPY TO STDIN 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 FROM STDIN operation, a data import mechanism to a PostgreSQL table. - It is the user's responsibility to parse the textual input according to the format specified - in . - - A COPY TO STDIN 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 or FROM), 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 FROM STDIN or COPY TO 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. - - - - - Registers an enum type for use with this connection. - - Enum labels are mapped by string. The .NET enum labels must correspond exactly to the PostgreSQL labels; - if another label is used in the database, this can be specified for each label with a EnumLabelAttribute. - 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 registration is lost. - - - To avoid registering the type for each connection, use the method. - - - A PostgreSQL type name for the corresponding enum type in the database. - If null, the .NET type's name in lowercase will be used - - The .NET enum type to be registered - - - - Registers an enum type for use with all connections created from now on. Existing connections aren't affected. - - Enum labels are mapped by string. The .NET enum labels must correspond exactly to the PostgreSQL labels; - if another label is used in the database, this can be specified for each label with a EnumLabelAttribute. - If there is a discrepancy between the .NET and database labels while an enum is read or written, - an exception will be raised. - - - To register the type for a specific connection, use the method. - - - A PostgreSQL type name for the corresponding enum type in the database. - If null, the .NET type's name in lowercase will be used - - The .NET enum type to be associated - - - - 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. - - - - 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 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. - - - - - 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. - - - - - Whether connection pooling should be used. - - - - - The minimum connection pool size. - - - - - The maximum connection pool size. - - - - - The time to wait before closing unused connections in the pool if the count - of all connections exeeds MinPoolSize. - - - If connection pool contains unused connections for ConnectionLifeTime seconds, - the half of them will be closed. If there will be unused connections in a second - later then again the half of them will be closed and so on. - This strategy provide smooth change of connection count in the pool. - - The time (in seconds) to wait. The default value is 15 seconds. - - - - 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. - - - - - Whether to have the backend enforce and - via the statement_timeout variable. Defaults to true. - - - - - 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 - - - - - Whether to process messages that arrive between command activity. - - - - - 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 https://github.com/npgsql/Npgsql/wiki/PreloadReader-Removal - - - - - Obsolete, see https://github.com/npgsql/Npgsql/wiki/UseExtendedTypes-Removal - - - - - No integrated security if we're on mono and .NET 4.5 because of ClaimsIdentity, - see https://github.com/npgsql/Npgsql/issues/133 - - - - - 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. - - - - - 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. - - - - - Buffer used for reading 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 - - - - - The number of messages that were prepended and sent to the last message chain. - Note that this only tracks messages which produce a ReadyForQuery message - - - - - A chain of messages to be sent to the backend. - - - - - 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 frontend 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 statement_timeout parameter at the backend, - used to determine whether we need to change it when commands are sent. - - - 0 means means no timeout. - -1 means that the current value is unknown. - - - - - 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 non-user-triggered async action is in progress, e.g. handling of an - asynchronous notification or a connection keepalive. Does not get taken for a user async - action such as . - - - - - 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. - - - - - Number of seconds added as a margin to the backend timeout to yield the frontend timeout. - We prefer the backend to timeout - it's a clean error which doesn't break the connector. - - - - - 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. - - - - Gets the current state of the connector - - - - - Returns whether the connector is open, regardless of any task it is currently performing - - - - - Returns whether the connector is open and performing a task, i.e. not ready for a query - - - - - Opens the physical connection to the server. - - Usually called by the RequestConnector - Method of the connection pool manager. - - - - 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. - - - - - - Given a user timeout in seconds, sets the socket's ReceiveTimeout (if needed). - Note that if backend timeouts are enabled, we add a few seconds of margin to allow - the backend timeout to happen first. - - - - - Reads and processes any messages that are already in our buffers (either Npgsql or TCP). - Handles asynchronous messages (Notification, Notice, ParameterStatus) that may after a - ReadyForQuery, as well as async notification mode. - - - - - 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. - - - - - 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 - - - - - Represents the method that allows the application to provide a certificate collection to be used for SSL client authentication - - - - - Verifies the remote Secure Sockets Layer (SSL) certificate used for authentication. - - - See - - - - - Creates another connector and sends a cancel request through it for this connector. - - - - - Closes the physical connection to the server. - - - - - Called when an unexpected message has been received during an action. Breaks the - connector and returns the appropriate message. - - - - - 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 - . - - - - - This method is required to set all the version dependent features flags. - SupportsPrepare means the server can use prepared query plans (7.3+) - - - - - Whether the backend is an AWS Redshift instance - - - - - Called in various cases to indicate that the backend's statement_timeout parameter - may have changed and is currently unknown. It will be set the next time a command - is sent. - - - - - Returns next portal index. - - - - - Returns next plan index. - - - - - 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 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 - - - - - This class manages all connector objects, pooled AND non-pooled. - - - - - A queue with an extra Int32 for keeping track of busy connections. - - - - - Connections available to the end user - - - - - Connections currently in use - - - - Unique static instance of the connector pool - mamager. - - - - Maximum number of possible connections in the pool. - - - - Map of index to unused pooled connectors, avaliable to the - next RequestConnector() call. - This hashmap will be indexed by connection string. - This key will hold a list of queues of pooled connectors available to be used. - - - - Searches the pooled connector lists for a matching connector object or creates a new one. - - The NpgsqlConnection that is requesting - the connector. Its ConnectionString will be used to search the - pool for available connectors. - A connector object. - - - - Find an available pooled connector in the pool, or create a new one if none found. - - - - - Releases a connector, possibly back to the pool for future use. - - - Pooled connectors will be put back into the pool if there is room. - - Connection to which the connector is leased. - The connector to release. - - - - 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. - - - - - 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 - - - - - 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 - - - - - 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. - - - - 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. - - - - - Returns a System.Data.DataTable that describes the column metadata of the DataReader. - - - - - Contains the column names as the keys - - - - - Contains all unique columns - - - - - The exception that is thrown when the PostgreSQL backend reports errors. - Note that other errors (network issues, Npgsql client-side problems) are reported as regular - .NET exceptions. - - - 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 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. - - - - - Same as , for backwards-compatibility with Npgsql 2.x - - - - - Gets a the PostgreSQL error message and code. - - - - - 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 factory to create instances of various Npgsql objects. - - - - - Creates an NpgsqlCommand object. - - - - - 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. - - - - - 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. - - - - - Represents an arbitrary-length message capable of flushing the buffer internally as it's - writing itself out. - - - - the buffer into which to write the message. - - an option buffer that, if returned, will be written to the server directly, bypassing our - NpgsqlBuffer. This is an optimization hack for bytea. - - - 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. - - - - - Specifies the type of SQL statement, e.g. SELECT - - - - - 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. - - - - - 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 and value. - - The name of the NpgsqlParameter. - The Value of the NpgsqlParameter to add to the collection. - One of the NpgsqlDbType values. - The paramater that was added. - - - - Adds a NpgsqlParameter to the NpgsqlParameterCollection given the specified parameter name and value. - - The name of the NpgsqlParameter. - The Value of the NpgsqlParameter to add to the collection. - One of the NpgsqlDbType values. - The length of the column. - The paramater that was added. - - - - Adds a NpgsqlParameter to the NpgsqlParameterCollection given the specified parameter name and value. - - The name of the NpgsqlParameter. - The Value of the NpgsqlParameter to add to the collection. - One of the NpgsqlDbType values. - The length of the column. - The name of the source column. - The paramater that was added. - - - - Adds a NpgsqlParameter to the NpgsqlParameterCollection given the parameter name and the data type. - - 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. - - - - - - - In methods taking an object as argument this method is used to verify - that the argument has the type NpgsqlParameter - - The object to verify - - - - 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 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. - - - - 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 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. - - - - - 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. - - - - - Creates a transaction save point. - - - - - Rolls back a transaction from a pending savepoint state. - - - - - Rolls back a transaction from a pending savepoint state. - - - - - Dispose. - - - - - - This method takes a version string as returned by SELECT VERSION() and returns - a valid version string ("7.2.2" for example). - This is only needed when running protocol version 2. - This does not do any validity checks. - - - - - Write a 32-bit integer to the given stream in the correct byte order. - - - - - 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 - - - - Represent the frontend/backend protocol version. - - - - - Protocol version 3 (the current version). - - - - - A class to handle everything associated with SSPI authentication - - - - - Simplified SecBufferDesc struct with only one SecBuffer - - - - - A handler which can read small, usually fixed-length values. - - the type of the value returned by this type handler - - - - The entire data required to read the value is expected to be in the buffer. - - - - - - - - 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 which handles values of totally arbitrary length, and therefore supports chunking them. - - - - - A marking interface to allow us to know whether a given type handler has a provider-specific type - distinct from its regular type - - - - - 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 - - - - 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 - - - - - 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. - - - - 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. - - - - - Returns a string that represents the current object. - - - - - Specifies the type of a type, as represented in the PostgreSQL typtype column of the pg_type table. - See http://www.postgresql.org/docs/current/static/catalog-pg-type.html - - - - - 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. - - - - 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 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 - - - - - Indicates that the PostgreSQL enum value differs from the .NET value. - - - - - The database label that corresponds to the .NET enum value on which this attribute is placed. - - - - - Indicates that the PostgreSQL enum value differs from the .NET value. - - What label to use instead. - - - - Represents the date 1970-01-01 - - - - - Represents the date 0001-01-01 - - - - - 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 "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. - - - - - 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. - - - - - 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 - - - - - 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 - - - - - - - -
-
diff --git a/src/Frapid.Web/Areas/Frapid.Dashboard/AppInfo.json b/src/Frapid.Web/Areas/Frapid.Dashboard/AppInfo.json new file mode 100644 index 00000000..63b64a8f --- /dev/null +++ b/src/Frapid.Web/Areas/Frapid.Dashboard/AppInfo.json @@ -0,0 +1,23 @@ +{ + "ApplicationName": "Frapid.Dashboard", + "AutoInstall": true, + "Thumbnail": null, + "Publisher": "MixERP Inc.", + "Url": "http://frapid.com", + "DocumentationUrl": "http://frapid.com", + "AssemblyName": "Frapid.Dashboard", + "Version": "1.0", + "RealeasedOn": null, + "Description": "Frapid dashboard module.", + "Category": "Core Modules", + "Bundle": "Frapid Framework", + "IsMeta": false, + "DbSchema": null, + "BlankDbPath": null, + "SampleDbPath": null, + "InstallSample": false, + "My": null, + "OverrideTemplatePath": null, + "OverrideDestination": null, + "DependsOn": [] +} \ No newline at end of file diff --git a/src/Frapid.Web/Areas/Frapid.WebsiteBuilder/AppInfo.json b/src/Frapid.Web/Areas/Frapid.WebsiteBuilder/AppInfo.json new file mode 100644 index 00000000..dcbd61a1 --- /dev/null +++ b/src/Frapid.Web/Areas/Frapid.WebsiteBuilder/AppInfo.json @@ -0,0 +1,23 @@ +{ + "ApplicationName": "Frapid.WebsiteBuilder", + "AutoInstall": true, + "Thumbnail": null, + "Publisher": "MixERP Inc.", + "Url": "http://frapid.com", + "DocumentationUrl": "http://frapid.com", + "AssemblyName": "Frapid.WebsiteBuilder", + "Version": "1.0", + "RealeasedOn": null, + "Description": "Frapid webiste builder module.", + "Category": "Core Modules", + "Bundle": "Frapid Framework", + "IsMeta": false, + "DbSchema": "account", + "BlankDbPath": "~/Areas/Frapid.WebsiteBuilder/db/1.x/1.0/db-blank.sql", + "SampleDbPath": "~/Areas/Frapid.WebsiteBuilder/db/1.x/1.0/db-sample.sql", + "InstallSample": true, + "My": null, + "OverrideTemplatePath": "~/Areas/Frapid.WebsiteBuilder/Override", + "OverrideDestination":"~/Catalogs/{0}/Areas", + "DependsOn": ["Frapid.Config"] +} \ No newline at end of file diff --git a/src/Frapid.Web/Areas/Frapid.WebsiteBuilder/Configuration.cs b/src/Frapid.Web/Areas/Frapid.WebsiteBuilder/Configuration.cs new file mode 100644 index 00000000..74b6eddf --- /dev/null +++ b/src/Frapid.Web/Areas/Frapid.WebsiteBuilder/Configuration.cs @@ -0,0 +1,43 @@ +using System.Globalization; +using System.Web.Hosting; +using Frapid.ApplicationState.Cache; +using Frapid.Configuration; +using static System.String; + +namespace Frapid.WebsiteBuilder +{ + public class Configuration + { + private const string Path = "~/Catalogs/{0}/Areas/Frapid.WebsiteBuilder/"; + private const string ConfigFile = "WebsiteBuilder.config"; + private const string DefaultThemeKey = "DefaultTheme"; + + public static string GetCurrentThemePath() + { + string catalog = AppUsers.GetCatalog(); + string path = Path + "Themes/{1}/"; + string theme = GetDefaultTheme(); + + return Format(CultureInfo.InvariantCulture, path, catalog, theme); + } + + public static string GetWebsiteBuilderPath() + { + string catalog = AppUsers.GetCatalog(); + string path = HostingEnvironment.MapPath(Format(CultureInfo.InvariantCulture, Path, catalog)); + + return path != null && !System.IO.Directory.Exists(path) ? Empty : path; + } + + public static string GetDefaultTheme() + { + return Get(DefaultThemeKey); + } + + public static string Get(string key) + { + var path = GetWebsiteBuilderPath() + "/" + ConfigFile; + return ConfigurationManager.ReadConfigurationValue(path, key); + } + } +} \ No newline at end of file diff --git a/src/Frapid.Web/Areas/Frapid.WebsiteBuilder/Controllers/ContactUsController.cs b/src/Frapid.Web/Areas/Frapid.WebsiteBuilder/Controllers/ContactUsController.cs new file mode 100644 index 00000000..20de1018 --- /dev/null +++ b/src/Frapid.Web/Areas/Frapid.WebsiteBuilder/Controllers/ContactUsController.cs @@ -0,0 +1,46 @@ +using System.Collections.Generic; +using System.Net; +using System.Threading.Tasks; +using System.Web.Mvc; +using Frapid.ApplicationState.Cache; +using Frapid.WebsiteBuilder.DAL; +using Frapid.WebsiteBuilder.Entities; +using Frapid.WebsiteBuilder.ViewModels; + +namespace Frapid.WebsiteBuilder.Controllers +{ + public class ContactUsController : WebsiteBuilderController + { + private const string TokenKey = "Token"; + + [Route("contact-us")] + [AllowAnonymous] + public ActionResult Index(string alias = "") + { + ContactUs model = new ContactUs(); + IEnumerable contacts = Contacts.GetContacts(); + model.Contacts = contacts; + + Session[TokenKey] = model.Token; + + return View(GetRazorView("ContactUs/Index.cshtml"), model); + } + + [Route("contact-us")] + [AllowAnonymous] + [HttpPost] + public async Task SendEmailAsync(ContactForm model) + { + string token = Session[TokenKey].ToString(); + if (token != model.Token) + { + return new HttpStatusCodeResult(HttpStatusCode.BadRequest); + } + + model.Subject = "Contact Form : " + model.Subject; + string catalog = AppUsers.GetCatalog(); + await new Email().SendAsync(catalog, model); + return Json("OK"); + } + } +} \ No newline at end of file diff --git a/src/Frapid.Web/Areas/Frapid.WebsiteBuilder/Controllers/ContentController.cs b/src/Frapid.Web/Areas/Frapid.WebsiteBuilder/Controllers/ContentController.cs index f4e6e6c6..cacb8b92 100644 --- a/src/Frapid.Web/Areas/Frapid.WebsiteBuilder/Controllers/ContentController.cs +++ b/src/Frapid.Web/Areas/Frapid.WebsiteBuilder/Controllers/ContentController.cs @@ -16,7 +16,7 @@ public ActionResult Index(string alias = "") [Authorize] public ActionResult Manage(int contentId = 0) { - var model = DAL.Content.Get(contentId); + var model = DAL.Contents.Get(contentId); return FrapidView(GetRazorView("Content/Manage.cshtml"), model); } } diff --git a/src/Frapid.Web/Areas/Frapid.WebsiteBuilder/Controllers/IndexController.cs b/src/Frapid.Web/Areas/Frapid.WebsiteBuilder/Controllers/IndexController.cs index 024f97ad..b7dc2522 100644 --- a/src/Frapid.Web/Areas/Frapid.WebsiteBuilder/Controllers/IndexController.cs +++ b/src/Frapid.Web/Areas/Frapid.WebsiteBuilder/Controllers/IndexController.cs @@ -10,17 +10,17 @@ public class IndexController : WebsiteBuilderController [Route("site/{*alias}")] public ActionResult Index(string alias = "") { - Content content = DAL.Content.GetPublished(alias); - Mapper.CreateMap(); - Models.Content model = Mapper.Map(content); + Content content = DAL.Contents.GetPublished(alias); + Mapper.CreateMap(); + ViewModels.Content model = Mapper.Map(content); string path = GetLayoutPath(); - string layout = "Layout.cshtml"; + string layout = this.GetDefaultDocument(); if (model == null) { return View(GetRazorView("layouts/404.cshtml"), - new Models.Content {LayoutPath = path, Layout = layout}); + new ViewModels.Content {LayoutPath = path, Layout = layout}); } model.LayoutPath = path; diff --git a/src/Frapid.Web/Areas/Frapid.WebsiteBuilder/Controllers/MyTemplateController.cs b/src/Frapid.Web/Areas/Frapid.WebsiteBuilder/Controllers/MyTemplateController.cs new file mode 100644 index 00000000..baa3cab1 --- /dev/null +++ b/src/Frapid.Web/Areas/Frapid.WebsiteBuilder/Controllers/MyTemplateController.cs @@ -0,0 +1,43 @@ +using System.IO; +using System.Web; +using System.Web.Hosting; +using System.Web.Mvc; + +namespace Frapid.WebsiteBuilder.Controllers +{ + public class MyTemplateController : Controller + { + [Route("my/template/{*resource}")] + public ActionResult Get(string resource = "") + { + if (string.IsNullOrWhiteSpace(resource)) + { + return HttpNotFound(); + } + + string directory = HostingEnvironment.MapPath(Configuration.GetCurrentThemePath()); + + if (directory == null) + { + return HttpNotFound(); + } + + string path = Path.Combine(directory, resource); + + if (!System.IO.File.Exists(path)) + { + return HttpNotFound(); + } + + string mimeType = GetMimeType(path); + + return File(path, mimeType); + } + + private string GetMimeType(string fileName) + { + return MimeMapping.GetMimeMapping(fileName); + } + + } +} \ No newline at end of file diff --git a/src/Frapid.Web/Areas/Frapid.WebsiteBuilder/Controllers/WebsiteBuilderController.cs b/src/Frapid.Web/Areas/Frapid.WebsiteBuilder/Controllers/WebsiteBuilderController.cs index 576b888c..b3d92d94 100644 --- a/src/Frapid.Web/Areas/Frapid.WebsiteBuilder/Controllers/WebsiteBuilderController.cs +++ b/src/Frapid.Web/Areas/Frapid.WebsiteBuilder/Controllers/WebsiteBuilderController.cs @@ -1,7 +1,5 @@ -using System.Globalization; -using System.IO; +using System.IO; using System.Web.Hosting; -using Frapid.ApplicationState.Cache; using Frapid.Areas; namespace Frapid.WebsiteBuilder.Controllers @@ -10,15 +8,15 @@ public class WebsiteBuilderController : FrapidController { public WebsiteBuilderController() { - ViewBag.LayoutPath = GetLayoutPath(); - ViewBag.Layout = "Layout.cshtml"; + string theme = GetTheme(); + + ViewBag.LayoutPath = GetLayoutPath(theme); + ViewBag.Layout = GetDefaultDocument(theme); } - protected string GetLayoutPath() + protected string GetLayoutPath(string theme = "") { - string layout = "~/Catalogs/{0}/Areas/Frapid.WebsiteBuilder/Views/Layouts/"; - string catalog = AppUsers.GetCatalog(); - layout = string.Format(CultureInfo.InvariantCulture, layout, catalog); + string layout = Configuration.GetCurrentThemePath(); string layoutDirectory = HostingEnvironment.MapPath(layout); @@ -27,7 +25,22 @@ protected string GetLayoutPath() return layout; } - return "~/Views/Site/Layouts/"; + return null; + } + + protected string GetTheme() + { + return Configuration.GetDefaultTheme(); + } + + protected string GetDefaultDocument(string theme = "") + { + if (string.IsNullOrWhiteSpace(theme)) + { + theme = GetTheme(); + } + + return ThemeConfiguration.GetDefaultDocument(theme); } } } \ No newline at end of file diff --git a/src/Frapid.Web/Areas/Frapid.WebsiteBuilder/DAL/Contacts.cs b/src/Frapid.Web/Areas/Frapid.WebsiteBuilder/DAL/Contacts.cs new file mode 100644 index 00000000..7d4968d2 --- /dev/null +++ b/src/Frapid.Web/Areas/Frapid.WebsiteBuilder/DAL/Contacts.cs @@ -0,0 +1,20 @@ +using System.Collections.Generic; +using System.Linq; +using Frapid.ApplicationState.Cache; +using Frapid.Configuration; +using Frapid.NPoco; +using Frapid.WebsiteBuilder.Entities; + +namespace Frapid.WebsiteBuilder.DAL +{ + public class Contacts + { + public static IEnumerable GetContacts() + { + using (Database db = DbProvider.Get(ConnectionString.GetConnectionString(AppUsers.GetCatalog())).GetDatabase()) + { + return db.FetchBy(sql => sql.Where(c => c.Status)).OrderBy(c => c.Sort).ThenBy(c=>c.ContactId); + } + } + } +} \ No newline at end of file diff --git a/src/Frapid.Web/Areas/Frapid.WebsiteBuilder/DAL/Content.cs b/src/Frapid.Web/Areas/Frapid.WebsiteBuilder/DAL/Contents.cs similarity index 94% rename from src/Frapid.Web/Areas/Frapid.WebsiteBuilder/DAL/Content.cs rename to src/Frapid.Web/Areas/Frapid.WebsiteBuilder/DAL/Contents.cs index af84cb06..e58b8267 100644 --- a/src/Frapid.Web/Areas/Frapid.WebsiteBuilder/DAL/Content.cs +++ b/src/Frapid.Web/Areas/Frapid.WebsiteBuilder/DAL/Contents.cs @@ -7,12 +7,11 @@ namespace Frapid.WebsiteBuilder.DAL { - public class Content + public class Contents { public static IEnumerable GetContents() { - using (Database db = DbProvider.Get(ConnectionString.GetConnectionString(AppUsers.GetCatalog())).GetDatabase() - ) + using (Database db = DbProvider.Get(ConnectionString.GetConnectionString(AppUsers.GetCatalog())).GetDatabase()) { return db.FetchBy(sql => sql.Where(c => c.IsHomepage)); } diff --git a/src/Frapid.Web/Areas/Frapid.WebsiteBuilder/DAL/Menus.cs b/src/Frapid.Web/Areas/Frapid.WebsiteBuilder/DAL/Menus.cs new file mode 100644 index 00000000..5fa87a7d --- /dev/null +++ b/src/Frapid.Web/Areas/Frapid.WebsiteBuilder/DAL/Menus.cs @@ -0,0 +1,20 @@ +using System.Collections.Generic; +using System.Linq; +using Frapid.ApplicationState.Cache; +using Frapid.Configuration; +using Frapid.NPoco; +using Frapid.WebsiteBuilder.Entities; + +namespace Frapid.WebsiteBuilder.DAL +{ + public class Menus + { + public static IEnumerable GetMenuItems(string menuName) + { + using (Database db = DbProvider.Get(ConnectionString.GetConnectionString(AppUsers.GetCatalog())).GetDatabase()) + { + return db.FetchBy(sql => sql.Where(c => c.MenuName == menuName)).OrderBy(c => c.Sort); + } + } + } +} \ No newline at end of file diff --git a/src/Frapid.Web/Areas/Frapid.WebsiteBuilder/DataAccess/Contact.cs b/src/Frapid.Web/Areas/Frapid.WebsiteBuilder/DataAccess/Contact.cs new file mode 100644 index 00000000..646a3efb --- /dev/null +++ b/src/Frapid.Web/Areas/Frapid.WebsiteBuilder/DataAccess/Contact.cs @@ -0,0 +1,842 @@ +// ReSharper disable All +using System.Collections.Generic; +using System.Data; +using System.Dynamic; +using System.Linq; +using Frapid.Configuration; +using Frapid.DataAccess; +using Frapid.DataAccess.Models; +using Frapid.DbPolicy; +using Frapid.Framework.Extensions; +using Npgsql; +using Frapid.NPoco; +using Serilog; + +namespace Frapid.WebsiteBuilder.DataAccess +{ + /// + /// Provides simplified data access features to perform SCRUD operation on the database table "website.contacts". + /// + public class Contact : DbAccess, IContactRepository + { + /// + /// The schema of this table. Returns literal "website". + /// + public override string _ObjectNamespace => "website"; + + /// + /// The schema unqualified name of this table. Returns literal "contacts". + /// + public override string _ObjectName => "contacts"; + + /// + /// Login id of application user accessing this table. + /// + public long _LoginId { get; set; } + + /// + /// User id of application user accessing this table. + /// + public int _UserId { get; set; } + + /// + /// The name of the database on which queries are being executed to. + /// + public string _Catalog { get; set; } + + /// + /// Performs SQL count on the table "website.contacts". + /// + /// Returns the number of rows of the table "website.contacts". + /// Thown when the application user does not have sufficient privilege to perform this action. + public long Count() + { + if (string.IsNullOrWhiteSpace(this._Catalog)) + { + return 0; + } + + if (!this.SkipValidation) + { + if (!this.Validated) + { + this.Validate(AccessTypeEnum.Read, this._LoginId, this._Catalog, false); + } + if (!this.HasAccess) + { + Log.Information("Access to count entity \"Contact\" was denied to the user with Login ID {LoginId}", this._LoginId); + throw new UnauthorizedException("Access is denied."); + } + } + + const string sql = "SELECT COUNT(*) FROM website.contacts;"; + return Factory.Scalar(this._Catalog, sql); + } + + /// + /// Executes a select query on the table "website.contacts" to return all instances of the "Contact" class. + /// + /// Returns a non-live, non-mapped instances of "Contact" class. + /// Thown when the application user does not have sufficient privilege to perform this action. + public IEnumerable GetAll() + { + if (string.IsNullOrWhiteSpace(this._Catalog)) + { + return null; + } + + if (!this.SkipValidation) + { + if (!this.Validated) + { + this.Validate(AccessTypeEnum.ExportData, this._LoginId, this._Catalog, false); + } + if (!this.HasAccess) + { + Log.Information("Access to the export entity \"Contact\" was denied to the user with Login ID {LoginId}", this._LoginId); + throw new UnauthorizedException("Access is denied."); + } + } + + const string sql = "SELECT * FROM website.contacts ORDER BY contact_id;"; + return Factory.Get(this._Catalog, sql); + } + + /// + /// Executes a select query on the table "website.contacts" to return all instances of the "Contact" class to export. + /// + /// Returns a non-live, non-mapped instances of "Contact" class. + /// Thown when the application user does not have sufficient privilege to perform this action. + public IEnumerable Export() + { + if (string.IsNullOrWhiteSpace(this._Catalog)) + { + return null; + } + + if (!this.SkipValidation) + { + if (!this.Validated) + { + this.Validate(AccessTypeEnum.ExportData, this._LoginId, this._Catalog, false); + } + if (!this.HasAccess) + { + Log.Information("Access to the export entity \"Contact\" was denied to the user with Login ID {LoginId}", this._LoginId); + throw new UnauthorizedException("Access is denied."); + } + } + + const string sql = "SELECT * FROM website.contacts ORDER BY contact_id;"; + return Factory.Get(this._Catalog, sql); + } + + /// + /// Executes a select query on the table "website.contacts" with a where filter on the column "contact_id" to return a single instance of the "Contact" class. + /// + /// The column "contact_id" parameter used on where filter. + /// Returns a non-live, non-mapped instance of "Contact" class mapped to the database row. + /// Thown when the application user does not have sufficient privilege to perform this action. + public Frapid.WebsiteBuilder.Entities.Contact Get(int contactId) + { + if (string.IsNullOrWhiteSpace(this._Catalog)) + { + return null; + } + + if (!this.SkipValidation) + { + if (!this.Validated) + { + this.Validate(AccessTypeEnum.Read, this._LoginId, this._Catalog, false); + } + if (!this.HasAccess) + { + Log.Information("Access to the get entity \"Contact\" filtered by \"ContactId\" with value {ContactId} was denied to the user with Login ID {_LoginId}", contactId, this._LoginId); + throw new UnauthorizedException("Access is denied."); + } + } + + const string sql = "SELECT * FROM website.contacts WHERE contact_id=@0;"; + return Factory.Get(this._Catalog, sql, contactId).FirstOrDefault(); + } + + /// + /// Gets the first record of the table "website.contacts". + /// + /// Returns a non-live, non-mapped instance of "Contact" class mapped to the database row. + /// Thown when the application user does not have sufficient privilege to perform this action. + public Frapid.WebsiteBuilder.Entities.Contact GetFirst() + { + if (string.IsNullOrWhiteSpace(this._Catalog)) + { + return null; + } + + if (!this.SkipValidation) + { + if (!this.Validated) + { + this.Validate(AccessTypeEnum.Read, this._LoginId, this._Catalog, false); + } + if (!this.HasAccess) + { + Log.Information("Access to the get the first record of entity \"Contact\" was denied to the user with Login ID {_LoginId}", this._LoginId); + throw new UnauthorizedException("Access is denied."); + } + } + + const string sql = "SELECT * FROM website.contacts ORDER BY contact_id LIMIT 1;"; + return Factory.Get(this._Catalog, sql).FirstOrDefault(); + } + + /// + /// Gets the previous record of the table "website.contacts" sorted by contactId. + /// + /// The column "contact_id" parameter used to find the next record. + /// Returns a non-live, non-mapped instance of "Contact" class mapped to the database row. + /// Thown when the application user does not have sufficient privilege to perform this action. + public Frapid.WebsiteBuilder.Entities.Contact GetPrevious(int contactId) + { + if (string.IsNullOrWhiteSpace(this._Catalog)) + { + return null; + } + + if (!this.SkipValidation) + { + if (!this.Validated) + { + this.Validate(AccessTypeEnum.Read, this._LoginId, this._Catalog, false); + } + if (!this.HasAccess) + { + Log.Information("Access to the get the previous entity of \"Contact\" by \"ContactId\" with value {ContactId} was denied to the user with Login ID {_LoginId}", contactId, this._LoginId); + throw new UnauthorizedException("Access is denied."); + } + } + + const string sql = "SELECT * FROM website.contacts WHERE contact_id < @0 ORDER BY contact_id DESC LIMIT 1;"; + return Factory.Get(this._Catalog, sql, contactId).FirstOrDefault(); + } + + /// + /// Gets the next record of the table "website.contacts" sorted by contactId. + /// + /// The column "contact_id" parameter used to find the next record. + /// Returns a non-live, non-mapped instance of "Contact" class mapped to the database row. + /// Thown when the application user does not have sufficient privilege to perform this action. + public Frapid.WebsiteBuilder.Entities.Contact GetNext(int contactId) + { + if (string.IsNullOrWhiteSpace(this._Catalog)) + { + return null; + } + + if (!this.SkipValidation) + { + if (!this.Validated) + { + this.Validate(AccessTypeEnum.Read, this._LoginId, this._Catalog, false); + } + if (!this.HasAccess) + { + Log.Information("Access to the get the next entity of \"Contact\" by \"ContactId\" with value {ContactId} was denied to the user with Login ID {_LoginId}", contactId, this._LoginId); + throw new UnauthorizedException("Access is denied."); + } + } + + const string sql = "SELECT * FROM website.contacts WHERE contact_id > @0 ORDER BY contact_id LIMIT 1;"; + return Factory.Get(this._Catalog, sql, contactId).FirstOrDefault(); + } + + + /// + /// Gets the last record of the table "website.contacts". + /// + /// Returns a non-live, non-mapped instance of "Contact" class mapped to the database row. + /// Thown when the application user does not have sufficient privilege to perform this action. + public Frapid.WebsiteBuilder.Entities.Contact GetLast() + { + if (string.IsNullOrWhiteSpace(this._Catalog)) + { + return null; + } + + if (!this.SkipValidation) + { + if (!this.Validated) + { + this.Validate(AccessTypeEnum.Read, this._LoginId, this._Catalog, false); + } + if (!this.HasAccess) + { + Log.Information("Access to the get the last record of entity \"Contact\" was denied to the user with Login ID {_LoginId}", this._LoginId); + throw new UnauthorizedException("Access is denied."); + } + } + + const string sql = "SELECT * FROM website.contacts ORDER BY contact_id DESC LIMIT 1;"; + return Factory.Get(this._Catalog, sql).FirstOrDefault(); + } + + /// + /// Executes a select query on the table "website.contacts" with a where filter on the column "contact_id" to return a multiple instances of the "Contact" class. + /// + /// Array of column "contact_id" parameter used on where filter. + /// Returns a non-live, non-mapped collection of "Contact" class mapped to the database row. + /// Thown when the application user does not have sufficient privilege to perform this action. + public IEnumerable Get(int[] contactIds) + { + if (string.IsNullOrWhiteSpace(this._Catalog)) + { + return null; + } + + if (!this.SkipValidation) + { + if (!this.Validated) + { + this.Validate(AccessTypeEnum.Read, this._LoginId, this._Catalog, false); + } + if (!this.HasAccess) + { + Log.Information("Access to entity \"Contact\" was denied to the user with Login ID {LoginId}. contactIds: {contactIds}.", this._LoginId, contactIds); + throw new UnauthorizedException("Access is denied."); + } + } + + const string sql = "SELECT * FROM website.contacts WHERE contact_id IN (@0);"; + + return Factory.Get(this._Catalog, sql, contactIds); + } + + /// + /// Custom fields are user defined form elements for website.contacts. + /// + /// Returns an enumerable custom field collection for the table website.contacts + /// Thown when the application user does not have sufficient privilege to perform this action. + public IEnumerable GetCustomFields(string resourceId) + { + if (string.IsNullOrWhiteSpace(this._Catalog)) + { + return null; + } + + if (!this.SkipValidation) + { + if (!this.Validated) + { + this.Validate(AccessTypeEnum.Read, this._LoginId, this._Catalog, false); + } + if (!this.HasAccess) + { + Log.Information("Access to get custom fields for entity \"Contact\" was denied to the user with Login ID {LoginId}", this._LoginId); + throw new UnauthorizedException("Access is denied."); + } + } + + string sql; + if (string.IsNullOrWhiteSpace(resourceId)) + { + sql = "SELECT * FROM config.custom_field_definition_view WHERE table_name='website.contacts' ORDER BY field_order;"; + return Factory.Get(this._Catalog, sql); + } + + sql = "SELECT * from config.get_custom_field_definition('website.contacts'::text, @0::text) ORDER BY field_order;"; + return Factory.Get(this._Catalog, sql, resourceId); + } + + /// + /// Displayfields provide a minimal name/value context for data binding the row collection of website.contacts. + /// + /// Returns an enumerable name and value collection for the table website.contacts + /// Thown when the application user does not have sufficient privilege to perform this action. + public IEnumerable GetDisplayFields() + { + List displayFields = new List(); + + if (string.IsNullOrWhiteSpace(this._Catalog)) + { + return displayFields; + } + + if (!this.SkipValidation) + { + if (!this.Validated) + { + this.Validate(AccessTypeEnum.Read, this._LoginId, this._Catalog, false); + } + if (!this.HasAccess) + { + Log.Information("Access to get display field for entity \"Contact\" was denied to the user with Login ID {LoginId}", this._LoginId); + throw new UnauthorizedException("Access is denied."); + } + } + + const string sql = "SELECT contact_id AS key, contact_id as value FROM website.contacts;"; + using (NpgsqlCommand command = new NpgsqlCommand(sql)) + { + using (DataTable table = DbOperation.GetDataTable(this._Catalog, command)) + { + if (table?.Rows == null || table.Rows.Count == 0) + { + return displayFields; + } + + foreach (DataRow row in table.Rows) + { + if (row != null) + { + DisplayField displayField = new DisplayField + { + Key = row["key"].ToString(), + Value = row["value"].ToString() + }; + + displayFields.Add(displayField); + } + } + } + } + + return displayFields; + } + + /// + /// Inserts or updates the instance of Contact class on the database table "website.contacts". + /// + /// The instance of "Contact" class to insert or update. + /// The custom field collection. + /// Thown when the application user does not have sufficient privilege to perform this action. + public object AddOrEdit(dynamic contact, List customFields) + { + if (string.IsNullOrWhiteSpace(this._Catalog)) + { + return null; + } + + contact.audit_user_id = this._UserId; + contact.audit_ts = System.DateTime.UtcNow; + + object primaryKeyValue = contact.contact_id; + + if (Cast.To(primaryKeyValue) > 0) + { + this.Update(contact, Cast.To(primaryKeyValue)); + } + else + { + primaryKeyValue = this.Add(contact); + } + + string sql = "DELETE FROM config.custom_fields WHERE custom_field_setup_id IN(" + + "SELECT custom_field_setup_id " + + "FROM config.custom_field_setup " + + "WHERE form_name=config.get_custom_field_form_name('website.contacts')" + + ");"; + + Factory.NonQuery(this._Catalog, sql); + + if (customFields == null) + { + return primaryKeyValue; + } + + foreach (var field in customFields) + { + sql = "INSERT INTO config.custom_fields(custom_field_setup_id, resource_id, value) " + + "SELECT config.get_custom_field_setup_id_by_table_name('website.contacts', @0::character varying(100)), " + + "@1, @2;"; + + Factory.NonQuery(this._Catalog, sql, field.FieldName, primaryKeyValue, field.Value); + } + + return primaryKeyValue; + } + + /// + /// Inserts the instance of Contact class on the database table "website.contacts". + /// + /// The instance of "Contact" class to insert. + /// Thown when the application user does not have sufficient privilege to perform this action. + public object Add(dynamic contact) + { + if (string.IsNullOrWhiteSpace(this._Catalog)) + { + return null; + } + + if (!this.SkipValidation) + { + if (!this.Validated) + { + this.Validate(AccessTypeEnum.Create, this._LoginId, this._Catalog, false); + } + if (!this.HasAccess) + { + Log.Information("Access to add entity \"Contact\" was denied to the user with Login ID {LoginId}. {Contact}", this._LoginId, contact); + throw new UnauthorizedException("Access is denied."); + } + } + + return Factory.Insert(this._Catalog, contact, "website.contacts", "contact_id"); + } + + /// + /// Inserts or updates multiple instances of Contact class on the database table "website.contacts"; + /// + /// List of "Contact" class to import. + /// + public List BulkImport(List contacts) + { + if (!this.SkipValidation) + { + if (!this.Validated) + { + this.Validate(AccessTypeEnum.ImportData, this._LoginId, this._Catalog, false); + } + + if (!this.HasAccess) + { + Log.Information("Access to import entity \"Contact\" was denied to the user with Login ID {LoginId}. {contacts}", this._LoginId, contacts); + throw new UnauthorizedException("Access is denied."); + } + } + + var result = new List(); + int line = 0; + try + { + using (Database db = new Database(ConnectionString.GetConnectionString(this._Catalog), Factory.ProviderName)) + { + using (ITransaction transaction = db.GetTransaction()) + { + foreach (dynamic contact in contacts) + { + line++; + + contact.audit_user_id = this._UserId; + contact.audit_ts = System.DateTime.UtcNow; + + object primaryKeyValue = contact.contact_id; + + if (Cast.To(primaryKeyValue) > 0) + { + result.Add(contact.contact_id); + db.Update("website.contacts", "contact_id", contact, contact.contact_id); + } + else + { + result.Add(db.Insert("website.contacts", "contact_id", contact)); + } + } + + transaction.Complete(); + } + + return result; + } + } + catch (NpgsqlException ex) + { + string errorMessage = $"Error on line {line} "; + + if (ex.Code.StartsWith("P")) + { + errorMessage += Factory.GetDbErrorResource(ex); + + throw new DataAccessException(errorMessage, ex); + } + + errorMessage += ex.Message; + throw new DataAccessException(errorMessage, ex); + } + catch (System.Exception ex) + { + string errorMessage = $"Error on line {line} "; + throw new DataAccessException(errorMessage, ex); + } + } + + /// + /// Updates the row of the table "website.contacts" with an instance of "Contact" class against the primary key value. + /// + /// The instance of "Contact" class to update. + /// The value of the column "contact_id" which will be updated. + /// Thown when the application user does not have sufficient privilege to perform this action. + public void Update(dynamic contact, int contactId) + { + if (string.IsNullOrWhiteSpace(this._Catalog)) + { + return; + } + + if (!this.SkipValidation) + { + if (!this.Validated) + { + this.Validate(AccessTypeEnum.Edit, this._LoginId, this._Catalog, false); + } + if (!this.HasAccess) + { + Log.Information("Access to edit entity \"Contact\" with Primary Key {PrimaryKey} was denied to the user with Login ID {LoginId}. {Contact}", contactId, this._LoginId, contact); + throw new UnauthorizedException("Access is denied."); + } + } + + Factory.Update(this._Catalog, contact, contactId, "website.contacts", "contact_id"); + } + + /// + /// Deletes the row of the table "website.contacts" against the primary key value. + /// + /// The value of the column "contact_id" which will be deleted. + /// Thown when the application user does not have sufficient privilege to perform this action. + public void Delete(int contactId) + { + if (string.IsNullOrWhiteSpace(this._Catalog)) + { + return; + } + + if (!this.SkipValidation) + { + if (!this.Validated) + { + this.Validate(AccessTypeEnum.Delete, this._LoginId, this._Catalog, false); + } + if (!this.HasAccess) + { + Log.Information("Access to delete entity \"Contact\" with Primary Key {PrimaryKey} was denied to the user with Login ID {LoginId}.", contactId, this._LoginId); + throw new UnauthorizedException("Access is denied."); + } + } + + const string sql = "DELETE FROM website.contacts WHERE contact_id=@0;"; + Factory.NonQuery(this._Catalog, sql, contactId); + } + + /// + /// Performs a select statement on table "website.contacts" producing a paginated result of 10. + /// + /// Returns the first page of collection of "Contact" class. + /// Thown when the application user does not have sufficient privilege to perform this action. + public IEnumerable GetPaginatedResult() + { + if (string.IsNullOrWhiteSpace(this._Catalog)) + { + return null; + } + + if (!this.SkipValidation) + { + if (!this.Validated) + { + this.Validate(AccessTypeEnum.Read, this._LoginId, this._Catalog, false); + } + if (!this.HasAccess) + { + Log.Information("Access to the first page of the entity \"Contact\" was denied to the user with Login ID {LoginId}.", this._LoginId); + throw new UnauthorizedException("Access is denied."); + } + } + + const string sql = "SELECT * FROM website.contacts ORDER BY contact_id LIMIT 10 OFFSET 0;"; + return Factory.Get(this._Catalog, sql); + } + + /// + /// Performs a select statement on table "website.contacts" producing a paginated result of 10. + /// + /// Enter the page number to produce the paginated result. + /// Returns collection of "Contact" class. + /// Thown when the application user does not have sufficient privilege to perform this action. + public IEnumerable GetPaginatedResult(long pageNumber) + { + if (string.IsNullOrWhiteSpace(this._Catalog)) + { + return null; + } + + if (!this.SkipValidation) + { + if (!this.Validated) + { + this.Validate(AccessTypeEnum.Read, this._LoginId, this._Catalog, false); + } + if (!this.HasAccess) + { + Log.Information("Access to Page #{Page} of the entity \"Contact\" was denied to the user with Login ID {LoginId}.", pageNumber, this._LoginId); + throw new UnauthorizedException("Access is denied."); + } + } + + long offset = (pageNumber - 1) * 10; + const string sql = "SELECT * FROM website.contacts ORDER BY contact_id LIMIT 10 OFFSET @0;"; + + return Factory.Get(this._Catalog, sql, offset); + } + + public List GetFilters(string catalog, string filterName) + { + const string sql = "SELECT * FROM config.filters WHERE object_name='website.contacts' AND lower(filter_name)=lower(@0);"; + return Factory.Get(catalog, sql, filterName).ToList(); + } + + /// + /// Performs a filtered count on table "website.contacts". + /// + /// The list of filter conditions. + /// Returns number of rows of "Contact" class using the filter. + /// Thown when the application user does not have sufficient privilege to perform this action. + public long CountWhere(List filters) + { + if (string.IsNullOrWhiteSpace(this._Catalog)) + { + return 0; + } + + if (!this.SkipValidation) + { + if (!this.Validated) + { + this.Validate(AccessTypeEnum.Read, this._LoginId, this._Catalog, false); + } + if (!this.HasAccess) + { + Log.Information("Access to count entity \"Contact\" was denied to the user with Login ID {LoginId}. Filters: {Filters}.", this._LoginId, filters); + throw new UnauthorizedException("Access is denied."); + } + } + + Sql sql = Sql.Builder.Append("SELECT COUNT(*) FROM website.contacts WHERE 1 = 1"); + Frapid.DataAccess.FilterManager.AddFilters(ref sql, new Frapid.WebsiteBuilder.Entities.Contact(), filters); + + return Factory.Scalar(this._Catalog, sql); + } + + /// + /// Performs a filtered select statement on table "website.contacts" producing a paginated result of 10. + /// + /// Enter the page number to produce the paginated result. If you provide a negative number, the result will not be paginated. + /// The list of filter conditions. + /// Returns collection of "Contact" class. + /// Thown when the application user does not have sufficient privilege to perform this action. + public IEnumerable GetWhere(long pageNumber, List filters) + { + if (string.IsNullOrWhiteSpace(this._Catalog)) + { + return null; + } + + if (!this.SkipValidation) + { + if (!this.Validated) + { + this.Validate(AccessTypeEnum.Read, this._LoginId, this._Catalog, false); + } + if (!this.HasAccess) + { + Log.Information("Access to Page #{Page} of the filtered entity \"Contact\" was denied to the user with Login ID {LoginId}. Filters: {Filters}.", pageNumber, this._LoginId, filters); + throw new UnauthorizedException("Access is denied."); + } + } + + long offset = (pageNumber - 1) * 10; + Sql sql = Sql.Builder.Append("SELECT * FROM website.contacts WHERE 1 = 1"); + + Frapid.DataAccess.FilterManager.AddFilters(ref sql, new Frapid.WebsiteBuilder.Entities.Contact(), filters); + + sql.OrderBy("contact_id"); + + if (pageNumber > 0) + { + sql.Append("LIMIT @0", 10); + sql.Append("OFFSET @0", offset); + } + + return Factory.Get(this._Catalog, sql); + } + + /// + /// Performs a filtered count on table "website.contacts". + /// + /// The named filter. + /// Returns number of rows of "Contact" class using the filter. + /// Thown when the application user does not have sufficient privilege to perform this action. + public long CountFiltered(string filterName) + { + if (string.IsNullOrWhiteSpace(this._Catalog)) + { + return 0; + } + + if (!this.SkipValidation) + { + if (!this.Validated) + { + this.Validate(AccessTypeEnum.Read, this._LoginId, this._Catalog, false); + } + if (!this.HasAccess) + { + Log.Information("Access to count entity \"Contact\" was denied to the user with Login ID {LoginId}. Filter: {Filter}.", this._LoginId, filterName); + throw new UnauthorizedException("Access is denied."); + } + } + + List filters = this.GetFilters(this._Catalog, filterName); + Sql sql = Sql.Builder.Append("SELECT COUNT(*) FROM website.contacts WHERE 1 = 1"); + Frapid.DataAccess.FilterManager.AddFilters(ref sql, new Frapid.WebsiteBuilder.Entities.Contact(), filters); + + return Factory.Scalar(this._Catalog, sql); + } + + /// + /// Performs a filtered select statement on table "website.contacts" producing a paginated result of 10. + /// + /// Enter the page number to produce the paginated result. If you provide a negative number, the result will not be paginated. + /// The named filter. + /// Returns collection of "Contact" class. + /// Thown when the application user does not have sufficient privilege to perform this action. + public IEnumerable GetFiltered(long pageNumber, string filterName) + { + if (string.IsNullOrWhiteSpace(this._Catalog)) + { + return null; + } + + if (!this.SkipValidation) + { + if (!this.Validated) + { + this.Validate(AccessTypeEnum.Read, this._LoginId, this._Catalog, false); + } + if (!this.HasAccess) + { + Log.Information("Access to Page #{Page} of the filtered entity \"Contact\" was denied to the user with Login ID {LoginId}. Filter: {Filter}.", pageNumber, this._LoginId, filterName); + throw new UnauthorizedException("Access is denied."); + } + } + + List filters = this.GetFilters(this._Catalog, filterName); + + long offset = (pageNumber - 1) * 10; + Sql sql = Sql.Builder.Append("SELECT * FROM website.contacts WHERE 1 = 1"); + + Frapid.DataAccess.FilterManager.AddFilters(ref sql, new Frapid.WebsiteBuilder.Entities.Contact(), filters); + + sql.OrderBy("contact_id"); + + if (pageNumber > 0) + { + sql.Append("LIMIT @0", 10); + sql.Append("OFFSET @0", offset); + } + + return Factory.Get(this._Catalog, sql); + } + + + } +} \ No newline at end of file diff --git a/src/Frapid.Web/Areas/Frapid.WebsiteBuilder/DataAccess/Frapid.WebsiteBuilder.DataAccess.csproj b/src/Frapid.Web/Areas/Frapid.WebsiteBuilder/DataAccess/Frapid.WebsiteBuilder.DataAccess.csproj index fbbccd0f..7ba7de68 100644 --- a/src/Frapid.Web/Areas/Frapid.WebsiteBuilder/DataAccess/Frapid.WebsiteBuilder.DataAccess.csproj +++ b/src/Frapid.Web/Areas/Frapid.WebsiteBuilder/DataAccess/Frapid.WebsiteBuilder.DataAccess.csproj @@ -46,8 +46,12 @@ False ..\..\..\bin\Frapid.NPoco.dll - - ..\packages\Npgsql.3.0.3\lib\net45\Npgsql.dll + + ..\packages\Npgsql.2.2.6\lib\net45\Mono.Security.dll + True + + + ..\packages\Npgsql.2.2.6\lib\net45\Npgsql.dll True @@ -69,8 +73,16 @@ + + + + + + + + diff --git a/src/Frapid.Web/Areas/Frapid.WebsiteBuilder/DataAccess/IContactRepository.cs b/src/Frapid.Web/Areas/Frapid.WebsiteBuilder/DataAccess/IContactRepository.cs new file mode 100644 index 00000000..001e56a1 --- /dev/null +++ b/src/Frapid.Web/Areas/Frapid.WebsiteBuilder/DataAccess/IContactRepository.cs @@ -0,0 +1,163 @@ +// ReSharper disable All +using System.Collections.Generic; +using System.Dynamic; +using Frapid.DataAccess; +using Frapid.DataAccess.Models; + +namespace Frapid.WebsiteBuilder.DataAccess +{ + public interface IContactRepository + { + /// + /// Counts the number of Contact in IContactRepository. + /// + /// Returns the count of IContactRepository. + long Count(); + + /// + /// Returns all instances of Contact. + /// + /// Returns a non-live, non-mapped instances of Contact. + IEnumerable GetAll(); + + /// + /// Returns all instances of Contact to export. + /// + /// Returns a non-live, non-mapped instances of Contact. + IEnumerable Export(); + + /// + /// Returns a single instance of the Contact against contactId. + /// + /// The column "contact_id" parameter used on where filter. + /// Returns a non-live, non-mapped instance of Contact. + Frapid.WebsiteBuilder.Entities.Contact Get(int contactId); + + /// + /// Gets the first record of Contact. + /// + /// Returns a non-live, non-mapped instance of Contact. + Frapid.WebsiteBuilder.Entities.Contact GetFirst(); + + /// + /// Gets the previous record of Contact sorted by contactId. + /// + /// The column "contact_id" parameter used to find the previous record. + /// Returns a non-live, non-mapped instance of Contact. + Frapid.WebsiteBuilder.Entities.Contact GetPrevious(int contactId); + + /// + /// Gets the next record of Contact sorted by contactId. + /// + /// The column "contact_id" parameter used to find the next record. + /// Returns a non-live, non-mapped instance of Contact. + Frapid.WebsiteBuilder.Entities.Contact GetNext(int contactId); + + /// + /// Gets the last record of Contact. + /// + /// Returns a non-live, non-mapped instance of Contact. + Frapid.WebsiteBuilder.Entities.Contact GetLast(); + + /// + /// Returns multiple instances of the Contact against contactIds. + /// + /// Array of column "contact_id" parameter used on where filter. + /// Returns a non-live, non-mapped collection of Contact. + IEnumerable Get(int[] contactIds); + + /// + /// Custom fields are user defined form elements for IContactRepository. + /// + /// Returns an enumerable custom field collection for Contact. + IEnumerable GetCustomFields(string resourceId); + + /// + /// Displayfields provide a minimal name/value context for data binding Contact. + /// + /// Returns an enumerable name and value collection for Contact. + IEnumerable GetDisplayFields(); + + /// + /// Inserts the instance of Contact class to IContactRepository. + /// + /// The instance of Contact class to insert or update. + /// The custom field collection. + object AddOrEdit(dynamic contact, List customFields); + + /// + /// Inserts the instance of Contact class to IContactRepository. + /// + /// The instance of Contact class to insert. + object Add(dynamic contact); + + /// + /// Inserts or updates multiple instances of Contact class to IContactRepository.; + /// + /// List of Contact class to import. + /// Returns list of inserted object ids. + List BulkImport(List contacts); + + + /// + /// Updates IContactRepository with an instance of Contact class against the primary key value. + /// + /// The instance of Contact class to update. + /// The value of the column "contact_id" which will be updated. + void Update(dynamic contact, int contactId); + + /// + /// Deletes Contact from IContactRepository against the primary key value. + /// + /// The value of the column "contact_id" which will be deleted. + void Delete(int contactId); + + /// + /// Produces a paginated result of 10 Contact classes. + /// + /// Returns the first page of collection of Contact class. + IEnumerable GetPaginatedResult(); + + /// + /// Produces a paginated result of 10 Contact classes. + /// + /// Enter the page number to produce the paginated result. + /// Returns collection of Contact class. + IEnumerable GetPaginatedResult(long pageNumber); + + List GetFilters(string catalog, string filterName); + + /// + /// Performs a filtered count on IContactRepository. + /// + /// The list of filter conditions. + /// Returns number of rows of Contact class using the filter. + long CountWhere(List filters); + + /// + /// Performs a filtered pagination against IContactRepository producing result of 10 items. + /// + /// Enter the page number to produce the paginated result. If you provide a negative number, the result will not be paginated. + /// The list of filter conditions. + /// Returns collection of Contact class. + IEnumerable GetWhere(long pageNumber, List filters); + + /// + /// Performs a filtered count on IContactRepository. + /// + /// The named filter. + /// Returns number of Contact class using the filter. + long CountFiltered(string filterName); + + /// + /// Gets a filtered result of IContactRepository producing a paginated result of 10. + /// + /// Enter the page number to produce the paginated result. If you provide a negative number, the result will not be paginated. + /// The named filter. + /// Returns collection of Contact class. + IEnumerable GetFiltered(long pageNumber, string filterName); + + + + } +} \ No newline at end of file diff --git a/src/Frapid.Web/Areas/Frapid.WebsiteBuilder/DataAccess/IContentRepository.cs b/src/Frapid.Web/Areas/Frapid.WebsiteBuilder/DataAccess/IContentRepository.cs index 6d5ef58e..334d0450 100644 --- a/src/Frapid.Web/Areas/Frapid.WebsiteBuilder/DataAccess/IContentRepository.cs +++ b/src/Frapid.Web/Areas/Frapid.WebsiteBuilder/DataAccess/IContentRepository.cs @@ -2,6 +2,7 @@ using System.Collections.Generic; using System.Dynamic; using Frapid.DataAccess; +using Frapid.DataAccess.Models; namespace Frapid.WebsiteBuilder.DataAccess { diff --git a/src/Frapid.Web/Areas/Frapid.WebsiteBuilder/DataAccess/IMenuItemRepository.cs b/src/Frapid.Web/Areas/Frapid.WebsiteBuilder/DataAccess/IMenuItemRepository.cs new file mode 100644 index 00000000..66842448 --- /dev/null +++ b/src/Frapid.Web/Areas/Frapid.WebsiteBuilder/DataAccess/IMenuItemRepository.cs @@ -0,0 +1,163 @@ +// ReSharper disable All +using System.Collections.Generic; +using System.Dynamic; +using Frapid.DataAccess; +using Frapid.DataAccess.Models; + +namespace Frapid.WebsiteBuilder.DataAccess +{ + public interface IMenuItemRepository + { + /// + /// Counts the number of MenuItem in IMenuItemRepository. + /// + /// Returns the count of IMenuItemRepository. + long Count(); + + /// + /// Returns all instances of MenuItem. + /// + /// Returns a non-live, non-mapped instances of MenuItem. + IEnumerable GetAll(); + + /// + /// Returns all instances of MenuItem to export. + /// + /// Returns a non-live, non-mapped instances of MenuItem. + IEnumerable Export(); + + /// + /// Returns a single instance of the MenuItem against menuItemId. + /// + /// The column "menu_item_id" parameter used on where filter. + /// Returns a non-live, non-mapped instance of MenuItem. + Frapid.WebsiteBuilder.Entities.MenuItem Get(int menuItemId); + + /// + /// Gets the first record of MenuItem. + /// + /// Returns a non-live, non-mapped instance of MenuItem. + Frapid.WebsiteBuilder.Entities.MenuItem GetFirst(); + + /// + /// Gets the previous record of MenuItem sorted by menuItemId. + /// + /// The column "menu_item_id" parameter used to find the previous record. + /// Returns a non-live, non-mapped instance of MenuItem. + Frapid.WebsiteBuilder.Entities.MenuItem GetPrevious(int menuItemId); + + /// + /// Gets the next record of MenuItem sorted by menuItemId. + /// + /// The column "menu_item_id" parameter used to find the next record. + /// Returns a non-live, non-mapped instance of MenuItem. + Frapid.WebsiteBuilder.Entities.MenuItem GetNext(int menuItemId); + + /// + /// Gets the last record of MenuItem. + /// + /// Returns a non-live, non-mapped instance of MenuItem. + Frapid.WebsiteBuilder.Entities.MenuItem GetLast(); + + /// + /// Returns multiple instances of the MenuItem against menuItemIds. + /// + /// Array of column "menu_item_id" parameter used on where filter. + /// Returns a non-live, non-mapped collection of MenuItem. + IEnumerable Get(int[] menuItemIds); + + /// + /// Custom fields are user defined form elements for IMenuItemRepository. + /// + /// Returns an enumerable custom field collection for MenuItem. + IEnumerable GetCustomFields(string resourceId); + + /// + /// Displayfields provide a minimal name/value context for data binding MenuItem. + /// + /// Returns an enumerable name and value collection for MenuItem. + IEnumerable GetDisplayFields(); + + /// + /// Inserts the instance of MenuItem class to IMenuItemRepository. + /// + /// The instance of MenuItem class to insert or update. + /// The custom field collection. + object AddOrEdit(dynamic menuItem, List customFields); + + /// + /// Inserts the instance of MenuItem class to IMenuItemRepository. + /// + /// The instance of MenuItem class to insert. + object Add(dynamic menuItem); + + /// + /// Inserts or updates multiple instances of MenuItem class to IMenuItemRepository.; + /// + /// List of MenuItem class to import. + /// Returns list of inserted object ids. + List BulkImport(List menuItems); + + + /// + /// Updates IMenuItemRepository with an instance of MenuItem class against the primary key value. + /// + /// The instance of MenuItem class to update. + /// The value of the column "menu_item_id" which will be updated. + void Update(dynamic menuItem, int menuItemId); + + /// + /// Deletes MenuItem from IMenuItemRepository against the primary key value. + /// + /// The value of the column "menu_item_id" which will be deleted. + void Delete(int menuItemId); + + /// + /// Produces a paginated result of 10 MenuItem classes. + /// + /// Returns the first page of collection of MenuItem class. + IEnumerable GetPaginatedResult(); + + /// + /// Produces a paginated result of 10 MenuItem classes. + /// + /// Enter the page number to produce the paginated result. + /// Returns collection of MenuItem class. + IEnumerable GetPaginatedResult(long pageNumber); + + List GetFilters(string catalog, string filterName); + + /// + /// Performs a filtered count on IMenuItemRepository. + /// + /// The list of filter conditions. + /// Returns number of rows of MenuItem class using the filter. + long CountWhere(List filters); + + /// + /// Performs a filtered pagination against IMenuItemRepository producing result of 10 items. + /// + /// Enter the page number to produce the paginated result. If you provide a negative number, the result will not be paginated. + /// The list of filter conditions. + /// Returns collection of MenuItem class. + IEnumerable GetWhere(long pageNumber, List filters); + + /// + /// Performs a filtered count on IMenuItemRepository. + /// + /// The named filter. + /// Returns number of MenuItem class using the filter. + long CountFiltered(string filterName); + + /// + /// Gets a filtered result of IMenuItemRepository producing a paginated result of 10. + /// + /// Enter the page number to produce the paginated result. If you provide a negative number, the result will not be paginated. + /// The named filter. + /// Returns collection of MenuItem class. + IEnumerable GetFiltered(long pageNumber, string filterName); + + + + } +} \ No newline at end of file diff --git a/src/Frapid.Web/Areas/Frapid.WebsiteBuilder/DataAccess/IMenuItemViewRepository.cs b/src/Frapid.Web/Areas/Frapid.WebsiteBuilder/DataAccess/IMenuItemViewRepository.cs new file mode 100644 index 00000000..80044a55 --- /dev/null +++ b/src/Frapid.Web/Areas/Frapid.WebsiteBuilder/DataAccess/IMenuItemViewRepository.cs @@ -0,0 +1,77 @@ +// ReSharper disable All +using System.Collections.Generic; +using System.Dynamic; +using Frapid.DataAccess; +using Frapid.DataAccess.Models; +using Frapid.NPoco; + +namespace Frapid.WebsiteBuilder.DataAccess +{ + public interface IMenuItemViewRepository + { + /// + /// Performs count on IMenuItemViewRepository. + /// + /// Returns the number of IMenuItemViewRepository. + long Count(); + + /// + /// Return all instances of the "MenuItemView" class from IMenuItemViewRepository. + /// + /// Returns a non-live, non-mapped instances of "MenuItemView" class. + IEnumerable Get(); + + /// + /// Displayfields provide a minimal name/value context for data binding IMenuItemViewRepository. + /// + /// Returns an enumerable name and value collection for IMenuItemViewRepository. + IEnumerable GetDisplayFields(); + + /// + /// Produces a paginated result of 10 items from IMenuItemViewRepository. + /// + /// Returns the first page of collection of "MenuItemView" class. + IEnumerable GetPaginatedResult(); + + /// + /// Produces a paginated result of 10 items from IMenuItemViewRepository. + /// + /// Enter the page number to produce the paginated result. + /// Returns collection of "MenuItemView" class. + IEnumerable GetPaginatedResult(long pageNumber); + + List GetFilters(string catalog, string filterName); + + /// + /// Performs a filtered count on IMenuItemViewRepository. + /// + /// The list of filter conditions. + /// Returns number of rows of "MenuItemView" class using the filter. + long CountWhere(List filters); + + /// + /// Produces a paginated result of 10 items using the supplied filters from IMenuItemViewRepository. + /// + /// Enter the page number to produce the paginated result. If you provide a negative number, the result will not be paginated. + /// The list of filter conditions. + /// Returns collection of "MenuItemView" class. + IEnumerable GetWhere(long pageNumber, List filters); + + /// + /// Performs a filtered count on IMenuItemViewRepository. + /// + /// The named filter. + /// Returns number of rows of "MenuItemView" class using the filter. + long CountFiltered(string filterName); + + /// + /// Produces a paginated result of 10 items using the supplied filter name from IMenuItemViewRepository. + /// + /// Enter the page number to produce the paginated result. If you provide a negative number, the result will not be paginated. + /// The named filter. + /// Returns collection of "MenuItemView" class. + IEnumerable GetFiltered(long pageNumber, string filterName); + + + } +} \ No newline at end of file diff --git a/src/Frapid.Web/Areas/Frapid.WebsiteBuilder/DataAccess/IMenuRepository.cs b/src/Frapid.Web/Areas/Frapid.WebsiteBuilder/DataAccess/IMenuRepository.cs new file mode 100644 index 00000000..d2c2ab70 --- /dev/null +++ b/src/Frapid.Web/Areas/Frapid.WebsiteBuilder/DataAccess/IMenuRepository.cs @@ -0,0 +1,163 @@ +// ReSharper disable All +using System.Collections.Generic; +using System.Dynamic; +using Frapid.DataAccess; +using Frapid.DataAccess.Models; + +namespace Frapid.WebsiteBuilder.DataAccess +{ + public interface IMenuRepository + { + /// + /// Counts the number of Menu in IMenuRepository. + /// + /// Returns the count of IMenuRepository. + long Count(); + + /// + /// Returns all instances of Menu. + /// + /// Returns a non-live, non-mapped instances of Menu. + IEnumerable GetAll(); + + /// + /// Returns all instances of Menu to export. + /// + /// Returns a non-live, non-mapped instances of Menu. + IEnumerable Export(); + + /// + /// Returns a single instance of the Menu against menuId. + /// + /// The column "menu_id" parameter used on where filter. + /// Returns a non-live, non-mapped instance of Menu. + Frapid.WebsiteBuilder.Entities.Menu Get(int menuId); + + /// + /// Gets the first record of Menu. + /// + /// Returns a non-live, non-mapped instance of Menu. + Frapid.WebsiteBuilder.Entities.Menu GetFirst(); + + /// + /// Gets the previous record of Menu sorted by menuId. + /// + /// The column "menu_id" parameter used to find the previous record. + /// Returns a non-live, non-mapped instance of Menu. + Frapid.WebsiteBuilder.Entities.Menu GetPrevious(int menuId); + + /// + /// Gets the next record of Menu sorted by menuId. + /// + /// The column "menu_id" parameter used to find the next record. + /// Returns a non-live, non-mapped instance of Menu. + Frapid.WebsiteBuilder.Entities.Menu GetNext(int menuId); + + /// + /// Gets the last record of Menu. + /// + /// Returns a non-live, non-mapped instance of Menu. + Frapid.WebsiteBuilder.Entities.Menu GetLast(); + + /// + /// Returns multiple instances of the Menu against menuIds. + /// + /// Array of column "menu_id" parameter used on where filter. + /// Returns a non-live, non-mapped collection of Menu. + IEnumerable Get(int[] menuIds); + + /// + /// Custom fields are user defined form elements for IMenuRepository. + /// + /// Returns an enumerable custom field collection for Menu. + IEnumerable GetCustomFields(string resourceId); + + /// + /// Displayfields provide a minimal name/value context for data binding Menu. + /// + /// Returns an enumerable name and value collection for Menu. + IEnumerable GetDisplayFields(); + + /// + /// Inserts the instance of Menu class to IMenuRepository. + /// + /// The instance of Menu class to insert or update. + /// The custom field collection. + object AddOrEdit(dynamic menu, List customFields); + + /// + /// Inserts the instance of Menu class to IMenuRepository. + /// + /// The instance of Menu class to insert. + object Add(dynamic menu); + + /// + /// Inserts or updates multiple instances of Menu class to IMenuRepository.; + /// + /// List of Menu class to import. + /// Returns list of inserted object ids. + List BulkImport(List menus); + + + /// + /// Updates IMenuRepository with an instance of Menu class against the primary key value. + /// + /// The instance of Menu class to update. + /// The value of the column "menu_id" which will be updated. + void Update(dynamic menu, int menuId); + + /// + /// Deletes Menu from IMenuRepository against the primary key value. + /// + /// The value of the column "menu_id" which will be deleted. + void Delete(int menuId); + + /// + /// Produces a paginated result of 10 Menu classes. + /// + /// Returns the first page of collection of Menu class. + IEnumerable GetPaginatedResult(); + + /// + /// Produces a paginated result of 10 Menu classes. + /// + /// Enter the page number to produce the paginated result. + /// Returns collection of Menu class. + IEnumerable GetPaginatedResult(long pageNumber); + + List GetFilters(string catalog, string filterName); + + /// + /// Performs a filtered count on IMenuRepository. + /// + /// The list of filter conditions. + /// Returns number of rows of Menu class using the filter. + long CountWhere(List filters); + + /// + /// Performs a filtered pagination against IMenuRepository producing result of 10 items. + /// + /// Enter the page number to produce the paginated result. If you provide a negative number, the result will not be paginated. + /// The list of filter conditions. + /// Returns collection of Menu class. + IEnumerable GetWhere(long pageNumber, List filters); + + /// + /// Performs a filtered count on IMenuRepository. + /// + /// The named filter. + /// Returns number of Menu class using the filter. + long CountFiltered(string filterName); + + /// + /// Gets a filtered result of IMenuRepository producing a paginated result of 10. + /// + /// Enter the page number to produce the paginated result. If you provide a negative number, the result will not be paginated. + /// The named filter. + /// Returns collection of Menu class. + IEnumerable GetFiltered(long pageNumber, string filterName); + + + + } +} \ No newline at end of file diff --git a/src/Frapid.Web/Areas/Frapid.WebsiteBuilder/DataAccess/Menu.cs b/src/Frapid.Web/Areas/Frapid.WebsiteBuilder/DataAccess/Menu.cs new file mode 100644 index 00000000..173d972c --- /dev/null +++ b/src/Frapid.Web/Areas/Frapid.WebsiteBuilder/DataAccess/Menu.cs @@ -0,0 +1,842 @@ +// ReSharper disable All +using System.Collections.Generic; +using System.Data; +using System.Dynamic; +using System.Linq; +using Frapid.Configuration; +using Frapid.DataAccess; +using Frapid.DataAccess.Models; +using Frapid.DbPolicy; +using Frapid.Framework.Extensions; +using Npgsql; +using Frapid.NPoco; +using Serilog; + +namespace Frapid.WebsiteBuilder.DataAccess +{ + /// + /// Provides simplified data access features to perform SCRUD operation on the database table "website.menus". + /// + public class Menu : DbAccess, IMenuRepository + { + /// + /// The schema of this table. Returns literal "website". + /// + public override string _ObjectNamespace => "website"; + + /// + /// The schema unqualified name of this table. Returns literal "menus". + /// + public override string _ObjectName => "menus"; + + /// + /// Login id of application user accessing this table. + /// + public long _LoginId { get; set; } + + /// + /// User id of application user accessing this table. + /// + public int _UserId { get; set; } + + /// + /// The name of the database on which queries are being executed to. + /// + public string _Catalog { get; set; } + + /// + /// Performs SQL count on the table "website.menus". + /// + /// Returns the number of rows of the table "website.menus". + /// Thown when the application user does not have sufficient privilege to perform this action. + public long Count() + { + if (string.IsNullOrWhiteSpace(this._Catalog)) + { + return 0; + } + + if (!this.SkipValidation) + { + if (!this.Validated) + { + this.Validate(AccessTypeEnum.Read, this._LoginId, this._Catalog, false); + } + if (!this.HasAccess) + { + Log.Information("Access to count entity \"Menu\" was denied to the user with Login ID {LoginId}", this._LoginId); + throw new UnauthorizedException("Access is denied."); + } + } + + const string sql = "SELECT COUNT(*) FROM website.menus;"; + return Factory.Scalar(this._Catalog, sql); + } + + /// + /// Executes a select query on the table "website.menus" to return all instances of the "Menu" class. + /// + /// Returns a non-live, non-mapped instances of "Menu" class. + /// Thown when the application user does not have sufficient privilege to perform this action. + public IEnumerable GetAll() + { + if (string.IsNullOrWhiteSpace(this._Catalog)) + { + return null; + } + + if (!this.SkipValidation) + { + if (!this.Validated) + { + this.Validate(AccessTypeEnum.ExportData, this._LoginId, this._Catalog, false); + } + if (!this.HasAccess) + { + Log.Information("Access to the export entity \"Menu\" was denied to the user with Login ID {LoginId}", this._LoginId); + throw new UnauthorizedException("Access is denied."); + } + } + + const string sql = "SELECT * FROM website.menus ORDER BY menu_id;"; + return Factory.Get(this._Catalog, sql); + } + + /// + /// Executes a select query on the table "website.menus" to return all instances of the "Menu" class to export. + /// + /// Returns a non-live, non-mapped instances of "Menu" class. + /// Thown when the application user does not have sufficient privilege to perform this action. + public IEnumerable Export() + { + if (string.IsNullOrWhiteSpace(this._Catalog)) + { + return null; + } + + if (!this.SkipValidation) + { + if (!this.Validated) + { + this.Validate(AccessTypeEnum.ExportData, this._LoginId, this._Catalog, false); + } + if (!this.HasAccess) + { + Log.Information("Access to the export entity \"Menu\" was denied to the user with Login ID {LoginId}", this._LoginId); + throw new UnauthorizedException("Access is denied."); + } + } + + const string sql = "SELECT * FROM website.menus ORDER BY menu_id;"; + return Factory.Get(this._Catalog, sql); + } + + /// + /// Executes a select query on the table "website.menus" with a where filter on the column "menu_id" to return a single instance of the "Menu" class. + /// + /// The column "menu_id" parameter used on where filter. + /// Returns a non-live, non-mapped instance of "Menu" class mapped to the database row. + /// Thown when the application user does not have sufficient privilege to perform this action. + public Frapid.WebsiteBuilder.Entities.Menu Get(int menuId) + { + if (string.IsNullOrWhiteSpace(this._Catalog)) + { + return null; + } + + if (!this.SkipValidation) + { + if (!this.Validated) + { + this.Validate(AccessTypeEnum.Read, this._LoginId, this._Catalog, false); + } + if (!this.HasAccess) + { + Log.Information("Access to the get entity \"Menu\" filtered by \"MenuId\" with value {MenuId} was denied to the user with Login ID {_LoginId}", menuId, this._LoginId); + throw new UnauthorizedException("Access is denied."); + } + } + + const string sql = "SELECT * FROM website.menus WHERE menu_id=@0;"; + return Factory.Get(this._Catalog, sql, menuId).FirstOrDefault(); + } + + /// + /// Gets the first record of the table "website.menus". + /// + /// Returns a non-live, non-mapped instance of "Menu" class mapped to the database row. + /// Thown when the application user does not have sufficient privilege to perform this action. + public Frapid.WebsiteBuilder.Entities.Menu GetFirst() + { + if (string.IsNullOrWhiteSpace(this._Catalog)) + { + return null; + } + + if (!this.SkipValidation) + { + if (!this.Validated) + { + this.Validate(AccessTypeEnum.Read, this._LoginId, this._Catalog, false); + } + if (!this.HasAccess) + { + Log.Information("Access to the get the first record of entity \"Menu\" was denied to the user with Login ID {_LoginId}", this._LoginId); + throw new UnauthorizedException("Access is denied."); + } + } + + const string sql = "SELECT * FROM website.menus ORDER BY menu_id LIMIT 1;"; + return Factory.Get(this._Catalog, sql).FirstOrDefault(); + } + + /// + /// Gets the previous record of the table "website.menus" sorted by menuId. + /// + /// The column "menu_id" parameter used to find the next record. + /// Returns a non-live, non-mapped instance of "Menu" class mapped to the database row. + /// Thown when the application user does not have sufficient privilege to perform this action. + public Frapid.WebsiteBuilder.Entities.Menu GetPrevious(int menuId) + { + if (string.IsNullOrWhiteSpace(this._Catalog)) + { + return null; + } + + if (!this.SkipValidation) + { + if (!this.Validated) + { + this.Validate(AccessTypeEnum.Read, this._LoginId, this._Catalog, false); + } + if (!this.HasAccess) + { + Log.Information("Access to the get the previous entity of \"Menu\" by \"MenuId\" with value {MenuId} was denied to the user with Login ID {_LoginId}", menuId, this._LoginId); + throw new UnauthorizedException("Access is denied."); + } + } + + const string sql = "SELECT * FROM website.menus WHERE menu_id < @0 ORDER BY menu_id DESC LIMIT 1;"; + return Factory.Get(this._Catalog, sql, menuId).FirstOrDefault(); + } + + /// + /// Gets the next record of the table "website.menus" sorted by menuId. + /// + /// The column "menu_id" parameter used to find the next record. + /// Returns a non-live, non-mapped instance of "Menu" class mapped to the database row. + /// Thown when the application user does not have sufficient privilege to perform this action. + public Frapid.WebsiteBuilder.Entities.Menu GetNext(int menuId) + { + if (string.IsNullOrWhiteSpace(this._Catalog)) + { + return null; + } + + if (!this.SkipValidation) + { + if (!this.Validated) + { + this.Validate(AccessTypeEnum.Read, this._LoginId, this._Catalog, false); + } + if (!this.HasAccess) + { + Log.Information("Access to the get the next entity of \"Menu\" by \"MenuId\" with value {MenuId} was denied to the user with Login ID {_LoginId}", menuId, this._LoginId); + throw new UnauthorizedException("Access is denied."); + } + } + + const string sql = "SELECT * FROM website.menus WHERE menu_id > @0 ORDER BY menu_id LIMIT 1;"; + return Factory.Get(this._Catalog, sql, menuId).FirstOrDefault(); + } + + + /// + /// Gets the last record of the table "website.menus". + /// + /// Returns a non-live, non-mapped instance of "Menu" class mapped to the database row. + /// Thown when the application user does not have sufficient privilege to perform this action. + public Frapid.WebsiteBuilder.Entities.Menu GetLast() + { + if (string.IsNullOrWhiteSpace(this._Catalog)) + { + return null; + } + + if (!this.SkipValidation) + { + if (!this.Validated) + { + this.Validate(AccessTypeEnum.Read, this._LoginId, this._Catalog, false); + } + if (!this.HasAccess) + { + Log.Information("Access to the get the last record of entity \"Menu\" was denied to the user with Login ID {_LoginId}", this._LoginId); + throw new UnauthorizedException("Access is denied."); + } + } + + const string sql = "SELECT * FROM website.menus ORDER BY menu_id DESC LIMIT 1;"; + return Factory.Get(this._Catalog, sql).FirstOrDefault(); + } + + /// + /// Executes a select query on the table "website.menus" with a where filter on the column "menu_id" to return a multiple instances of the "Menu" class. + /// + /// Array of column "menu_id" parameter used on where filter. + /// Returns a non-live, non-mapped collection of "Menu" class mapped to the database row. + /// Thown when the application user does not have sufficient privilege to perform this action. + public IEnumerable Get(int[] menuIds) + { + if (string.IsNullOrWhiteSpace(this._Catalog)) + { + return null; + } + + if (!this.SkipValidation) + { + if (!this.Validated) + { + this.Validate(AccessTypeEnum.Read, this._LoginId, this._Catalog, false); + } + if (!this.HasAccess) + { + Log.Information("Access to entity \"Menu\" was denied to the user with Login ID {LoginId}. menuIds: {menuIds}.", this._LoginId, menuIds); + throw new UnauthorizedException("Access is denied."); + } + } + + const string sql = "SELECT * FROM website.menus WHERE menu_id IN (@0);"; + + return Factory.Get(this._Catalog, sql, menuIds); + } + + /// + /// Custom fields are user defined form elements for website.menus. + /// + /// Returns an enumerable custom field collection for the table website.menus + /// Thown when the application user does not have sufficient privilege to perform this action. + public IEnumerable GetCustomFields(string resourceId) + { + if (string.IsNullOrWhiteSpace(this._Catalog)) + { + return null; + } + + if (!this.SkipValidation) + { + if (!this.Validated) + { + this.Validate(AccessTypeEnum.Read, this._LoginId, this._Catalog, false); + } + if (!this.HasAccess) + { + Log.Information("Access to get custom fields for entity \"Menu\" was denied to the user with Login ID {LoginId}", this._LoginId); + throw new UnauthorizedException("Access is denied."); + } + } + + string sql; + if (string.IsNullOrWhiteSpace(resourceId)) + { + sql = "SELECT * FROM config.custom_field_definition_view WHERE table_name='website.menus' ORDER BY field_order;"; + return Factory.Get(this._Catalog, sql); + } + + sql = "SELECT * from config.get_custom_field_definition('website.menus'::text, @0::text) ORDER BY field_order;"; + return Factory.Get(this._Catalog, sql, resourceId); + } + + /// + /// Displayfields provide a minimal name/value context for data binding the row collection of website.menus. + /// + /// Returns an enumerable name and value collection for the table website.menus + /// Thown when the application user does not have sufficient privilege to perform this action. + public IEnumerable GetDisplayFields() + { + List displayFields = new List(); + + if (string.IsNullOrWhiteSpace(this._Catalog)) + { + return displayFields; + } + + if (!this.SkipValidation) + { + if (!this.Validated) + { + this.Validate(AccessTypeEnum.Read, this._LoginId, this._Catalog, false); + } + if (!this.HasAccess) + { + Log.Information("Access to get display field for entity \"Menu\" was denied to the user with Login ID {LoginId}", this._LoginId); + throw new UnauthorizedException("Access is denied."); + } + } + + const string sql = "SELECT menu_id AS key, menu_name as value FROM website.menus;"; + using (NpgsqlCommand command = new NpgsqlCommand(sql)) + { + using (DataTable table = DbOperation.GetDataTable(this._Catalog, command)) + { + if (table?.Rows == null || table.Rows.Count == 0) + { + return displayFields; + } + + foreach (DataRow row in table.Rows) + { + if (row != null) + { + DisplayField displayField = new DisplayField + { + Key = row["key"].ToString(), + Value = row["value"].ToString() + }; + + displayFields.Add(displayField); + } + } + } + } + + return displayFields; + } + + /// + /// Inserts or updates the instance of Menu class on the database table "website.menus". + /// + /// The instance of "Menu" class to insert or update. + /// The custom field collection. + /// Thown when the application user does not have sufficient privilege to perform this action. + public object AddOrEdit(dynamic menu, List customFields) + { + if (string.IsNullOrWhiteSpace(this._Catalog)) + { + return null; + } + + menu.audit_user_id = this._UserId; + menu.audit_ts = System.DateTime.UtcNow; + + object primaryKeyValue = menu.menu_id; + + if (Cast.To(primaryKeyValue) > 0) + { + this.Update(menu, Cast.To(primaryKeyValue)); + } + else + { + primaryKeyValue = this.Add(menu); + } + + string sql = "DELETE FROM config.custom_fields WHERE custom_field_setup_id IN(" + + "SELECT custom_field_setup_id " + + "FROM config.custom_field_setup " + + "WHERE form_name=config.get_custom_field_form_name('website.menus')" + + ");"; + + Factory.NonQuery(this._Catalog, sql); + + if (customFields == null) + { + return primaryKeyValue; + } + + foreach (var field in customFields) + { + sql = "INSERT INTO config.custom_fields(custom_field_setup_id, resource_id, value) " + + "SELECT config.get_custom_field_setup_id_by_table_name('website.menus', @0::character varying(100)), " + + "@1, @2;"; + + Factory.NonQuery(this._Catalog, sql, field.FieldName, primaryKeyValue, field.Value); + } + + return primaryKeyValue; + } + + /// + /// Inserts the instance of Menu class on the database table "website.menus". + /// + /// The instance of "Menu" class to insert. + /// Thown when the application user does not have sufficient privilege to perform this action. + public object Add(dynamic menu) + { + if (string.IsNullOrWhiteSpace(this._Catalog)) + { + return null; + } + + if (!this.SkipValidation) + { + if (!this.Validated) + { + this.Validate(AccessTypeEnum.Create, this._LoginId, this._Catalog, false); + } + if (!this.HasAccess) + { + Log.Information("Access to add entity \"Menu\" was denied to the user with Login ID {LoginId}. {Menu}", this._LoginId, menu); + throw new UnauthorizedException("Access is denied."); + } + } + + return Factory.Insert(this._Catalog, menu, "website.menus", "menu_id"); + } + + /// + /// Inserts or updates multiple instances of Menu class on the database table "website.menus"; + /// + /// List of "Menu" class to import. + /// + public List BulkImport(List menus) + { + if (!this.SkipValidation) + { + if (!this.Validated) + { + this.Validate(AccessTypeEnum.ImportData, this._LoginId, this._Catalog, false); + } + + if (!this.HasAccess) + { + Log.Information("Access to import entity \"Menu\" was denied to the user with Login ID {LoginId}. {menus}", this._LoginId, menus); + throw new UnauthorizedException("Access is denied."); + } + } + + var result = new List(); + int line = 0; + try + { + using (Database db = new Database(ConnectionString.GetConnectionString(this._Catalog), Factory.ProviderName)) + { + using (ITransaction transaction = db.GetTransaction()) + { + foreach (dynamic menu in menus) + { + line++; + + menu.audit_user_id = this._UserId; + menu.audit_ts = System.DateTime.UtcNow; + + object primaryKeyValue = menu.menu_id; + + if (Cast.To(primaryKeyValue) > 0) + { + result.Add(menu.menu_id); + db.Update("website.menus", "menu_id", menu, menu.menu_id); + } + else + { + result.Add(db.Insert("website.menus", "menu_id", menu)); + } + } + + transaction.Complete(); + } + + return result; + } + } + catch (NpgsqlException ex) + { + string errorMessage = $"Error on line {line} "; + + if (ex.Code.StartsWith("P")) + { + errorMessage += Factory.GetDbErrorResource(ex); + + throw new DataAccessException(errorMessage, ex); + } + + errorMessage += ex.Message; + throw new DataAccessException(errorMessage, ex); + } + catch (System.Exception ex) + { + string errorMessage = $"Error on line {line} "; + throw new DataAccessException(errorMessage, ex); + } + } + + /// + /// Updates the row of the table "website.menus" with an instance of "Menu" class against the primary key value. + /// + /// The instance of "Menu" class to update. + /// The value of the column "menu_id" which will be updated. + /// Thown when the application user does not have sufficient privilege to perform this action. + public void Update(dynamic menu, int menuId) + { + if (string.IsNullOrWhiteSpace(this._Catalog)) + { + return; + } + + if (!this.SkipValidation) + { + if (!this.Validated) + { + this.Validate(AccessTypeEnum.Edit, this._LoginId, this._Catalog, false); + } + if (!this.HasAccess) + { + Log.Information("Access to edit entity \"Menu\" with Primary Key {PrimaryKey} was denied to the user with Login ID {LoginId}. {Menu}", menuId, this._LoginId, menu); + throw new UnauthorizedException("Access is denied."); + } + } + + Factory.Update(this._Catalog, menu, menuId, "website.menus", "menu_id"); + } + + /// + /// Deletes the row of the table "website.menus" against the primary key value. + /// + /// The value of the column "menu_id" which will be deleted. + /// Thown when the application user does not have sufficient privilege to perform this action. + public void Delete(int menuId) + { + if (string.IsNullOrWhiteSpace(this._Catalog)) + { + return; + } + + if (!this.SkipValidation) + { + if (!this.Validated) + { + this.Validate(AccessTypeEnum.Delete, this._LoginId, this._Catalog, false); + } + if (!this.HasAccess) + { + Log.Information("Access to delete entity \"Menu\" with Primary Key {PrimaryKey} was denied to the user with Login ID {LoginId}.", menuId, this._LoginId); + throw new UnauthorizedException("Access is denied."); + } + } + + const string sql = "DELETE FROM website.menus WHERE menu_id=@0;"; + Factory.NonQuery(this._Catalog, sql, menuId); + } + + /// + /// Performs a select statement on table "website.menus" producing a paginated result of 10. + /// + /// Returns the first page of collection of "Menu" class. + /// Thown when the application user does not have sufficient privilege to perform this action. + public IEnumerable GetPaginatedResult() + { + if (string.IsNullOrWhiteSpace(this._Catalog)) + { + return null; + } + + if (!this.SkipValidation) + { + if (!this.Validated) + { + this.Validate(AccessTypeEnum.Read, this._LoginId, this._Catalog, false); + } + if (!this.HasAccess) + { + Log.Information("Access to the first page of the entity \"Menu\" was denied to the user with Login ID {LoginId}.", this._LoginId); + throw new UnauthorizedException("Access is denied."); + } + } + + const string sql = "SELECT * FROM website.menus ORDER BY menu_id LIMIT 10 OFFSET 0;"; + return Factory.Get(this._Catalog, sql); + } + + /// + /// Performs a select statement on table "website.menus" producing a paginated result of 10. + /// + /// Enter the page number to produce the paginated result. + /// Returns collection of "Menu" class. + /// Thown when the application user does not have sufficient privilege to perform this action. + public IEnumerable GetPaginatedResult(long pageNumber) + { + if (string.IsNullOrWhiteSpace(this._Catalog)) + { + return null; + } + + if (!this.SkipValidation) + { + if (!this.Validated) + { + this.Validate(AccessTypeEnum.Read, this._LoginId, this._Catalog, false); + } + if (!this.HasAccess) + { + Log.Information("Access to Page #{Page} of the entity \"Menu\" was denied to the user with Login ID {LoginId}.", pageNumber, this._LoginId); + throw new UnauthorizedException("Access is denied."); + } + } + + long offset = (pageNumber - 1) * 10; + const string sql = "SELECT * FROM website.menus ORDER BY menu_id LIMIT 10 OFFSET @0;"; + + return Factory.Get(this._Catalog, sql, offset); + } + + public List GetFilters(string catalog, string filterName) + { + const string sql = "SELECT * FROM config.filters WHERE object_name='website.menus' AND lower(filter_name)=lower(@0);"; + return Factory.Get(catalog, sql, filterName).ToList(); + } + + /// + /// Performs a filtered count on table "website.menus". + /// + /// The list of filter conditions. + /// Returns number of rows of "Menu" class using the filter. + /// Thown when the application user does not have sufficient privilege to perform this action. + public long CountWhere(List filters) + { + if (string.IsNullOrWhiteSpace(this._Catalog)) + { + return 0; + } + + if (!this.SkipValidation) + { + if (!this.Validated) + { + this.Validate(AccessTypeEnum.Read, this._LoginId, this._Catalog, false); + } + if (!this.HasAccess) + { + Log.Information("Access to count entity \"Menu\" was denied to the user with Login ID {LoginId}. Filters: {Filters}.", this._LoginId, filters); + throw new UnauthorizedException("Access is denied."); + } + } + + Sql sql = Sql.Builder.Append("SELECT COUNT(*) FROM website.menus WHERE 1 = 1"); + Frapid.DataAccess.FilterManager.AddFilters(ref sql, new Frapid.WebsiteBuilder.Entities.Menu(), filters); + + return Factory.Scalar(this._Catalog, sql); + } + + /// + /// Performs a filtered select statement on table "website.menus" producing a paginated result of 10. + /// + /// Enter the page number to produce the paginated result. If you provide a negative number, the result will not be paginated. + /// The list of filter conditions. + /// Returns collection of "Menu" class. + /// Thown when the application user does not have sufficient privilege to perform this action. + public IEnumerable GetWhere(long pageNumber, List filters) + { + if (string.IsNullOrWhiteSpace(this._Catalog)) + { + return null; + } + + if (!this.SkipValidation) + { + if (!this.Validated) + { + this.Validate(AccessTypeEnum.Read, this._LoginId, this._Catalog, false); + } + if (!this.HasAccess) + { + Log.Information("Access to Page #{Page} of the filtered entity \"Menu\" was denied to the user with Login ID {LoginId}. Filters: {Filters}.", pageNumber, this._LoginId, filters); + throw new UnauthorizedException("Access is denied."); + } + } + + long offset = (pageNumber - 1) * 10; + Sql sql = Sql.Builder.Append("SELECT * FROM website.menus WHERE 1 = 1"); + + Frapid.DataAccess.FilterManager.AddFilters(ref sql, new Frapid.WebsiteBuilder.Entities.Menu(), filters); + + sql.OrderBy("menu_id"); + + if (pageNumber > 0) + { + sql.Append("LIMIT @0", 10); + sql.Append("OFFSET @0", offset); + } + + return Factory.Get(this._Catalog, sql); + } + + /// + /// Performs a filtered count on table "website.menus". + /// + /// The named filter. + /// Returns number of rows of "Menu" class using the filter. + /// Thown when the application user does not have sufficient privilege to perform this action. + public long CountFiltered(string filterName) + { + if (string.IsNullOrWhiteSpace(this._Catalog)) + { + return 0; + } + + if (!this.SkipValidation) + { + if (!this.Validated) + { + this.Validate(AccessTypeEnum.Read, this._LoginId, this._Catalog, false); + } + if (!this.HasAccess) + { + Log.Information("Access to count entity \"Menu\" was denied to the user with Login ID {LoginId}. Filter: {Filter}.", this._LoginId, filterName); + throw new UnauthorizedException("Access is denied."); + } + } + + List filters = this.GetFilters(this._Catalog, filterName); + Sql sql = Sql.Builder.Append("SELECT COUNT(*) FROM website.menus WHERE 1 = 1"); + Frapid.DataAccess.FilterManager.AddFilters(ref sql, new Frapid.WebsiteBuilder.Entities.Menu(), filters); + + return Factory.Scalar(this._Catalog, sql); + } + + /// + /// Performs a filtered select statement on table "website.menus" producing a paginated result of 10. + /// + /// Enter the page number to produce the paginated result. If you provide a negative number, the result will not be paginated. + /// The named filter. + /// Returns collection of "Menu" class. + /// Thown when the application user does not have sufficient privilege to perform this action. + public IEnumerable GetFiltered(long pageNumber, string filterName) + { + if (string.IsNullOrWhiteSpace(this._Catalog)) + { + return null; + } + + if (!this.SkipValidation) + { + if (!this.Validated) + { + this.Validate(AccessTypeEnum.Read, this._LoginId, this._Catalog, false); + } + if (!this.HasAccess) + { + Log.Information("Access to Page #{Page} of the filtered entity \"Menu\" was denied to the user with Login ID {LoginId}. Filter: {Filter}.", pageNumber, this._LoginId, filterName); + throw new UnauthorizedException("Access is denied."); + } + } + + List filters = this.GetFilters(this._Catalog, filterName); + + long offset = (pageNumber - 1) * 10; + Sql sql = Sql.Builder.Append("SELECT * FROM website.menus WHERE 1 = 1"); + + Frapid.DataAccess.FilterManager.AddFilters(ref sql, new Frapid.WebsiteBuilder.Entities.Menu(), filters); + + sql.OrderBy("menu_id"); + + if (pageNumber > 0) + { + sql.Append("LIMIT @0", 10); + sql.Append("OFFSET @0", offset); + } + + return Factory.Get(this._Catalog, sql); + } + + + } +} \ No newline at end of file diff --git a/src/Frapid.Web/Areas/Frapid.WebsiteBuilder/DataAccess/MenuItem.cs b/src/Frapid.Web/Areas/Frapid.WebsiteBuilder/DataAccess/MenuItem.cs new file mode 100644 index 00000000..45ca19e8 --- /dev/null +++ b/src/Frapid.Web/Areas/Frapid.WebsiteBuilder/DataAccess/MenuItem.cs @@ -0,0 +1,842 @@ +// ReSharper disable All +using System.Collections.Generic; +using System.Data; +using System.Dynamic; +using System.Linq; +using Frapid.Configuration; +using Frapid.DataAccess; +using Frapid.DataAccess.Models; +using Frapid.DbPolicy; +using Frapid.Framework.Extensions; +using Npgsql; +using Frapid.NPoco; +using Serilog; + +namespace Frapid.WebsiteBuilder.DataAccess +{ + /// + /// Provides simplified data access features to perform SCRUD operation on the database table "website.menu_items". + /// + public class MenuItem : DbAccess, IMenuItemRepository + { + /// + /// The schema of this table. Returns literal "website". + /// + public override string _ObjectNamespace => "website"; + + /// + /// The schema unqualified name of this table. Returns literal "menu_items". + /// + public override string _ObjectName => "menu_items"; + + /// + /// Login id of application user accessing this table. + /// + public long _LoginId { get; set; } + + /// + /// User id of application user accessing this table. + /// + public int _UserId { get; set; } + + /// + /// The name of the database on which queries are being executed to. + /// + public string _Catalog { get; set; } + + /// + /// Performs SQL count on the table "website.menu_items". + /// + /// Returns the number of rows of the table "website.menu_items". + /// Thown when the application user does not have sufficient privilege to perform this action. + public long Count() + { + if (string.IsNullOrWhiteSpace(this._Catalog)) + { + return 0; + } + + if (!this.SkipValidation) + { + if (!this.Validated) + { + this.Validate(AccessTypeEnum.Read, this._LoginId, this._Catalog, false); + } + if (!this.HasAccess) + { + Log.Information("Access to count entity \"MenuItem\" was denied to the user with Login ID {LoginId}", this._LoginId); + throw new UnauthorizedException("Access is denied."); + } + } + + const string sql = "SELECT COUNT(*) FROM website.menu_items;"; + return Factory.Scalar(this._Catalog, sql); + } + + /// + /// Executes a select query on the table "website.menu_items" to return all instances of the "MenuItem" class. + /// + /// Returns a non-live, non-mapped instances of "MenuItem" class. + /// Thown when the application user does not have sufficient privilege to perform this action. + public IEnumerable GetAll() + { + if (string.IsNullOrWhiteSpace(this._Catalog)) + { + return null; + } + + if (!this.SkipValidation) + { + if (!this.Validated) + { + this.Validate(AccessTypeEnum.ExportData, this._LoginId, this._Catalog, false); + } + if (!this.HasAccess) + { + Log.Information("Access to the export entity \"MenuItem\" was denied to the user with Login ID {LoginId}", this._LoginId); + throw new UnauthorizedException("Access is denied."); + } + } + + const string sql = "SELECT * FROM website.menu_items ORDER BY menu_item_id;"; + return Factory.Get(this._Catalog, sql); + } + + /// + /// Executes a select query on the table "website.menu_items" to return all instances of the "MenuItem" class to export. + /// + /// Returns a non-live, non-mapped instances of "MenuItem" class. + /// Thown when the application user does not have sufficient privilege to perform this action. + public IEnumerable Export() + { + if (string.IsNullOrWhiteSpace(this._Catalog)) + { + return null; + } + + if (!this.SkipValidation) + { + if (!this.Validated) + { + this.Validate(AccessTypeEnum.ExportData, this._LoginId, this._Catalog, false); + } + if (!this.HasAccess) + { + Log.Information("Access to the export entity \"MenuItem\" was denied to the user with Login ID {LoginId}", this._LoginId); + throw new UnauthorizedException("Access is denied."); + } + } + + const string sql = "SELECT * FROM website.menu_items ORDER BY menu_item_id;"; + return Factory.Get(this._Catalog, sql); + } + + /// + /// Executes a select query on the table "website.menu_items" with a where filter on the column "menu_item_id" to return a single instance of the "MenuItem" class. + /// + /// The column "menu_item_id" parameter used on where filter. + /// Returns a non-live, non-mapped instance of "MenuItem" class mapped to the database row. + /// Thown when the application user does not have sufficient privilege to perform this action. + public Frapid.WebsiteBuilder.Entities.MenuItem Get(int menuItemId) + { + if (string.IsNullOrWhiteSpace(this._Catalog)) + { + return null; + } + + if (!this.SkipValidation) + { + if (!this.Validated) + { + this.Validate(AccessTypeEnum.Read, this._LoginId, this._Catalog, false); + } + if (!this.HasAccess) + { + Log.Information("Access to the get entity \"MenuItem\" filtered by \"MenuItemId\" with value {MenuItemId} was denied to the user with Login ID {_LoginId}", menuItemId, this._LoginId); + throw new UnauthorizedException("Access is denied."); + } + } + + const string sql = "SELECT * FROM website.menu_items WHERE menu_item_id=@0;"; + return Factory.Get(this._Catalog, sql, menuItemId).FirstOrDefault(); + } + + /// + /// Gets the first record of the table "website.menu_items". + /// + /// Returns a non-live, non-mapped instance of "MenuItem" class mapped to the database row. + /// Thown when the application user does not have sufficient privilege to perform this action. + public Frapid.WebsiteBuilder.Entities.MenuItem GetFirst() + { + if (string.IsNullOrWhiteSpace(this._Catalog)) + { + return null; + } + + if (!this.SkipValidation) + { + if (!this.Validated) + { + this.Validate(AccessTypeEnum.Read, this._LoginId, this._Catalog, false); + } + if (!this.HasAccess) + { + Log.Information("Access to the get the first record of entity \"MenuItem\" was denied to the user with Login ID {_LoginId}", this._LoginId); + throw new UnauthorizedException("Access is denied."); + } + } + + const string sql = "SELECT * FROM website.menu_items ORDER BY menu_item_id LIMIT 1;"; + return Factory.Get(this._Catalog, sql).FirstOrDefault(); + } + + /// + /// Gets the previous record of the table "website.menu_items" sorted by menuItemId. + /// + /// The column "menu_item_id" parameter used to find the next record. + /// Returns a non-live, non-mapped instance of "MenuItem" class mapped to the database row. + /// Thown when the application user does not have sufficient privilege to perform this action. + public Frapid.WebsiteBuilder.Entities.MenuItem GetPrevious(int menuItemId) + { + if (string.IsNullOrWhiteSpace(this._Catalog)) + { + return null; + } + + if (!this.SkipValidation) + { + if (!this.Validated) + { + this.Validate(AccessTypeEnum.Read, this._LoginId, this._Catalog, false); + } + if (!this.HasAccess) + { + Log.Information("Access to the get the previous entity of \"MenuItem\" by \"MenuItemId\" with value {MenuItemId} was denied to the user with Login ID {_LoginId}", menuItemId, this._LoginId); + throw new UnauthorizedException("Access is denied."); + } + } + + const string sql = "SELECT * FROM website.menu_items WHERE menu_item_id < @0 ORDER BY menu_item_id DESC LIMIT 1;"; + return Factory.Get(this._Catalog, sql, menuItemId).FirstOrDefault(); + } + + /// + /// Gets the next record of the table "website.menu_items" sorted by menuItemId. + /// + /// The column "menu_item_id" parameter used to find the next record. + /// Returns a non-live, non-mapped instance of "MenuItem" class mapped to the database row. + /// Thown when the application user does not have sufficient privilege to perform this action. + public Frapid.WebsiteBuilder.Entities.MenuItem GetNext(int menuItemId) + { + if (string.IsNullOrWhiteSpace(this._Catalog)) + { + return null; + } + + if (!this.SkipValidation) + { + if (!this.Validated) + { + this.Validate(AccessTypeEnum.Read, this._LoginId, this._Catalog, false); + } + if (!this.HasAccess) + { + Log.Information("Access to the get the next entity of \"MenuItem\" by \"MenuItemId\" with value {MenuItemId} was denied to the user with Login ID {_LoginId}", menuItemId, this._LoginId); + throw new UnauthorizedException("Access is denied."); + } + } + + const string sql = "SELECT * FROM website.menu_items WHERE menu_item_id > @0 ORDER BY menu_item_id LIMIT 1;"; + return Factory.Get(this._Catalog, sql, menuItemId).FirstOrDefault(); + } + + + /// + /// Gets the last record of the table "website.menu_items". + /// + /// Returns a non-live, non-mapped instance of "MenuItem" class mapped to the database row. + /// Thown when the application user does not have sufficient privilege to perform this action. + public Frapid.WebsiteBuilder.Entities.MenuItem GetLast() + { + if (string.IsNullOrWhiteSpace(this._Catalog)) + { + return null; + } + + if (!this.SkipValidation) + { + if (!this.Validated) + { + this.Validate(AccessTypeEnum.Read, this._LoginId, this._Catalog, false); + } + if (!this.HasAccess) + { + Log.Information("Access to the get the last record of entity \"MenuItem\" was denied to the user with Login ID {_LoginId}", this._LoginId); + throw new UnauthorizedException("Access is denied."); + } + } + + const string sql = "SELECT * FROM website.menu_items ORDER BY menu_item_id DESC LIMIT 1;"; + return Factory.Get(this._Catalog, sql).FirstOrDefault(); + } + + /// + /// Executes a select query on the table "website.menu_items" with a where filter on the column "menu_item_id" to return a multiple instances of the "MenuItem" class. + /// + /// Array of column "menu_item_id" parameter used on where filter. + /// Returns a non-live, non-mapped collection of "MenuItem" class mapped to the database row. + /// Thown when the application user does not have sufficient privilege to perform this action. + public IEnumerable Get(int[] menuItemIds) + { + if (string.IsNullOrWhiteSpace(this._Catalog)) + { + return null; + } + + if (!this.SkipValidation) + { + if (!this.Validated) + { + this.Validate(AccessTypeEnum.Read, this._LoginId, this._Catalog, false); + } + if (!this.HasAccess) + { + Log.Information("Access to entity \"MenuItem\" was denied to the user with Login ID {LoginId}. menuItemIds: {menuItemIds}.", this._LoginId, menuItemIds); + throw new UnauthorizedException("Access is denied."); + } + } + + const string sql = "SELECT * FROM website.menu_items WHERE menu_item_id IN (@0);"; + + return Factory.Get(this._Catalog, sql, menuItemIds); + } + + /// + /// Custom fields are user defined form elements for website.menu_items. + /// + /// Returns an enumerable custom field collection for the table website.menu_items + /// Thown when the application user does not have sufficient privilege to perform this action. + public IEnumerable GetCustomFields(string resourceId) + { + if (string.IsNullOrWhiteSpace(this._Catalog)) + { + return null; + } + + if (!this.SkipValidation) + { + if (!this.Validated) + { + this.Validate(AccessTypeEnum.Read, this._LoginId, this._Catalog, false); + } + if (!this.HasAccess) + { + Log.Information("Access to get custom fields for entity \"MenuItem\" was denied to the user with Login ID {LoginId}", this._LoginId); + throw new UnauthorizedException("Access is denied."); + } + } + + string sql; + if (string.IsNullOrWhiteSpace(resourceId)) + { + sql = "SELECT * FROM config.custom_field_definition_view WHERE table_name='website.menu_items' ORDER BY field_order;"; + return Factory.Get(this._Catalog, sql); + } + + sql = "SELECT * from config.get_custom_field_definition('website.menu_items'::text, @0::text) ORDER BY field_order;"; + return Factory.Get(this._Catalog, sql, resourceId); + } + + /// + /// Displayfields provide a minimal name/value context for data binding the row collection of website.menu_items. + /// + /// Returns an enumerable name and value collection for the table website.menu_items + /// Thown when the application user does not have sufficient privilege to perform this action. + public IEnumerable GetDisplayFields() + { + List displayFields = new List(); + + if (string.IsNullOrWhiteSpace(this._Catalog)) + { + return displayFields; + } + + if (!this.SkipValidation) + { + if (!this.Validated) + { + this.Validate(AccessTypeEnum.Read, this._LoginId, this._Catalog, false); + } + if (!this.HasAccess) + { + Log.Information("Access to get display field for entity \"MenuItem\" was denied to the user with Login ID {LoginId}", this._LoginId); + throw new UnauthorizedException("Access is denied."); + } + } + + const string sql = "SELECT menu_item_id AS key, menu_item_id as value FROM website.menu_items;"; + using (NpgsqlCommand command = new NpgsqlCommand(sql)) + { + using (DataTable table = DbOperation.GetDataTable(this._Catalog, command)) + { + if (table?.Rows == null || table.Rows.Count == 0) + { + return displayFields; + } + + foreach (DataRow row in table.Rows) + { + if (row != null) + { + DisplayField displayField = new DisplayField + { + Key = row["key"].ToString(), + Value = row["value"].ToString() + }; + + displayFields.Add(displayField); + } + } + } + } + + return displayFields; + } + + /// + /// Inserts or updates the instance of MenuItem class on the database table "website.menu_items". + /// + /// The instance of "MenuItem" class to insert or update. + /// The custom field collection. + /// Thown when the application user does not have sufficient privilege to perform this action. + public object AddOrEdit(dynamic menuItem, List customFields) + { + if (string.IsNullOrWhiteSpace(this._Catalog)) + { + return null; + } + + menuItem.audit_user_id = this._UserId; + menuItem.audit_ts = System.DateTime.UtcNow; + + object primaryKeyValue = menuItem.menu_item_id; + + if (Cast.To(primaryKeyValue) > 0) + { + this.Update(menuItem, Cast.To(primaryKeyValue)); + } + else + { + primaryKeyValue = this.Add(menuItem); + } + + string sql = "DELETE FROM config.custom_fields WHERE custom_field_setup_id IN(" + + "SELECT custom_field_setup_id " + + "FROM config.custom_field_setup " + + "WHERE form_name=config.get_custom_field_form_name('website.menu_items')" + + ");"; + + Factory.NonQuery(this._Catalog, sql); + + if (customFields == null) + { + return primaryKeyValue; + } + + foreach (var field in customFields) + { + sql = "INSERT INTO config.custom_fields(custom_field_setup_id, resource_id, value) " + + "SELECT config.get_custom_field_setup_id_by_table_name('website.menu_items', @0::character varying(100)), " + + "@1, @2;"; + + Factory.NonQuery(this._Catalog, sql, field.FieldName, primaryKeyValue, field.Value); + } + + return primaryKeyValue; + } + + /// + /// Inserts the instance of MenuItem class on the database table "website.menu_items". + /// + /// The instance of "MenuItem" class to insert. + /// Thown when the application user does not have sufficient privilege to perform this action. + public object Add(dynamic menuItem) + { + if (string.IsNullOrWhiteSpace(this._Catalog)) + { + return null; + } + + if (!this.SkipValidation) + { + if (!this.Validated) + { + this.Validate(AccessTypeEnum.Create, this._LoginId, this._Catalog, false); + } + if (!this.HasAccess) + { + Log.Information("Access to add entity \"MenuItem\" was denied to the user with Login ID {LoginId}. {MenuItem}", this._LoginId, menuItem); + throw new UnauthorizedException("Access is denied."); + } + } + + return Factory.Insert(this._Catalog, menuItem, "website.menu_items", "menu_item_id"); + } + + /// + /// Inserts or updates multiple instances of MenuItem class on the database table "website.menu_items"; + /// + /// List of "MenuItem" class to import. + /// + public List BulkImport(List menuItems) + { + if (!this.SkipValidation) + { + if (!this.Validated) + { + this.Validate(AccessTypeEnum.ImportData, this._LoginId, this._Catalog, false); + } + + if (!this.HasAccess) + { + Log.Information("Access to import entity \"MenuItem\" was denied to the user with Login ID {LoginId}. {menuItems}", this._LoginId, menuItems); + throw new UnauthorizedException("Access is denied."); + } + } + + var result = new List(); + int line = 0; + try + { + using (Database db = new Database(ConnectionString.GetConnectionString(this._Catalog), Factory.ProviderName)) + { + using (ITransaction transaction = db.GetTransaction()) + { + foreach (dynamic menuItem in menuItems) + { + line++; + + menuItem.audit_user_id = this._UserId; + menuItem.audit_ts = System.DateTime.UtcNow; + + object primaryKeyValue = menuItem.menu_item_id; + + if (Cast.To(primaryKeyValue) > 0) + { + result.Add(menuItem.menu_item_id); + db.Update("website.menu_items", "menu_item_id", menuItem, menuItem.menu_item_id); + } + else + { + result.Add(db.Insert("website.menu_items", "menu_item_id", menuItem)); + } + } + + transaction.Complete(); + } + + return result; + } + } + catch (NpgsqlException ex) + { + string errorMessage = $"Error on line {line} "; + + if (ex.Code.StartsWith("P")) + { + errorMessage += Factory.GetDbErrorResource(ex); + + throw new DataAccessException(errorMessage, ex); + } + + errorMessage += ex.Message; + throw new DataAccessException(errorMessage, ex); + } + catch (System.Exception ex) + { + string errorMessage = $"Error on line {line} "; + throw new DataAccessException(errorMessage, ex); + } + } + + /// + /// Updates the row of the table "website.menu_items" with an instance of "MenuItem" class against the primary key value. + /// + /// The instance of "MenuItem" class to update. + /// The value of the column "menu_item_id" which will be updated. + /// Thown when the application user does not have sufficient privilege to perform this action. + public void Update(dynamic menuItem, int menuItemId) + { + if (string.IsNullOrWhiteSpace(this._Catalog)) + { + return; + } + + if (!this.SkipValidation) + { + if (!this.Validated) + { + this.Validate(AccessTypeEnum.Edit, this._LoginId, this._Catalog, false); + } + if (!this.HasAccess) + { + Log.Information("Access to edit entity \"MenuItem\" with Primary Key {PrimaryKey} was denied to the user with Login ID {LoginId}. {MenuItem}", menuItemId, this._LoginId, menuItem); + throw new UnauthorizedException("Access is denied."); + } + } + + Factory.Update(this._Catalog, menuItem, menuItemId, "website.menu_items", "menu_item_id"); + } + + /// + /// Deletes the row of the table "website.menu_items" against the primary key value. + /// + /// The value of the column "menu_item_id" which will be deleted. + /// Thown when the application user does not have sufficient privilege to perform this action. + public void Delete(int menuItemId) + { + if (string.IsNullOrWhiteSpace(this._Catalog)) + { + return; + } + + if (!this.SkipValidation) + { + if (!this.Validated) + { + this.Validate(AccessTypeEnum.Delete, this._LoginId, this._Catalog, false); + } + if (!this.HasAccess) + { + Log.Information("Access to delete entity \"MenuItem\" with Primary Key {PrimaryKey} was denied to the user with Login ID {LoginId}.", menuItemId, this._LoginId); + throw new UnauthorizedException("Access is denied."); + } + } + + const string sql = "DELETE FROM website.menu_items WHERE menu_item_id=@0;"; + Factory.NonQuery(this._Catalog, sql, menuItemId); + } + + /// + /// Performs a select statement on table "website.menu_items" producing a paginated result of 10. + /// + /// Returns the first page of collection of "MenuItem" class. + /// Thown when the application user does not have sufficient privilege to perform this action. + public IEnumerable GetPaginatedResult() + { + if (string.IsNullOrWhiteSpace(this._Catalog)) + { + return null; + } + + if (!this.SkipValidation) + { + if (!this.Validated) + { + this.Validate(AccessTypeEnum.Read, this._LoginId, this._Catalog, false); + } + if (!this.HasAccess) + { + Log.Information("Access to the first page of the entity \"MenuItem\" was denied to the user with Login ID {LoginId}.", this._LoginId); + throw new UnauthorizedException("Access is denied."); + } + } + + const string sql = "SELECT * FROM website.menu_items ORDER BY menu_item_id LIMIT 10 OFFSET 0;"; + return Factory.Get(this._Catalog, sql); + } + + /// + /// Performs a select statement on table "website.menu_items" producing a paginated result of 10. + /// + /// Enter the page number to produce the paginated result. + /// Returns collection of "MenuItem" class. + /// Thown when the application user does not have sufficient privilege to perform this action. + public IEnumerable GetPaginatedResult(long pageNumber) + { + if (string.IsNullOrWhiteSpace(this._Catalog)) + { + return null; + } + + if (!this.SkipValidation) + { + if (!this.Validated) + { + this.Validate(AccessTypeEnum.Read, this._LoginId, this._Catalog, false); + } + if (!this.HasAccess) + { + Log.Information("Access to Page #{Page} of the entity \"MenuItem\" was denied to the user with Login ID {LoginId}.", pageNumber, this._LoginId); + throw new UnauthorizedException("Access is denied."); + } + } + + long offset = (pageNumber - 1) * 10; + const string sql = "SELECT * FROM website.menu_items ORDER BY menu_item_id LIMIT 10 OFFSET @0;"; + + return Factory.Get(this._Catalog, sql, offset); + } + + public List GetFilters(string catalog, string filterName) + { + const string sql = "SELECT * FROM config.filters WHERE object_name='website.menu_items' AND lower(filter_name)=lower(@0);"; + return Factory.Get(catalog, sql, filterName).ToList(); + } + + /// + /// Performs a filtered count on table "website.menu_items". + /// + /// The list of filter conditions. + /// Returns number of rows of "MenuItem" class using the filter. + /// Thown when the application user does not have sufficient privilege to perform this action. + public long CountWhere(List filters) + { + if (string.IsNullOrWhiteSpace(this._Catalog)) + { + return 0; + } + + if (!this.SkipValidation) + { + if (!this.Validated) + { + this.Validate(AccessTypeEnum.Read, this._LoginId, this._Catalog, false); + } + if (!this.HasAccess) + { + Log.Information("Access to count entity \"MenuItem\" was denied to the user with Login ID {LoginId}. Filters: {Filters}.", this._LoginId, filters); + throw new UnauthorizedException("Access is denied."); + } + } + + Sql sql = Sql.Builder.Append("SELECT COUNT(*) FROM website.menu_items WHERE 1 = 1"); + Frapid.DataAccess.FilterManager.AddFilters(ref sql, new Frapid.WebsiteBuilder.Entities.MenuItem(), filters); + + return Factory.Scalar(this._Catalog, sql); + } + + /// + /// Performs a filtered select statement on table "website.menu_items" producing a paginated result of 10. + /// + /// Enter the page number to produce the paginated result. If you provide a negative number, the result will not be paginated. + /// The list of filter conditions. + /// Returns collection of "MenuItem" class. + /// Thown when the application user does not have sufficient privilege to perform this action. + public IEnumerable GetWhere(long pageNumber, List filters) + { + if (string.IsNullOrWhiteSpace(this._Catalog)) + { + return null; + } + + if (!this.SkipValidation) + { + if (!this.Validated) + { + this.Validate(AccessTypeEnum.Read, this._LoginId, this._Catalog, false); + } + if (!this.HasAccess) + { + Log.Information("Access to Page #{Page} of the filtered entity \"MenuItem\" was denied to the user with Login ID {LoginId}. Filters: {Filters}.", pageNumber, this._LoginId, filters); + throw new UnauthorizedException("Access is denied."); + } + } + + long offset = (pageNumber - 1) * 10; + Sql sql = Sql.Builder.Append("SELECT * FROM website.menu_items WHERE 1 = 1"); + + Frapid.DataAccess.FilterManager.AddFilters(ref sql, new Frapid.WebsiteBuilder.Entities.MenuItem(), filters); + + sql.OrderBy("menu_item_id"); + + if (pageNumber > 0) + { + sql.Append("LIMIT @0", 10); + sql.Append("OFFSET @0", offset); + } + + return Factory.Get(this._Catalog, sql); + } + + /// + /// Performs a filtered count on table "website.menu_items". + /// + /// The named filter. + /// Returns number of rows of "MenuItem" class using the filter. + /// Thown when the application user does not have sufficient privilege to perform this action. + public long CountFiltered(string filterName) + { + if (string.IsNullOrWhiteSpace(this._Catalog)) + { + return 0; + } + + if (!this.SkipValidation) + { + if (!this.Validated) + { + this.Validate(AccessTypeEnum.Read, this._LoginId, this._Catalog, false); + } + if (!this.HasAccess) + { + Log.Information("Access to count entity \"MenuItem\" was denied to the user with Login ID {LoginId}. Filter: {Filter}.", this._LoginId, filterName); + throw new UnauthorizedException("Access is denied."); + } + } + + List filters = this.GetFilters(this._Catalog, filterName); + Sql sql = Sql.Builder.Append("SELECT COUNT(*) FROM website.menu_items WHERE 1 = 1"); + Frapid.DataAccess.FilterManager.AddFilters(ref sql, new Frapid.WebsiteBuilder.Entities.MenuItem(), filters); + + return Factory.Scalar(this._Catalog, sql); + } + + /// + /// Performs a filtered select statement on table "website.menu_items" producing a paginated result of 10. + /// + /// Enter the page number to produce the paginated result. If you provide a negative number, the result will not be paginated. + /// The named filter. + /// Returns collection of "MenuItem" class. + /// Thown when the application user does not have sufficient privilege to perform this action. + public IEnumerable GetFiltered(long pageNumber, string filterName) + { + if (string.IsNullOrWhiteSpace(this._Catalog)) + { + return null; + } + + if (!this.SkipValidation) + { + if (!this.Validated) + { + this.Validate(AccessTypeEnum.Read, this._LoginId, this._Catalog, false); + } + if (!this.HasAccess) + { + Log.Information("Access to Page #{Page} of the filtered entity \"MenuItem\" was denied to the user with Login ID {LoginId}. Filter: {Filter}.", pageNumber, this._LoginId, filterName); + throw new UnauthorizedException("Access is denied."); + } + } + + List filters = this.GetFilters(this._Catalog, filterName); + + long offset = (pageNumber - 1) * 10; + Sql sql = Sql.Builder.Append("SELECT * FROM website.menu_items WHERE 1 = 1"); + + Frapid.DataAccess.FilterManager.AddFilters(ref sql, new Frapid.WebsiteBuilder.Entities.MenuItem(), filters); + + sql.OrderBy("menu_item_id"); + + if (pageNumber > 0) + { + sql.Append("LIMIT @0", 10); + sql.Append("OFFSET @0", offset); + } + + return Factory.Get(this._Catalog, sql); + } + + + } +} \ No newline at end of file diff --git a/src/Frapid.Web/Areas/Frapid.WebsiteBuilder/DataAccess/MenuItemView.cs b/src/Frapid.Web/Areas/Frapid.WebsiteBuilder/DataAccess/MenuItemView.cs new file mode 100644 index 00000000..eef2b9a7 --- /dev/null +++ b/src/Frapid.Web/Areas/Frapid.WebsiteBuilder/DataAccess/MenuItemView.cs @@ -0,0 +1,383 @@ +// ReSharper disable All +using System.Collections.Generic; +using System.Data; +using System.Dynamic; +using System.Linq; +using Frapid.DataAccess; +using Frapid.DataAccess.Models; +using Frapid.DbPolicy; +using Frapid.Framework.Extensions; +using Npgsql; +using Serilog; +using Frapid.NPoco; + +namespace Frapid.WebsiteBuilder.DataAccess +{ + /// + /// Provides simplified data access features to perform SCRUD operation on the database view "website.menu_item_view". + /// + public class MenuItemView : DbAccess, IMenuItemViewRepository + { + /// + /// The schema of this view. Returns literal "website". + /// + public override string _ObjectNamespace => "website"; + + /// + /// The schema unqualified name of this view. Returns literal "menu_item_view". + /// + public override string _ObjectName => "menu_item_view"; + + /// + /// Login id of application user accessing this view. + /// + public long _LoginId { get; set; } + + /// + /// User id of application user accessing this table. + /// + public int _UserId { get; set; } + + /// + /// The name of the database on which queries are being executed to. + /// + public string _Catalog { get; set; } + + /// + /// Performs SQL count on the view "website.menu_item_view". + /// + /// Returns the number of rows of the view "website.menu_item_view". + /// Thown when the application user does not have sufficient privilege to perform this action. + public long Count() + { + if (string.IsNullOrWhiteSpace(this._Catalog)) + { + return 0; + } + + if (!this.SkipValidation) + { + if (!this.Validated) + { + this.Validate(AccessTypeEnum.Read, this._LoginId, this._Catalog, false); + } + if (!this.HasAccess) + { + Log.Information("Access to count entity \"MenuItemView\" was denied to the user with Login ID {LoginId}", this._LoginId); + throw new UnauthorizedException("Access is denied."); + } + } + + const string sql = "SELECT COUNT(*) FROM website.menu_item_view;"; + return Factory.Scalar(this._Catalog, sql); + } + + /// + /// Executes a select query on the view "website.menu_item_view" to return all instances of the "MenuItemView" class. + /// + /// Returns a non-live, non-mapped instances of "MenuItemView" class. + /// Thown when the application user does not have sufficient privilege to perform this action. + public IEnumerable Get() + { + if (string.IsNullOrWhiteSpace(this._Catalog)) + { + return null; + } + + if (!this.SkipValidation) + { + if (!this.Validated) + { + this.Validate(AccessTypeEnum.ExportData, this._LoginId, this._Catalog, false); + } + if (!this.HasAccess) + { + Log.Information("Access to the export entity \"MenuItemView\" was denied to the user with Login ID {LoginId}", this._LoginId); + throw new UnauthorizedException("Access is denied."); + } + } + + const string sql = "SELECT * FROM website.menu_item_view ORDER BY 1;"; + return Factory.Get(this._Catalog, sql); + } + + /// + /// Displayfields provide a minimal name/value context for data binding the row collection of website.menu_item_view. + /// + /// Returns an enumerable name and value collection for the view website.menu_item_view + /// Thown when the application user does not have sufficient privilege to perform this action. + public IEnumerable GetDisplayFields() + { + List displayFields = new List(); + + if (string.IsNullOrWhiteSpace(this._Catalog)) + { + return displayFields; + } + + if (!this.SkipValidation) + { + if (!this.Validated) + { + this.Validate(AccessTypeEnum.Read, this._LoginId, this._Catalog, false); + } + if (!this.HasAccess) + { + Log.Information("Access to get display field for entity \"MenuItemView\" was denied to the user with Login ID {LoginId}", this._LoginId); + throw new UnauthorizedException("Access is denied."); + } + } + + const string sql = "SELECT menu_id AS key, menu_name as value FROM website.menu_item_view;"; + using (NpgsqlCommand command = new NpgsqlCommand(sql)) + { + using (DataTable table = DbOperation.GetDataTable(this._Catalog, command)) + { + if (table?.Rows == null || table.Rows.Count == 0) + { + return displayFields; + } + + foreach (DataRow row in table.Rows) + { + if (row != null) + { + DisplayField displayField = new DisplayField + { + Key = row["key"].ToString(), + Value = row["value"].ToString() + }; + + displayFields.Add(displayField); + } + } + } + } + + return displayFields; + } + + + + /// + /// Performs a select statement on the view "website.menu_item_view" producing a paginated result of 10. + /// + /// Returns the first page of collection of "MenuItemView" class. + /// Thown when the application user does not have sufficient privilege to perform this action. + public IEnumerable GetPaginatedResult() + { + if (string.IsNullOrWhiteSpace(this._Catalog)) + { + return null; + } + + if (!this.SkipValidation) + { + if (!this.Validated) + { + this.Validate(AccessTypeEnum.Read, this._LoginId, this._Catalog, false); + } + if (!this.HasAccess) + { + Log.Information("Access to the first page of the entity \"MenuItemView\" was denied to the user with Login ID {LoginId}.", this._LoginId); + throw new UnauthorizedException("Access is denied."); + } + } + + const string sql = "SELECT * FROM website.menu_item_view ORDER BY 1 LIMIT 10 OFFSET 0;"; + return Factory.Get(this._Catalog, sql); + } + + /// + /// Performs a select statement on the view "website.menu_item_view" producing a paginated result of 10. + /// + /// Enter the page number to produce the paginated result. + /// Returns collection of "MenuItemView" class. + /// Thown when the application user does not have sufficient privilege to perform this action. + public IEnumerable GetPaginatedResult(long pageNumber) + { + if (string.IsNullOrWhiteSpace(this._Catalog)) + { + return null; + } + + if (!this.SkipValidation) + { + if (!this.Validated) + { + this.Validate(AccessTypeEnum.Read, this._LoginId, this._Catalog, false); + } + if (!this.HasAccess) + { + Log.Information("Access to Page #{Page} of the entity \"MenuItemView\" was denied to the user with Login ID {LoginId}.", pageNumber, this._LoginId); + throw new UnauthorizedException("Access is denied."); + } + } + + long offset = (pageNumber - 1) * 10; + const string sql = "SELECT * FROM website.menu_item_view ORDER BY 1 LIMIT 10 OFFSET @0;"; + + return Factory.Get(this._Catalog, sql, offset); + } + + public List GetFilters(string catalog, string filterName) + { + const string sql = "SELECT * FROM config.filters WHERE object_name='website.menu_item_view' AND lower(filter_name)=lower(@0);"; + return Factory.Get(catalog, sql, filterName).ToList(); + } + + /// + /// Performs a filtered count on view "website.menu_item_view". + /// + /// The list of filter conditions. + /// Returns number of rows of "MenuItemView" class using the filter. + /// Thown when the application user does not have sufficient privilege to perform this action. + public long CountWhere(List filters) + { + if (string.IsNullOrWhiteSpace(this._Catalog)) + { + return 0; + } + + if (!this.SkipValidation) + { + if (!this.Validated) + { + this.Validate(AccessTypeEnum.Read, this._LoginId, this._Catalog, false); + } + if (!this.HasAccess) + { + Log.Information("Access to count entity \"MenuItemView\" was denied to the user with Login ID {LoginId}. Filters: {Filters}.", this._LoginId, filters); + throw new UnauthorizedException("Access is denied."); + } + } + + Sql sql = Sql.Builder.Append("SELECT COUNT(*) FROM website.menu_item_view WHERE 1 = 1"); + Frapid.DataAccess.FilterManager.AddFilters(ref sql, new Frapid.WebsiteBuilder.Entities.MenuItemView(), filters); + + return Factory.Scalar(this._Catalog, sql); + } + + /// + /// Performs a filtered select statement on view "website.menu_item_view" producing a paginated result of 10. + /// + /// Enter the page number to produce the paginated result. If you provide a negative number, the result will not be paginated. + /// The list of filter conditions. + /// Returns collection of "MenuItemView" class. + /// Thown when the application user does not have sufficient privilege to perform this action. + public IEnumerable GetWhere(long pageNumber, List filters) + { + if (string.IsNullOrWhiteSpace(this._Catalog)) + { + return null; + } + + if (!this.SkipValidation) + { + if (!this.Validated) + { + this.Validate(AccessTypeEnum.Read, this._LoginId, this._Catalog, false); + } + if (!this.HasAccess) + { + Log.Information("Access to Page #{Page} of the filtered entity \"MenuItemView\" was denied to the user with Login ID {LoginId}. Filters: {Filters}.", pageNumber, this._LoginId, filters); + throw new UnauthorizedException("Access is denied."); + } + } + + long offset = (pageNumber - 1) * 10; + Sql sql = Sql.Builder.Append("SELECT * FROM website.menu_item_view WHERE 1 = 1"); + + Frapid.DataAccess.FilterManager.AddFilters(ref sql, new Frapid.WebsiteBuilder.Entities.MenuItemView(), filters); + + sql.OrderBy("1"); + + if (pageNumber > 0) + { + sql.Append("LIMIT @0", 10); + sql.Append("OFFSET @0", offset); + } + + return Factory.Get(this._Catalog, sql); + } + + /// + /// Performs a filtered count on view "website.menu_item_view". + /// + /// The named filter. + /// Returns number of rows of "MenuItemView" class using the filter. + /// Thown when the application user does not have sufficient privilege to perform this action. + public long CountFiltered(string filterName) + { + if (string.IsNullOrWhiteSpace(this._Catalog)) + { + return 0; + } + + if (!this.SkipValidation) + { + if (!this.Validated) + { + this.Validate(AccessTypeEnum.Read, this._LoginId, this._Catalog, false); + } + if (!this.HasAccess) + { + Log.Information("Access to count entity \"MenuItemView\" was denied to the user with Login ID {LoginId}. Filter: {Filter}.", this._LoginId, filterName); + throw new UnauthorizedException("Access is denied."); + } + } + + List filters = this.GetFilters(this._Catalog, filterName); + Sql sql = Sql.Builder.Append("SELECT COUNT(*) FROM website.menu_item_view WHERE 1 = 1"); + Frapid.DataAccess.FilterManager.AddFilters(ref sql, new Frapid.WebsiteBuilder.Entities.MenuItemView(), filters); + + return Factory.Scalar(this._Catalog, sql); + } + + /// + /// Performs a filtered select statement on view "website.menu_item_view" producing a paginated result of 10. + /// + /// Enter the page number to produce the paginated result. If you provide a negative number, the result will not be paginated. + /// The named filter. + /// Returns collection of "MenuItemView" class. + /// Thown when the application user does not have sufficient privilege to perform this action. + public IEnumerable GetFiltered(long pageNumber, string filterName) + { + if (string.IsNullOrWhiteSpace(this._Catalog)) + { + return null; + } + + if (!this.SkipValidation) + { + if (!this.Validated) + { + this.Validate(AccessTypeEnum.Read, this._LoginId, this._Catalog, false); + } + if (!this.HasAccess) + { + Log.Information("Access to Page #{Page} of the filtered entity \"MenuItemView\" was denied to the user with Login ID {LoginId}. Filter: {Filter}.", pageNumber, this._LoginId, filterName); + throw new UnauthorizedException("Access is denied."); + } + } + + List filters = this.GetFilters(this._Catalog, filterName); + + long offset = (pageNumber - 1) * 10; + Sql sql = Sql.Builder.Append("SELECT * FROM website.menu_item_view WHERE 1 = 1"); + + Frapid.DataAccess.FilterManager.AddFilters(ref sql, new Frapid.WebsiteBuilder.Entities.MenuItemView(), filters); + + sql.OrderBy("1"); + + if (pageNumber > 0) + { + sql.Append("LIMIT @0", 10); + sql.Append("OFFSET @0", offset); + } + + return Factory.Get(this._Catalog, sql); + } + + } +} \ No newline at end of file diff --git a/src/Frapid.Web/Areas/Frapid.WebsiteBuilder/DataAccess/packages.config b/src/Frapid.Web/Areas/Frapid.WebsiteBuilder/DataAccess/packages.config index 2ec73ed3..324b7ed3 100644 --- a/src/Frapid.Web/Areas/Frapid.WebsiteBuilder/DataAccess/packages.config +++ b/src/Frapid.Web/Areas/Frapid.WebsiteBuilder/DataAccess/packages.config @@ -1,5 +1,5 @@  - + \ No newline at end of file diff --git a/src/Frapid.Web/Areas/Frapid.WebsiteBuilder/Email.cs b/src/Frapid.Web/Areas/Frapid.WebsiteBuilder/Email.cs new file mode 100644 index 00000000..f333ce9b --- /dev/null +++ b/src/Frapid.Web/Areas/Frapid.WebsiteBuilder/Email.cs @@ -0,0 +1,82 @@ +using System; +using System.Globalization; +using System.IO; +using System.Text; +using System.Text.RegularExpressions; +using System.Threading.Tasks; +using System.Web; +using System.Web.Hosting; +using System.Web.Mvc; +using Frapid.Messaging; +using Frapid.Messaging.DTO; +using Frapid.Messaging.Helpers; +using Frapid.WebsiteBuilder.ViewModels; + +namespace Frapid.WebsiteBuilder +{ + public class Email + { + private const string TemplatePath = "~/Catalogs/{0}/Areas/Frapid.WebsiteBuilder/EmailTemplates/contact-us.html"; + + private string ConvertLines(string message) + { + return Regex.Replace(message, @"\r\n?|\n", "
"); + } + + private string GetMessage(string catalog, ContactForm model) + { + var fallback = model.Email + " wrote :

" + this.ConvertLines(model.Message); + + var file = HostingEnvironment.MapPath(string.Format(CultureInfo.InvariantCulture, TemplatePath, catalog)); + + if (file == null || !File.Exists(file)) + { + return fallback; + } + + var message = File.ReadAllText(file, Encoding.UTF8); + + if (string.IsNullOrWhiteSpace(message)) + { + return fallback; + } + + message = message.Replace("{{Email}}", model.Email); + message = message.Replace("{{Name}}", model.Name); + message = message.Replace("{{Message}}", this.ConvertLines(model.Message)); + + return message; + } + + private EmailQueue GetEmail(string catalog, ContactForm model) + { + Config config = new Config(catalog); + + return new EmailQueue + { + AddedOn = DateTime.Now, + FromName = model.Name, + ReplyTo = model.Email, + Subject = model.Subject, + Message = this.GetMessage(catalog, model), + SendTo = config.FromEmail + }; + } + + public async Task SendAsync(string catalog, ContactForm model) + { + try + { + var email = this.GetEmail(catalog, model); + MailQueueManager manager = new MailQueueManager(catalog, email); + manager.Add(); + + await manager.ProcessMailQueueAsync(EmailProcessor.GetDefault()); + } + catch + { + throw new HttpException(500, "Internal Server Error"); + } + } + } +} \ No newline at end of file diff --git a/src/Frapid.Web/Areas/Frapid.WebsiteBuilder/Entities/Contact.cs b/src/Frapid.Web/Areas/Frapid.WebsiteBuilder/Entities/Contact.cs new file mode 100644 index 00000000..d827f780 --- /dev/null +++ b/src/Frapid.Web/Areas/Frapid.WebsiteBuilder/Entities/Contact.cs @@ -0,0 +1,31 @@ +// ReSharper disable All +using System; +using Frapid.DataAccess; +using Frapid.NPoco; + +namespace Frapid.WebsiteBuilder.Entities +{ + [TableName("website.contacts")] + [PrimaryKey("contact_id", AutoIncrement = true)] + public sealed class Contact : IPoco + { + public int ContactId { get; set; } + public string Title { get; set; } + public string Name { get; set; } + public string Position { get; set; } + public string Address { get; set; } + public string City { get; set; } + public string State { get; set; } + public string Country { get; set; } + public string PostalCode { get; set; } + public string Telephone { get; set; } + public string Details { get; set; } + public string Email { get; set; } + public bool DisplayEmail { get; set; } + public bool DisplayContactForm { get; set; } + public int Sort { get; set; } + public bool Status { get; set; } + public int? AuditUserId { get; set; } + public DateTime? AuditTs { get; set; } + } +} \ No newline at end of file diff --git a/src/Frapid.Web/Areas/Frapid.WebsiteBuilder/Entities/Frapid.WebsiteBuilder.Entities.csproj b/src/Frapid.Web/Areas/Frapid.WebsiteBuilder/Entities/Frapid.WebsiteBuilder.Entities.csproj index 240003aa..2bd38937 100644 --- a/src/Frapid.Web/Areas/Frapid.WebsiteBuilder/Entities/Frapid.WebsiteBuilder.Entities.csproj +++ b/src/Frapid.Web/Areas/Frapid.WebsiteBuilder/Entities/Frapid.WebsiteBuilder.Entities.csproj @@ -51,7 +51,11 @@ + + + + diff --git a/src/Frapid.Web/Areas/Frapid.WebsiteBuilder/Entities/Menu.cs b/src/Frapid.Web/Areas/Frapid.WebsiteBuilder/Entities/Menu.cs new file mode 100644 index 00000000..d175411a --- /dev/null +++ b/src/Frapid.Web/Areas/Frapid.WebsiteBuilder/Entities/Menu.cs @@ -0,0 +1,18 @@ +// ReSharper disable All +using System; +using Frapid.DataAccess; +using Frapid.NPoco; + +namespace Frapid.WebsiteBuilder.Entities +{ + [TableName("website.menus")] + [PrimaryKey("menu_id", AutoIncrement = true)] + public sealed class Menu : IPoco + { + public int MenuId { get; set; } + public string MenuName { get; set; } + public string Description { get; set; } + public int? AuditUserId { get; set; } + public DateTime? AuditTs { get; set; } + } +} \ No newline at end of file diff --git a/src/Frapid.Web/Areas/Frapid.WebsiteBuilder/Entities/MenuItem.cs b/src/Frapid.Web/Areas/Frapid.WebsiteBuilder/Entities/MenuItem.cs new file mode 100644 index 00000000..d01c3b82 --- /dev/null +++ b/src/Frapid.Web/Areas/Frapid.WebsiteBuilder/Entities/MenuItem.cs @@ -0,0 +1,21 @@ +// ReSharper disable All +using System; +using Frapid.DataAccess; +using Frapid.NPoco; + +namespace Frapid.WebsiteBuilder.Entities +{ + [TableName("website.menu_items")] + [PrimaryKey("menu_item_id", AutoIncrement = true)] + public sealed class MenuItem : IPoco + { + public int MenuItemId { get; set; } + public int? MenuId { get; set; } + public int Sort { get; set; } + public string Title { get; set; } + public string Url { get; set; } + public int? ContentId { get; set; } + public int? AuditUserId { get; set; } + public DateTime? AuditTs { get; set; } + } +} \ No newline at end of file diff --git a/src/Frapid.Web/Areas/Frapid.WebsiteBuilder/Entities/MenuItemView.cs b/src/Frapid.Web/Areas/Frapid.WebsiteBuilder/Entities/MenuItemView.cs new file mode 100644 index 00000000..cccf5774 --- /dev/null +++ b/src/Frapid.Web/Areas/Frapid.WebsiteBuilder/Entities/MenuItemView.cs @@ -0,0 +1,22 @@ +// ReSharper disable All +using System; +using Frapid.DataAccess; +using Frapid.NPoco; + +namespace Frapid.WebsiteBuilder.Entities +{ + [TableName("website.menu_item_view")] + [PrimaryKey("", AutoIncrement = false)] + public sealed class MenuItemView : IPoco + { + public int? MenuId { get; set; } + public string MenuName { get; set; } + public string Description { get; set; } + public int? MenuItemId { get; set; } + public int? Sort { get; set; } + public string Title { get; set; } + public string Url { get; set; } + public int? ContentId { get; set; } + public string ContentAlias { get; set; } + } +} \ No newline at end of file diff --git a/src/Frapid.Web/Areas/Frapid.WebsiteBuilder/Frapid.WebsiteBuilder.csproj b/src/Frapid.Web/Areas/Frapid.WebsiteBuilder/Frapid.WebsiteBuilder.csproj index b0d14a70..6ab339cd 100644 --- a/src/Frapid.Web/Areas/Frapid.WebsiteBuilder/Frapid.WebsiteBuilder.csproj +++ b/src/Frapid.Web/Areas/Frapid.WebsiteBuilder/Frapid.WebsiteBuilder.csproj @@ -84,6 +84,10 @@ False ..\..\bin\Frapid.i18n.dll + + False + ..\..\bin\Frapid.Messaging.dll + False ..\..\bin\Frapid.NPoco.dll @@ -203,16 +207,27 @@ + + + - + + + + + + + - + + + @@ -244,9 +259,7 @@ - - - + {6d84caf6-e1fa-4a5c-8ccc-a36aea06aa0b} @@ -258,6 +271,8 @@ + + diff --git a/src/Frapid.Web/Areas/Frapid.WebsiteBuilder/Override/Frapid.WebsiteBuilder/EmailTemplates/contact-us.html b/src/Frapid.Web/Areas/Frapid.WebsiteBuilder/Override/Frapid.WebsiteBuilder/EmailTemplates/contact-us.html new file mode 100644 index 00000000..10c50c1a --- /dev/null +++ b/src/Frapid.Web/Areas/Frapid.WebsiteBuilder/Override/Frapid.WebsiteBuilder/EmailTemplates/contact-us.html @@ -0,0 +1,4 @@ +{{Name}} wrote: +
+
+{{Message}} \ No newline at end of file diff --git a/src/Frapid.Web/Catalogs/localhost/Areas/Frapid.WebsiteBuilder/Views/Layouts/404.cshtml b/src/Frapid.Web/Areas/Frapid.WebsiteBuilder/Override/Frapid.WebsiteBuilder/Themes/default/404.cshtml similarity index 100% rename from src/Frapid.Web/Catalogs/localhost/Areas/Frapid.WebsiteBuilder/Views/Layouts/404.cshtml rename to src/Frapid.Web/Areas/Frapid.WebsiteBuilder/Override/Frapid.WebsiteBuilder/Themes/default/404.cshtml diff --git a/src/Frapid.Web/Catalogs/localhost/Areas/Frapid.WebsiteBuilder/Views/Layouts/Footer.cshtml b/src/Frapid.Web/Areas/Frapid.WebsiteBuilder/Override/Frapid.WebsiteBuilder/Themes/default/Footer.cshtml similarity index 100% rename from src/Frapid.Web/Catalogs/localhost/Areas/Frapid.WebsiteBuilder/Views/Layouts/Footer.cshtml rename to src/Frapid.Web/Areas/Frapid.WebsiteBuilder/Override/Frapid.WebsiteBuilder/Themes/default/Footer.cshtml diff --git a/src/Frapid.Web/Catalogs/localhost/Areas/Frapid.WebsiteBuilder/Views/Layouts/Header.cshtml b/src/Frapid.Web/Areas/Frapid.WebsiteBuilder/Override/Frapid.WebsiteBuilder/Themes/default/Header.cshtml similarity index 73% rename from src/Frapid.Web/Catalogs/localhost/Areas/Frapid.WebsiteBuilder/Views/Layouts/Header.cshtml rename to src/Frapid.Web/Areas/Frapid.WebsiteBuilder/Override/Frapid.WebsiteBuilder/Themes/default/Header.cshtml index 75e00107..cefbd97f 100644 --- a/src/Frapid.Web/Catalogs/localhost/Areas/Frapid.WebsiteBuilder/Views/Layouts/Header.cshtml +++ b/src/Frapid.Web/Areas/Frapid.WebsiteBuilder/Override/Frapid.WebsiteBuilder/Themes/default/Header.cshtml @@ -1,3 +1,5 @@ +@using Frapid.WebsiteBuilder.DAL +