Model management
Functions
aws_cf:available(Record repo)->Bag of Charstring m
aws_cf:url_generator(Charstring name,Record repo,Charstring model,
Charstring version)->Charstring
download_textfile(Charstring path,Charstring file)->Charstring fullpath
Download file
in path
under sa_home()
github:url_generator(Charstring name,Record repo,Charstring model,
Charstring version)->Charstring
loadedsystem(Charstring file)->Boolean
Is master file
loaded?
loadedsystems()->Bag of Charstring
Table of loaded OSQL master files
loadsystem(Charstring d,Charstring file)->Charstring
Load master file
with OSQL commands in directory d
load_data(Charstring model,Charstring file)->Charstring
Load data file
in model
into database
migrate_database(Charstring model,Charstring file)->Charstring
Migrate unloaded database in file
of model
to current database schema
models:add_github_repo(Charstring name,Charstring organization,
Charstring repository,Charstring auth_token)->Boolean
models:add_official_repository(Charstring name,Charstring jwt)->Boolean
models:available()->Bag of Charstring
Same as models:available("default")
models:available(Charstring repo)->Bag of Charstring
Get models available as repo
models:create(Charstring model)->Charstring
Create a new user model
models:create_release(Charstring model,Charstring version)->Charstring
Create version
of model
- Unsigned.
models:create_release(Charstring model,Charstring version,Charstring ca_name,
Charstring pkey,Charstring pw)->Charstring
Create a signed release version
of model
using the supplied ca private
key and optional password for private key.
models:deploy(Vector of Charstring peers,Charstring model)->Stream of Charstring
Install model
on peers
models:deploy(Vector of Charstring peers,Charstring model,
Boolean upload_from_client)->Stream of Charstring
Install model
on peers
if upload_from_client
is true
then
the model is first uploaded from the local client to the nameserver before deployment.
models:files(Charstring model)->Bag of (Charstring,Charstring)
Relative paths to all files in user model
models:folder()->Charstring
This user's model folder
models:folder(Charstring model)->Charstring
The folder of user defined model
models:functions(Charstring model)->Bag of Function
Functions belonging to model
models:get_repository_configurations()->Record
models:import(Charstring model,Charstring version)->Charstring
same as models:import("default",model,version)
models:import(Charstring repo,Charstring model,Charstring version)->Charstring
Import version
of model
from models:repository with name repo
models:install(Charstring file,Charstring name,Charstring version)->Charstring
models:installed()->Bag of Charstring
Get a bag of all locally installed models.
models:is_published(Charstring repo,Charstring model,Charstring version)
->Boolean
Check if version
of model
is published on repo
models:is_published(Charstring model,Charstring version)->Boolean
same as models:is_published("default",model,version)
models:list()->Bag of Charstring
The current user defined models
models:load(Charstring model)->Charstring
Install user model
on Stream Server
models:loaded()->Bag of Charstring
The user models currently in database
models:load_local(Charstring model)->Charstring
Install local user model
models:publish(Charstring repo,Charstring model,Charstring version)->Charstring
Publish version
of model
on repo
. Note that you must
have created a local release with the model and version before
publishing it. See:
doc(apropos("models:create_release"))
models:publish(Charstring model,Charstring version)->Charstring
Same as models:publish("default",model,version)
models:repository(Charstring name)->Record
Stored function for keeping track of repositories to install
model from. name
must be unique and the record has the following
format:
{
"url": "http(s)://url.to.your.repo:port",
"base_path": "/models/",
"http_headers": {
"authorization": "token-for-auth",
"header2": "another header needed for connection",
...
"headerN"; "Header n"
}
}
You may add more fields to the record for your convenience but sa.enigne will not look at any other fields that these.
models:test(Charstring model)->Charstring
Load and execute tests of user model
models:update_repository_configurations(Record input)->Boolean
send_textfile_to_peer(Charstring peer,Charstring file)->Charstring fullpath
sfcz:pack_folder(Charstring folder,Charstring destination,
Vector of Charstring ignored)->Charstring
sfcz:unpack(Charstring file,Charstring destination,Boolean verbose)->Charstring
system_models:file(Charstring filename)->Charstring
Get the full file name of a system model file
system_models:folder()->Charstring
Get the full path name of system model file folder
system_models:folder(Charstring model)->Charstring
The folder of system defined model
system_models:load(Charstring model)->Charstring
Load system model named model
system_models:loaded()->Bag of Charstring
The system models currently in database
unload_database(Charstring model,Charstring file)->Charstring
Unload current user database to file
in model
unload_schema(Charstring model,Charstring file)->Charstring
Unload user model
into OSQL file
script
upload_folder_to_server(Charstring peer,Charstring subfolder_on_server,
Charstring model)->Bag of Charstring