Ecto.ERD.Node (Ecto ERD v0.6.5)

View Source

Node struct.

  • If source is nil, then schema_module cannot be nil and node describes embedded schema.
  • If source is not nil and schema_module is not nil, then the node describes a regular schema.
  • If schema_module is nil, then source cannot be nil, and the node describes a source (table) that was automatically inferred from many-to-many relations.
  • If cluster is nil, then the node is rendered outside any cluster.

Summary

Functions

Set a cluster for the given node.

Types

t()

@type t() :: %Ecto.ERD.Node{
  cluster: nil | String.t(),
  fields: [Ecto.ERD.Field.t()],
  schema_module: nil | module(),
  source: nil | String.t()
}

Functions

set_cluster(node, cluster)

@spec set_cluster(t(), nil | String.t()) :: t()

Set a cluster for the given node.

A cluster is a group of nodes that are displayed together.