kandi background
Explore Kits

historian | Custom Timber tree implementation that can save logs | Database library

 by   yshrsmz Java Version: v0.4.0 License: Apache-2.0

 by   yshrsmz Java Version: v0.4.0 License: Apache-2.0

kandi X-RAY | historian Summary

historian is a Java library typically used in Database applications. historian has no bugs, it has build file available, it has a Permissive License and it has high support. However historian has 1 vulnerabilities. You can download it from GitHub, Maven.
[Maven Central] Historian is a custom [Timber] implementation that saves logs to SQLite, so that you can see/download the SQLite file later for debugging. This library is primarily made to help debugging crash in consumers' devices.
Support
Support
Quality
Quality
Security
Security
License
License
Reuse
Reuse

kandi-support Support

  • historian has a highly active ecosystem.
  • It has 22 star(s) with 5 fork(s). There are 3 watchers for this library.
  • It had no major release in the last 12 months.
  • There are 2 open issues and 0 have been closed. On average issues are closed in 632 days. There are no pull requests.
  • It has a negative sentiment in the developer community.
  • The latest version of historian is v0.4.0
historian Support
Best in #Database
Average in #Database
historian Support
Best in #Database
Average in #Database

quality kandi Quality

  • historian has 0 bugs and 0 code smells.
historian Quality
Best in #Database
Average in #Database
historian Quality
Best in #Database
Average in #Database

securitySecurity

  • historian has 1 vulnerability issues reported (0 critical, 0 high, 1 medium, 0 low).
  • historian code analysis shows 0 unresolved vulnerabilities.
  • There are 0 security hotspots that need review.
historian Security
Best in #Database
Average in #Database
historian Security
Best in #Database
Average in #Database

license License

  • historian is licensed under the Apache-2.0 License. This license is Permissive.
  • Permissive licenses have the least restrictions, and you can use them in most projects.
historian License
Best in #Database
Average in #Database
historian License
Best in #Database
Average in #Database

buildReuse

  • historian releases are available to install and integrate.
  • Deployable package is available in Maven.
  • Build file is available. You can build the component from source.
  • Installation instructions, examples and code snippets are available.
historian Reuse
Best in #Database
Average in #Database
historian Reuse
Best in #Database
Average in #Database
Top functions reviewed by kandi - BETA

