Skip to main content

Class: StringPropertyModel

Models a string property.

Extends

Constructors

new StringPropertyModel()

new StringPropertyModel(state: Readonly<StringPropertyModelState>): StringPropertyModel

Parameters

ParameterType
stateReadonly<StringPropertyModelState>

Returns

StringPropertyModel

Overrides

ScalarPropertyModel.constructor

Defined in

packages/verse-core/src/model/model.ts:1267

Accessors

column

get column(): undefined | string

Returns

undefined | string

Inherited from

ScalarPropertyModel.column

Defined in

packages/verse-core/src/model/model.ts:1112


convert

get convert(): undefined | ConversionModel

Returns

undefined | ConversionModel

Inherited from

ScalarPropertyModel.convert

Defined in

packages/verse-core/src/model/model.ts:1168


generate

get generate(): undefined | GeneratorModel

Returns

undefined | GeneratorModel

Inherited from

ScalarPropertyModel.generate

Defined in

packages/verse-core/src/model/model.ts:1151


maxLength

get maxLength(): undefined | number

Returns

undefined | number

Defined in

packages/verse-core/src/model/model.ts:1271


name

get name(): string

Returns

string

Inherited from

ScalarPropertyModel.name

Defined in

packages/verse-core/src/model/model.ts:1108


nullable

get nullable(): undefined | boolean

Returns

undefined | boolean

Inherited from

ScalarPropertyModel.nullable

Defined in

packages/verse-core/src/model/model.ts:1138


parent

get parent(): EntityModel<any, any>

Returns the parent model element.

Returns

EntityModel<any, any>

The parent model element.

Inherited from

ScalarPropertyModel.parent

Defined in

packages/verse-core/src/model/model.ts:1204


principal

get principal(): undefined | ScalarPropertyModel

Returns

undefined | ScalarPropertyModel

Inherited from

ScalarPropertyModel.principal

Defined in

packages/verse-core/src/model/model.ts:1208


state

get protected state(): StringPropertyModelState

Returns

StringPropertyModelState

Overrides

ScalarPropertyModel.state

Defined in

packages/verse-core/src/model/model.ts:1283


storeGenerated

get storeGenerated(): boolean

Returns

boolean

Inherited from

ScalarPropertyModel.storeGenerated

Defined in

packages/verse-core/src/model/model.ts:1164


type

get type(): undefined | SqlType

Returns

undefined | SqlType

Inherited from

ScalarPropertyModel.type

Defined in

packages/verse-core/src/model/model.ts:1125


valueCtor

get protected valueCtor(): StringConstructor

Returns

StringConstructor

Overrides

ScalarPropertyModel.valueCtor

Defined in

packages/verse-core/src/model/model.ts:1287

Methods

accept()

accept<T, S>(visitor: ModelVisitor<T, S>, state?: S): T

Accepts a visitor and returns the result of visiting this model element.

Type Parameters

Type ParameterDefault type
T-
Sunknown

Parameters

ParameterTypeDescription
visitorModelVisitor<T, S>The visitor to accept.
state?SAn optional state to pass to the visitor.

Returns

T

The result of visiting this model element.

Overrides

ScalarPropertyModel.accept

Defined in

packages/verse-core/src/model/model.ts:1299


equals()

equals(other: unknown): boolean

Checks if the current object is equal to the provided object.

Parameters

ParameterTypeDescription
otherunknownThe object to compare with.

Returns

boolean

Whether the objects are equal or not.

Overrides

ScalarPropertyModel.equals

Defined in

packages/verse-core/src/model/model.ts:1303


hashCode()

hashCode(): number

Returns the hash code of this object.

Returns

number

The hash code.

Overrides

ScalarPropertyModel.hashCode

Defined in

packages/verse-core/src/model/model.ts:1312


merge()

merge(override?: PropertyModel): any

Parameters

ParameterType
override?PropertyModel

Returns

any

Inherited from

ScalarPropertyModel.merge

Defined in

packages/verse-core/src/model/model.ts:1186


rewrite()

rewrite(rewriter: ModelRewriter): AbstractModel

Rewrite method for processing a given model with a rewriter.

Parameters

ParameterTypeDescription
rewriterModelRewriterThe rewriter to use for rewriting the model.

Returns

AbstractModel

The rewritten model.

Inherited from

ScalarPropertyModel.rewrite

Defined in

packages/verse-core/src/model/model.ts:55


toJSON()

toJSON(): string

Returns a JSON representation of this model element.

Returns

string

The JSON representation.

Inherited from

ScalarPropertyModel.toJSON

Defined in

packages/verse-core/src/model/model.ts:82


toObject()

toObject(): {column: undefined | string;convert: undefined | {read: string;write: string; };generate: undefined | {default: unknown;on: undefined | "add";sequence: undefined | string;using: undefined | Generator; };kind: "string";maxLength: undefined | number;name: string;nullable: undefined | boolean;type: undefined | SqlType; }

Returns this instance as a plain object.

Returns

{column: undefined | string;convert: undefined | {read: string;write: string; };generate: undefined | {default: unknown;on: undefined | "add";sequence: undefined | string;using: undefined | Generator; };kind: "string";maxLength: undefined | number;name: string;nullable: undefined | boolean;type: undefined | SqlType; }

The plain object.

column

column: undefined | string

convert

convert: undefined | {read: string;write: string; }

generate

generate: undefined | {default: unknown;on: undefined | "add";sequence: undefined | string;using: undefined | Generator; }

kind

kind: string = "string"

maxLength

maxLength: undefined | number

name

name: string

nullable

nullable: undefined | boolean

type

type: undefined | SqlType

Overrides

ScalarPropertyModel.toObject

Defined in

packages/verse-core/src/model/model.ts:1291


withColumn()

withColumn(column: string): any

Parameters

ParameterType
columnstring

Returns

any

Inherited from

ScalarPropertyModel.withColumn

Defined in

packages/verse-core/src/model/model.ts:1116


withConvert()

withConvert(convert: ConversionModel): any

Parameters

ParameterType
convertConversionModel

Returns

any

Inherited from

ScalarPropertyModel.withConvert

Defined in

packages/verse-core/src/model/model.ts:1177


withGenerate()

withGenerate(generate: GeneratorModel): any

Parameters

ParameterType
generateGeneratorModel

Returns

any

Inherited from

ScalarPropertyModel.withGenerate

Defined in

packages/verse-core/src/model/model.ts:1155


withMaxLength()

withMaxLength(maxLength: number): StringPropertyModel

Parameters

ParameterType
maxLengthnumber

Returns

StringPropertyModel

Defined in

packages/verse-core/src/model/model.ts:1275


withNullable()

withNullable(nullable: boolean): any

Parameters

ParameterType
nullableboolean

Returns

any

Inherited from

ScalarPropertyModel.withNullable

Defined in

packages/verse-core/src/model/model.ts:1142


withType()

withType(type: SqlType): any

Parameters

ParameterType
typeSqlType

Returns

any

Inherited from

ScalarPropertyModel.withType

Defined in

packages/verse-core/src/model/model.ts:1129