Picture of Tobias 1810
Registered 10 years 327 days
Tobias 1810 Saturday, 2 March 2024, 03:12 PM
Documentation about the JavaScript Database Type creation syntax

Is there any documentation about the syntax of the database Type creation:

i.e.: "type": "BIGSERIAL PRIMARY KEY NOT NULL"

What keywords are allowed? In which order? How to Create an Index?

Of course, the Type is clear and the type in the example is the primary key and must not be null. But what about additional commands, like indexing?

Andreas Fink
Moderator Registered 13 years 109 days
Andreas Fink (innovaphone) Monday, 4 March 2024, 11:03 AM
Re: Documentation about the JavaScript Database Type creation syntax
Hello Tobias,

the type property in the database part of the config.json is a direct mapping to PostgreSQL types.

You have to make sure that the type you define here maps to one of the types defined in the config.json documentation ("string", "int", "unsigned", "long", "ulong64", "bool").


However, it is important to understand, that the database definition in the config.json is only required in case where you have no server side JavaScript code and rely solely on the client side framework ( https://sdk.innovaphone.com/14r1/doc/appgeneric.htm#client ).

In case you have JavaScript code running on the App Service you can use the Database JavaScript Library for App Services ( https://sdk.innovaphone.com/14r1/doc/reference.htm#JS_library_service ). With this library you have the possibility to execute any statement directly (by using "exec" function). This way you could set up an Index, for example.

Best Regards
Andreas Fink




← You can define your color theme preference here