Class: SchemaGenerator
The SchemaGenerator class is used to generate SQL schema DDL statements corresponding to a given metadata model.
Extends
Constructors
new SchemaGenerator()
new SchemaGenerator():
SchemaGenerator
Returns
Inherited from
Methods
generate()
Parameters
Parameter | Type |
---|---|
metadata | Metadata |
Returns
SqlNode
[]
Defined in
packages/verse-core/src/db/schema.ts:30
visitBooleanProperty()
visitBooleanProperty(
booleanProperty
:BooleanPropertyModel
,state
?:unknown
):SqlNode
Parameters
Parameter | Type |
---|---|
booleanProperty | BooleanPropertyModel |
state ? | unknown |
Returns
Inherited from
ModelVisitor
.visitBooleanProperty
Defined in
packages/verse-core/src/model/visitor.ts:79
visitConcurrency()
visitConcurrency(
concurrency
:ConcurrencyModel
,state
?:unknown
):SqlNode
Parameters
Parameter | Type |
---|---|
concurrency | ConcurrencyModel |
state ? | unknown |
Returns
Inherited from
Defined in
packages/verse-core/src/model/visitor.ts:59
visitConversion()
visitConversion(
conversion
:ConversionModel
,state
?:unknown
):SqlNode
Parameters
Parameter | Type |
---|---|
conversion | ConversionModel |
state ? | unknown |
Returns
Inherited from
Defined in
packages/verse-core/src/model/visitor.ts:109
visitDateProperty()
visitDateProperty(
dateProperty
:DatePropertyModel
,state
?:unknown
):SqlNode
Parameters
Parameter | Type |
---|---|
dateProperty | DatePropertyModel |
state ? | unknown |
Returns
Inherited from
ModelVisitor
.visitDateProperty
Defined in
packages/verse-core/src/model/visitor.ts:84
visitEntity()
visitEntity(
entity
:EntityModel
<any
,any
>):SqlNode
Parameters
Parameter | Type |
---|---|
entity | EntityModel <any , any > |
Returns
Overrides
Defined in
packages/verse-core/src/db/schema.ts:48
visitForeignKey()
visitForeignKey(
foreignKey
:ForeignKeyModel
):SqlForeignKey
Parameters
Parameter | Type |
---|---|
foreignKey | ForeignKeyModel |
Returns
Overrides
Defined in
packages/verse-core/src/db/schema.ts:67
visitGenerator()
visitGenerator(
generator
:GeneratorModel
,state
?:unknown
):SqlNode
Parameters
Parameter | Type |
---|---|
generator | GeneratorModel |
state ? | unknown |
Returns
Inherited from
Defined in
packages/verse-core/src/model/visitor.ts:104
visitIntProperty()
visitIntProperty(
intProperty
:IntPropertyModel
,state
?:unknown
):SqlNode
Parameters
Parameter | Type |
---|---|
intProperty | IntPropertyModel |
state ? | unknown |
Returns
Inherited from
Defined in
packages/verse-core/src/model/visitor.ts:74
visitKey()
Parameters
Parameter | Type |
---|---|
key | KeyModel |
state ? | unknown |
Returns
Inherited from
Defined in
packages/verse-core/src/model/visitor.ts:49
visitModel()
Parameters
Parameter | Type |
---|---|
model | Model |
Returns
Overrides
Defined in
packages/verse-core/src/db/schema.ts:38
visitNavigationProperty()
visitNavigationProperty(
navigation
:NavigationPropertyModel
,state
?:unknown
):SqlNode
Parameters
Parameter | Type |
---|---|
navigation | NavigationPropertyModel |
state ? | unknown |
Returns
Inherited from
ModelVisitor
.visitNavigationProperty
Defined in
packages/verse-core/src/model/visitor.ts:94
visitNumberProperty()
visitNumberProperty(
numberProperty
:NumberPropertyModel
,state
?:unknown
):SqlNode
Parameters
Parameter | Type |
---|---|
numberProperty | NumberPropertyModel |
state ? | unknown |
Returns
Inherited from
ModelVisitor
.visitNumberProperty
Defined in
packages/verse-core/src/model/visitor.ts:89
visitScalarProperty()
visitScalarProperty(
scalarProperty
:ScalarPropertyModel
):SqlColumn
Parameters
Parameter | Type |
---|---|
scalarProperty | ScalarPropertyModel |
Returns
Overrides
ModelVisitor
.visitScalarProperty
Defined in
packages/verse-core/src/db/schema.ts:76
visitSequence()
visitSequence(
sequence
:SequenceModel
):SqlCreateSequence
Parameters
Parameter | Type |
---|---|
sequence | SequenceModel |
Returns
Overrides
Defined in
packages/verse-core/src/db/schema.ts:59
visitStringProperty()
visitStringProperty(
stringProperty
:StringPropertyModel
,state
?:unknown
):SqlNode
Parameters
Parameter | Type |
---|---|
stringProperty | StringPropertyModel |
state ? | unknown |
Returns
Inherited from
ModelVisitor
.visitStringProperty
Defined in
packages/verse-core/src/model/visitor.ts:69
visitValueObject()
visitValueObject(
valueObject
:ValueObjectModel
<any
>,state
?:unknown
):SqlNode
Parameters
Parameter | Type |
---|---|
valueObject | ValueObjectModel <any > |
state ? | unknown |
Returns
Inherited from
Defined in
packages/verse-core/src/model/visitor.ts:39
visitValueObjectProperty()
visitValueObjectProperty(
valueObjectProperty
:ValueObjectPropertyModel
,state
?:unknown
):SqlNode
Parameters
Parameter | Type |
---|---|
valueObjectProperty | ValueObjectPropertyModel |
state ? | unknown |
Returns
Inherited from
ModelVisitor
.visitValueObjectProperty