view.schemaCreate( schema-name as String, permissions as Sequence ) as (Number|String)
This function creates a new relational schema in the Schema database. The schema id is returned. Every SQL deployment must include a default schema, called "main," as shown in the example below.
This schema is typically created for Range Views. However, such a schema can also contain Template Views. Note that Range Views cannot be created in a schema created by a Template View.
const view = require('/MarkLogic/views'); view.schemaCreate('main', [] ); // Create a new schema, named 'main', using the default permissions.
Stack Overflow: Get the most useful answers to questions from the MarkLogic community, or ask your own question.