dotnet-db-samples | NET code samples for Oracle database developers | SQL Database library

 by   oracle C# Version: Current License: MIT

kandi X-RAY | dotnet-db-samples Summary

dotnet-db-samples is a C# library typically used in Database, SQL Database, Oracle applications. dotnet-db-samples has no bugs, it has no vulnerabilities, it has a Permissive License and it has low support. You can download it from GitHub.
.NET code samples for Oracle database developers
    Support
      Quality
        Security
          License
            Reuse
            Support
              Quality
                Security
                  License
                    Reuse

                      kandi-support Support

                        summary
                        dotnet-db-samples has a low active ecosystem.
                        summary
                        It has 340 star(s) with 171 fork(s). There are 50 watchers for this library.
                        summary
                        It had no major release in the last 6 months.
                        summary
                        There are 30 open issues and 235 have been closed. On average issues are closed in 132 days. There are no pull requests.
                        summary
                        It has a neutral sentiment in the developer community.
                        summary
                        The latest version of dotnet-db-samples is current.
                        dotnet-db-samples Support
                          Best in #SQL Database
                            Average in #SQL Database
                            dotnet-db-samples Support
                              Best in #SQL Database
                                Average in #SQL Database

                                  kandi-Quality Quality

                                    summary
                                    dotnet-db-samples has 0 bugs and 0 code smells.
                                    dotnet-db-samples Quality
                                      Best in #SQL Database
                                        Average in #SQL Database
                                        dotnet-db-samples Quality
                                          Best in #SQL Database
                                            Average in #SQL Database

                                              kandi-Security Security

                                                summary
                                                dotnet-db-samples has no vulnerabilities reported, and its dependent libraries have no vulnerabilities reported.
                                                summary
                                                dotnet-db-samples code analysis shows 0 unresolved vulnerabilities.
                                                summary
                                                There are 0 security hotspots that need review.
                                                dotnet-db-samples Security
                                                  Best in #SQL Database
                                                    Average in #SQL Database
                                                    dotnet-db-samples Security
                                                      Best in #SQL Database
                                                        Average in #SQL Database

                                                          kandi-License License

                                                            summary
                                                            dotnet-db-samples is licensed under the MIT License. This license is Permissive.
                                                            summary
                                                            Permissive licenses have the least restrictions, and you can use them in most projects.
                                                            dotnet-db-samples License
                                                              Best in #SQL Database
                                                                Average in #SQL Database
                                                                dotnet-db-samples License
                                                                  Best in #SQL Database
                                                                    Average in #SQL Database

                                                                      kandi-Reuse Reuse

                                                                        summary
                                                                        dotnet-db-samples releases are not available. You will need to build from source code and install.
                                                                        dotnet-db-samples Reuse
                                                                          Best in #SQL Database
                                                                            Average in #SQL Database
                                                                            dotnet-db-samples Reuse
                                                                              Best in #SQL Database
                                                                                Average in #SQL Database
                                                                                  Top functions reviewed by kandi - BETA
                                                                                  kandi's functional review helps you automatically verify the functionalities of the libraries and avoid rework.
                                                                                  Currently covering the most popular Java, JavaScript and Python libraries. See a Sample Here
                                                                                  Get all kandi verified functions for this library.
                                                                                  Get all kandi verified functions for this library.

                                                                                  dotnet-db-samples Key Features

                                                                                  .NET code samples for Oracle database developers #OracleDotNet

                                                                                  dotnet-db-samples Examples and Code Snippets

                                                                                  No Code Snippets are available at this moment for dotnet-db-samples.
                                                                                  Community Discussions

                                                                                  Trending Discussions on dotnet-db-samples

                                                                                  using GetFieldValueAsync with type from GetFieldType
                                                                                  chevron right

                                                                                  Trending Discussions on dotnet-db-samples

                                                                                  QUESTION

                                                                                  using GetFieldValueAsync with type from GetFieldType
                                                                                  Asked 2020-Sep-16 at 08:15

                                                                                  I have a generic reader and I want to transform it from sync to async.

                                                                                  The original code is

                                                                                  while (DR.Read())
                                                                                  {
                                                                                      count++;
                                                                                      Field[] fields = new Field[DR.FieldCount];
                                                                                      for (int i = 0; i < DR.FieldCount; i++)
                                                                                      {
                                                                                          Field field = new Field();
                                                                                          field.RowCount = count;
                                                                                          field.FieldCount = i;
                                                                                          field.Name = DR.GetName(i);
                                                                                          field.DataType = DR.GetDataTypeName(i);
                                                                                          // decimal overflow workaround 
                                                                                          field.ObjValue =
                                                                                              field.DataType == "Decimal"?
                                                                                              DR.GetDouble(i) :
                                                                                              DR.GetValue(i);
                                                                                          fields[i] = field;
                                                                                      }
                                                                                      yield return fields;
                                                                                  }
                                                                                  

                                                                                  and it is ok. What I have tried to do is

                                                                                  List ret = new List();
                                                                                  while (await DR.ReadAsync())
                                                                                  {
                                                                                      count++;
                                                                                      Field[] fields = new Field[DR.FieldCount];
                                                                                      for (int i = 0; i < DR.FieldCount; i++)
                                                                                      {
                                                                                          Field field = new Field();
                                                                                          field.RowCount = count;
                                                                                          field.FieldCount = i;
                                                                                          field.Name = DR.GetName(i);
                                                                                          field.DataType = DR.GetDataTypeName(i);
                                                                                          // decimal overflow workaround 
                                                                                          field.ObjValue =
                                                                                              field.DataType == "Decimal" ?
                                                                                              ((object)await DR.GetFieldValueAsync(i)) :
                                                                                              ((object)await DR.GetFieldValueAsync(i));
                                                                                          fields[i] = field;
                                                                                      }
                                                                                      ret.Add(fields);
                                                                                  }
                                                                                  

                                                                                  which is not working because of error CS0411

                                                                                  The type arguments for method 'GetFieldValueAsync' cannot be inferred from the usage. Try specifying the type arguments explicitly.

                                                                                  I have also tried to specify the type from Type t = DR.GetFieldType(i) but I can't do await DR.GetFieldValueAsync(i) either.

                                                                                  Am I out of luck here?

                                                                                  Should I revert to the following blocking code inside my async method?

                                                                                  // decimal overflow workaround 
                                                                                  field.ObjValue =
                                                                                      field.DataType == "Decimal" ?
                                                                                      DR.GetDouble(i) :
                                                                                      DR.GetValue(i);
                                                                                  

                                                                                  Is there a theoretical reason why there is no DR.GetValueAsync(i) returning an object like the sync counterpart??

                                                                                  Minor note, out of topic

                                                                                  In case someone insists to know why I'm writing a different code for decimal, this is the issue.

                                                                                  ANSWER

                                                                                  Answered 2020-Sep-16 at 08:15

                                                                                  I asssume you're talking about the DbDataReader Class.

                                                                                  From the documentation:

                                                                                  Reads a forward-only stream of rows from a data source.

                                                                                  Once the row is read by either Read or ReadAsync, the values for that row will all be in memory, which doesn't require any I/O and, thus, doesn't need to be asynchronous.

                                                                                  Update:

                                                                                  Turns out, there's a GetFieldValueAsync method in the DbDataReader Class, but not a GetValueAsync method.

                                                                                  Source https://stackoverflow.com/questions/63906352

                                                                                  Community Discussions, Code Snippets contain sources that include Stack Exchange Network

                                                                                  Vulnerabilities

                                                                                  No vulnerabilities reported

                                                                                  Install dotnet-db-samples

                                                                                  You can download it from GitHub.

                                                                                  Support

                                                                                  For any new features, suggestions and bugs create an issue on GitHub. If you have any questions check and ask questions on community page Stack Overflow .
                                                                                  Find more information at:
                                                                                  Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
                                                                                  Find more libraries
                                                                                  Explore Kits - Develop, implement, customize Projects, Custom Functions and Applications with kandi kits​
                                                                                  Save this library and start creating your kit
                                                                                  CLONE
                                                                                • HTTPS

                                                                                  https://github.com/oracle/dotnet-db-samples.git

                                                                                • CLI

                                                                                  gh repo clone oracle/dotnet-db-samples

                                                                                • sshUrl

                                                                                  git@github.com:oracle/dotnet-db-samples.git

                                                                                • Share this Page

                                                                                  share link

                                                                                  Explore Related Topics

                                                                                  Reuse Pre-built Kits with dotnet-db-samples

                                                                                  Consider Popular SQL Database Libraries

                                                                                  dbeaver

                                                                                  by dbeaver

                                                                                  sequelize

                                                                                  by sequelize

                                                                                  flink

                                                                                  by apache

                                                                                  knex

                                                                                  by knex

                                                                                  Dapper

                                                                                  by DapperLib

                                                                                  Try Top Libraries by oracle

                                                                                  graal

                                                                                  by oracleJava

                                                                                  docker-images

                                                                                  by oracleShell

                                                                                  opengrok

                                                                                  by oracleJava

                                                                                  truffleruby

                                                                                  by oracleRuby

                                                                                  helidon

                                                                                  by oracleJava

                                                                                  Compare SQL Database Libraries with Highest Support

                                                                                  dbeaver

                                                                                  by dbeaver

                                                                                  sequelize

                                                                                  by sequelize

                                                                                  mongoengine

                                                                                  by MongoEngine

                                                                                  modin

                                                                                  by modin-project

                                                                                  sqlalchemy

                                                                                  by sqlalchemy

                                                                                  Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
                                                                                  Find more libraries
                                                                                  Explore Kits - Develop, implement, customize Projects, Custom Functions and Applications with kandi kits​
                                                                                  Save this library and start creating your kit