# src/allographer/schema_builder/models/table

Theme:

- Index

Search:
Group by:

# Imports

../enums, column

# Types

    Table = ref object
      name*: string
      columns*: seq[Column]
      primary*: seq[string]
      query*: seq[string]
      commentContent*: string
      checksum*: string
      previousName*: string
      migrationType*: TableMigrationType
      usecaseType*: UsecaseType

# Procs

    proc renameTo(self: Table; name: string): Table {....raises: [], tags: [],
        forbids: [].}

    proc smallName(self: Table): string {....raises: [], tags: [], forbids: [].}

  TableName -> tablename

    proc table(name: string): Table {....raises: [], tags: [], forbids: [].}

    proc table(name: string; columns: openArray[Column]; comment = ""): Table {.
        ...raises: [], tags: [], forbids: [].}

    proc table(name: string; columns: seq[Column]; primary: seq[string] = @[];
               comment = ""): Table {....raises: [], tags: [], forbids: [].}

    proc toSchema(self: Table): JsonNode {....raises: [], tags: [], forbids: [].}