Register the schema, app and user
Register the database schema, application, and user by using the
dbsync_srvapp.register_central_app_params() function with a JSON schema file,
application ID, and user ID as parameters. User auto-registration can be achieved with the
dbsync_srvapp.auto_register_user() function.
User auto-registration
Before calling the
dbsync_srvapp.register_central_app_params() function, if
needed, it is possible to enable automatic DB Sync user registration with the following function
call:LET s = dbsync_srvapp.auto_register_user( app_id , user_id, user_name )
IF s<0 THEN EXIT PROGRAM -1 END IFThis function indicates to the DB Sync system that the provided user_id is authenticated and validated, and can be automatically registered in the DB Sync system, if this user identifier has not yet been filed.
Schema / app / user registration
Declare the DB Sync schema, application and user
with:
CALL dbsync_srvapp.register_central_app_params( schema_filename,
app_id , user_id )The schema_filename must be the JSON file containing the database schema definition.
The app_id parameter identifies the server-side application in the DB Sync system.
The user_id parameter identifies the end user which is using the current server-side app.