Class: abstract
ScalarPropertyModel
Base class for scalar property models.
Extends
Extended by
Constructors
new ScalarPropertyModel()
protected
new ScalarPropertyModel(state
:Readonly
<ScalarPropertyModelState
>):ScalarPropertyModel
Parameters
Parameter | Type |
---|---|
state | Readonly <ScalarPropertyModelState > |
Returns
Overrides
Defined in
packages/verse-core/src/model/model.ts:1100
Accessors
column
get
column():undefined
|string
Returns
undefined
| string
Defined in
packages/verse-core/src/model/model.ts:1112
convert
get
convert():undefined
|ConversionModel
Returns
undefined
| ConversionModel
Defined in
packages/verse-core/src/model/model.ts:1168
generate
get
generate():undefined
|GeneratorModel
Returns
undefined
| GeneratorModel
Defined in
packages/verse-core/src/model/model.ts:1151
name
get
name():string
Returns
string
Overrides
Defined in
packages/verse-core/src/model/model.ts:1108
nullable
get
nullable():undefined
|boolean
Returns
undefined
| boolean
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.
Overrides
Defined in
packages/verse-core/src/model/model.ts:1204
principal
get
principal():undefined
|ScalarPropertyModel
Returns
undefined
| ScalarPropertyModel
Defined in
packages/verse-core/src/model/model.ts:1208
state
get
protected
state():Readonly
<ScalarPropertyModelState
>
Returns
Readonly
<ScalarPropertyModelState
>
Defined in
packages/verse-core/src/model/model.ts:1200
storeGenerated
get
storeGenerated():boolean
Returns
boolean
Defined in
packages/verse-core/src/model/model.ts:1164
type
get
type():undefined
|SqlType
Returns
undefined
| SqlType
Defined in
packages/verse-core/src/model/model.ts:1125
valueCtor
get
abstract
protected
valueCtor():Newable
<unknown
>
Returns
Newable
<unknown
>
Defined in
packages/verse-core/src/model/model.ts:1175
Methods
accept()
abstract
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 Parameter | Default type |
---|---|
T | - |
S | unknown |
Parameters
Parameter | Type | Description |
---|---|---|
visitor | ModelVisitor <T , S > | The visitor to accept. |
state ? | S | An optional state to pass to the visitor. |
Returns
T
The result of visiting this model element.
Overrides
Defined in
packages/verse-core/src/model/model.ts:1234
equals()
equals(
other
:unknown
):boolean
Checks if the current object is equal to the provided object.
Parameters
Parameter | Type | Description |
---|---|---|
other | unknown | The object to compare with. |
Returns
boolean
Whether the objects are equal or not.
Overrides
Defined in
packages/verse-core/src/model/model.ts:1236
hashCode()
hashCode():
number
Returns the hash code of this object.
Returns
number
The hash code.
Overrides
Defined in
packages/verse-core/src/model/model.ts:1249
merge()
merge(
override
?:PropertyModel
):any
Parameters
Parameter | Type |
---|---|
override ? | PropertyModel |
Returns
any
Overrides
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
Parameter | Type | Description |
---|---|---|
rewriter | ModelRewriter | The rewriter to use for rewriting the model. |
Returns
The rewritten model.
Inherited from
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
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
; };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
; };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
; }
name
name:
string
nullable
nullable:
undefined
|boolean
type
type:
undefined
|SqlType
Overrides
Defined in
packages/verse-core/src/model/model.ts:1212
withColumn()
withColumn(
column
:string
):any
Parameters
Parameter | Type |
---|---|
column | string |
Returns
any
Defined in
packages/verse-core/src/model/model.ts:1116
withConvert()
withConvert(
convert
:ConversionModel
):any
Parameters
Parameter | Type |
---|---|
convert | ConversionModel |
Returns
any
Defined in
packages/verse-core/src/model/model.ts:1177
withGenerate()
withGenerate(
generate
:GeneratorModel
):any
Parameters
Parameter | Type |
---|---|
generate | GeneratorModel |
Returns
any
Defined in
packages/verse-core/src/model/model.ts:1155
withNullable()
withNullable(
nullable
:boolean
):any
Parameters
Parameter | Type |
---|---|
nullable | boolean |
Returns
any
Defined in
packages/verse-core/src/model/model.ts:1142
withType()
withType(
type
:SqlType
):any
Parameters
Parameter | Type |
---|---|
type | SqlType |
Returns
any