Shorthand for creating an integer field and marking it as the primary field
()
| 58 | |
| 59 | /** Shorthand for creating an integer field and marking it as the primary field */ |
| 60 | id(): this { |
| 61 | this._data = { |
| 62 | field: this._data.field, |
| 63 | ...ID_FIELD, |
| 64 | _kind: 'finished', |
| 65 | }; |
| 66 | |
| 67 | if (this._collection) this.primary(); |
| 68 | |
| 69 | return this; |
| 70 | } |
| 71 | |
| 72 | options(options: FieldOveriewBuilderOptions): this { |
| 73 | assert(this._data._kind !== 'initial', 'Cannot configure field before specifing a type'); |
no test coverage detected