kandi has reviewed historian and discovered the below as its top functions. This is intended to give you an instant insight into historian implemented functionality, and help decide if they suit your requirements.

  • Exports a historical sample to the database .
    • Sets the status of the application .
      • Insert the provided log into the database .
        • Display priority .
          • Executes a transactional transaction .
            • Runs log .
              • Closes a Closeable .
                • On upgrade .
                  • Deletes the log table
                    • Gets the canonical path to the database .

                      Get all kandi verified functions for this library.

                      Get all kandi verified functions for this library.

                      historian Key Features

                      Custom Timber tree implementation that can save logs to SQLite

                      historian Examples and Code Snippets

                      See all related Code Snippets

                      Community Discussions

                      Trending Discussions on historian
                      • SQL Historian Query not returning all results
                      • react router v5 to v6 nested route not working
                      • Python Script to pass input in loop to URL one by one
                      • Can I Paste on Multiple Lines?
                      • Discord.py: How do I write discord bot in OOP without using Cogs? I have an error while I tried it
                      • SQL query for evaluating boolean logic from innerjoin on itself
                      • Dynamic SQL query from different Historian tables
                      • What does the Riddler service do in the Fluid Framework reference service?
                      • why am I getting props unique keys error with undefined variable?
                      • Filtering knockout observable array based on string
                      Trending Discussions on historian

                      QUESTION

                      SQL Historian Query not returning all results

                      Asked 2021-Dec-13 at 12:56

                      I am using an historian to search for certain values of a specific tag. The historian has certain rules, such as, I cannot create or drop tables, queries need tagnames etc.

                      I want to search a TagName 'Tank1' for example and return its DateTime and Value results, then search further Tags using these results to match those tags that have the same Values at that DateTime.

                      I search 'Tank1' between a given date and time and receive 4 results as below

                      2021-11-02 08:00:54.9870000 1
                      2021-11-02 10:22:27.9850000 1
                      2021-11-02 11:47:31.3360000 2
                      2021-11-02 23:11:57.8120000 2

                      So, I need to search four other Tags and return results that match the dateTime and value.

                      The below code is what I have produced (I should now tell you that I am a virtual novice)

                      DECLARE @AT1Value INT,
                              @AT1DateTime DateTime
                      SELECT  @AT1Value = Value,                              --GETS THE VALUES OF AT1 STERILISER
                              @AT1DateTime = DateTime                         --GETS THE DATETIME OF AT1 STERILISER VALUES
                      From Runtime.dbo.v_History
                      Where 
                          Runtime.dbo.v_History.Tagname = 'AT1_Select_ster'
                      AND Runtime.dbo.v_History.DateTime >= '2021-11-02 08:00'
                      AND Runtime.dbo.v_History.DateTime <= '2021-11-03 08:01'
                      AND Runtime.dbo.v_History.Value > 0
                      
                      
                      Select  a.DateTime,
                              a.TagName,
                              a.Value
                      From Runtime.dbo.v_History AS a        --GETS  THE VALUES OF THE FM TAGS AT THE DATETIME OF AT1 STERILISER VALUES
                      Where  
                          ((a.TagName = 'FM_S1_Batch' AND a.Value = @AT1Value AND a.DateTime = @AT1DateTime)
                      OR  (a.Tagname = 'FM_S2_batch' AND a.Value = @AT1Value AND a.DateTime = @AT1DateTime)
                      OR  (a.Tagname = 'FM_S3_batch' AND a.Value = @AT1Value AND a.DateTime = @AT1DateTime)
                      OR  (a.Tagname = 'FM_S4_batch' AND a.Value = @AT1Value AND a.DateTime = @AT1DateTime))
                      AND a.Value > 0
                      

                      This works fine, albeit it only produces the last dateTime and Value result below,

                      2021-11-02 23:11:57.8120000 FM_S2_batch 2

                      Am I right in assuming this is because the Variable is being overwritten each time and only holding the last values?

                      The results that should be returned should look something like the results below

                      2021-11-02 08:00:54.9870000 FM_S1_batch 1
                      2021-11-02 10:22:27.9850000 FM_S1_batch 1
                      2021-11-02 11:47:31.3360000 FM_S2_batch 2
                      2021-11-02 23:11:57.8120000 FM_S2_batch 2

                      Is there anyway I can do several scans and save each result until I have all the results needed? or is there an easier more suitable method (which I am guessing there is).

                      TIA

                      ANSWER

                      Answered 2021-Dec-10 at 16:56

                      If I'm understanding correctly, you are hoping your int and datetime variables (@AT1DateTime and @AT1Value) will hold more than one value returned by the first query. That won't work (as you indicated, they will hold only one value).

                      From the code provided, it's not clear that you need to store those values in a variable at all. I think you are probably looking for something like:

                      Select  a.DateTime,
                              a.TagName,
                              a.Value
                      From Runtime.dbo.v_History AS a        
                      Where  
                      a.TagName IN ('FM_S1_Batch', 'FM_S2_batch', 'FM_S3_batch', 'FM_S4_batch')
                      AND EXISTS
                       (SELECT  *
                       From Runtime.dbo.v_History b
                       Where 
                        b.Tagname = 'AT1_Select_ster'
                        AND b.DateTime >= '2021-11-02 08:00'
                        AND b.DateTime <= '2021-11-03 08:01'
                        AND b.Value > 0
                        AND b.Value = a.Value
                        AND b.DateTime = a.DateTime
                       )
                      AND a.Value > 0
                      

                      This is your two queries combined together into one. The 2nd/middle WHERE condition of the outer query checks that the a.value/a.datetime combination exists in the inner query.

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

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

                      Vulnerabilities

                      No vulnerabilities reported

                      Install historian

                      Historian is distributed via Maven Central. [![Maven Central](https://maven-badges.herokuapp.com/maven-central/net.yslibrary.historian/historian-core/badge.svg)](https://maven-badges.herokuapp.com/maven-central/net.yslibrary.historian/historian-core).

                      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
                      Reuse Solution Kits and Libraries Curated by Popular Use Cases
                      Explore Kits

                      Save this library and start creating your kit

                      Clone
                      • https://github.com/yshrsmz/historian.git

                      • gh repo clone yshrsmz/historian

                      • git@github.com:yshrsmz/historian.git

                      Share this Page

                      share link

                      See Similar Libraries in

                      Consider Popular Database Libraries
                      Try Top Libraries by yshrsmz
                      Compare Database Libraries with Highest Support
                      Compare Database Libraries with Highest Quality
                      Compare Database Libraries with Highest Security
                      Compare Database Libraries with Permissive License
                      Compare Database Libraries with Highest Reuse
                      Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from
                      over 650 million Knowledge Items
                      Find more libraries
                      Reuse Solution Kits and Libraries Curated by Popular Use Cases
                      Explore Kits

                      Save this library and start creating your kit