Code Monkey home page Code Monkey logo

presto-ado's Introduction

NReco MDD Framework

NReco is an ASP.NET application framework that enables lightweight model-driven development and domain-specific modelling for real-life applications.

NReco Framework includes:

  • reusable components for building loosely-coupled web applications and suitable for generative programming
  • special XML models processor that transforms abstract domain-specific XML models into ASP.NET components and IoC-container configuration
  • ready-to-use set of domain-specific models that cover different aspects of typical ASP.NET application (UI elements like forms, lists dialogs; business-logic layer; data access and data permissions, data indexing etc)

NReco is a right choice for:

  • rapid prototyping and development of custom web-applications
  • custom enterprise/business web applications
  • software product-lines development and maintenance (projects "family")
  • SaaS-products and other scalable web-applications hosted in the cloud
## More information ## Standalone NReco Components

Copyright & License

NReco Version 1.0 (nreco1 branch) © 2008-2013 Vitalii Fedorchenko + other contributors (published under LGPL) NReco Version 2.x (master) © 2013-2015 Vitalii Fedorchenko + other contributors (LGPL)

presto-ado's People

Contributors

vitaliymf avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

presto-ado's Issues

user name cannot be null or empty

I tried to connect to a Presto cluster, but ran into an ArgumentNullException. When I set username using environment variable, the underlying PrestoClient library happily accepts that. I'd appreciate any guidance on how I can resolve this

$ docker run --rm -it -v $HOME/dev/MyApp:/app --workdir /app mcr.microsoft.com/dotnet/sdk bash
root@e14817128e98:/app# dotnet run
Unhandled exception. System.ArgumentNullException: The user name cannot be null or empty. (Parameter 'User')
   at BAMCIS.PrestoClient.PrestoClientSessionConfig.set_User(String value)
   at BAMCIS.PrestoClient.PrestoClientSessionConfig..ctor()
   at NReco.PrestoAdo.PrestoConnection.set_ConnectionString(String value)
   at NReco.PrestoAdo.PrestoConnection..ctor(String connectionString)
   at PrestoTest.CreateConnection() in /app/DataLinkSQL.cs:line 17
   at PrestoTest.Main() in /app/DataLinkSQL.cs:line 22
root@e14817128e98:/app# USER=bob dotnet run
Name or service not known (example.com:443)
using System.Data;
using System.Data.Common;
using NReco.PrestoAdo;

// ADO.NET Examples: https://docs.microsoft.com/en-us/dotnet/framework/data/adonet/ado-net-code-examples#adonet-data-provider-examples
// Retrieve data: https://docs.microsoft.com/en-us/dotnet/framework/data/adonet/dbconnection-dbcommand-and-dbexception#retrieving-data-example
class MyApp
{
    static PrestoConnection CreateConnection()
    {
        return new PrestoConnection("Host=example.com;Port=443;User=bob;Password=secret;Catalog=main;Schema=public;UseSsl=True;");
    }

