io.eezo.db.schema

Members list

Type members

Classlikes

enum Change

Attributes

Source
Change.scala
Supertypes
trait Enum
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
object CheckSpelling

The model's checks in Postgres's own spelling, so that a live database can be compared with the model without reporting a check that is already there.

The model's checks in Postgres's own spelling, so that a live database can be compared with the model without reporting a check that is already there.

Postgres keeps a check as an expression tree and hands back its own rendering of it: between becomes two comparisons, a literal on a numeric column gains a cast, in becomes = any. No list of rewrites on our side would keep up with that deparser, so the model's checks are given to Postgres to spell, on a temporary table inside a transaction or savepoint that is always rolled back. This happens only when comparing with a live database: the snapshot, freeze and the migration files keep the readable spelling and never need a database (issue 322).

A check Postgres refuses to create here, an invalid expression, a column whose name needs quoting, a read only connection, keeps the model's spelling: the comparison then reports it, as it did before, rather than failing, because the dev server asks for this on every request.

Attributes

Source
CheckSpelling.scala
Supertypes
class Object
trait Matchable
class Any
Self type
final case class ColumnSnap(name: String, pgType: String, nullable: Boolean, primaryKey: Boolean, checks: List[String], references: Option[String])

Attributes

Source
Snapshot.scala
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
object Ddl

Renders every Change the differ can emit, and is the only place that renders DDL.

Renders every Change the differ can emit, and is the only place that renders DDL.

Constraint names come from a hash of the expression, which holds together only because both sides of a drop/add cycle compute the same hash: see BACKLOG §27, and §25, which needs the same decision.

Attributes

Source
Ddl.scala
Supertypes
class Object
trait Matchable
class Any
Self type
Ddl.type
object Differ

Attributes

Source
Differ.scala
Supertypes
class Object
trait Matchable
class Any
Self type
Differ.type
final case class IndexSnap(name: String, columns: List[String], unique: Boolean)

Attributes

Source
Snapshot.scala
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
object Introspect

Attributes

Source
Introspect.scala
Supertypes
class Object
trait Matchable
class Any
Self type
Introspect.type
final case class SchemaSnap(tables: List[TableSnap])

Attributes

Source
Snapshot.scala
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
object Snapshot

Attributes

Source
Snapshot.scala
Supertypes
class Object
trait Matchable
class Any
Self type
Snapshot.type
final case class TableSnap(name: String, columns: List[ColumnSnap], indexes: List[IndexSnap])

Attributes

Source
Snapshot.scala
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all