{"modulePath":"github.com/cygnetdigital/roachdiff","version":"v1.3.1","isLatest":true,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package model\n\n## Types\n\n```go\ntype Column struct {\n\tTable *Table\n\tName  string\n\tTree  *tree.ColumnTableDef\n}\n```\n\n```go\ntype ColumnList struct {\n\t// contains filtered or unexported fields\n}\n```\n\n```go\nfunc (cd *ColumnList) All() []*Column\n```\n\n```go\nfunc (cd *ColumnList) Find(name string) (*Column, bool)\n```\n\n```go\ntype Constraint struct {\n\tTable *Table\n\tTree  tree.ConstraintTableDef\n\tName  string\n}\n```\n\n```go\nfunc (c *Constraint) Equal(n *Constraint) bool\n```\n\n```go\ntype ConstraintList struct {\n\t// contains filtered or unexported fields\n}\n```\n\n```go\nfunc (il *ConstraintList) All() []*Constraint\n```\n\n```go\nfunc (il *ConstraintList) Find(name string) (*Constraint, bool)\n```\n\n```go\ntype Enum struct {\n\tName   string\n\tValues EnumValueList\n\tEnum   *tree.CreateType\n}\n```\nEnum represents the declarative state of a \\`CREATE TYPE \\_ AS ENUM\\` statement\n\n```go\nfunc NewEnum(ct *tree.CreateType) (*Enum, error)\n```\nNewEnum parses a CREATE TYPE statement and returns an Enum\n\n```go\ntype EnumList struct {\n\t// contains filtered or unexported fields\n}\n```\n\n```go\nfunc (el *EnumList) All() []*Enum\n```\n\n```go\nfunc (el *EnumList) Find(name string) (*Enum, bool)\n```\nFind enum by name\n\n```go\ntype EnumValueList struct {\n\t// contains filtered or unexported fields\n}\n```\n\n```go\nfunc (ev *EnumValueList) All() []string\n```\n\n```go\nfunc (ev *EnumValueList) Find(v string) bool\n```\n\n```go\ntype Index struct {\n\tTable *Table\n\tName  string\n\tTree  *tree.CreateIndex\n}\n```\n\n```go\ntype IndexList struct {\n\t// contains filtered or unexported fields\n}\n```\nIndexList ,,,\n\n```go\nfunc (il *IndexList) All() []*Index\n```\n\n```go\nfunc (il *IndexList) Find(name string) (*Index, bool)\n```\n\n```go\ntype Model struct {\n\tTables *TableList\n\tEnums  *EnumList\n}\n```\nModel is the declarative representation of a sql schema\n\n```go\nfunc NewModel(sql string) (*Model, error)\n```\nNewModel parses a set of \\`CREATE (TABLE|ENUM)\\` statements to produce a model\n\n```go\ntype Table struct {\n\tName        string\n\tTree        *tree.CreateTable\n\tColumns     *ColumnList\n\tIndexes     *IndexList\n\tConstraints *ConstraintList\n}\n```\nTable represents the declarative state of a \\`CREATE TABLE\\` statement\n\n```go\nfunc NewTable(ct *tree.CreateTable) (*Table, error)\n```\nNewTable parses a \\`CREATE TABLE\\` statement to produce a declarative representation of the table state\n\n```go\ntype TableList struct {\n\t// contains filtered or unexported fields\n}\n```\n\n```go\nfunc (tl *TableList) All() []*Table\n```\n\n```go\nfunc (tl *TableList) Find(name string) (*Table, bool)\n```\nFind table by name\n\n","path":"github.com/cygnetdigital/roachdiff/pkg/diff/model","name":"model","synopsis":"","isRedistributable":true}
