postgres.ql
Constructor | Description |
---|---|
Connection(_connection) |
Function | Description |
---|---|
native fun isConnected() | Check if the connection is connected. |
native fun prepareStatement(statementString) | Prepare a statement for execution without any parameters given yet. |
native fun prepareStatement(statementString, paramList) | Prepare a statement for execution with pre populated parameters. |
native fun query(query) | Query the database. |
native fun fetchOne(query) | Fetch one row from the database. |
native fun fetchAll(query) | Fetch all rows from the database. |
native fun update(query) | Update entries in the database. |
native fun execute(query) | Executes a query that does not return any data. |
native fun beginTransaction() | Begins a transaction for executing multiple queries. |
native fun commit() | Commits a transaction. |
native fun rollback() | Rolls back a transaction. |
native fun disconnect() | Disconnect from the database. |
Prepare a statement for execution without any parameters given yet.
statementString
( string )
|
The statement to prepare |
The prepared statement
Prepare a statement for execution with pre populated parameters.
statementString
( string )
|
The statement to prepare |
paramList
( list )
|
The list of parameters to prepare |
The prepared statement
Query the database.
query
|
The query string to execute. Either a string or a PreparedStatement |
The result of the query, containing a ResultSet
Fetch one row from the database.
query
( string )
|
The query string to execute. Either a string or a PreparedStatement |
The result of the query, containing a list of the resulting row
Fetch all rows from the database.
query
|
The query string to execute. Either a string or a PreparedStatement |
The result of the query, containing a 2D list of the resulting rows
Update entries in the database.
query
|
The query string to execute. Either a string or a PreparedStatement |
How many rows were updated
Executes a query that does not return any data.
query
|
The query string to execute. Either a string or a PreparedStatement |
true
if the query returned any ResultSets, false
otherwise
Begins a transaction for executing multiple queries.
Commits a transaction.
Rolls back a transaction.
Disconnect from the database.