Constructor and Description |
---|
CountSql() |
Modifier and Type | Method and Description |
---|---|
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.
|
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
|
public CountSql()
public void processDirectory(String dirPath, String outputPath, boolean showFileDetails, boolean exportJson, String jsonOutputDir)
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 filepublic static String calculateHashId(String sql)
sql
- SQL statement to hash