# src/allographer/schema_builder/models/column

Theme:

- Index

Search:
Group by:

# Imports

../enums

# Types

    Column = ref object
      name*: string
      typ*: RdbTypeKind
      isIndex*: bool
      isNullable*: bool
      isUnsigned*: bool
      isUnique*: bool
      isAutoIncrement*: bool
      isDefault*: bool
      isUpdatedAt*: bool
      defaultBool*: bool
      defaultInt*: int
      defaultFloat*: float
      defaultString*: string
      defaultJson*: JsonNode
      defaultDatetime*: DefaultDateTime
      foreignOnDelete*: ForeignOnDelete
      commentContent*: string
      isCommentNull*: bool
      info*: JsonNode
      checksum*: string
      previousName*: string
      migrationType*: ColumnMigrationType
      usecaseType*: UsecaseType

# Procs

    proc add(c: Column): Column {....raises: [], tags: [], forbids: [].}

    proc autoIncrement(c: Column): Column {....raises: [], tags: [], forbids: [].}

    proc bigInteger(_: type Column; name: string): Column

    proc binary(_: type Column; name: string): Column

    proc boolean(_: type Column; name: string): Column

    proc change(c: Column): Column {....raises: [], tags: [], forbids: [].}

    proc char(_: type Column; name: string; maxLength: int): Column

    proc comment(c: Column; arg: type nil): Column {....raises: [], tags: [],
        forbids: [].}

    proc comment(c: Column; value: string): Column {....raises: [], tags: [],
        forbids: [].}

    proc date(_: type Column; name: string): Column

    proc datetime(_: type Column; name: string): Column

    proc decimal(_: type Column; name: string; maximum: int; digit: int): Column

    proc default(c: Column): Column {....raises: [], tags: [], forbids: [].}

    proc default(c: Column; value: bool): Column {....raises: [], tags: [], forbids: [].}

    proc default(c: Column; value: DefaultDateTime): Column {....raises: [], tags: [],
        forbids: [].}

    proc default(c: Column; value: float): Column {....raises: [], tags: [],
        forbids: [].}

    proc default(c: Column; value: int): Column {....raises: [], tags: [], forbids: [].}

    proc default(c: Column; value: JsonNode): Column {....raises: [], tags: [],
        forbids: [].}

    proc default(c: Column; value: string): Column {....raises: [], tags: [],
        forbids: [].}

    proc double(_: type Column; name: string; maximum: int; digit: int): Column

    proc dropColumn(_: type Column; name: string): Column

    proc enumField(_: type Column; name: string; options: openArray[string]): Column

    proc float(_: type Column; name: string): Column

    proc foreign(_: type Column; name: string): Column

    proc increments(_: type Column; name: string): Column

    proc index(c: Column): Column {....raises: [], tags: [], forbids: [].}

    proc integer(_: type Column; name: string): Column

    proc json(_: type Column; name: string): Column

    proc longText(_: type Column; name: string): Column

    proc mediumInteger(_: type Column; name: string): Column

    proc mediumText(_: type Column; name: string): Column

    proc nullable(c: Column): Column {....raises: [], tags: [], forbids: [].}

    proc onDelete(self: Column; kind: ForeignOnDelete): Column {....raises: [],
        tags: [], forbids: [].}

    proc onTable(self: Column; table: string): Column {....raises: [], tags: [],
        forbids: [].}

    proc reference(self: Column; column: string): Column {....raises: [], tags: [],
        forbids: [].}

    proc renameColumn(_: type Column; src, dest: string): Column

    proc smallInteger(_: type Column; name: string): Column

    proc softDelete(_: type Column): Column

    proc strForeign(_: type Column; name: string; length = 256): Column

    proc string(_: type Column; name: string; length = 256): Column

    proc text(_: type Column; name: string): Column

    proc time(_: type Column; name: string): Column

    proc timestamp(_: type Column; name: string): Column

    proc timestamps(_: type Column): Column

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

    proc unique(c: Column): Column {....raises: [], tags: [], forbids: [].}

    proc unsigned(c: Column): Column {....raises: [], tags: [], forbids: [].}

    proc uuid(_: type Column; name: string): Column