Package gudusoft.gsqlparser.tools
Class CountSql
Object
gudusoft.gsqlparser.tools.CountSql
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic StringcalculateHashId(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.static voidvoidprocessDirectory(String dirPath, String outputPath, boolean showFileDetails, boolean exportJson, String jsonOutputDir) Process all SQL files in a directory and its subdirectories
-
Constructor Details
-
CountSql
public CountSql()
-
-
Method Details
-
main
-
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 processoutputPath- Path to output CSV fileshowFileDetails- Whether to include file details section in the outputexportJson- Whether to export all SQL statements as JSONjsonOutputDir- Directory to save the JSON output file
-
calculateHashId
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
-