# Schema

data class Schema(name: String, val authorization: String? = null, val password: String? = null, val defaultTablespace: String? = null, val temporaryTablespace: String? = null, val quota: String? = null, val on: String? = null)

Represents a database schema.

#### Parameters

name

The schema name.

authorization

Specifies the name of the database-level principal that will own the schema.

password

Used only for Oracle schema.

defaultTablespace

Used only for Oracle schema.

temporaryTablespace

Used only for Oracle schema.

quota

Used only for Oracle schema.

on

Used only for Oracle schema.

## Constructors

Schema
Link copied to clipboard
constructor(name: String, authorization: String? = null, password: String? = null, defaultTablespace: String? = null, temporaryTablespace: String? = null, quota: String? = null, on: String? = null)

## Properties

authorization
Link copied to clipboard
val authorization: String? = null
ddl
Link copied to clipboard
val ddl: List<String>

The SQL statements that create this schema.

defaultTablespace
Link copied to clipboard
val defaultTablespace: String? = null
identifier
Link copied to clipboard
val identifier: String

This schema's name in proper database casing.

on
Link copied to clipboard
val on: String? = null
password
Link copied to clipboard
val password: String? = null
quota
Link copied to clipboard
val quota: String? = null
temporaryTablespace
Link copied to clipboard
val temporaryTablespace: String? = null

## Functions

createStatement
Link copied to clipboard
fun createStatement(): List<String>

Returns the SQL statements that create this schema.

dropStatement
Link copied to clipboard
fun dropStatement(cascade: Boolean): List<String>

Returns the SQL statements that drop this schema, as well as all its objects if cascade is `true`.

exists
Link copied to clipboard
fun exists(): Boolean

Checks if this schema exists or not.

setSchemaStatement
Link copied to clipboard
fun setSchemaStatement(): List<String>

Returns the SQL statements that set this schema as the current schema.