Class CountSql

Object
gudusoft.gsqlparser.tools.CountSql

public class CountSql extends Object
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static String
    Calculate unique hash ID for SQL statement ignoring all whitespaces This implementation uses SHA-256 and will produce consistent results across languages when implementing the same algorithm.
    static void
    main(String[] args)
     
    void
    processDirectory(String dirPath, String outputPath, boolean showFileDetails, boolean exportJson, String jsonOutputDir)
    Process all SQL files in a directory and its subdirectories

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

  • Method Details

    • main

      public static void main(String[] args)
    • processDirectory

      public void processDirectory(String dirPath, String outputPath, boolean showFileDetails, boolean exportJson, String jsonOutputDir)
      Process all SQL files in a directory and its subdirectories
      Parameters:
      dirPath - Directory path to process
      outputPath - Path to output CSV file
      showFileDetails - Whether to include file details section in the output
      exportJson - Whether to export all SQL statements as JSON
      jsonOutputDir - Directory to save the JSON output file
    • calculateHashId

      public static String calculateHashId(String sql)
      Calculate unique hash ID for SQL statement ignoring all whitespaces This implementation uses SHA-256 and will produce consistent results across languages when implementing the same algorithm.
      Parameters:
      sql - SQL statement to hash
      Returns:
      Unique hash ID as a lowercase hex string