    static void Main()
    {
        using (PrestoConnection connection = CreateConnection())
        {
            string queryString =
            "SELECT ProductID, UnitPrice, ProductName from dbo.products "
                + "WHERE UnitPrice > @pricePoint "
                + "ORDER BY UnitPrice DESC";

            DbCommand command = connection.CreateCommand();
            command.CommandText = queryString;
            command.CommandType = CommandType.Text;

            DbParameter param1 = command.CreateParameter();
            param1.ParameterName = "@pricePoint";
            param1.Value = 5;
            command.Parameters.Add(param1);

            try
            {
                connection.Open();
                DbDataReader reader = command.ExecuteReader();
                while (reader.Read())
                {
                    Console.WriteLine("\t{0}\t{1}\t{2}",
                        reader[0], reader[1], reader[2]);
                }
                reader.Close();
            }
            catch (Exception ex)
            {
                Console.WriteLine(ex.Message);
            }
            Console.ReadLine();
        }
    }
}
$ dotnet list package --include-transitive
Project 'DataLinkSQL' has the following package references
   [net6.0]: 
   Top-level Package      Requested   Resolved
   > NReco.PrestoAdo      1.0.0       1.0.0   

   Transitive Package                                                                   Resolved
   > Microsoft.CSharp                                                                   4.7.0   
   > Microsoft.NETCore.Platforms                                                        1.1.1   
   > Microsoft.NETCore.Targets                                                          1.1.0   
   > Newtonsoft.Json                                                                    12.0.3  
   > PrestoClient                                                                       0.198.5 
   > runtime.debian.8-x64.runtime.native.System.Security.Cryptography.OpenSsl           4.3.2   
   > runtime.fedora.23-x64.runtime.native.System.Security.Cryptography.OpenSsl          4.3.2   
   > runtime.fedora.24-x64.runtime.native.System.Security.Cryptography.OpenSsl          4.3.2   
   > runtime.native.System                                                              4.3.0   
   > runtime.native.System.Net.Http                                                     4.3.0   
   > runtime.native.System.Security.Cryptography.Apple                                  4.3.0   
   > runtime.native.System.Security.Cryptography.OpenSsl                                4.3.2   
   > runtime.opensuse.13.2-x64.runtime.native.System.Security.Cryptography.OpenSsl      4.3.2   
   > runtime.opensuse.42.1-x64.runtime.native.System.Security.Cryptography.OpenSsl      4.3.2   
   > runtime.osx.10.10-x64.runtime.native.System.Security.Cryptography.Apple            4.3.0   
   > runtime.osx.10.10-x64.runtime.native.System.Security.Cryptography.OpenSsl          4.3.2   
   > runtime.rhel.7-x64.runtime.native.System.Security.Cryptography.OpenSsl             4.3.2   
   > runtime.ubuntu.14.04-x64.runtime.native.System.Security.Cryptography.OpenSsl       4.3.2   
   > runtime.ubuntu.16.04-x64.runtime.native.System.Security.Cryptography.OpenSsl       4.3.2   
   > runtime.ubuntu.16.10-x64.runtime.native.System.Security.Cryptography.OpenSsl       4.3.2   
   > System.Collections                                                                 4.3.0   
   > System.Collections.Concurrent                                                      4.3.0   
   > System.ComponentModel                                                              4.3.0   
   > System.Diagnostics.Debug                                                           4.3.0   
   > System.Diagnostics.DiagnosticSource                                                4.3.0   
   > System.Diagnostics.Tracing                                                         4.3.0   
   > System.Globalization                                                               4.3.0   
   > System.Globalization.Calendars                                                     4.3.0   
   > System.Globalization.Extensions                                                    4.3.0   
   > System.IO                                                                          4.3.0   
   > System.IO.FileSystem                                                               4.3.0   
   > System.IO.FileSystem.Primitives                                                    4.3.0   
   > System.Linq                                                                        4.3.0   
   > System.Net.Http                                                                    4.3.4   
   > System.Net.Primitives                                                              4.3.0   
   > System.Reflection                                                                  4.3.0   
   > System.Reflection.Primitives                                                       4.3.0   
   > System.Resources.ResourceManager                                                   4.3.0   
   > System.Runtime                                                                     4.3.0   
   > System.Runtime.Extensions                                                          4.3.0   
   > System.Runtime.Handles                                                             4.3.0   
   > System.Runtime.InteropServices                                                     4.3.0   
   > System.Runtime.Numerics                                                            4.3.0   
   > System.Security.Cryptography.Algorithms                                            4.3.0   
   > System.Security.Cryptography.Cng                                                   4.3.0   
   > System.Security.Cryptography.Csp                                                   4.3.0   
   > System.Security.Cryptography.Encoding                                              4.3.0   
   > System.Security.Cryptography.OpenSsl                                               4.3.0   
   > System.Security.Cryptography.Primitives                                            4.3.0   
   > System.Security.Cryptography.X509Certificates                                      4.3.0   
   > System.Text.Encoding                                                               4.3.0   
   > System.Threading                                                                   4.3.0   
   > System.Threading.Tasks                                                             4.3.0

Support for OAuth2?

Curious whether you have considered adding support for OAuth2 authentication. We are in need of a provider like this but we need to authenticate our users via our IdP (Auth0).

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.