# gizmodel/sql/parsecolumn

The SQL parser: columns, constraints, sequences and type names.

```gizlang
import * as Parsecolumn from "gizmodel/sql/parsecolumn";
```

## Methods

### `Parser.signedInt`

```gizlang
function Parser.signedInt(self: mut Parser): i64
```

Effects: fail, alloc.

### `Parser.skipParens`

```gizlang
function Parser.skipParens(self: mut Parser): void
```

Effects: fail.

### `Parser.indexColumn`

```gizlang
function Parser.indexColumn(self: mut Parser): Vec<string>
```

An index column: its name and an operator class naming a vector metric, if any. Expressions
other than a column are not indexed.

Effects: fail, alloc.

### `Parser.tableConstraint`

```gizlang
function Parser.tableConstraint(self: mut Parser): Constraint
```

Effects: fail, read, alloc.

### `Parser.nullsDistinct`

```gizlang
function Parser.nullsDistinct(self: mut Parser): string
```

NULLS [NOT] DISTINCT of a unique key: "nulls not distinct" when its NULLs are equal, else "".

Effects: fail, alloc.

### `Parser.rawParens`

```gizlang
function Parser.rawParens(self: mut Parser): string
```

The text between a pair of parentheses, as written (any tokens).

Effects: fail, alloc.

### `Parser.sequenceOptions`

```gizlang
function Parser.sequenceOptions(self: mut Parser): string
```

A sequence's options (CREATE SEQUENCE, an identity column's): START, INCREMENT, MINVALUE, MAXVALUE, CYCLE as the
sequence's text (sequence.giz sequenceText); CACHE, ORDER, AS, OWNED BY and SEQUENCE NAME change nothing.

Effects: fail, alloc.

### `Parser.identitySpec`

```gizlang
function Parser.identitySpec(self: mut Parser): string
```

GENERATED {ALWAYS | BY DEFAULT [ON NULL]} AS IDENTITY [(options)] after GENERATED: "a", "d" or "n" (ON NULL: a given
NULL takes the next value too), then "\u0001" and the sequence's text when options are given.

Effects: fail, alloc.

### `Parser.columnSpec`

```gizlang
function Parser.columnSpec(self: mut Parser): ColumnSpec
```

Effects: fail, read, alloc.

### `Parser.typeName`

```gizlang
function Parser.typeName(self: mut Parser): string
```

Effects: fail, alloc.

### `Parser.userMapping`

```gizlang
function Parser.userMapping(self: Parser): bool
```

Whether the next words are USER MAPPING (a catalog object, not a role).

Effects: fail, alloc.

### `Parser.catalogKind`

```gizlang
function Parser.catalogKind(self: mut Parser): string
```

The kind of a PostgreSQL object GizDB keeps in its catalog but does not use, as CREATE, ALTER
and DROP name it ("" when the next words name none).

Effects: fail, alloc.

