applySchema
applySchema(
db
,definables
,method
):Promise
<void
>
Defined in: schema/generator.ts:76
Generates and applies the full SurrealQL schema to a SurrealDB instance.
Parameters
Section titled “Parameters”Surreal
The SurrealDB instance to apply the schema to.
definables
Section titled “definables”Definable
[]
An array of Definable
entities (model classes and index definitions).
method
Section titled “method”SchemaApplicationMethod
= "error"
The method to use for schema application if a table already exists.
Returns
Section titled “Returns”Promise
<void
>