The ExternalDatabase system operation provides the developer the option of connecting to an external SQL database, and obtaining data.
var database = new ExternalDatabase;
The host IP address of the external SQL database.
The port of the external SQL database.
The username of the user that has proper authorization access to the external SQL database.
The password of the user that has proper authorization access to the external SQL database.
The database property refers to the name of the database. The Cuneiform platform allows developers to create as many internal databases as they need.
The database query that is to be executed. This should be provided as a SQL query in the form of a string.
Makes a connection to the database after a value for database is provided.
Returns 1 if the database connection is successful, 0 is unsuccessful.
Disconnects from the database if a connection has been established earlier.
Returns 1 if the disconnection is successful, 0 is unsuccessful.
Obtains the query value provided for the query property and executes the SQL query.
Each element in the parent array corresponds to a row obtained from the query. Each of these elements (child array) correspond to a column in the row. Returns an empty array if no results are found.
The next part discusses the implementation of the HTTP system operation.