orville-postgresql-1.0.0.0: A Haskell library for PostgreSQL
CopyrightFlipstone Technology Partners 2023
LicenseMIT
StabilityStable
Safe HaskellSafe-Inferred
LanguageHaskell2010

Orville.PostgreSQL.Expr.Index

Description

Since: 1.0.0.0

Synopsis

Documentation

data CreateIndexExpr Source #

Type to represent a SQL "CREATE INDEX" statement. E.G.

CREATE INDEX ON table (foo, bar, baz)

CreateIndexExpr provides a SqlExpression instance. See unsafeSqlExpression for how to construct a value with your own custom SQL.

Since: 1.0.0.0

Instances

Instances details
SqlExpression CreateIndexExpr Source #

Since: 1.0.0.0

Instance details

Defined in Orville.PostgreSQL.Expr.Index

createIndexExpr :: IndexUniqueness -> Maybe ConcurrentlyExpr -> Qualified TableName -> NonEmpty ColumnName -> CreateIndexExpr Source #

Construct a SQL CREATE INDEX from an indicator of if the index should be unique, a table, and corresponding collection of ColumnNames.

Since: 1.0.0.0

data IndexBodyExpr Source #

Type to represent the body of an index definition E.G.

(foo, bar)

in

CREATE some_index ON some_table (foo, bar)

IndexBodyExpr provides a SqlExpression instance. See unsafeSqlExpression for how to construct a value with your own custom SQL.

Since: 1.0.0.0

Instances

Instances details
SqlExpression IndexBodyExpr Source #

Since: 1.0.0.0

Instance details

Defined in Orville.PostgreSQL.Expr.Index

indexBodyColumns :: NonEmpty ColumnName -> IndexBodyExpr Source #

Creates an IndexBodyExpr for the given column names. The resulting SQL looks like (column1, column2, ...).

Since: 1.0.0.0

data ConcurrentlyExpr Source #

Type to represent the CONCURRENTLY keyword for index creation. E.G.

CONCURRENTLY

ConcurrentlyExpr provides a SqlExpression instance. See unsafeSqlExpression for how to construct a value with your own custom SQL.

Since: 1.0.0.0

Instances

Instances details
SqlExpression ConcurrentlyExpr Source #

Since: 1.0.0.0

Instance details

Defined in Orville.PostgreSQL.Expr.Index

concurrently :: ConcurrentlyExpr Source #

The CONCURRENTLY keyword indicates to PostgreSQL that an index should be created concurrently.

Since: 1.0.0.0

data DropIndexExpr Source #

Type to represent a SQL "DROP INDEX" statement. E.G.

DROP INDEX foo

DropIndexExpr provides a SqlExpression instance. See unsafeSqlExpression for how to construct a value with your own custom SQL.

Since: 1.0.0.0

Instances

Instances details
SqlExpression DropIndexExpr Source #

Since: 1.0.0.0

Instance details

Defined in Orville.PostgreSQL.Expr.Index

dropIndexExpr :: IndexName -> DropIndexExpr Source #

Construct a SQL DROP INDEX for a given IndexName.

Since: 1.0.0.0

createNamedIndexExpr :: IndexUniqueness -> Maybe ConcurrentlyExpr -> Qualified TableName -> IndexName -> IndexBodyExpr -> CreateIndexExpr Source #

Construct a SQL CREATE INDEX from an indicator of if the index should be unique, a table, a name for the index, and some SQL representing the rest of the index creation.

Since: 1.0.0.0