PostgreSQLDatabase

Description

The PostgreSQLDatabase object can be used to connect to a PostgreSQL database server.

This object was introduced in InCore 2.4.

› Inherits:NetworkDatabase

Properties

Example

import InCore.Foundation 2.5
import InCore.Database 2.5

Application {
    PostgreSQLDatabase {
        user: "postgres"
        password: "postgres"
        server: "localhost"

        sqlQueries: [
            DatabaseSqlQuery {
                id: checkVersionQuery
                query: ("SELECT version();" )
                onErrorOccurred: console.log(errorString)
                onResultsChanged: console.log(JSON.stringify(results))
            }
        ]
    }

    onCompleted: checkVersionQuery.execute()
}