containsSchema

fun containsSchema(connection: Connection, schemaName: String): Boolean

The name of the schema is first checked for an exact lexicographical match. If a match occurs, the schema is returned. If a lexicographical match fails, then a check for a match ignoring the case of the string is performed. This is done because SQL identifier names should be case-insensitive. If neither matches then false is returned.

The connection should be open and is not closed during this function. It is the caller's responsibility to close the connection when appropriate.

Return

true if the database contains a schema with the provided name

Parameters

connection

A valid and open connection to a database.

schemaName

the schema name to check