Package org.pgcodekeeper.core.loader
Class TokenLoader
java.lang.Object
org.pgcodekeeper.core.loader.DatabaseLoader
org.pgcodekeeper.core.loader.TokenLoader
Database loader for SQL token verification and validation.
Processes SQL files and directories to verify compliance with specified verification rules
using ANTLR parsing and custom verification listeners.
-
Method Summary
Modifier and TypeMethodDescriptionload()Not supported operation for token loader.verify(ISettings settings, Path path, Collection<String> sources) Verifies SQL sources using verification properties from the specified path.verify(ISettings args, VerificationProperties rules, Collection<String> sources) Verifies SQL sources using the specified verification rules.Methods inherited from class org.pgcodekeeper.core.loader.DatabaseLoader
createDb, getErrors, loadAndAnalyze
-
Method Details
-
load
Not supported operation for token loader.- Specified by:
loadin classDatabaseLoader- Returns:
- the loaded database schema
- Throws:
IllegalStateException- always, as this operation is not supportedIOException- if database loading failsInterruptedException- if the loading process is interrupted
-
verify
public static List<Object> verify(ISettings settings, Path path, Collection<String> sources) throws InterruptedException, IOException Verifies SQL sources using verification properties from the specified path.- Parameters:
settings- loader settings and configurationpath- path to verification properties filesources- collection of source paths to verify- Returns:
- list of verification errors found
- Throws:
InterruptedException- if verification is interruptedIOException- if file access fails
-
verify
public static List<Object> verify(ISettings args, VerificationProperties rules, Collection<String> sources) throws InterruptedException, IOException Verifies SQL sources using the specified verification rules.- Parameters:
args- loader settings and configurationrules- verification rules for token validationsources- collection of source paths to verify- Returns:
- list of verification errors found
- Throws:
InterruptedException- if verification is interruptedIOException- if file access fails
-