Create Namespace snippet
Does anyone have a snippet to create the Namespace and database with defaults in one command?
Something like:
do ##class(Utils.Namespace).Create(Name)
Please share?
Thank you in advance!
Does anyone have a snippet to create the Namespace and database with defaults in one command?
Something like:
do ##class(Utils.Namespace).Create(Name)
Please share?
Thank you in advance!
There are two examples, at code.intersystems.com
Will try, thanks.
Take a look at CREATE DATABASE
FROM the Docs: TheCREATE DATABASE command creates a namespace and two associated databases. This allows you to create a namespace within SQL.
http://docs.intersystems.com/latest/csp/docbook/DocBook.UI.Page.cls?KEY=RSQL_createdatabase
Thanks Andreas, that's interesting!
It's getting even more interesting with Web Terminal where is the sql mode enabled:
But "CREATE DATABASE" SQL expression creates only the Namespace and Database, but it doesn't create the default web app and the CSP/Namespace folder in case if you need it too.