public interface DbConfig
.dbconfig file,
or at runtime if the config is provided from a DbConfigProvider SPI implementation, it is obtained programmatically.
At compile-time the dbconfig is supplied as a resource file.| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
getBuildUrl()
(Optional) JDBC URL for database (build time).
|
default java.lang.String |
getBuildUrlOtherwiseRuntimeUrl()
Returns the build URL if provided, otherwise the runtime URL
|
java.lang.String |
getCatalogName()
(Optional) The catalog containing the schema.
|
java.lang.String |
getName()
(Provided) Name corresponding with the dbconfig file: MyDatabase.dbconfig -> "MyDatabase".
|
java.lang.String |
getPassword()
(Optional) Password for database account
|
java.lang.String |
getPath()
(Provided: Compile) Location of dbconfig file corresponding with this class.
|
manifold.rt.api.Bindings |
getProperties()
(Optional) JDBC connection properties in JSON format.
|
java.lang.String |
getSchemaName()
(Optional) The name of the database schema used for this configuration.
|
java.lang.String |
getSchemaPackage()
(Required: Compile) The fully qualified package name where schema .class files will be generated.
|
java.lang.String |
getUrl()
(Required: Compile/Run) JDBC URL for database (run time).
|
java.lang.String |
getUser()
(Optional) Username for database account
|
void |
init(java.sql.Connection connection,
java.lang.String url) |
boolean |
isDefault()
(Optional) If true, this dbconfig is applied to SQL resources that do not specify a dbconfig name.
|
default java.util.Properties |
toProperties()
Convert the connection related config attributes to a Properties object
|
java.lang.String getName()
DbConfigProvider
SPI, it will be supplied by the implementation.java.lang.String getCatalogName()
"", this indicates only schemas without a catalog will be considered.
Note, it is common for JDBC drivers to support naming the catalog in the URL. In this case the catalog name is unnecessary
in the dbconfig.java.lang.String getSchemaName()
java.lang.String getPath()
java.lang.String getUrl()
getBuildUrl() returns null, this URL is used
both for runtime and build time.java.lang.String getBuildUrl()
java.lang.String getSchemaPackage()
java.lang.String getUser()
java.lang.String getPassword()
boolean isDefault()
MyQuery.dbconfigName.sql"[.sql:dbconfigName/] select * from ..."manifold.rt.api.Bindings getProperties()
toProperties().default java.lang.String getBuildUrlOtherwiseRuntimeUrl()
default java.util.Properties toProperties()
void init(java.sql.Connection connection,
java.lang.String url)
Copyright © 2023. All rights reserved.