postgrelize / AllowNull
Variable: AllowNull ​
constAllowNull:ModelPropertyDecorator& ((argument?) =>ModelPropertyDecorator)
Defined in: src/decorators/column-decorators.ts:78
Sets allowNull. Usable bare (@AllowNull, meaning true) or called.
Param ​
allowNull
Whether NULL is allowed.
Default Value ​
ts
trueReturns ​
An attribute decorator.
Example ​
ts
class User extends Model {
@AllowNull(false)
@Column(DataTypes.TEXT)
name!: string;
}