Class

stark.migration

PostgresqlDatabaseAdapter

Related Doc: package migration

Permalink

class PostgresqlDatabaseAdapter extends DatabaseAdapter

Linear Supertypes
DatabaseAdapter, AnyRef, Any
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. PostgresqlDatabaseAdapter
  2. DatabaseAdapter
  3. AnyRef
  4. Any
  1. Hide All
  2. Show all
Visibility
  1. Public
  2. All

Instance Constructors

  1. new PostgresqlDatabaseAdapter(schemaNameOpt: Option[String])

    Permalink

Type Members

  1. sealed trait PrivilegeTarget extends AnyRef

    Permalink
    Definition Classes
    DatabaseAdapter
  2. case class TablePrivilegeTarget(tableName: String) extends PrivilegeTarget with Product with Serializable

    Permalink
    Definition Classes
    DatabaseAdapter

Value Members

  1. final def !=(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  4. object SchemaPrivilegeTarget extends PrivilegeTarget with Product with Serializable

    Permalink
    Definition Classes
    DatabaseAdapter
  5. val addingForeignKeyConstraintCreatesIndex: Boolean

    Permalink

    This value is true if the database implicitly adds an index on the column that has a foreign key constraint added to it.

    This value is true if the database implicitly adds an index on the column that has a foreign key constraint added to it.

    The following SQL can be used to test the database. The last statement will fail with a message that there already is an index on the column.

    CREATE TABLE parent (pk INT PRIMARY KEY); CREATE TABLE child (pk INT PRIMARY KEY, pk_parent INT NOT NULL); ALTER TABLE child ADD CONSTRAINT idx_child_pk_parent FOREIGN KEY (pk_parent) REFERENCES parent (pk); CREATE INDEX idx_child_pk_parent ON child (pk_parent);

    Definition Classes
    PostgresqlDatabaseAdapterDatabaseAdapter
  6. def alterColumnSql(schemaNameOpt: Option[String], columnDefinition: ColumnDefinition): String

    Permalink
    Attributes
    protected
    Definition Classes
    PostgresqlDatabaseAdapterDatabaseAdapter
  7. def alterColumnSql(tableName: String, columnName: String, columnType: SqlType, options: ColumnOption*): Array[String]

    Permalink

    Different databases require different SQL to alter a column's definition.

    Different databases require different SQL to alter a column's definition. Uses the schemaNameOpt defined in the adapter.

    tableName

    the name of the table with the column

    columnName

    the name of the column

    columnType

    the type the column is being altered to

    options

    a possibly empty array of column options to customize the column

    returns

    the SQL to alter the column

    Definition Classes
    DatabaseAdapter
  8. def alterColumnSql(schemaNameOpt: Option[String], tableName: String, columnName: String, columnType: SqlType, options: ColumnOption*): Array[String]

    Permalink

    Different databases require different SQL to alter a column's definition.

    Different databases require different SQL to alter a column's definition.

    schemaNameOpt

    the optional schema name to qualify the table name

    tableName

    the name of the table with the column

    columnName

    the name of the column

    columnType

    the type the column is being altered to

    options

    a possibly empty array of column options to customize the column

    returns

    the SQL to alter the column

    Definition Classes
    DatabaseAdapter
  9. val alterTableDropForeignKeyConstraintPhrase: String

    Permalink

    The SQL keyword(s) or "phrase" used to drop a foreign key constraint.

    The SQL keyword(s) or "phrase" used to drop a foreign key constraint. For example, Derby, Oracle and PostgreSQL use

    ALTER TABLE child DROP CONSTRAINT idx_child_pk_parent; ^^^^^^^^^^

    while MySQL uses

    ALTER TABLE child DROP FOREIGN KEY idx_child_pk_parent; ^^^^^^^^^^

    Definition Classes
    PostgresqlDatabaseAdapterDatabaseAdapter
  10. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  11. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  12. def columnDefinitionFactory(columnType: SqlType, characterSetOpt: Option[CharacterSet]): ColumnDefinition

    Permalink

    Concrete subclasses must define this method that returns a newly constructed, but uninitialized, concrete ColumnDefinition subclass for the given SQL data type and optional CharacterSet.

    Concrete subclasses must define this method that returns a newly constructed, but uninitialized, concrete ColumnDefinition subclass for the given SQL data type and optional CharacterSet.

    columnType

    the column's data type

    characterSetOpt

    an optional CharacterSet

    returns

    a newly constructed but uninitialized ColumnDefinition for the columnType

    Definition Classes
    PostgresqlDatabaseAdapterDatabaseAdapter
  13. def commentColumnSql(tableName: String, columnName: String, comment: String): String

    Permalink

    对某一列增加注释

    对某一列增加注释

    tableName

    表名

    columnName

    列名

    comment

    注释

    returns

    注释的sql

    Definition Classes
    DatabaseAdapter
  14. def commentTableSql(tableName: String, comment: String): String

    Permalink

    对表添加注释

    对表添加注释

    tableName

    表名

    comment

    注释

    returns

    注释的sql

    Definition Classes
    DatabaseAdapter
  15. def createTriggerSql(tableName: String, triggerName: String, timingPointOpt: Option[TriggerTimingPoint], triggerFiringOpt: List[TriggerFiring], referencingOpt: Option[Referencing], forEachRowOpt: Option[ForEachRow.type], whenOpt: Option[When])(f: ⇒ String): String

    Permalink
    Definition Classes
    DatabaseAdapter
  16. def dropSequenceSql(name: String): String

    Permalink
    Definition Classes
    DatabaseAdapter
  17. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  18. def equals(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  19. def fetchColumnCommentSql(tableName: String, columnName: String): String

    Permalink
    Definition Classes
    DatabaseAdapter
  20. def fetchTableCommentSql(tableName: String): String

    Permalink
    Definition Classes
    DatabaseAdapter
  21. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  22. def findSequencesSql(): Option[String]

    Permalink
    Definition Classes
    DatabaseAdapter
  23. def generateCheckConstraintName(on: On, options: CheckOption*): (String, List[CheckOption])

    Permalink

    Given a check constraint, create a name for it, using a Name() if it is provided in the options.

    Given a check constraint, create a name for it, using a Name() if it is provided in the options.

    on

    the table and columns the check constraint is on

    options

    a varargs list of CheckOptions

    returns

    a two-tuple with the calculated name or the overridden name from a Name and the remaining options

    Definition Classes
    DatabaseAdapter
  24. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  25. def grantOnSchemaSql(grantees: Array[User], privileges: SchemaPrivilege*): String

    Permalink

    Grant one or more privileges to a schema.

    Grant one or more privileges to a schema.

    grantees

    one or more objects to grant the new privileges to

    privileges

    one or more SchemaPrivilege objects describing the types of privileges to grant

    returns

    the SQL to grant privileges

    Definition Classes
    DatabaseAdapter
  26. def grantOnSchemaSql(schemaName: String, grantees: Array[User], privileges: SchemaPrivilege*): String

    Permalink

    Grant one or more privileges to a schema.

    Grant one or more privileges to a schema.

    schemaName

    the name of the schema to grant privileges on

    grantees

    one or more objects to grant the new privileges to

    privileges

    one or more SchemaPrivilege objects describing the types of privileges to grant

    returns

    the SQL to grant privileges

    Definition Classes
    DatabaseAdapter
  27. def grantOnTableSql(tableName: String, grantees: Array[User], privileges: GrantPrivilegeType*): String

    Permalink

    Different databases have different limitations on the GRANT statement.

    Different databases have different limitations on the GRANT statement. Uses the schemaNameOpt defined in the adapter.

    tableName

    the name of the table with the index

    grantees

    one or more objects to grant the new privileges to

    privileges

    one or more GrantPrivilegeType objects describing the types of privileges to grant

    returns

    the SQL to grant privileges

    Definition Classes
    DatabaseAdapter
  28. def grantOnTableSql(schemaNameOpt: Option[String], tableName: String, grantees: Array[User], privileges: GrantPrivilegeType*): String

    Permalink

    Different databases have different limitations on the GRANT statement.

    Different databases have different limitations on the GRANT statement.

    schemaNameOpt

    the optional schema name to qualify the table name

    tableName

    the name of the table with the index

    grantees

    one or more objects to grant the new privileges to

    privileges

    one or more GrantPrivilegeType objects describing the types of privileges to grant

    returns

    the SQL to grant privileges

    Definition Classes
    DatabaseAdapter
  29. def hashCode(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  30. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  31. def lockTableSql(tableName: String): String

    Permalink

    Different databases require different SQL to lock a table.

    Different databases require different SQL to lock a table.

    tableName

    the name of the table to lock

    returns

    the SQL to lock the table

    Definition Classes
    DatabaseAdapter
  32. def lockTableSql(schemaNameOpt: Option[String], tableName: String): String

    Permalink

    Different databases require different SQL to lock a table.

    Different databases require different SQL to lock a table.

    schemaNameOpt

    the optional schema name to qualify the table name

    tableName

    the name of the table to lock

    returns

    the SQL to lock the table

    Definition Classes
    DatabaseAdapter
  33. final val logger: Logger

    Permalink
    Attributes
    protected
    Definition Classes
    DatabaseAdapter
  34. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  35. def newColumnDefinition(tableName: String, columnName: String, columnType: SqlType, options: ColumnOption*): ColumnDefinition

    Permalink

    Given a table name, column name and column data type, return a newly constructed and fully initialized ColumnDefinition.

    Given a table name, column name and column data type, return a newly constructed and fully initialized ColumnDefinition. The class of the returned ColumnDefinition only depends upon the input column data type.

    tableName

    the name of the table the column is in

    columnName

    the column's name

    columnType

    the data type of the column

    options

    a list of column options customizing the column

    returns

    a new ColumnDefinition

    Definition Classes
    DatabaseAdapter
  36. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  37. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
  38. def onDeleteSql(onDeleteOpt: Option[OnDelete]): String

    Permalink

    Return the SQL text in a foreign key relationship for an optional ON DELETE clause.

    Return the SQL text in a foreign key relationship for an optional ON DELETE clause.

    onDeleteOpt

    an Option[OnDelete]

    returns

    the SQL text to append to the SQL to create a foreign key relationship

    Definition Classes
    DatabaseAdapter
  39. def onUpdateSql(onUpdateOpt: Option[OnUpdate]): String

    Permalink

    Return the SQL text in a foreign key relationship for an optional ON UPDATE clause.

    Return the SQL text in a foreign key relationship for an optional ON UPDATE clause.

    onUpdateOpt

    an Option[OnUpdate]

    returns

    the SQL text to append to the SQL to create a foreign key relationship

    Definition Classes
    DatabaseAdapter
  40. val quoteCharacter: Char

    Permalink

    The character that is used to quote identifiers.

    The character that is used to quote identifiers.

    Definition Classes
    PostgresqlDatabaseAdapterDatabaseAdapter
  41. def quoteColumnName(columnName: String): String

    Permalink

    Quote a column name.

    Quote a column name.

    columnName

    the name of the column to quote

    returns

    a properly quoted column name

    Definition Classes
    DatabaseAdapter
  42. def quoteIndexName(schemaNameOpt: Option[String], indexName: String): String

    Permalink

    Quote an index name.

    Quote an index name.

    schemaNameOpt

    an optional schema name

    indexName

    the name of the index to quote

    returns

    a properly quoted index name

    Definition Classes
    DatabaseAdapter
  43. def quoteSchemaName(schemaName: String): String

    Permalink

    Quote a schema name.

    Quote a schema name.

    schemaName

    the name of the schema to quote

    returns

    a properly quoted schema name

    Definition Classes
    DatabaseAdapter
  44. def quoteTableName(tableName: String): String

    Permalink

    Quote a table name.

    Quote a table name. If the database adapter was provided with a default schema name, then the quoted table name is prepended with the quoted schema name along with a '.'.

    tableName

    the name of the table to quote

    returns

    the table name properly quoted for the database, prepended with the quoted schema name and a '.' if the database adapter was provided with a default schema name

    Definition Classes
    DatabaseAdapter
  45. def quoteTableName(schemaNameOpt: Option[String], tableName: String): String

    Permalink

    Quote a table name, prepending the quoted schema name to the quoted table name along with a '.' if a schema name is provided.

    Quote a table name, prepending the quoted schema name to the quoted table name along with a '.' if a schema name is provided.

    schemaNameOpt

    an optional schema name

    tableName

    the name of the table to quote

    returns

    the table name properly quoted for the database, prepended with the quoted schema name and a '.' if a schema name is provided

    Definition Classes
    DatabaseAdapter
  46. def removeColumnSql(tableName: String, columnName: String): String

    Permalink

    Different databases require different SQL to drop a column.

    Different databases require different SQL to drop a column. Uses the schemaNameOpt defined in the adapter.

    tableName

    the name of the table with the column

    columnName

    the name of the column

    returns

    the SQL to drop the column

    Definition Classes
    DatabaseAdapter
  47. def removeColumnSql(schemaNameOpt: Option[String], tableName: String, columnName: String): String

    Permalink

    Different databases require different SQL to drop a column.

    Different databases require different SQL to drop a column.

    schemaNameOpt

    the optional schema name to qualify the table name

    tableName

    the name of the table with the column

    columnName

    the name of the column

    returns

    the SQL to drop the column

    Definition Classes
    DatabaseAdapter
  48. def removeIndexSql(tableName: String, indexName: String): String

    Permalink

    Different databases require different SQL to drop an index.

    Different databases require different SQL to drop an index. Uses the schemaNameOpt defined in the adapter.

    tableName

    the name of the table with the index

    indexName

    the name of the index

    returns

    the SQL to drop the index

    Definition Classes
    DatabaseAdapter
  49. def removeIndexSql(schemaNameOpt: Option[String], tableName: String, indexName: String): String

    Permalink

    Different databases require different SQL to drop an index.

    Different databases require different SQL to drop an index.

    schemaNameOpt

    the optional schema name to qualify the table name

    tableName

    the name of the table with the index

    indexName

    the name of the index

    returns

    the SQL to drop the index

    Definition Classes
    DatabaseAdapter
  50. def revokeOnSchemaSql(grantees: Array[User], privileges: SchemaPrivilege*): String

    Permalink

    Revoke one or more privileges from a schema.

    Revoke one or more privileges from a schema.

    grantees

    one or more objects to revoke the privileges from

    privileges

    one or more SchemaPrivilege objects describing the types of privileges to revoke

    returns

    the SQL to revoke privileges

    Definition Classes
    DatabaseAdapter
  51. def revokeOnSchemaSql(schemaName: String, grantees: Array[User], privileges: SchemaPrivilege*): String

    Permalink

    Revoke one or more privileges from a schema.

    Revoke one or more privileges from a schema.

    schemaName

    the name of the schema to revoke privileges from

    grantees

    one or more objects to revoke the privileges from

    privileges

    one or more SchemaPrivilege objects describing the types of privileges to revoke

    returns

    the SQL to revoke privileges

    Definition Classes
    DatabaseAdapter
  52. def revokeOnTableSql(tableName: String, grantees: Array[User], privileges: GrantPrivilegeType*): String

    Permalink

    Different databases have different limitations on the REVOKE statement.

    Different databases have different limitations on the REVOKE statement. Uses the schemaNameOpt defined in the adapter.

    tableName

    the name of the table with the index

    grantees

    one or more objects to revoke the privileges from

    privileges

    one or more GrantPrivilegeType objects describing the types of privileges to revoke

    returns

    the SQL to revoke privileges

    Definition Classes
    DatabaseAdapter
  53. def revokeOnTableSql(schemaNameOpt: Option[String], tableName: String, grantees: Array[User], privileges: GrantPrivilegeType*): String

    Permalink

    Different databases have different limitations on the REVOKE statement.

    Different databases have different limitations on the REVOKE statement.

    schemaNameOpt

    the optional schema name to qualify the table name

    tableName

    the name of the table with the index

    grantees

    one or more objects to revoke the privileges from

    privileges

    one or more GrantPrivilegeType objects describing the types of privileges to revoke

    returns

    the SQL to revoke privileges

    Definition Classes
    DatabaseAdapter
  54. val schemaNameOpt: Option[String]

    Permalink
  55. def sequenceSql(name: String): String

    Permalink
    Definition Classes
    DatabaseAdapter
  56. val supportsCheckConstraints: Boolean

    Permalink

    If the database supports table and column check constraints.

    If the database supports table and column check constraints.

    Definition Classes
    PostgresqlDatabaseAdapterDatabaseAdapter
  57. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  58. def toString(): String

    Permalink
    Definition Classes
    AnyRef → Any
  59. def unlockTableSql(tableName: String): Option[String]

    Permalink
    Definition Classes
    DatabaseAdapter
  60. def unlockTableSql(schemaNameOpt: Option[String], tableName: String): Option[String]

    Permalink
    Definition Classes
    DatabaseAdapter
  61. val unquotedNameConverter: LowercaseUnquotedNameConverter.type

    Permalink

    To properly quote table names the database adapter needs to know how the database treats unquoted names.

    To properly quote table names the database adapter needs to know how the database treats unquoted names.

    Definition Classes
    PostgresqlDatabaseAdapterDatabaseAdapter
  62. val userFactory: PlainUserFactory.type

    Permalink

    A factory for creating User instances from a bare user name.

    A factory for creating User instances from a bare user name.

    Definition Classes
    PostgresqlDatabaseAdapterDatabaseAdapter
  63. val vendor: Postgresql.type

    Permalink

    The vendor of the database.

    The vendor of the database.

    Definition Classes
    PostgresqlDatabaseAdapterDatabaseAdapter
  64. final def wait(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  65. final def wait(arg0: Long, arg1: Int): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  66. final def wait(arg0: Long): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from DatabaseAdapter

Inherited from AnyRef

Inherited from Any

Ungrouped