public class TJSONSQLEnvParser extends Object implements TSQLEnvParser
| Constructor and Description |
|---|
TJSONSQLEnvParser(String defaultServer,
String defaultDatabase,
String defaultSchema) |
| Modifier and Type | Method and Description |
|---|---|
TSQLEnv[] |
parseSQLEnv(EDbVendor vendor,
String sql) |
TSQLEnv[] |
parseSQLEnv(EDbVendor vendor,
String sql,
String explicitBaseDir) |
TJSONSQLEnvParser |
withIdentifierProfile(IdentifierProfile identifierProfile)
Configure the identifier rules the parsed environments register their metadata under.
|
public TJSONSQLEnvParser(String defaultServer, String defaultDatabase, String defaultSchema)
public TJSONSQLEnvParser withIdentifierProfile(IdentifierProfile identifierProfile)
Set it before parseSQLEnv(gudusoft.gsqlparser.EDbVendor, java.lang.String). A metadata file that declares its own
dbVendor is built with that vendor's default instead, since a profile is a
configuration of one dialect (IdentifierProfile.forVendorOr(gudusoft.gsqlparser.sqlenv.IdentifierProfile, gudusoft.gsqlparser.EDbVendor)).
identifierProfile - the analysis's configuration, or null for vendor defaultspublic TSQLEnv[] parseSQLEnv(EDbVendor vendor, String sql)
parseSQLEnv in interface TSQLEnvParserpublic TSQLEnv[] parseSQLEnv(EDbVendor vendor, String sql, String explicitBaseDir)
explicitBaseDir - directory to resolve a sharded manifest's relative
catalog/source paths against, used when sql is inline manifest
CONTENT (which carries no location of its own). Ignored when sql
is a file path, since the path already yields the base directory.