Fantom

 

class sql::SqlConn

sys::Obj
  sql::SqlConn

Source

SqlConn manages a connection to a relational database. See pod-doc.

autoCommit

Bool autoCommit

Source

If auto-commit is true then each statement is executed and committed as an individual transaction. Otherwise statements are grouped into transaction which must be closed via commit or rollback.

close

Bool close()

Source

Close the database connection. Closing a connection already closed is a no-op. This method is guaranteed to never throw an exception. Return true if the connection was closed successfully or false if closed abnormally.

commit

Void commit()

Source

Commit all the changes made inside the current transaction.

isClosed

Bool isClosed()

Source

Return if close has been called.

meta

SqlMeta meta()

Source

Get the database meta-data

open

const static SqlConn open(Str uri, Str? username, Str? password)

Source

Open a connection to the database specified by the given JDBC uri and username/password credentials. Raise exception if connection cannot be established. See pod-doc.

rollback

Void rollback()

Source

Undo any changes made inside the current transaction.

sql

Statement sql(Str sql)

Source

Create a statement for this database.